1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-22 12:33:33 +02:00
Commit Graph

3263 Commits

Author SHA1 Message Date
Owen Anderson
712152a68e Pass the queried value by argument rather than in a member, in preparation for supporting PHI translation.
llvm-svn: 109701
2010-07-28 23:50:08 +00:00
Owen Anderson
670fd343a5 Get rid of LVIQuery as a distinct data structure, so that we don't have to initialize a new set of maps on every query.
llvm-svn: 109679
2010-07-28 22:07:25 +00:00
Daniel Dunbar
111cf008aa RegionInfo: Make sure to free cached nodes; Tobias, please check!
llvm-svn: 109650
2010-07-28 20:28:50 +00:00
Gabor Greif
4909c0a1f1 simplify
llvm-svn: 109585
2010-07-28 15:31:37 +00:00
Gabor Greif
9bb43864b1 use Value* constructor of CallSite to create potentially improper site, and test that
llvm-svn: 109580
2010-07-28 12:35:54 +00:00
Gabor Greif
f6966fafe3 use Value* constructor of CallSite to create potentially improper site
llvm-svn: 109579
2010-07-28 12:19:46 +00:00
Gabor Greif
e27a194ce5 simplify
llvm-svn: 109578
2010-07-28 10:57:28 +00:00
Gabor Greif
6dc7dec8c1 simplify
llvm-svn: 109577
2010-07-28 10:46:09 +00:00
Dan Gohman
2bea1e1572 Make SCEVCallbackVH::allUsesReplacedWith update the old SCEVUnknown
object, as it may still be referenced by SCEVs not cleaned up by the
use list traversal.

Also, in ScalarEvolution::forgetValue, only check for a SCEVUnknown
object for the original value, not for any value in the use list,
because other SCEVUnknown values aren't necessary obsolete at that
point.

llvm-svn: 109570
2010-07-28 01:09:07 +00:00
Dan Gohman
9a6ea54d94 Make SCEVCallbackVH::allUsesReplacedWith unconditionally delete
the old value.

llvm-svn: 109567
2010-07-28 00:28:25 +00:00
Owen Anderson
2d39891e91 Rearrange several datastructures in LazyValueInfo to improve compile time.
This is still not perfect, but better than it was before.

llvm-svn: 109563
2010-07-27 23:58:11 +00:00
Gabor Greif
ec0c7b2427 reintroduce original (asserting) semantics of CallSite(Instruction *II)
add instead a CallSite(Value* V) constructor that is consistent with ImmutableCallSize
and use that one in client code

llvm-svn: 109553
2010-07-27 22:53:28 +00:00
Gabor Greif
8c197e5dbb recommit simplification (originally r109504, backed out in r109508) now that problem in CallSiteBase is fixed
llvm-svn: 109547
2010-07-27 22:02:00 +00:00
Gabor Greif
981f3d3a31 back out r109504, breaks the bots
llvm-svn: 109508
2010-07-27 15:18:11 +00:00
Gabor Greif
90a627cfaa simplify
llvm-svn: 109504
2010-07-27 14:38:38 +00:00
Gabor Greif
aaf68e2e5a use ImmutableCallSite for const-corrgoodness
llvm-svn: 109503
2010-07-27 14:15:29 +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
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
9e0ae022d2 Fix SCEVExpander::visitAddRecExpr so that it remembers the induction variable
it inserted rather than using LoopInfo::getCanonicalInductionVariable to
rediscover it, since that doesn't work on non-canonical loops. This fixes
infinite recurrsion on such loops; PR7562.

llvm-svn: 109419
2010-07-26 18:28:14 +00:00
Dan Gohman
0627594a67 Use DominatorTree::properlyDominates instead of dominates with an
explicit inequality check.

llvm-svn: 109398
2010-07-26 17:34:05 +00:00
Dan Gohman
e6e38c1685 Eliminate getCanonicalInductionVariableIncrement's last user and
eliminate it.

llvm-svn: 109270
2010-07-23 21:34:51 +00:00
Dan Gohman
1d19d69faf Simplify this code; it can use the regular CFG utlities rather than
the BlockTraits abstractions.

llvm-svn: 109268
2010-07-23 21:25:16 +00:00
Dan Gohman
188a4d7d53 Micro-optimize SCEVComplexityCompare.
llvm-svn: 109267
2010-07-23 21:20:52 +00:00
Dan Gohman
2de2b0713e Add a const qualifier.
llvm-svn: 109266
2010-07-23 21:18:55 +00:00
Gabor Greif
346b13120a use cascading operator-> feature
llvm-svn: 109104
2010-07-22 13:49:27 +00:00
Gabor Greif
96a9f8c7c6 mass elimination of reliance on automatic iterator dereferencing
llvm-svn: 109103
2010-07-22 13:36:47 +00:00
Gabor Greif
197322c365 use -> instead of (*).
llvm-svn: 109094
2010-07-22 11:12:32 +00:00
Gabor Greif
e826ece8c2 cache dereferenced iterator
llvm-svn: 109093
2010-07-22 11:07:46 +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
859ffd353e Make NamedMDNode not be a subclass of Value, and simplify the interface
for creating and populating NamedMDNodes.

llvm-svn: 109061
2010-07-21 23:38:33 +00:00
Owen Anderson
b36d01c1b6 Add INSTANTIATE_AG_PASS, which combines RegisterPass<> with RegisterAnalysisGroup<> for pass registration.
llvm-svn: 109058
2010-07-21 23:07:00 +00:00
Owen Anderson
f8addbb0a1 Fix batch of converting RegisterPass<> to INTIALIZE_PASS().
llvm-svn: 109045
2010-07-21 22:09:45 +00:00
Jim Grosbach
4d3c808fd9 tidy up.
llvm-svn: 109038
2010-07-21 21:36:25 +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
Dan Gohman
45ba7b5c5c Fix SCEV denormalization of expressions where the exit value from
one loop is involved in the increment of an addrec for another
loop. This fixes rdar://8168938.

llvm-svn: 108863
2010-07-20 17:06:20 +00:00
Dan Gohman
61bb92a5ff Add a fast path for x - x.
llvm-svn: 108855
2010-07-20 16:53:00 +00:00
Dan Gohman
ac63cc9b2e Simplify this code; LoopInfo::getCanonicalInductionVariable will only
find integer induction variables.

llvm-svn: 108853
2010-07-20 16: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
Dan Gohman
64ebb77660 Change an argument from an Instruction* to a Value*, which is all
that is needed here.

llvm-svn: 108850
2010-07-20 16:34:50 +00:00
Dan Gohman
6a45181120 Minor code cleanups.
llvm-svn: 108848
2010-07-20 16:32:11 +00:00
Owen Anderson
5f218b8612 Speculatively revert r108813, in an attempt to get the self-host buildbots working again. I don't see why this patch
would cause them to fail the way they are, but none of the other intervening patches seem likely either.

llvm-svn: 108818
2010-07-20 08:26:15 +00:00
Owen Anderson
cf625d0179 Reapply r108794, a fix for the failing test from last time.
llvm-svn: 108813
2010-07-20 06:52:42 +00:00
Daniel Dunbar
3280e3aebf Revert r108794, "Separate PassInfo into two classes: a constructor-free
superclass (StaticPassInfo) and a constructor-ful subclass (PassInfo).", it is
breaking teh everything.

llvm-svn: 108805
2010-07-20 03:06:07 +00:00
Owen Anderson
3502f9a91b Separate PassInfo into two classes: a constructor-free superclass (StaticPassInfo) and a constructor-ful subclass (PassInfo).
llvm-svn: 108794
2010-07-20 01:19:58 +00:00
Dan Gohman
3a3e97cdbd Minor code simplification.
llvm-svn: 108793
2010-07-20 00:57:18 +00:00
Stuart Hastings
587ed4918c Correct line info for declarations/definitions. Radar 8063111.
llvm-svn: 108784
2010-07-19 23:56:30 +00:00
Gabor Greif
17c48ecd68 eliminate CallInst::ArgOffset
llvm-svn: 108522
2010-07-16 09:38:02 +00:00
Dan Gohman
1705ac2740 Fix the order that SCEVExpander considers add operands in so that
it doesn't miss an opportunity to form a GEP, regardless of the
relative loop depths of the operands. This fixes rdar://8197217.

llvm-svn: 108475
2010-07-15 23:38:13 +00:00
Dan Gohman
04768aa9a5 Teach ScalarEvolution how to fold trunc(undef) and anyext(undef) to undef.
This helps LSR behave more consistently on bugpoint-reduced testcases.

llvm-svn: 108451
2010-07-15 20:02:11 +00:00