Devang Patel
0206af99dc
Remove unused function.
...
llvm-svn: 50664
2008-05-05 19:44:16 +00:00
Evan Cheng
d9353009b7
Fix more -Wshorten-64-to-32 warnings.
...
llvm-svn: 50659
2008-05-05 18:30:58 +00:00
Owen Anderson
611b415d12
Fix PR1098 by correcting the postdominators analysis.
...
Patch by Florian Brandner.
llvm-svn: 50628
2008-05-04 21:07:35 +00:00
Torok Edwin
d016bb2685
Implement destructor for PostDominatorTree to eliminate a memory leak.
...
llvm-svn: 50607
2008-05-03 20:25:26 +00:00
Nick Lewycky
1f831c0f57
Remove 'unwinds to' support from mainline. This patch undoes r47802 r47989
...
r48047 r48084 r48085 r48086 r48088 r48096 r48099 r48109 and r48123.
llvm-svn: 50265
2008-04-25 16:53:59 +00:00
Owen Anderson
030428b435
Major repairs to the post-dominators implementation. Patch from Florian Brandner!
...
llvm-svn: 49768
2008-04-16 04:21:16 +00:00
Dan Gohman
14dce3e51c
Teach AliasSetTracker about VAArgInst.
...
llvm-svn: 49674
2008-04-14 18:34:50 +00:00
Chris Lattner
f63bdaf0b5
add a new CallGraphNode::removeCallEdgeFor method, tidy some comments.
...
llvm-svn: 49617
2008-04-13 19:41:25 +00:00
Owen Anderson
93ab00f1d9
Make GVN more memory efficient, particularly on code that contains a large number of
...
allocations, which GVN can't optimize anyways.
llvm-svn: 49329
2008-04-07 09:59:07 +00:00
Dan Gohman
2b96ce84aa
Add explicit keywords.
...
llvm-svn: 48801
2008-03-25 22:06:05 +00:00
Dan Gohman
a363ba510c
Don't include <map> in Pass.h, which doesn't need it. This requires
...
adding <map> to many files that actually do need it.
llvm-svn: 48667
2008-03-21 23:51:57 +00:00
Devang Patel
5e8cbbea65
PassInfo keep tracks whether a pass is an analysis pass or not.
...
llvm-svn: 48554
2008-03-19 21:56:59 +00:00
Devang Patel
38f181fa8c
Do not use virtual function to identify an analysis pass.
...
llvm-svn: 48520
2008-03-19 00:48:41 +00:00
Dale Johannesen
4d0221c45b
Get rid of compilation warnings. Per Devang.
...
llvm-svn: 48478
2008-03-18 01:52:17 +00:00
Devang Patel
811ca3ddba
Identify Analysis pass.
...
Do not run analysis pass again if analysis info is still available.
This fixes PR1441.
llvm-svn: 48476
2008-03-18 00:39:19 +00:00
Dan Gohman
9ca724cee0
Move the PMStack class out of Pass.h and into PassManagers.h.
...
llvm-svn: 48367
2008-03-14 18:14:29 +00:00
Nick Lewycky
50c8d20ca2
Update the block cloner which fixes bugpoint on code using unwind_to (phew!)
...
and also update the cloning interface's major user, the loop optimizations.
llvm-svn: 48088
2008-03-09 05:24:34 +00:00
Dan Gohman
0cfccf801d
Add -analyze support to postdomtree.
...
llvm-svn: 47680
2008-02-27 18:38:29 +00:00
Anton Korobeynikov
0c5e186924
Unbreak build with gcc 4.3: provide missed includes and silence most annoying warnings.
...
llvm-svn: 47367
2008-02-20 11:08:44 +00:00
Nick Lewycky
0b6cdd1eff
Add 'umax' similar to 'smax' SCEV. Closes PR2003.
...
Parse reversed smax and umax as smin and umin and express them with negative
or binary-not SCEVs (which are really just subtract under the hood).
Parse 'xor %x, -1' as (-1 - %x).
Remove dead code (ConstantInt::get always returns a ConstantInt).
Don't use getIntegerSCEV(-1, Ty). The first value is an int, then it gets
passed into a uint64_t. Instead, create the -1 directly from
ConstantInt::getAllOnesValue().
llvm-svn: 47360
2008-02-20 06:48:22 +00:00
Owen Anderson
274aa2846e
Re-apply the patch to improve the optimizations of memcpy's, with several
...
bugs fixed. This now passes PPC bootstrap.
llvm-svn: 47026
2008-02-12 21:15:18 +00:00
Wojciech Matyjewicz
76c2b22ee4
Fix PR1798 - an error in the evaluation of SCEVAddRecExpr at an
...
arbitrary iteration.
The patch:
1) changes SCEVSDivExpr into SCEVUDivExpr,
2) replaces PartialFact() function with BinomialCoefficient(); the
computations (essentially, the division) in BinomialCoefficient() are
performed with the apprioprate bitwidth necessary to avoid overflow;
unsigned division is used instead of the signed one.
Computations in BinomialCoefficient() require support from the code
generator for APInts. Currently, we use a hack rounding up the
neccessary bitwidth to the nearest power of 2. The hack is easy to turn
off in future.
One remaining issue: we assume the divisor of the binomial coefficient
formula can be computed accurately using 16 bits. It means we can handle
AddRecs of length up to 9. In future, we should use APInts to evaluate
the divisor.
Thanks to Nicholas for cooperation!
llvm-svn: 46955
2008-02-11 11:03:14 +00:00
Wojciech Matyjewicz
2e45476439
Add a check if the initial value of the induction variable is 0 (the method comment says it should be).
...
llvm-svn: 46907
2008-02-09 18:06:58 +00:00
Dan Gohman
562ed58408
Avoid unnecessarily casting away const, fixing a FIXME.
...
llvm-svn: 46591
2008-01-31 01:05:10 +00:00
Dan Gohman
6f9748b626
Add comments describing what the loop depth values mean. Also, make a
...
minor simplification to the loop depth calculation code.
llvm-svn: 46511
2008-01-29 12:12:40 +00:00
Chris Lattner
201be5f41e
Move typedef of loop to top of the file where it is more obvious.
...
llvm-svn: 45857
2008-01-11 06:29:42 +00:00
Chris Lattner
b9232a8374
Fix 80 col violations
...
llvm-svn: 45856
2008-01-11 06:27:42 +00:00
Wojciech Matyjewicz
2502769cf3
fix typo
...
llvm-svn: 45595
2008-01-04 20:04:08 +00:00
Chris Lattner
e0b1ee937a
Don't attribute in file headers anymore. See llvmdev for the
...
discussion of this change. Boy are my fingers tired. ;-)
llvm-svn: 45411
2007-12-29 19:59:42 +00:00
Chris Lattner
5ca42cd342
Fix PR1850 by removing an unsafe transformation from VMCore/ConstantFold.cpp.
...
Reimplement the xform in Analysis/ConstantFolding.cpp where we can use
targetdata to validate that it is safe. While I'm in there, fix some const
correctness issues and generalize the interface to the "operand folder".
llvm-svn: 44817
2007-12-10 22:53:04 +00:00
Owen Anderson
e3de18ac1d
Fix several cache coherence bugs in MemDep/GVN that were found. Also add some (disabled) debugging code
...
to make such problems easier to diagnose in the future, written by Duncan Sands.
llvm-svn: 44695
2007-12-08 01:37:09 +00:00
Duncan Sands
14f11d6836
Integrate the readonly/readnone logic more deeply
...
into alias analysis. This meant updating the API
which now has versions of the getModRefBehavior,
doesNotAccessMemory and onlyReadsMemory methods
which take a callsite parameter. These should be
used unless the callsite is not known, since in
general they can do a better job than the versions
that take a function. Also, users should no longer
call the version of getModRefBehavior that takes
both a function and a callsite. To reduce the
chance of misuse it is now protected.
llvm-svn: 44487
2007-12-01 07:51:45 +00:00
Owen Anderson
37a1ebc6a3
Fixes for MachineLoopInfo, mostly from Evan. With these, it should be almost useable!
...
llvm-svn: 44480
2007-12-01 03:01:39 +00:00
Owen Anderson
2b9b50b985
Add MachineLoopInfo. This is not yet tested.
...
llvm-svn: 44384
2007-11-27 22:47:08 +00:00
Owen Anderson
43d4a82d4b
Make LoopInfoBase more generic, in preparation for having MachineLoopInfo. This involves a small interface change.
...
llvm-svn: 44348
2007-11-27 03:43:35 +00:00
Owen Anderson
67929e6873
Add accessor for getting the underlying templated type. This is necessary for templated LoopInfo.
...
llvm-svn: 44347
2007-11-27 03:33:40 +00:00
Anton Korobeynikov
14246a2eba
Remove another leak. Due to some reason AliasSetTracker didn't had any dtor...
...
llvm-svn: 44320
2007-11-25 23:52:02 +00:00
Nick Lewycky
1536b3f230
Add new SCEV, SCEVSMax. This allows LLVM to analyze do-while loops.
...
llvm-svn: 44319
2007-11-25 22:41:31 +00:00
Anton Korobeynikov
b7ee8cdcba
Remove a leak. Destroy LoopInfoBase object. releaseMemory() is actually called in its dtor.
...
llvm-svn: 44317
2007-11-25 18:41:39 +00:00
Dan Gohman
27ac53cc23
Remove meaningless qualifiers from return types, avoiding compiler warnings.
...
llvm-svn: 44240
2007-11-19 20:46:23 +00:00
Dan Gohman
760d574313
Add explicit keywords.
...
llvm-svn: 44234
2007-11-19 15:30:20 +00:00
Anton Korobeynikov
c9ab2516fa
Reverted r44163 per request
...
llvm-svn: 44177
2007-11-15 18:33:16 +00:00
Nick Lewycky
6690b9499b
Fix handling of overflow in loop calculation by adding new UDiv SCEV. This SCEV
...
is disabled in the sense that it will refuse to create one from a UDiv
instruction, until the code is better tested.
llvm-svn: 44163
2007-11-15 06:30:50 +00:00
Owen Anderson
b88ac41e0e
More templatization.
...
llvm-svn: 44158
2007-11-15 05:00:15 +00:00
Owen Anderson
7b92dab615
Start the process of making MachineLoopInfo possible by templating Loop.
...
llvm-svn: 44097
2007-11-14 02:33:58 +00:00
Owen Anderson
e6b623ba1c
VAArgInst does, in fact, read memory.
...
llvm-svn: 43633
2007-11-02 04:01:21 +00:00
Owen Anderson
4314cf9d58
Some fixes to get MachineDomTree working better.
...
llvm-svn: 43541
2007-10-31 03:30:14 +00:00
Dan Gohman
65be3b6502
Add explicit keywords.
...
llvm-svn: 43464
2007-10-29 19:52:04 +00:00
Owen Anderson
229333c94b
Add a first attempt at dominator information for MBB's. Use with caution: this has been tested to compile. It has not yet been confirmed to generate correct analysis.
...
llvm-svn: 43438
2007-10-29 04:50:50 +00:00
Owen Anderson
dc3329dbf7
Make it possible for DomTreeBase to be constructed from MachineFunction's as well as just Function's.
...
llvm-svn: 43321
2007-10-25 00:16:57 +00:00