aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Analysis/IPA
Commit message (Collapse)AuthorAgeFilesLines
...
| * Reapply r110396, with fixes to appease the Linux buildbot gods.Owen Anderson2010-08-063-9/+9
| | | | | | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110460 91177308-0d34-0410-b5e6-96231b3b80d8
| * Revert r110396 to fix buildbots.Owen Anderson2010-08-063-9/+9
| | | | | | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110410 91177308-0d34-0410-b5e6-96231b3b80d8
| * Don't use PassInfo* as a type identifier for passes. Instead, use the ↵Owen Anderson2010-08-053-9/+9
| | | | | | | | | | | | | | | | | | address of the static ID member as the sole unique type identifier. Clean up APIs related to this change. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110396 91177308-0d34-0410-b5e6-96231b3b80d8
| * Remove PointerAccessInfo, which nothing was using.Dan Gohman2010-08-031-7/+5
| | | | | | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110167 91177308-0d34-0410-b5e6-96231b3b80d8
| * Thread const correctness through a bunch of AliasAnalysis interfaces andDan Gohman2010-08-031-30/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | eliminate several const_casts. Make CallSite implicitly convertible to ImmutableCallSite. Rename the getModRefBehavior for intrinsic IDs to getIntrinsicModRefBehavior to avoid overload ambiguity with CallSite, which happens to be implicitly convertible to bool. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110155 91177308-0d34-0410-b5e6-96231b3b80d8
| * use Value* constructor of CallSite to create potentially improper site, and ↵Gabor Greif2010-07-281-3/+3
| | | | | | | | | | | | test that git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109580 91177308-0d34-0410-b5e6-96231b3b80d8
| * use Value* constructor of CallSite to create potentially improper siteGabor Greif2010-07-281-2/+2
| | | | | | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109579 91177308-0d34-0410-b5e6-96231b3b80d8
| * Add INSTANTIATE_AG_PASS, which combines RegisterPass<> with ↵Owen Anderson2010-07-212-5/+4
| | | | | | | | | | | | RegisterAnalysisGroup<> for pass registration. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109058 91177308-0d34-0410-b5e6-96231b3b80d8
| * Speculatively revert r108813, in an attempt to get the self-host buildbots ↵Owen Anderson2010-07-202-2/+2
| | | | | | | | | | | | | | | | | | working again. I don't see why this patch would cause them to fail the way they are, but none of the other intervening patches seem likely either. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108818 91177308-0d34-0410-b5e6-96231b3b80d8
| * Reapply r108794, a fix for the failing test from last time.Owen Anderson2010-07-202-2/+2
| | | | | | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108813 91177308-0d34-0410-b5e6-96231b3b80d8
| * Revert r108794, "Separate PassInfo into two classes: a constructor-freeDaniel Dunbar2010-07-202-2/+2
| | | | | | | | | | | | | | superclass (StaticPassInfo) and a constructor-ful subclass (PassInfo).", it is breaking teh everything. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108805 91177308-0d34-0410-b5e6-96231b3b80d8
| * Separate PassInfo into two classes: a constructor-free superclass ↵Owen Anderson2010-07-202-2/+2
| | | | | | | | | | | | (StaticPassInfo) and a constructor-ful subclass (PassInfo). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108794 91177308-0d34-0410-b5e6-96231b3b80d8
| * cache result of operator*Gabor Greif2010-07-091-2/+3
| | | | | | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107982 91177308-0d34-0410-b5e6-96231b3b80d8
| * cache result of operator*Gabor Greif2010-07-091-11/+14
| | | | | | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107978 91177308-0d34-0410-b5e6-96231b3b80d8
| * do not repeatedly dereference use_iteratorGabor Greif2010-07-091-3/+5
| | | | | | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107963 91177308-0d34-0410-b5e6-96231b3b80d8
| * Create new accessors to get arguments for call/invoke instructions. It breaksBill Wendling2010-06-071-4/+4
| | | | | | | | | | | | | | | | | | encapsulation to force the users of these classes to know about the internal data structure of the Operands structure. It also can lead to errors, like in the MSIL writer. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@105539 91177308-0d34-0410-b5e6-96231b3b80d8
| * fix PR5009 by making CGSCCPM realize that a call was devirtualizedChris Lattner2010-05-011-5/+36
| | | | | | | | | | | | | | | | if an indirect call site was removed and a direct one was added, not just if an indirect call site was modified to be direct. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102830 91177308-0d34-0410-b5e6-96231b3b80d8
| * Implement rdar://6295824 and PR6724 with two tiny changesChris Lattner2010-05-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | that can have a big effect :). The first is to enable the iterative SCC passmanager juice that kicks in when the scc passmgr detects that a function pass has devirtualized a call. In this case, it will rerun all the passes it manages on the SCC, up to the iteration count limit (4). This is useful because a function pass may devirualize a call, and we want the inliner to inline it, or pruneeh to infer stuff about it, etc. The second patch is to add *all* call sites to the DevirtualizedCalls list the inliner uses. This list is about to get renamed, but the jist of this is that the inliner now reconsiders *all* inlined call sites as candidates for further inlining. The intuition is this that in cases like this: f() { g(1); } g(int x) { h(x); } We analyze this bottom up, and may decide that it isn't profitable to inline H into G. Next step, we decide that it is profitable to inline G into F, and do so, which means that F now calls H. Even though the call from G -> H may not have been profitable to inline, the call from F -> H may be (in this case because a constant allows folding etc). In my spot checks, this doesn't have a big impact on code. For example, the LLC output for 252.eon grew from 0.02% (from 317252 to 317308) and 176.gcc actually shrunk by .3% (from 1525612 to 1520964 bytes). 252.eon never iterated in the SCC Passmgr, 176.gcc iterated at most 1 time. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102823 91177308-0d34-0410-b5e6-96231b3b80d8
| * fix callgraph dump to not print 0x0x1234 for nodes.Chris Lattner2010-04-231-6/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add the instruction pointer value for debuggability. We now get dump output that looks like this: Call graph node for function: 'f1'<<0x1017086b0>> #uses=1 CS<0x1017046f8> calls external node Call graph node for function: '_ZNSt6vectorIdSaIdEEC1EmRKdRKS0_'<<0x1017086f0>> #uses=1 CS<0x0> calls external node Call graph node for function: 'f4'<<0x1017087a0>> #uses=1 CS<0x101708c88> calls function 'f3' git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102194 91177308-0d34-0410-b5e6-96231b3b80d8
| * add a DEBUG call so that -debug lists when CGSCCPM iterates.Chris Lattner2010-04-221-7/+4
| | | | | | | | | | | | | | | | | | | | Fix RefreshCallGraph to use CGN->replaceCallEdge instead of hand rolling its own loop. replaceCallEdge properly maintains the reference counts of the nodes, fixing a crash exposed by the iterative callgraph stuff. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102120 91177308-0d34-0410-b5e6-96231b3b80d8
| * Implement (but don't enable) PR6724 and rdar://6295824. In short,Chris Lattner2010-04-211-56/+122
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | we have RefreshCallGraph detect when a function pass devirtualizes a call, and have CGSCCPassMgr iterate (up to a count) when this happens. This allows (in the example) GVN to devirtualize the call in foo, then the inliner to inline it away. This is not currently enabled because I haven't done any analysis on the (potentially substantial) code size or performance impact of doing this, and guess what, it exposes callgraph updating bugs in various passes. This is progress though, and you can play with it by passing -max-cg-scc-iterations=5 to opt. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101973 91177308-0d34-0410-b5e6-96231b3b80d8
| * PR6880: Don't dereference CallsExternalNode if it's NULL.Benjamin Kramer2010-04-201-3/+5
| | | | | | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101897 91177308-0d34-0410-b5e6-96231b3b80d8
| * make CallGraphNode dtor abort if a node is deleted when there are stillChris Lattner2010-04-201-0/+9
| | | | | | | | | | | | | | references to it. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101847 91177308-0d34-0410-b5e6-96231b3b80d8
| * reenable r101565, removing a problematic assertion.Chris Lattner2010-04-171-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | CGSCC can delete nodes in regions of the callgraph that have already been visited. If new CG nodes are allocated to the same pointer, we shouldn't abort, just handle it correctly by assigning a new number. This should restore stability by removing invalidated pointers that *will* be reused from the densemap in the iterator. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101628 91177308-0d34-0410-b5e6-96231b3b80d8
| * disable r101565: an assert is getting triggered. More lurking badness no doubt.Chris Lattner2010-04-171-0/+2
| | | | | | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101583 91177308-0d34-0410-b5e6-96231b3b80d8
| * Revert 101465, it broke internal OpenGL testing.Eric Christopher2010-04-161-1/+1
| | | | | | | | | | | | | | | | Probably the best way to know that all getOperand() calls have been handled is to replace that API instead of updating. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101579 91177308-0d34-0410-b5e6-96231b3b80d8
| * building on the new CallGraphSCC abstraction, teach CallGraphSCCPassManager Chris Lattner2010-04-161-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | to keep the node entries in scc_iterator up to date instead of dangling as the SCC mutates. This is a really terrible problem which was causing -g to affect codegen because it would permute the memory image of the compiler process. Thanks to Dale for expertly hunting it down. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101565 91177308-0d34-0410-b5e6-96231b3b80d8
| * move ReplaceNode out of line, rename scc_iterator::fini -> isAtEnd().Chris Lattner2010-04-161-5/+15
| | | | | | | | | | | | | | No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101562 91177308-0d34-0410-b5e6-96231b3b80d8
| * introduce a new CallGraphSCC class, and pass it aroundChris Lattner2010-04-161-21/+34
| | | | | | | | | | | | | | | | | | to CallGraphSCCPass's instead of passing around a std::vector<CallGraphNode*>. No functionality change, but now we have a much tidier interface. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101558 91177308-0d34-0410-b5e6-96231b3b80d8
| * move PrintCallGraphPass out of the middle of CGPassManager.Chris Lattner2010-04-161-33/+43
| | | | | | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101543 91177308-0d34-0410-b5e6-96231b3b80d8
| * reapply r101434Gabor Greif2010-04-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | with a fix for self-hosting rotate CallInst operands, i.e. move callee to the back of the operand array the motivation for this patch are laid out in my mail to llvm-commits: more efficient access to operands and callee, faster callgraph-construction, smaller compiler binary git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101465 91177308-0d34-0410-b5e6-96231b3b80d8
| * back out r101423 and r101397, they break llvm-gcc self-host on darwin10Gabor Greif2010-04-161-1/+1
| | | | | | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101434 91177308-0d34-0410-b5e6-96231b3b80d8
| * reapply r101364, which has been backed out in r101368Gabor Greif2010-04-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | with a fix rotate CallInst operands, i.e. move callee to the back of the operand array the motivation for this patch are laid out in my mail to llvm-commits: more efficient access to operands and callee, faster callgraph-construction, smaller compiler binary git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101397 91177308-0d34-0410-b5e6-96231b3b80d8
| * back out r101364, as it trips the linux nightlybot on some clang C++ testsGabor Greif2010-04-151-1/+1
| | | | | | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101368 91177308-0d34-0410-b5e6-96231b3b80d8
| * rotate CallInst operands, i.e. move callee to the backGabor Greif2010-04-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | of the operand array the motivation for this patch are laid out in my mail to llvm-commits: more efficient access to operands and callee, faster callgraph-construction, smaller compiler binary git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101364 91177308-0d34-0410-b5e6-96231b3b80d8
| * Ok, third time's the charm. No changes from last time except the CMakeDavid Greene2010-04-021-0/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100249 91177308-0d34-0410-b5e6-96231b3b80d8
| * Revert 100204. It broke a bunch of tests and apparently changed what passes ↵Evan Cheng2010-04-021-35/+0
| | | | | | | | | | | | are run during codegen. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100207 91177308-0d34-0410-b5e6-96231b3b80d8
| * Let's try this again. Re-apply 100143 including an apparent missingDavid Greene2010-04-021-0/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | <string> include. For some reason the buildbot choked on this while my builds did not. It's probably due to a difference in system headers. --- 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100204 91177308-0d34-0410-b5e6-96231b3b80d8
| * Revert r100143.Eric Christopher2010-04-011-35/+0
| | | | | | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100146 91177308-0d34-0410-b5e6-96231b3b80d8
| * Add some switches helpful for debugging:David Greene2010-04-011-0/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | -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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100143 91177308-0d34-0410-b5e6-96231b3b80d8
| * reapply my timer rewrite with a change for PassManager to store Chris Lattner2010-03-301-8/+9
| | | | | | | | | | | | | | timers by pointer instead of by-value. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99871 91177308-0d34-0410-b5e6-96231b3b80d8
| * revert r99862 which is causing FNT failures.Chris Lattner2010-03-301-9/+8
| | | | | | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99870 91177308-0d34-0410-b5e6-96231b3b80d8
| * fairly major rewrite of various timing related stuff.Chris Lattner2010-03-301-8/+9
| | | | | | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99862 91177308-0d34-0410-b5e6-96231b3b80d8
| * Finally land the InvokeInst operand reordering.Gabor Greif2010-03-241-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | I have audited all getOperandNo calls now, fixing hidden assumptions. CallSite related uglyness will be eliminated successively. Note this patch has a long and griveous history, for all the back-and-forths have a look at CallSite.h's log. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99399 91177308-0d34-0410-b5e6-96231b3b80d8
| * backing out r99170 because it still fails on clang-x86_64-darwin10-fntGabor Greif2010-03-221-1/+1
| | | | | | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99171 91177308-0d34-0410-b5e6-96231b3b80d8
| * Now that hopefully all direct accesses to InvokeInst operands are fixedGabor Greif2010-03-221-1/+1
| | | | | | | | | | | | | | | | we can reapply the InvokeInst operand reordering patch. (see r98957). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99170 91177308-0d34-0410-b5e6-96231b3b80d8
| * back out r98957, it broke ↵Gabor Greif2010-03-191-1/+1
| | | | | | | | | | | | http://smooshlab.apple.com:8010/builders/clang-x86_64-darwin10-fnt/builds/703 in the nightly test suite git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98958 91177308-0d34-0410-b5e6-96231b3b80d8
| * Recommit r80858 again (which has been backed out in r80871).Gabor Greif2010-03-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | This time I did a self-hosted bootstrap on Linux x86-64, with no problems. Let's see how darwin 64-bit self-hosting goes. At the first sign of failure I'll back this out. Maybe the valgrind bots give me a hint of what may be wrong (it at all). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98957 91177308-0d34-0410-b5e6-96231b3b80d8
| * Update CMake build.Ted Kremenek2010-03-011-1/+0
| | | | | | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97488 91177308-0d34-0410-b5e6-96231b3b80d8
| * remove anders-aa from mainline, it isn't maintained and isChris Lattner2010-03-011-2868/+0
| | | | | | | | | | | | | | tantalyzing enough that people keep trying to use it. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97483 91177308-0d34-0410-b5e6-96231b3b80d8