Dan Gohman
dc19104267
Make the code that updates ScalarEvolution's internal state in response
...
to a loop deletion more thorough. Don't prune the def-use tree search at
instructions that don't have SCEVs computed, because an instruction with
a user that has a computed SCEV may itself lack a computed SCEV. Also,
remove loop-related values from the ValuesAtScopes and
ConstantEvolutionLoopExitValues maps as well.
This fixes a regression in 483.xalancbmk.
llvm-svn: 75030
2009-07-08 19:23:34 +00:00
Owen Anderson
b17f32945f
Switch GlobalVariable ctors to a sane API, where *either* a context or a module is required.
...
llvm-svn: 75025
2009-07-08 19:03:57 +00:00
Nick Lewycky
a21d3daadc
Remove the vicmp and vfcmp instructions. Because we never had a release with
...
these instructions, no autoupgrade or backwards compatibility support is
provided.
llvm-svn: 74991
2009-07-08 03:04:38 +00:00
Owen Anderson
5948fdf68b
Push LLVMContext through GlobalVariables and IRBuilder.
...
llvm-svn: 74985
2009-07-08 01:26:06 +00:00
Owen Anderson
9e2af02143
Re-LLVMContext-ize DebugInfo, now with less breakage.
...
llvm-svn: 74920
2009-07-07 17:12:53 +00:00
Dan Gohman
af75234955
Change all SCEV* to SCEV *.
...
llvm-svn: 74918
2009-07-07 17:06:11 +00:00
Owen Anderson
4f3675ca73
Revert part of r74873 that broke Clang's debug info generation.
...
llvm-svn: 74910
2009-07-07 16:31:25 +00:00
Owen Anderson
38264b1554
"LLVMContext* " --> "LLVMContext *"
...
llvm-svn: 74878
2009-07-06 23:00:19 +00:00
Owen Anderson
f1f1743b2e
Finish LLVMContext-ing lib/Analysis. This required pushing LLVMContext's through the ValueTracking API.
...
llvm-svn: 74873
2009-07-06 22:37:39 +00:00
Owen Anderson
39f00cc1d4
Thread LLVMContext through the constant folding APIs, which touches a lot of files.
...
llvm-svn: 74844
2009-07-06 18:42:36 +00:00
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