Commit Graph

52771 Commits

Author SHA1 Message Date
Dan Gohman 5b3e05bcaa Start refactoring the inline cost estimation code so that it can be used
for purposes other than inlining.

llvm-svn: 83997
2009-10-13 18:24:11 +00:00
Chris Lattner 19788ca686 change simplifycfg to not duplicate 'unwind' instructions. Hopefully
this will increase the likelihood of common code getting sunk towards
the unwind.

llvm-svn: 83996
2009-10-13 18:13:05 +00:00
Chris Lattner 8d6d09379d convert to filecheck
llvm-svn: 83995
2009-10-13 18:10:05 +00:00
Chris Lattner 6f55a81bb9 rename test
llvm-svn: 83994
2009-10-13 18:08:21 +00:00
Dan Gohman 71ca652475 Make LoopUnswitch's cost estimation count Instructions, rather than
BasicBlocks, so that it doesn't blindly procede in the presence of
large individual BasicBlocks. This addresses a class of code-size
expansion problems.

llvm-svn: 83992
2009-10-13 17:50:43 +00:00
Chris Lattner aa61f41e56 rename ReleaseNotes-2.6.html -> ReleaseNotes.html
llvm-svn: 83990
2009-10-13 17:48:04 +00:00
Chris Lattner 123dd67f76 add Zero
llvm-svn: 83988
2009-10-13 17:47:06 +00:00
Jeffrey Yasskin f98e981cd0 Make the ExecutionEngine automatically remove global mappings on when their
GlobalValue is destroyed.  Function destruction still leaks machine code and
can crash on leaked stubs, but this is some progress.

llvm-svn: 83987
2009-10-13 17:42:08 +00:00
Chris Lattner faa0320f27 don't use dead loads as tests.
llvm-svn: 83985
2009-10-13 17:39:29 +00:00
Devang Patel c5cc659cfa "there is not any instruction with attached debug info in this module" does not mean "there is no debug info in this module". :)
llvm-svn: 83984
2009-10-13 17:35:35 +00:00
Bob Wilson 453a06e3ac Add some ARM instruction encoding bits.
Patch by Johnny Chen.

llvm-svn: 83983
2009-10-13 17:35:30 +00:00
Bob Wilson d26a26ae7e Fix regression introduced by r83894.
llvm-svn: 83982
2009-10-13 17:29:13 +00:00
Devang Patel e6f26a7415 Copy metadata when value is RAUW'd. It is debatable whether this is the right approach for custom metadata data in general. However, right now the only custom data user, "dbg", expects this behavior while FE is constructing llvm IR with debug info.
llvm-svn: 83977
2009-10-13 17:00:54 +00:00
Devang Patel 9bd98a440b Disable this test for now.
llvm-svn: 83975
2009-10-13 16:32:09 +00:00
Bob Wilson 0bc673de0d Fix a tab. Thanks to Johnny Chen for pointing it out.
llvm-svn: 83973
2009-10-13 15:27:23 +00:00
Duncan Sands 1008612b36 The eh.exception intrinsic only reads from memory, it doesn't
write to it.

llvm-svn: 83963
2009-10-13 09:24:02 +00:00
Duncan Sands f7ad620c62 Pacify the compiler (signed with unsigned comparison) by making
these constants unsigned.

llvm-svn: 83962
2009-10-13 09:23:11 +00:00
Nick Lewycky 9bc890425a Force memory use markers to have a ConstantInt for the size argument.
llvm-svn: 83960
2009-10-13 07:57:33 +00:00
Nick Lewycky e2782c7614 Teach BasicAA a little something about the atomic intrinsics: they can only
modify through the pointer they're given.

llvm-svn: 83959
2009-10-13 07:48:38 +00:00
Nick Lewycky 6f7d8347c1 Add new "memory use marker" intrinsics. These indicate lifetimes and invariant
sections of memory objects.

llvm-svn: 83953
2009-10-13 07:03:23 +00:00
Daniel Dunbar cdf01b5d82 Fix a -Asserts warning.
llvm-svn: 83950
2009-10-13 06:47:08 +00:00
Chris Lattner 799dd8538e remove dead header.
llvm-svn: 83943
2009-10-13 05:33:26 +00:00
Chris Lattner 278c12e1af remove notcast, it is now dead!
llvm-svn: 83938
2009-10-13 04:27:02 +00:00
Chris Lattner a24b2b8c88 remove two old and nearly useless tests.
llvm-svn: 83937
2009-10-13 04:25:24 +00:00
Devang Patel bd9c3a074d XFAIL these tests for now.
llvm-svn: 83933
2009-10-13 01:51:29 +00:00
Dan Gohman c4e367b854 Add a ceilLogBase2 function to APInt.
llvm-svn: 83932
2009-10-13 01:49:02 +00:00
Victor Hernandez 70e8505eb1 Memory dependence analysis was incorrectly stopping to scan for stores to a pointer at bitcast uses of a malloc call.
It should continue scanning until the malloc call, and this patch fixes that.

llvm-svn: 83931
2009-10-13 01:42:53 +00:00
Edward O'Callaghan a5314b83d1 Regenerate configure for rev. 83823 putback.
llvm-svn: 83930
2009-10-13 01:01:38 +00:00
Devang Patel 9da3cc2b2d Enable "debug info attached to an instruction" mode.
llvm-svn: 83925
2009-10-12 23:22:09 +00:00
Devang Patel 0f58bec599 Find enclosing subprogram info.
llvm-svn: 83922
2009-10-12 23:11:24 +00:00
Devang Patel 0af2a420cd Set default location for a function if it is not set.
llvm-svn: 83921
2009-10-12 23:10:55 +00:00
Kevin Enderby 11b32384f2 Fix two warnings about unused variables that are only used in assert() calls.
llvm-svn: 83917
2009-10-12 22:51:49 +00:00
Bob Wilson 5b07a903d4 Delete a comment that makes no sense to me. The statement that moving a CPE
before its reference is only supported on ARM has not been true for a while.
In fact, until recently, that was only supported for Thumb.  Besides that,
CPEs are always a multiple of 4 bytes in size, so inserting a CPE should have
no effect on Thumb alignment.

llvm-svn: 83916
2009-10-12 22:49:05 +00:00
Kevin Enderby 3f0b9b3db4 Fix a problem in the code where ARMAsmParser::ParseShift() second argument
should have been a pointer to a reference.

llvm-svn: 83915
2009-10-12 22:39:54 +00:00
Evan Cheng f815861591 Make licm debug message readable.
llvm-svn: 83908
2009-10-12 22:25:23 +00:00
Bob Wilson 3250e7769f Change CreateNewWater method to return NewMBB by reference.
llvm-svn: 83905
2009-10-12 21:39:43 +00:00
Bob Wilson cc121aa750 Last week, ARMConstantIslandPass was failing to converge for the
MultiSource/Benchmarks/MiBench/automotive-susan test.  The failure has
since been masked by an unrelated change (just randomly), so I don't have
a testcase for this now.  Radar 7291928.

The situation where this happened is that a constant pool entry (CPE) was
placed at a lower address than the load that referenced it.  There were in
fact 2 CPEs placed at adjacent addresses and referenced by 2 loads that were
close together in the code.  The distance from the loads to the CPEs was
right at the limit of what they could handle, so that only one of the CPEs
could be placed within range.  On every iteration, the first CPE was found
to be out of range, causing a new CPE to be inserted.  The second CPE had
been in range but the newly inserted entry pushed it too far away.  Thus the
second CPE was also replaced by a new entry, which in turn pushed the first
CPE out of range.  Etc.

Judging from some comments in the code, the initial implementation of this
pass did not support CPEs placed _before_ their references.  In the case
where the CPE is placed at a higher address, the key to making the algorithm
terminate is that new CPEs are only inserted at the end of a group of adjacent
CPEs.  This is implemented by removing a basic block from the "WaterList"
once it has been used, and then adding the newly inserted CPE block to the
list so that the next insertion will come after it.  This avoids the ping-pong
effect where CPEs are repeatedly moved to the beginning of a group of
adjacent CPEs.  This does not work when going backwards, however, because the
entries at the end of an adjacent group of CPEs are closer than the CPEs
earlier in the group.

To make this pass terminate, we need to maintain a property that changes can
only happen in some sort of monotonic fashion.  The fix used here is to require
that the CPE for a particular constant pool load can only move to lower
addresses.  This is a very simple change to the code and should not cause
any significant degradation in the results.

llvm-svn: 83902
2009-10-12 21:23:15 +00:00
Bob Wilson e4adae267e Another minor clean-up.
llvm-svn: 83897
2009-10-12 20:45:53 +00:00
Chris Lattner bf43817408 allow this testcase to pass with recent changes. The test hasn't been
producing any stores at all for a long time, but ".store." was in some
IR instruction names until recently.  This removal caused the test to
start failing.  Just make it reject any stores.

llvm-svn: 83895
2009-10-12 20:42:35 +00:00
Bob Wilson 196bf32ab0 Remove redundant parameter.
llvm-svn: 83894
2009-10-12 20:37:23 +00:00
Bob Wilson 3a7326e705 Use early exit to reduce indentation.
llvm-svn: 83874
2009-10-12 19:04:03 +00:00
Bob Wilson 3af34312d4 Change to return a value by reference.
llvm-svn: 83873
2009-10-12 19:01:12 +00:00
Bob Wilson c7a3cf4066 Add a typedef for an iterator.
llvm-svn: 83872
2009-10-12 18:52:13 +00:00
Dale Johannesen 06243d7bf2 Revert the kludge in 76703. I got a clean
bootstrap of FSF-style PPC, so there is some
reason to believe the original bug (which was
never analyzed) has been fixed, probably by
82266.

llvm-svn: 83871
2009-10-12 18:49:00 +00:00
Dale Johannesen 4c9f0e8f53 Fix warning.
llvm-svn: 83870
2009-10-12 18:45:32 +00:00
Chris Lattner 6208bc171a fix validation error pointed out by gabor (and the w3c :)
llvm-svn: 83868
2009-10-12 18:33:33 +00:00
Chris Lattner 7c6e0f22ad Improve bugpoint doc, patch by Timo Lindfors!
llvm-svn: 83865
2009-10-12 18:12:47 +00:00
Jeffrey Yasskin 406ac811ab Fix http://llvm.org/PR5160, to let CallbackVHs modify other ValueHandles on the
same Value without breaking things.

llvm-svn: 83861
2009-10-12 17:43:32 +00:00
Gabor Greif 001d74c312 another bunch of <tt>s
llvm-svn: 83860
2009-10-12 16:50:25 +00:00
Dan Gohman 32eed95a78 Remove a redundant member variable.
llvm-svn: 83857
2009-10-12 16:44:10 +00:00