Chris Lattner
818045f208
pull a simple method out of LICM into a new
...
Loop::hasLoopInvariantOperands method. Remove
a useless and confusing Loop::isLoopInvariant(Instruction)
method, which didn't do what you thought it did.
No functionality change.
llvm-svn: 113133
2010-09-06 01:05:37 +00:00
Dan Gohman
ad593f9d93
Revert 112442 and 112440 until the compile time problems introduced
...
by 112440 are resolved.
llvm-svn: 112692
2010-09-01 01:45:53 +00:00
Dan Gohman
d261381db5
Update the descriptions of NoModRef and ModRef to be consistent
...
with the descriptions of Mod and Ref.
llvm-svn: 112557
2010-08-30 23:47:24 +00:00
Chris Lattner
9e35d96cea
two changes: 1) make AliasSet hold the list of call sites with an
...
assertingvh so we get a violent explosion if the pointer dangles.
2) Fix AliasSetTracker::deleteValue to remove call sites with
by-pointer comparisons instead of by-alias queries. Using
findAliasSetForCallSite can cause alias sets to get merged
when they shouldn't, and can also miss alias sets when the
call is readonly.
#2 fixes PR6889, which only repros with a .c file :(
llvm-svn: 112452
2010-08-29 18:42:23 +00:00
Dan Gohman
9ea315c5ca
Make IVUsers iterative instead of recursive.
...
This has the side effect of reversing the order of most of
IVUser's results.
llvm-svn: 112442
2010-08-29 16:40:03 +00:00
Dan Gohman
636c57c5de
Switch ScalarEvolution's main Value*->SCEV* map from std::map
...
to DenseMap.
llvm-svn: 112281
2010-08-27 18:55:03 +00:00
Eric Christopher
6263463ccb
Fix header define to reflect the name of the file.
...
Patch by Adam Treat!
llvm-svn: 112077
2010-08-25 19:28:39 +00:00
Devang Patel
cf6c6b4038
Handle qualified constants that are directly folded by FE.
...
PR 7920.
llvm-svn: 111820
2010-08-23 18:25:56 +00:00
Dan Gohman
31ab7e6b8c
CreateTemporaryType doesn't needs its Context argument.
...
llvm-svn: 111687
2010-08-20 22:39:47 +00:00
Dan Gohman
072e7bdcd4
Introduce a new temporary MDNode concept. Temporary MDNodes are
...
not part of the IR, are not uniqued, and may be safely RAUW'd.
This replaces a variety of alternate mechanisms for achieving
the same effect.
llvm-svn: 111681
2010-08-20 22:02:26 +00:00
Chris Lattner
bd80bd5d69
move gep decomposition out of ValueTracking into BasicAA. The form of
...
decomposition that it is doing is very basicaa specific and is only used
by basicaa.
Now with less tree breakingness.
llvm-svn: 111433
2010-08-18 22:07:29 +00:00
Daniel Dunbar
3d68ce9eeb
Revert r111375, "move gep decomposition out of ValueTracking into BasicAA. The
...
form of", it doesn't pass tests.
llvm-svn: 111385
2010-08-18 18:43:08 +00:00
Owen Anderson
65795241db
Inform LazyValueInfo whenever a block is deleted, to avoid dangling pointer issues.
...
llvm-svn: 111382
2010-08-18 18:39:01 +00:00
Chris Lattner
2d584f0b0e
move gep decomposition out of ValueTracking into BasicAA. The form of
...
decomposition that it is doing is very basicaa specific and is only used
by basicaa.
llvm-svn: 111375
2010-08-18 18:22:17 +00:00
Dan Gohman
cc19893826
Revert r111031. The way LLVM defines loop invariance, the property of an
...
expression being loop invariant is not equivalent to the property of
properly dominating the loop header.
Other optimizations have also made this optimization less important.
llvm-svn: 111160
2010-08-16 17:34:25 +00:00
Dan Gohman
928cf9d77b
Placate overzealous compiler warnings.
...
llvm-svn: 111152
2010-08-16 17:01:55 +00:00
Dan Gohman
6d808db278
Move SCEVNAryExpr's virtual member functions out of line, and convert
...
them to iterators.
llvm-svn: 111140
2010-08-16 16:21:27 +00:00
Dan Gohman
3921a903bb
Specialize FoldingSetTrait<SCEV>, providing implementations of node
...
comparison and hash computation which don't require constructing
temporary ID values.
llvm-svn: 111131
2010-08-16 15:31:45 +00:00
Dan Gohman
c58d128eb8
Implement hasComputableLoopEvolution for Add, Mul, and Trunc operators,
...
since they can support trivial implementations. This avoids potentially
expensive traversals of the operands.
llvm-svn: 111031
2010-08-13 20:03:15 +00:00
Dan Gohman
2d7bf8c073
Make LoopPass::getContainedPass return a LoopPass* instead of a Pass*
...
and remove casts from all its callers.
llvm-svn: 110848
2010-08-11 20:34:43 +00:00
Dan Gohman
7e49302e9a
Rename and reorder the arguments to isImpliedCond, for consistency and clarity.
...
llvm-svn: 110750
2010-08-10 23:46:30 +00:00
Devang Patel
17606414a4
Add missing argument. CreateCompositeTypeEx() users, please verify.
...
llvm-svn: 110717
2010-08-10 20:22:49 +00:00
Devang Patel
8d0c79694e
Refactor.
...
llvm-svn: 110607
2010-08-09 21:39:24 +00:00
Dan Gohman
0c6a626902
Remove assignPassManager's default arguments. It's really
...
confusing to have different arguments for the same virtual
function at different levels of the class hierarchy.
llvm-svn: 110500
2010-08-07 01:25:32 +00:00
Dan Gohman
a581d6d202
Tidy up PMStack. Add a bunch of consts, use std::vector instead of
...
std::deque, since this is a stack and only supports push/pop on
one end, and remove an unimplemented declaration.
llvm-svn: 110495
2010-08-07 00:53:01 +00:00
Owen Anderson
f2fea95f2f
Reapply r110396, with fixes to appease the Linux buildbot gods.
...
llvm-svn: 110460
2010-08-06 18:33:48 +00:00
Dan Gohman
da3f592fb3
Implement a proper getModRefInfo for va_arg.
...
llvm-svn: 110458
2010-08-06 18:24:38 +00:00
Dan Gohman
66b637e4da
Add a comment.
...
llvm-svn: 110426
2010-08-06 02:04:07 +00:00
Owen Anderson
aadd8a89ca
Revert r110396 to fix buildbots.
...
llvm-svn: 110410
2010-08-06 00:23:35 +00:00
Dan Gohman
ecf79cf569
Make AA private, since subclasses shouldn't (aren't don't) access it directly.
...
llvm-svn: 110398
2010-08-05 23:44:45 +00:00
Owen Anderson
b9762c07cb
Don't use PassInfo* as a type identifier for passes. Instead, use the address of the static
...
ID member as the sole unique type identifier. Clean up APIs related to this change.
llvm-svn: 110396
2010-08-05 23:42:04 +00:00
Dan Gohman
9ded12adcb
Delete obsolete comments.
...
llvm-svn: 110277
2010-08-04 23:08:15 +00:00
Torok Edwin
967fc5164f
Add a missing function.
...
llvm-svn: 110195
2010-08-04 11:42:45 +00:00
Dan Gohman
aac19e4ffe
Remove PointerAccessInfo, which nothing was using.
...
llvm-svn: 110167
2010-08-03 23:08:10 +00:00
Dan Gohman
a087b90950
Thread const correctness through a bunch of AliasAnalysis interfaces and
...
eliminate several const_casts.
Make CallSite implicitly convertible to ImmutableCallSite.
Rename the getModRefBehavior for intrinsic IDs to
getIntrinsicModRefBehavior to avoid overload ambiguity with CallSite,
which happens to be implicitly convertible to bool.
llvm-svn: 110155
2010-08-03 21:48:53 +00:00
Dan Gohman
aabb615d52
Update some comments.
...
llvm-svn: 110092
2010-08-03 01:07:32 +00:00
Dan Gohman
6604a72154
Introduce a symbolic constant for ~0u for use with AliasAnalysis.
...
llvm-svn: 110091
2010-08-03 01:03:11 +00:00
Dan Gohman
e0489ffe8e
Add a convenient form of AliasAnalysis::alias for the case where the sizes
...
are unknown.
llvm-svn: 110090
2010-08-03 00:56:30 +00:00
Dan Gohman
68ac0492a4
Make SCEVUnknown a CallbackVH, so that it can be notified directly
...
of Value deletions and RAUWs, instead of relying on ScalarEvolution's
Scalars map being notified, as that's complicated at best, and
insufficient in general.
This means SCEVUnknown needs a non-trivial destructor, so introduce
a mechanism to allow ScalarEvolution to locate all the SCEVUnknowns.
llvm-svn: 110086
2010-08-02 23:49:30 +00:00
Dan Gohman
9d80b87a4d
Sketch up a preliminary Type-Based Alias Analysis implementation.
...
llvm-svn: 110077
2010-08-02 23:11:01 +00:00
Devang Patel
f18faa5945
Add explicit constructors. Patch by Renato Golin.
...
llvm-svn: 110072
2010-08-02 22:51:46 +00:00
Nick Lewycky
460d1a457b
LibCallAliasAnalysis uses multiple inheritance, so it needs to implement
...
getAdjustedAnalysisPointer. Part of a fix to PR7760.
llvm-svn: 109883
2010-07-30 20:19:09 +00:00
Eric Christopher
6a1da7b4a5
Speculatively revert r109705 since it seems to be causing some build bot
...
angst.
llvm-svn: 109718
2010-07-29 01:25:38 +00:00
Dan Gohman
ea1486b53c
Factor out some of the code for updating old SCEVUnknown values, and
...
extend it to handle the case where multiple RAUWs affect a single
SCEVUnknown.
Add a ScalarEvolution unittest to test for this situation.
llvm-svn: 109705
2010-07-29 00:17:55 +00:00
Dan Gohman
b4699b3002
Add some extra friend declarations to fix a gcc-4.0 compile error.
...
This is a temporary fix, until more elaborate changes are ready.
llvm-svn: 109593
2010-07-28 17:09:24 +00:00
Dan Gohman
2dcafa2402
Add a comment.
...
llvm-svn: 109565
2010-07-28 00:21:18 +00:00
Tobias Grosser
ebc6c0cf50
RegionInfo: Add getMaxRegionExit()
...
getMaxRegionExit returns the exit of the maximal refined region starting
at a specific basic block.
llvm-svn: 109496
2010-07-27 08:39:43 +00:00
Tobias Grosser
16789d79fe
Add function to query RegionInfo about loops.
...
* contains(Loop), * getOutermostLoop()
* Improve getNameStr() to return a sensible name, if basic blocks are not named.
llvm-svn: 109490
2010-07-27 04:17:13 +00:00
Dan Gohman
66b6f7d702
Use AssertingVH for InsertedValues and InsertedPostIncValues, to verify
...
that the values they refer to aren't being deleted underneath them.
Make sure these containters get cleared by clear(), which IndVarSimplify
and LSR both use before deleting instructions.
llvm-svn: 109478
2010-07-27 01:19:06 +00:00
Owen Anderson
12ab6162bf
Add an initial implementation of LazyValueInfo updating for JumpThreading. Disabled for now.
...
llvm-svn: 109424
2010-07-26 18:48:03 +00:00