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
Dan Gohman
e6e38c1685
Eliminate getCanonicalInductionVariableIncrement's last user and
...
eliminate it.
llvm-svn: 109270
2010-07-23 21:34:51 +00:00
Tobias Grosser
604a50cd71
Add new RegionInfo pass.
...
The RegionInfo pass detects single entry single exit regions in a function,
where a region is defined as any subgraph that is connected to the remaining
graph at only two spots.
Furthermore an hierarchical region tree is built.
Use it by calling "opt -regions analyze" or "opt -view-regions".
llvm-svn: 109089
2010-07-22 07:46:31 +00:00
Dan Gohman
fc3ee085a0
Disallow null as a named metadata operand.
...
Make MDNode::destroy private.
Fix the one thing that used MDNode::destroy, outside of MDNode itself.
One should never delete or destroy an MDNode explicitly. MDNodes
implicitly go away when there are no references to them (implementation
details aside).
llvm-svn: 109028
2010-07-21 18:54:18 +00:00
Jakob Stoklund Olesen
dcf78c06f8
Implement loop splitting analysis.
...
Determine which loop exit blocks need a 'pre-exit' block inserted.
Recognize when this would be impossible.
llvm-svn: 108941
2010-07-20 21:46:58 +00:00
Dan Gohman
0bfc6146bf
Make getOrInsertCanonicalInductionVariable guarantee that its
...
result is a PHINode*.
llvm-svn: 108852
2010-07-20 16:44:52 +00:00
Stuart Hastings
587ed4918c
Correct line info for declarations/definitions. Radar 8063111.
...
llvm-svn: 108784
2010-07-19 23:56:30 +00:00
Lang Hames
ac3a879f12
Switched to array_pod_sort as per Chris's suggestion.
...
llvm-svn: 108616
2010-07-17 09:21:53 +00:00
Lang Hames
48638f63ba
LoopSplitter - intended to split live intervals over loop boundaries.
...
Still very much under development. Comments and fixes will be forthcoming.
(This commit includes some small tweaks to LiveIntervals & LoopInfo to support the splitter)
llvm-svn: 108615
2010-07-17 07:34:01 +00:00
Tobias Grosser
97dc00d1d8
Add dump() to DominanceFrontier
...
llvm-svn: 108512
2010-07-16 05:59:39 +00:00
Eric Christopher
bc774d339c
80-columns
...
llvm-svn: 108228
2010-07-13 05:50:08 +00:00
Eric Christopher
ff925e91b9
Remove tab characters and 80-col.
...
llvm-svn: 108127
2010-07-12 05:26:37 +00:00