Nick Lewycky
3292908132
When comparing constants, consider a less wide constant to be "less complex"
...
than a wider one, before trying to compare their contents which will crash
if their sizes are different.
llvm-svn: 74792
2009-07-04 17:24:52 +00:00
Andreas Bolka
1cd3fd6336
Minor improvement to the LDA debug output.
...
llvm-svn: 74754
2009-07-03 01:42:52 +00:00
Devang Patel
87127712b9
Simplify debug info intrisinc lowering.
...
llvm-svn: 74733
2009-07-02 22:43:26 +00:00
Devang Patel
526b17097a
Fix typo.
...
Thanks Duncan!
llvm-svn: 74706
2009-07-02 17:17:03 +00:00
Chris Lattner
edb8407f0c
do not try to analyze bitcasts from i64 to <2 x i32> in ComputedMaskedBits. While
...
we could do this, doing so requires adjusting the demanded mask and the code isn't
doing that yet. This fixes PR4495
llvm-svn: 74699
2009-07-02 16:04:08 +00:00
Devang Patel
bbf38f8f3b
Add debug info utility routines.
...
llvm-svn: 74680
2009-07-02 01:15:24 +00:00
Devang Patel
b9fb595400
Keep DIDescriptor methods together.
...
No functionality change.
llvm-svn: 74652
2009-07-01 22:10:23 +00:00
Andreas Bolka
394b4156cf
Use AA to check objects before LDA.
...
llvm-svn: 74647
2009-07-01 21:45:23 +00:00
Chris Lattner
96122debc1
improve the APIs for creating struct and function types with no arguments/elements
...
to not have to create a temporary vector (in the API at least). Patch by Jay Foad!
llvm-svn: 74584
2009-07-01 04:13:31 +00:00
Dan Gohman
3423e72b55
Minor code cleanups.
...
llvm-svn: 74551
2009-06-30 20:13:32 +00:00
Owen Anderson
00d07afe98
Fix the build on Cygwin. Patch by Aaron Gray.
...
llvm-svn: 74510
2009-06-30 05:33:46 +00:00
Andreas Bolka
9541801105
Array accesses are independent if the underlying arrays differ.
...
llvm-svn: 74499
2009-06-30 02:12:10 +00:00
Dan Gohman
e8eca73cdd
Minor formatting, whitespace, and 80-column fixes.
...
llvm-svn: 74492
2009-06-30 01:25:30 +00:00
Dan Gohman
9d203c636b
Use getSCEV instead of getUnknown to create a SCEV for a
...
Constant. This lets ConstantInts be handled as SCEVConstant instead
of SCEVUnknown, as getUnknown no longer has special-case code for
ConstantInt and friends. This usually doesn't affect the final
output, since the constants end up getting folded later, but it
does make intermediate expressions more obvious in many cases.
llvm-svn: 74459
2009-06-29 21:31:18 +00:00
Dan Gohman
19d2417c90
Don't cache PHI exit values from exhaustive evaluations, because
...
an individual exhaustive evaluation reflects only the exit value
implied by an individual exit, which may differ from the actual
exit value of the loop if there are other exits. This fixes PR4477.
llvm-svn: 74447
2009-06-29 20:34:13 +00:00
Andreas Bolka
6037bc9e60
Relax LDA memory instruction checks.
...
llvm-svn: 74439
2009-06-29 18:51:11 +00:00
Torok Edwin
24c7835d19
Call doInitialization(), releaseMemory(), and doFinalization() for on-the-fly passes as well.
...
Also don't call finalizers for LoopPass if initialization was not called.
Add a unittest that tests that these methods are called, in the proper
order, and the correct number of times.
llvm-svn: 74438
2009-06-29 18:49:09 +00:00
Dan Gohman
e00beaaee8
Simplify this code, and avoid using APInt(). This fixes
...
(otherwise harmless) uninitialized value warnings that
Duncan found with gcc-4.4.
llvm-svn: 74437
2009-06-29 18:25:52 +00:00
Andreas Bolka
3a09c8bd5e
Missed one.
...
llvm-svn: 74416
2009-06-29 00:53:49 +00:00
Andreas Bolka
c5558a83f4
Fix case in LDA util function names.
...
llvm-svn: 74415
2009-06-29 00:50:26 +00:00
Andreas Bolka
9d09e20142
Print pairwise dependence results, add testcases.
...
llvm-svn: 74402
2009-06-28 00:35:22 +00:00
Andreas Bolka
9fee7f86ad
Minimal LDA interface, maximally conservative tester.
...
llvm-svn: 74401
2009-06-28 00:21:21 +00:00
Andreas Bolka
8976d3bc7e
LDA analysis output scaffolding.
...
llvm-svn: 74400
2009-06-28 00:16:08 +00:00
Dan Gohman
4f16a2923c
Eliminate a layer of indirection in LoopInfo and MachineLoopInfo.
...
llvm-svn: 74394
2009-06-27 21:22:48 +00:00
Dan Gohman
c5c85c0fec
Convert ScalarEvolution to use BumpPtrAllocator and FoldingSet, instead
...
of a team of individual allocations and a team of std::maps.
llvm-svn: 74393
2009-06-27 21:21:31 +00:00
Dan Gohman
830fd38d9b
Change SCEVExpander to use an IRBuilder to emit instructions.
...
llvm-svn: 74391
2009-06-27 21:18:18 +00:00
Dan Gohman
daafbe6168
Incorporate the insertion point into the key of SCEVExpander's CSE map.
...
This helps it avoid reusing an instruction that doesn't dominate all
of the users, in cases where the original instruction was inserted
before all of the users were known. This may result in redundant
expansions of sub-expressions that depend on loop-unpredictable values
in some cases, however this isn't very common, and it primarily impacts
IndVarSimplify, so GVN can be expected to clean these up.
This eliminates the need for IndVarSimplify's FixUsesBeforeDefs,
which fixes several bugs.
llvm-svn: 74352
2009-06-26 22:53:46 +00:00
Dan Gohman
cc030b7e51
Fix ScalarEvolution::getAddRecExpr's code which canonicalized the
...
nesting order of nested AddRec expressions to skip the transformation
if it would introduce an AddRec with operands not loop-invariant
with respect to its loop.
llvm-svn: 74343
2009-06-26 22:36:20 +00:00
Dan Gohman
06a4e273be
Fix SCEVAddRecExpr::isLoopInvariant to test if all of its operands
...
are loop invariant, not just the start operand.
llvm-svn: 74338
2009-06-26 22:17:21 +00:00
Douglas Gregor
6d94e6a5f3
Fix linking of llvm-ld and lli with CMake, from Xerxes Rånby
...
llvm-svn: 74285
2009-06-26 15:37:00 +00:00
Devang Patel
0751a28888
Remove debug info anchors - llvm.dbg.compile_units, llvm.dbg.subprograms
...
and llvm.dbg.global_variables.
llvm-svn: 74251
2009-06-26 01:49:18 +00:00
Owen Anderson
52d70e2d05
Use a more correct atomic increment style. This isn't really necessary in
...
this case, but it should help avoid issues in the future.
llvm-svn: 74178
2009-06-25 16:32:45 +00:00
Owen Anderson
8e62b5f339
Make this thread-safe.
...
llvm-svn: 74129
2009-06-24 22:16:52 +00:00
Owen Anderson
4830e08613
Get rid of a static boolean.
...
llvm-svn: 74125
2009-06-24 22:08:59 +00:00
Andreas Bolka
8c7e299270
Scaffolding for LDA pass.
...
llvm-svn: 74120
2009-06-24 21:29:13 +00:00
Owen Anderson
b70adf2b92
Get rid of the global CFGOnly flag by threading a ShortNames parameters through the GraphViz rendering code.
...
Update other uses in the codebase for this change.
llvm-svn: 74084
2009-06-24 17:37:09 +00:00
Dan Gohman
abd1709678
Minor whitespace cleanups.
...
llvm-svn: 74074
2009-06-24 14:49:00 +00:00
Dan Gohman
f57bdb75d4
Simplify [su]max(MAX, n) to MAX. This comes up in loop tripcount
...
computations in loops with multiple exits.
Adjust the testcase for PR4436 so that the relevant portion isn't
optimized away.
llvm-svn: 74073
2009-06-24 14:46:22 +00:00
Dan Gohman
ce973df28b
Delete some orphaned comments, fix some 80-column violations,
...
and tidy up a few other formatting issues.
llvm-svn: 74060
2009-06-24 04:48:43 +00:00
Dan Gohman
f19aeec3f5
Extend ScalarEvolution's multiple-exit support to compute exact
...
trip counts in more cases.
Generalize ScalarEvolution's isLoopGuardedByCond code to recognize
And and Or conditions, splitting the code out into an
isNecessaryCond helper function so that it can evaluate Ands and Ors
recursively, and make SCEVExpander be much more aggressive about
hoisting instructions out of loops.
test/CodeGen/X86/pr3495.ll has an additional instruction now, but
it appears to be due to an arbitrary register allocation difference.
llvm-svn: 74048
2009-06-24 01:18:18 +00:00
Dan Gohman
d261d27165
Teach GetMinSignBits about SCEVAddExprs.
...
llvm-svn: 74045
2009-06-24 01:05:09 +00:00
Dan Gohman
f436bacb6b
Move the special cases for constants out of getUnknown and into
...
createSCEV. Also, recognize UndefValue in createSCEV.
Change getIntegerSCEV's comment to avoid mentioning FP types,
and re-implement it in terms of getConstant instead of getUnknown.
llvm-svn: 74041
2009-06-24 00:54:57 +00:00
Dan Gohman
8d7576e12c
Use ScalarEvolution::getConstant instead of getUnknown to create
...
SCEVConstants. This cleanup is a step toward letting getUnknown
be simpler.
llvm-svn: 74037
2009-06-24 00:38:39 +00:00
Dan Gohman
6994293b17
Include the maximum trip count expression in ScalarEvolution's print output.
...
llvm-svn: 74035
2009-06-24 00:33:16 +00:00
Dan Gohman
18a96bb07f
Add an isAllOnesValue utility function, similar to isZero and isOne.
...
llvm-svn: 74032
2009-06-24 00:30:26 +00:00
Devang Patel
2ed89d7faa
It is not a good idea to have data member's name match argument's name. In fact, it is a simple receipe to waste an hour or so.
...
llvm-svn: 74018
2009-06-23 22:25:41 +00:00
Devang Patel
4d3a423dcd
Use getReturnTypeName() to print return type.
...
llvm-svn: 74017
2009-06-23 22:23:13 +00:00
Dan Gohman
53efeb0e45
Fix a bug in the trip-count computation with And/Or. If either of the
...
sides is CouldNotCompute, the resulting exact count must be CouldNotCompute.
llvm-svn: 73920
2009-06-22 23:28:56 +00:00
Owen Anderson
e9454e8c25
Remove unneeded #include.
...
llvm-svn: 73911
2009-06-22 22:09:07 +00:00
Dan Gohman
fd76113e28
Fix a few minor issues that were exposed by the removal of SCEVHandle.
...
llvm-svn: 73910
2009-06-22 22:08:45 +00:00