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
Gabor Greif
0b8d6a43c0
cache another dereferenced iterator
...
llvm-svn: 108421
2010-07-15 10:19:23 +00:00
Chris Lattner
2b2265a9c5
Fix PR7647, handling the case when 'To' ends up being
...
mutated by recursive simplification. This also enhances
ReplaceAndSimplifyAllUses to actually do a real RAUW
at the end of it, which updates any value handles
pointing to "From" to start pointing to "To". This
seems useful for debug info and random other VH users.
llvm-svn: 108415
2010-07-15 06:36:08 +00:00
Eli Friedman
f7ae898f2b
Revert r108401; it breaks bootstrap :(
...
llvm-svn: 108407
2010-07-15 05:09:31 +00:00
Eli Friedman
5d36d37a4a
Add AssertingVH which makes PR7647 break consistently.
...
llvm-svn: 108401
2010-07-15 04:46:14 +00:00
Dan Gohman
0af129aa1b
Add a lint check for mismatched return types, inspired by PR6944.
...
llvm-svn: 108162
2010-07-12 18:02:04 +00:00
Duncan Sands
f7b98e2b1e
Convert some tab stops into spaces.
...
llvm-svn: 108130
2010-07-12 08:16:59 +00:00
Chandler Carruth
6b1b1c63b9
Add parentheses around an || to correct the logic. Also silences a GCC warning
...
that was actually useful here.
Chris, please double check that this is the correct interpretation. I was
pretty sure, and ran it by Nick as well.
llvm-svn: 108129
2010-07-12 06:47:05 +00:00
Chris Lattner
d8288040c3
fix PR7429, a crash turning a load from a string into a float.
...
llvm-svn: 108113
2010-07-12 00:22:51 +00:00
Gabor Greif
0a544667f8
remove useless cast and fix typos in comment
...
llvm-svn: 107989
2010-07-09 16:42:04 +00:00
Gabor Greif
a2c75f904d
cache result of operator*
...
llvm-svn: 107988
2010-07-09 16:39:02 +00:00
Gabor Greif
e249fc8808
cache result of operator*
...
llvm-svn: 107982
2010-07-09 16:22:36 +00:00
Gabor Greif
1277447002
cache result of operator*
...
llvm-svn: 107978
2010-07-09 15:53:42 +00:00
Gabor Greif
9096841571
cache result of operator*
...
llvm-svn: 107977
2010-07-09 15:52:36 +00:00
Gabor Greif
6184b1a2fa
cache result of operator*
...
llvm-svn: 107976
2010-07-09 15:40:10 +00:00
Gabor Greif
6c80602356
cache result of operator*
...
llvm-svn: 107967
2010-07-09 14:28:41 +00:00
Gabor Greif
7bc80c7586
do not repeatedly dereference use_iterator
...
llvm-svn: 107963
2010-07-09 13:17:13 +00:00
Stuart Hastings
a3999081cf
Reverting r107918 and r107919. Radar 8063111.
...
llvm-svn: 107930
2010-07-08 23:25:39 +00:00
Stuart Hastings
b70d4e06e3
Fix decl/def debug info for template functions. Radar 8063111.
...
llvm-svn: 107919
2010-07-08 22:28:59 +00:00
Dan Gohman
dbfdd07710
Minore code simplification.
...
llvm-svn: 107777
2010-07-07 14:30:04 +00:00
Dan Gohman
2a08e2ce81
Remove interprocedural-basic-aa and associated code. The AliasAnalysis
...
interface needs implementations to be consistent, so any code which
wants to support different semantics must use a different interface.
It's not currently worthwhile to add a new interface for this new
concept.
Document that AliasAnalysis doesn't support cross-function queries.
llvm-svn: 107776
2010-07-07 14:27:09 +00:00
Gabor Greif
600c671ab6
conditionalize by CallInst::ArgOffset
...
llvm-svn: 107767
2010-07-07 10:34:03 +00:00
Dan Gohman
0cea029f14
Add some more TODO comments.
...
llvm-svn: 107657
2010-07-06 15:23:00 +00:00
Dan Gohman
fa0252225f
Add a comment.
...
llvm-svn: 107656
2010-07-06 15:21:57 +00:00
Dan Gohman
f9365363db
Remove context sensitivity concerns from interprocedural-basic-aa, and
...
make it more aggressive in cases where both pointers are known to live
in the same function.
llvm-svn: 107420
2010-07-01 20:08:40 +00:00
Dan Gohman
547c92af20
In ScalarEvolution::forgetValue, eliminate any SCEVUnknown
...
entries associated with the value being erased in the
folding set map. These entries used to be harmless, because
a SCEVUnknown doesn't store any information about its Value*,
so having a new Value allocated at the old Value's address
wasn't a problem. But now that ScalarEvolution is storing more
information about values, this is no longer safe.
llvm-svn: 107316
2010-06-30 20:21:12 +00:00
Dan Gohman
683a9e2498
Revert the part of r107257 which introduced new logic for using
...
nsw and nuw flags from IR Instructions. On further consideration,
this isn't valid.
llvm-svn: 107298
2010-06-30 17:27:11 +00:00
Dan Gohman
b7fc09a156
Improve ScalarEvolution's nsw and nuw preservation.
...
llvm-svn: 107257
2010-06-30 07:16:37 +00:00
Dan Gohman
7446416058
When computing a new ConservativeResult, intersect it with
...
the old one instead of replacing it, to be more precise.
llvm-svn: 107256
2010-06-30 06:58:35 +00:00
Dan Gohman
2112bbf184
Rework scev-aa's basic computation so that it doesn't depend
...
on ScalarEvolution successfully folding and preserving
range information for both A-B and B-A. Now, if it gets
either one, it's sufficient.
llvm-svn: 107249
2010-06-30 06:12:16 +00:00
Dan Gohman
01304ebfad
Simplify.
...
llvm-svn: 107248
2010-06-30 06:09:46 +00:00
Dan Gohman
32534063c7
Fix ScalarEvolution's tripcount computation for chains of loops
...
where each loop's induction variable's start value is the exit
value of a preceding loop.
llvm-svn: 107224
2010-06-29 23:43:06 +00:00
Dan Gohman
1c9ce3e66d
Fix whitespace style.
...
llvm-svn: 107175
2010-06-29 18:12:34 +00:00
Duncan Sands
b367b1e428
Remove a pointless variable.
...
llvm-svn: 107128
2010-06-29 11:39:45 +00:00
Benjamin Kramer
acb45b427b
Use a more obvious way to avoid compiling functions which are only used when XDEBUG is enabled.
...
llvm-svn: 107125
2010-06-29 10:03:11 +00:00
Chandler Carruth
e9bf8c4ee8
Jump through some silly hoops to make GCC accept that a function may not always
...
be called.
llvm-svn: 107124
2010-06-29 06:46:00 +00:00