summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/IPO
Commit message (Collapse)AuthorAgeFilesLines
...
* Clear CachedFunctionInfo upon Pass::releaseMemory. Because ValueMap will abortNick Lewycky2010-05-121-0/+3
| | | | | | | | | | 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
* revert r102831. We already delete dead readonly calls inChris Lattner2010-05-011-8/+1
| | | | | | | other places, killing a valid transformation is not the right answer. llvm-svn: 102850
* Disable the call-deletion transformation introduced in r86975. WithoutOwen Anderson2010-05-011-1/+8
| | | | | | | | | | halting analysis, it is illegal to delete a call to a read-only function. The correct solution is almost certainly to add a "must halt" attribute and only allow deletions in its presence. XFAIL the relevant testcase for now. llvm-svn: 102831
* rename InlineInfo.DevirtualizedCalls -> InlinedCalls toChris Lattner2010-05-011-4/+4
| | | | | | | reflect that it includes all inlined calls now, not just devirtualized ones. llvm-svn: 102824
* The inliner has traditionally not considered call sitesChris Lattner2010-05-011-9/+48
| | | | | | | | | | | | | | | | | that appear due to inlining a callee as candidates for futher inlining, but a recent patch made it do this if those call sites were indirect and became direct. Unfortunately, in bizarre cases (see testcase) doing this can cause us to infinitely inline mutually recursive functions into callers not in the cycle. Fix this by keeping track of the inline history from which callsite inline candidates got inlined from. This shouldn't affect any "real world" code, but is required for a follow on patch that is coming up next. llvm-svn: 102822
* Preserve debug info attached with call instruction while eliminating dead ↵Devang Patel2010-04-301-0/+6
| | | | | | | | argument. Radar 7927803 llvm-svn: 102760
* remove #if 1's.Chris Lattner2010-04-251-2/+0
| | | | llvm-svn: 102296
* enable my inliner change: add newly devirtualized call sites toChris Lattner2010-04-231-1/+1
| | | | | | the worklist, making them inline candidates. llvm-svn: 102213
* switch InlineInfo.DevirtualizedCalls's list to be of WeakVH.Chris Lattner2010-04-231-2/+4
| | | | | | | | | This fixes a bug where calls inlined into an invoke would get changed into an invoke but the array would keep pointing to the (now dead) call. The improved inliner behavior is still disabled for now. llvm-svn: 102196
* disable my previous inliner patch, it appears to be busting self-host.Chris Lattner2010-04-231-0/+2
| | | | llvm-svn: 102153
* The inliner was choosing to not consider call sitesChris Lattner2010-04-221-1/+7
| | | | | | | | | | that appear in the SCC as a result of inlining as candidates for inlining. Change this so that it *does* consider call sites that change from being indirect to being direct as a result of inlining. This allows it to completely "devirtualize" the testcase. llvm-svn: 102146
* refactor the interface to InlineFunction so that most of the in/outChris Lattner2010-04-222-11/+12
| | | | | | | | arguments are handled with a new InlineFunctionInfo class. This makes it easier to extend InlineFunction to return more info in the future. llvm-svn: 102137
* use abstract accessors to CallInstGabor Greif2010-04-201-2/+2
| | | | llvm-svn: 101899
* make the inliner do less work for leaf functions.Chris Lattner2010-04-201-0/+4
| | | | llvm-svn: 101846
* Fix rdar://7879828 - crash in CallGraph, a self host issue.Chris Lattner2010-04-201-3/+9
| | | | | | | | Arg promotion was deleting call graph nodes that still had references from the 'indirect' CGN. Like the inliner, it should only delete the function if all references are gone. llvm-svn: 101845
* Revert 101465, it broke internal OpenGL testing.Eric Christopher2010-04-162-17/+17
| | | | | | | Probably the best way to know that all getOperand() calls have been handled is to replace that API instead of updating. llvm-svn: 101579
* introduce a new CallGraphSCC class, and pass it aroundChris Lattner2010-04-165-52/+54
| | | | | | | | to CallGraphSCCPass's instead of passing around a std::vector<CallGraphNode*>. No functionality change, but now we have a much tidier interface. llvm-svn: 101558
* reapply r101434Gabor Greif2010-04-162-17/+17
| | | | | | | | | | | | | 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 llvm-svn: 101465
* back out r101423 and r101397, they break llvm-gcc self-host on darwin10Gabor Greif2010-04-162-17/+17
| | | | llvm-svn: 101434
* reapply r101364, which has been backed out in r101368Gabor Greif2010-04-152-17/+17
| | | | | | | | | | | | | 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 llvm-svn: 101397
* back out r101364, as it trips the linux nightlybot on some clang C++ testsGabor Greif2010-04-152-17/+17
| | | | llvm-svn: 101368
* rotate CallInst operands, i.e. move callee to the backGabor Greif2010-04-152-17/+17
| | | | | | | | | | 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 llvm-svn: 101364
* IPO needs ScalarOpts and InstCombine in its libsTobias Grosser2010-04-141-0/+2
| | | | | | | | The commit "Adding IPSCCP and Internalize passes to the C-bindings" introduced new dependencies for IPO. Add these to the CMAKE build as otherwise the BUILD_SHARED_LIBS=1 build fails. llvm-svn: 101313
* - Code clean up to reduce indentation.Evan Cheng2010-04-141-51/+54
| | | | | | - TryToOptimizeStoreOfMallocToGlobal should check if TargetData is available and bail out if it is not. The transformations being done requires TD. llvm-svn: 101285
* I don't know how, but I managed to goof the revert. Remove function that shouldNick Lewycky2010-04-141-37/+0
| | | | | | have been removed in r101231. llvm-svn: 101232
* Revert r101213.Nick Lewycky2010-04-141-29/+14
| | | | llvm-svn: 101231
* Remove tab.Nick Lewycky2010-04-141-1/+1
| | | | llvm-svn: 101223
* While DAE can't modify the function signature of an externally visible function,Nick Lewycky2010-04-141-14/+66
| | | | | | | | | it can check whether the visible direct callers are passing in parameters to dead arguments and replace those with undef. This reinstates r94322 with bugs fixed. llvm-svn: 101213
* Implement support for varargs functions without any fixedChris Lattner2010-04-101-15/+0
| | | | | | | | parameters in the CBE by implicitly adding a fixed argument. This allows eliminating a work-around from DAE. Patch by Sylvere Teissier! llvm-svn: 100944
* fix PR6760, a missing check in heap SRoA.Chris Lattner2010-04-101-1/+2
| | | | llvm-svn: 100936
* Adding IPSCCP and Internalize passes to the C-bindingsWesley Peck2010-04-091-0/+9
| | | | llvm-svn: 100893
* fix 80-col violationsGabor Greif2010-04-071-13/+17
| | | | llvm-svn: 100677
* make more two predicates constantGabor Greif2010-04-061-15/+15
| | | | llvm-svn: 100549
* performance: get rid of repeated dereferencing of use_iterator by caching ↵Gabor Greif2010-04-061-21/+28
| | | | | | its result llvm-svn: 100547
* const-ize predicate ValueIsOnlyUsedLocallyOrStoredToOneGlobalGabor Greif2010-04-061-9/+10
| | | | llvm-svn: 100546
* use CallSite to access calls vs. invokes uniformlyGabor Greif2010-04-061-5/+6
| | | | | | and remove assumptions about operand order llvm-svn: 100544
* don't internalize available_externally functions, they areChris Lattner2010-04-031-0/+4
| | | | | | really just declarations. This is related to PR6524 llvm-svn: 100269
* Revert the recent alignment changes. They're broken for -Os because,Dan Gohman2010-04-021-7/+1
| | | | | | | in particular, they end up aligning strings at 16-byte boundaries, and there's no way for GlobalOpt to check OptForSize. llvm-svn: 100172
* Make globalopt refine global variable alignment.Dan Gohman2010-04-021-1/+7
| | | | llvm-svn: 100160
* Introduce ImmutableCallSite, useful for contexts where no mutationGabor Greif2010-04-012-63/+65
| | | | | | | | | is necessary. Inherits from new templated baseclass CallSiteBase<> which is highly customizable. Base CallSite on it too, in a configuration that allows full mutation. Adapt some call sites in analyses to employ ImmutableCallSite. llvm-svn: 100100
* Clean up this file a little, no functionality change. This is a subset of myNick Lewycky2010-04-011-11/+10
| | | | | | patch back in r94322. llvm-svn: 100097
* When we promote a load of an argument make sure to take the alignmentEric Christopher2010-03-271-1/+5
| | | | | | | of the previous load - it's usually important. For example, we don't want to blindly turn an unaligned load into an aligned one. llvm-svn: 99699
* Finally land the InvokeInst operand reordering.Gabor Greif2010-03-242-2/+2
| | | | | | | | | | | | 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. llvm-svn: 99399
* tighten a type and remove trailing whitespace, no functional changesGabor Greif2010-03-241-12/+12
| | | | llvm-svn: 99398
* add assert in argpromotion, which cannot triggerGabor Greif2010-03-231-4/+5
| | | | | | | | if Function::hasAddressTaken works as advertised also included some cosmetic cleanups llvm-svn: 99276
* backing out r99170 because it still fails on clang-x86_64-darwin10-fntGabor Greif2010-03-222-4/+4
| | | | llvm-svn: 99171
* Now that hopefully all direct accesses to InvokeInst operands are fixedGabor Greif2010-03-222-4/+4
| | | | | | we can reapply the InvokeInst operand reordering patch. (see r98957). llvm-svn: 99170
* Add a setCalledFunction member to InvokeInst (like in CallInst)Gabor Greif2010-03-201-2/+2
| | | | | | | and use this (as well as getCalledValue) to access the callee, instead of {g|s}etOperand(0). llvm-svn: 99084
* back out r98957, it broke ↵Gabor Greif2010-03-192-4/+4
| | | | | | http://smooshlab.apple.com:8010/builders/clang-x86_64-darwin10-fnt/builds/703 in the nightly test suite llvm-svn: 98958
* Recommit r80858 again (which has been backed out in r80871).Gabor Greif2010-03-192-4/+4
| | | | | | | | | | | 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). llvm-svn: 98957
OpenPOWER on IntegriCloud