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
Dan Gohman
f5dfb360be
Just as its not safe to blindly transfer the nsw bit from an add
...
instruction to an add scev, it's not safe to blindly transfer the
inbounds flag from a gep instruction to an nsw on the scev for the
gep.
llvm-svn: 107117
2010-06-29 01:41:41 +00:00
Dan Gohman
37bf33ccff
Add an Intraprocedural form of BasicAliasAnalysis, which aims to
...
properly handles instructions and arguments defined in different
functions, or across recursive function iterations.
llvm-svn: 107109
2010-06-29 00:50:39 +00:00
Dan Gohman
bd121d9b9f
Fix Value::stripPointerCasts and BasicAA to avoid trouble on
...
code in unreachable blocks, which have have use-def cycles.
This fixes PR7514.
llvm-svn: 107071
2010-06-28 21:16:52 +00:00
Dan Gohman
d454f5c234
Generalize AAEval so that it can be used both per-function and
...
interprocedurally. Note that as of this writing, existing alias
analysis passes are not prepared to be used interprocedurally.
llvm-svn: 107013
2010-06-28 16:01:37 +00:00
Devang Patel
fdca552823
Use named MDNode, llvm.dbg.sp, to collect subprogram info. This will be used to emit local variable's debug info of deleted functions.
...
llvm-svn: 106989
2010-06-28 05:53:08 +00:00
Devang Patel
858a0f3664
Do not forget last element, function, while creating Subprogram definition MDNode from subprogram declare MDNode.
...
llvm-svn: 106985
2010-06-27 21:04:31 +00:00
Dan Gohman
01de3704f9
Eliminate a redundant FoldingSet lookup.
...
llvm-svn: 106872
2010-06-25 18:47:08 +00:00
Dan Gohman
bfbfa95b51
Don't try to preserve pointer types in SCEVConstants; the old code
...
was over-complicated.
llvm-svn: 106760
2010-06-24 16:47:03 +00:00
Dan Gohman
35a5a7285a
Make the trunc code consistent with the zext and sext code in its
...
handling of pointer types.
llvm-svn: 106757
2010-06-24 16:33:38 +00:00
Gabor Greif
b86c04f740
use ArgOperand accessors
...
llvm-svn: 106697
2010-06-23 23:38:07 +00:00
Gabor Greif
bfb7386690
use the new isFreeCall API and ArgOperand accessors
...
llvm-svn: 106692
2010-06-23 22:48:06 +00:00
Gabor Greif
4615fc1c93
minor enhancement to llvm::isFreeCall API: return CallInst; no functional change
...
llvm-svn: 106686
2010-06-23 21:51:12 +00:00
Gabor Greif
0b348ae475
use ArgOperand getters
...
llvm-svn: 106685
2010-06-23 21:41:47 +00:00
Dan Gohman
f44783ab4e
Replace ScalarEvolution's private copy of getLoopPredecessor
...
with LoopInfo's public copy.
llvm-svn: 106603
2010-06-22 23:43:28 +00:00
Dan Gohman
74d5144414
Use pre-increment instead of post-increment when the result is not used.
...
llvm-svn: 106542
2010-06-22 15:08:57 +00:00
Dan Gohman
a3bc6b13f7
Allow "exhaustive" trip count evaluation on phi nodes with all
...
constant operands.
llvm-svn: 106537
2010-06-22 13:15:46 +00:00
Devang Patel
f50b6147ad
Use single interface, using twine, to get named metadata.
...
getNamedMetadata().
llvm-svn: 106518
2010-06-22 01:19:38 +00:00
Devang Patel
dee41b010a
Do not rely on Twine temporaries to survive.
...
llvm-svn: 106515
2010-06-22 01:01:58 +00:00
Dan Gohman
6a3c46ad49
Use A.append(...) instead of A.insert(A.end(), ...) when A is a
...
SmallVector, and other SmallVector simplifications.
llvm-svn: 106452
2010-06-21 19:47:52 +00:00
Devang Patel
3dbb143c29
Do not directly use function names to construct new name for named metadata.
...
"llvm.dbg.lv.~A" is not a valid name.
llvm-svn: 106438
2010-06-21 18:36:58 +00:00
Dan Gohman
90c5f8753d
Restore a call to rememberInstruction which was accidentally dropped
...
in refactoring.
llvm-svn: 106398
2010-06-19 22:50:35 +00:00
Dan Gohman
cec5b682b6
Fix ScalarEvolution's "exhaustive" trip count evaluation code to avoid
...
assuming that loops are in canonical form, as ScalarEvolution doesn't
depend on LoopSimplify itself. Also, with indirectbr not all loops can
be simplified. This fixes PR7416.
llvm-svn: 106389
2010-06-19 14:17:24 +00:00
Dan Gohman
fb091c213b
Factor out duplicated code for reusing and inserting casts into
...
a helper function.
llvm-svn: 106388
2010-06-19 13:25:23 +00:00
Dan Gohman
b5ec637e57
Revert r106304 (105548 and friends), which are the SCEVComplexityCompare
...
optimizations. There is still some nondeterminism remaining.
llvm-svn: 106306
2010-06-18 19:54:20 +00:00
Dan Gohman
527b570925
Reapply 105540, 105542, and 105548, and revert r105732.
...
llvm-svn: 106304
2010-06-18 19:26:04 +00:00
Dan Gohman
75f6f94c48
Reapply 105546.
...
llvm-svn: 106302
2010-06-18 19:12:32 +00:00
Dan Gohman
ab895769a7
Reapply 105544.
...
llvm-svn: 106301
2010-06-18 19:09:27 +00:00
Dan Gohman
e20e668c7e
Remove getIntegerSCEV; it's redundant with getConstant, and getConstant
...
is more consistent with the ConstantInt API.
llvm-svn: 106281
2010-06-18 14:33:50 +00:00
Dan Gohman
0b5b93b20d
Eliminate unnecessary uses of getZExtValue().
...
llvm-svn: 106279
2010-06-18 14:22:04 +00:00
Dan Gohman
eab6b51039
Fix a typo in a comment.
...
llvm-svn: 106260
2010-06-18 00:53:08 +00:00
Dan Gohman
1d9d93381a
Simplify this code.
...
llvm-svn: 106254
2010-06-17 23:34:09 +00:00
Jim Grosbach
67b46d6303
A few more places where SCEVExpander bits need to skip over debug intrinsics
...
when iterating through instructions. Yet more work for rdar://7797940
llvm-svn: 106149
2010-06-16 21:13:38 +00:00
Devang Patel
108d77796f
Check function pointer first, before comparing function names.
...
llvm-svn: 106088
2010-06-16 06:42:02 +00:00
Devang Patel
3282324020
Use separate named MDNode to hold each function's local variable info.
...
This speeds up local variable handling in DwarfDebug.
llvm-svn: 106075
2010-06-16 00:53:55 +00:00
Stuart Hastings
f9ef9ff3d6
Support for nested functions/classes in debug output. (Again.) Radar 7424645.
...
llvm-svn: 105828
2010-06-11 20:08:44 +00:00
Stuart Hastings
7b15c202c7
Delete duplicate function.
...
llvm-svn: 105827
2010-06-11 20:05:01 +00:00
Evan Cheng
28c151ae52
Revert 105540, 105542, 105544, 105546, and 105548 to unbreak bootstrapping.
...
llvm-svn: 105740
2010-06-09 18:59:43 +00:00
Kenneth Uildriks
2c6b68924d
Pulled CodeMetrics out of InlineCost.h and made it a bit more general, so it can be reused from PartialSpecializationCost
...
llvm-svn: 105725
2010-06-09 15:11:37 +00:00