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
Dan Gohman
490f4d7020
The FoldingSet hash data includes pointer values, so it isn't
...
determinstic. Instead, give SCEV objects an arbitrary sequence
number.
llvm-svn: 105548
2010-06-07 19:36:14 +00:00
Dan Gohman
65954b2eb4
Optimize ScalarEvolution's SCEVComplexityCompare predicate: don't go
...
scrounging through SCEVUnknown contents and SCEVNAryExpr operands;
instead just do a simple deterministic comparison of the precomputed
hash data.
Also, since this is more precise, it eliminates the need for the slow
N^2 duplicate detection code.
llvm-svn: 105540
2010-06-07 19:06:13 +00:00
Stuart Hastings
37ed2a9663
Revert 105492 & 105493 due to a testcase regression. Radar 7424645.
...
llvm-svn: 105511
2010-06-05 00:39:29 +00:00
Dan Gohman
1865db1b89
LSR needs to remember inserted instructions even in postinc mode, because
...
there could be multiple subexpressions within a single expansion which
require insert point adjustment. This fixes PR7306.
llvm-svn: 105510
2010-06-05 00:33:07 +00:00
Stuart Hastings
eb78f8db98
Support for nested functions/classes in debug output. Radar 7424645.
...
llvm-svn: 105492
2010-06-04 22:36:03 +00:00
Dan Gohman
0d7d3faf8e
Move FindAvailableLoadedValue isSafeToLoadUnconditionally out of
...
lib/Transforms/Utils and into lib/Analysis so that Analysis passes
can use them.
llvm-svn: 104949
2010-05-28 16:19:17 +00:00
Dan Gohman
f7bbeb021a
Fix a comment.
...
llvm-svn: 104947
2010-05-28 16:06:09 +00:00
Dan Gohman
0b5922b032
Fix Lint printing warnings multiple times. Remove the ErrorStr
...
option from lintModule, which was an artifact from being
based on Verifier code.
llvm-svn: 104765
2010-05-26 22:28:53 +00:00
Devang Patel
3d4cd812aa
Rename variable. add comment.
...
llvm-svn: 104274
2010-05-20 20:35:24 +00:00
Devang Patel
2b99c27e47
Add support to preserve type info for the variables that are removed by the optimizer.
...
llvm-svn: 103798
2010-05-14 21:01:35 +00:00
Nick Lewycky
b5bf752087
Clear CachedFunctionInfo upon Pass::releaseMemory. Because ValueMap will abort
...
on RAUW of functions, this is a correctness issue instead of a mere memory
usage problem.
No testcase until the new MergeFunctions can land.
llvm-svn: 103653
2010-05-12 21:48:15 +00:00
Devang Patel
14f07a8625
Remove DIGlobal.
...
llvm-svn: 103325
2010-05-07 23:19:07 +00:00
Devang Patel
62b4a23a3b
Add DINameSpace::Verify().
...
llvm-svn: 103318
2010-05-07 23:04:32 +00:00
Douglas Gregor
2b05a8ffe8
Clang is dying on this with an ambiguous conversion sequence. We're working on it
...
llvm-svn: 103312
2010-05-07 22:28:25 +00:00
Devang Patel
3c2f4664fc
Verify variable directly.
...
llvm-svn: 103305
2010-05-07 22:04:20 +00:00
Devang Patel
0638b539bb
Wrap const MDNode * inside DIDescriptor.
...
llvm-svn: 103295
2010-05-07 20:54:48 +00:00
Devang Patel
af119914f7
remove DIDescriptor::getNode()
...
llvm-svn: 103278
2010-05-07 18:36:34 +00:00
Devang Patel
02bb578ffd
Avoid DIDescriptor::getNode(). Use overloaded operators instead.
...
llvm-svn: 103272
2010-05-07 18:11:54 +00:00
Dan Gohman
38fe30a595
Add a simple module-level debug info printer. It just sets up a
...
DebugInfoFinder and iterates over all the contents calling print.
llvm-svn: 103262
2010-05-07 16:22:32 +00:00
Dan Gohman
6201059ec3
Const-ify some stuff.
...
llvm-svn: 103256
2010-05-07 15:36:10 +00:00
Dan Gohman
612fbfa641
Convert the DebugInfo classes dump() methods into print(raw_ostream &)
...
methods, and add dump functions implemented in terms of the print.
llvm-svn: 103254
2010-05-07 15:30:29 +00:00
David Chisnall
52a91e993b
Added a variant of InlineCostAnalyzer::getInlineCost() that takes the called function as an explicit argument, for use when inlining function pointers.
...
llvm-svn: 102841
2010-05-01 15:47:41 +00:00
Devang Patel
52c2d4d378
Attach AT_APPLE_optimized attribute to optimized function's debug info.
...
llvm-svn: 102743
2010-04-30 19:38:23 +00:00
Dan Gohman
cfd0d9393a
Add some comments.
...
llvm-svn: 102731
2010-04-30 18:33:41 +00:00
Devang Patel
432efd232d
Missed earlier. This is part of previous check-in. (r102661 - refactor.)
...
llvm-svn: 102662
2010-04-29 20:48:12 +00:00
Dan Gohman
0fbfae5efe
Add a new utility function SimplifyICmpOperands. Much of this code is
...
refactored out of ScalarEvolution::isImpliedCond, which will be updated
to use this new utility routine soon.
llvm-svn: 102229
2010-04-24 01:28:42 +00:00
Chris Lattner
6adbb41d8c
fix file header.
...
llvm-svn: 102049
2010-04-22 05:33:15 +00:00
Chris Lattner
b6b95141ec
move some select simplifications out out instcombine into
...
inst simplify. No functionality change.
llvm-svn: 101873
2010-04-20 05:32:14 +00:00
Chris Lattner
2f4001f3a8
make CallGraphNode dtor abort if a node is deleted when there are still
...
references to it.
llvm-svn: 101847
2010-04-20 00:47:34 +00:00
Dan Gohman
e52396cb52
Remove the Expr member from IVUsers. Instead of remembering the expression,
...
just ask ScalarEvolution for it on demand. This helps IVUsers be more robust
in the case of expressions changing underneath it. This fixes PR6862.
llvm-svn: 101819
2010-04-19 21:48:58 +00:00
Dale Johannesen
f044ed7cf9
Add comment (lost when reverting and reapplying 101503).
...
llvm-svn: 101664
2010-04-17 19:56:46 +00:00
Dale Johannesen
9968eef300
Reapply 101503+101520. These are "obviously correct" [Chris]
...
and don't cause any problems on Darwin.
llvm-svn: 101584
2010-04-17 00:08:21 +00:00
Dan Gohman
2520b6e199
Revert 101520, which depended on 101503, which was reverted.
...
llvm-svn: 101528
2010-04-16 19:36:41 +00:00
Duncan Sands
7fa5f38be8
Revert commit 101503 (johannes), in the hope of fixing the dragonegg build,
...
see http://google1.osuosl.org:8011/builders/dragonegg-x86_64-linux/builds/693
Original commit text:
Use a ValueMap not a std::map for the reason indicated
in the comment. This was causing nondeterministic changes
in inlining decisions.
llvm-svn: 101525
2010-04-16 19:28:59 +00:00
Dan Gohman
5d99e7df1c
Trim a #include.
...
llvm-svn: 101520
2010-04-16 18:45:11 +00:00
Dale Johannesen
759091323b
Use a ValueMap not a std::map for the reason indicated
...
in the comment. This was causing nondeterministic changes
in inlining decisions.
llvm-svn: 101503
2010-04-16 18:16:08 +00:00
Dan Gohman
f754ff8ee9
Make callIsSmall accessible as a utility function.
...
llvm-svn: 101463
2010-04-16 15:14:50 +00:00
Dan Gohman
034c0f7354
Make getPredecessorWithUniqueSuccessorForBB return the unique successor
...
in addition to the predecessor.
llvm-svn: 101374
2010-04-15 16:19:08 +00:00
Dan Gohman
5c72d507d7
Constify GetConstantStringInfo.
...
llvm-svn: 101298
2010-04-14 22:20:45 +00:00
Dan Gohman
ff456e3f4d
Enhance ScalarEvolution::isKnownPredicate with support for
...
loop conditions which are invariants.
llvm-svn: 100995
2010-04-11 22:16:48 +00:00
Dan Gohman
a76ed3e23b
Fix a comment.
...
llvm-svn: 100992
2010-04-11 22:07:56 +00:00
Dan Gohman
25305cd2d1
Fix a #include.
...
llvm-svn: 100980
2010-04-11 19:27:52 +00:00
Dan Gohman
9ca5efece4
Rename isLoopGuardedByCond to isLoopEntryGuardedByCond, to emphasise
...
that it's only testing for the entry condition, not full loop-invariant
conditions.
llvm-svn: 100979
2010-04-11 19:27:13 +00:00
Dan Gohman
6ad805d335
Add a -lint pass which checks for common sources of undefined or likely
...
unintended behavior.
llvm-svn: 100798
2010-04-08 18:47:09 +00:00
Dan Gohman
95038973ce
Fix a comment.
...
llvm-svn: 100783
2010-04-08 17:41:04 +00:00
Dan Gohman
b5210c934f
Generalize IVUsers to track arbitrary expressions rather than expressions
...
explicitly split into stride-and-offset pairs. Also, add the
ability to track multiple post-increment loops on the same expression.
This refines the concept of "normalizing" SCEV expressions used for
to post-increment uses, and introduces a dedicated utility routine for
normalizing and denormalizing expressions.
This fixes the expansion of expressions which are post-increment users
of more than one loop at a time. More broadly, this takes LSR another
step closer to being able to reason about more than one loop at a time.
llvm-svn: 100699
2010-04-07 22:27:08 +00:00
David Greene
7c81589636
Ok, third time's the charm. No changes from last time except the CMake
...
source addition. Apparently the buildbots were wrong about failures.
---
Add some switches helpful for debugging:
-print-before=<Pass Name>
Dump IR before running pass <Pass Name>.
-print-before-all
Dump IR before running each pass.
-print-after-all
Dump IR after running each pass.
These are helpful when tracking down a miscompilation. It is easy to
get IR dumps and do diffs on them, etc.
To make this work well, add a new getPrinterPass API to Pass so that
each kind of pass (ModulePass, FunctionPass, etc.) can create a Pass
suitable for dumping out the kind of object the Pass works on.
llvm-svn: 100249
2010-04-02 23:17:14 +00:00
Chris Lattner
305c84b8ee
Switch the code generator (except the JIT) onto the new DebugLoc
...
representation. This eliminates the 'DILocation' MDNodes for
file/line/col tuples from -O0 -g codegen.
This remove the old DebugLoc class, making it a typedef for DebugLoc,
I'll rename NewDebugLoc next.
I didn't update the JIT to use the new apis, so it will continue to
work, but be as slow as before. Someone should eventually do this
or, better yet, rip out the JIT debug info stuff and build the JIT
on top of MC.
llvm-svn: 100209
2010-04-02 19:42:39 +00:00