summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/IPO/ArgumentPromotion.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Get rid of static constructors for pass registration. Instead, every pass ↵Owen Anderson2010-10-191-1/+3
| | | | | | | | | | | | | | | | | exposes an initializeMyPassFunction(), which must be called in the pass's constructor. This function uses static dependency declarations to recursively initialize the pass's dependencies. Clients that only create passes through the createFooPass() APIs will require no changes. Clients that want to use the CommandLine options for passes will need to manually call the appropriate initialization functions in PassInitialization.h before parsing commandline arguments. I have tested this with all standard configurations of clang and llvm-gcc on Darwin. It is possible that there are problems with the static dependencies that will only be visible with non-standard options. If you encounter any crash in pass registration/creation, please send the testcase to me directly. llvm-svn: 116820
* CallGraphSCC passes implicity require CallGraph analysis.Owen Anderson2010-10-131-0/+1
| | | | llvm-svn: 116443
* Begin adding static dependence information to passes, which will allow us toOwen Anderson2010-10-121-1/+4
| | | | | | | | | perform initialization without static constructors AND without explicit initialization by the client. For the moment, passes are required to initialize both their (potential) dependencies and any passes they preserve. I hope to be able to relax the latter requirement in the future. llvm-svn: 116334
* Now with fewer extraneous semicolons!Owen Anderson2010-10-071-1/+1
| | | | llvm-svn: 115996
* Reapply r110396, with fixes to appease the Linux buildbot gods.Owen Anderson2010-08-061-1/+1
| | | | llvm-svn: 110460
* Revert r110396 to fix buildbots.Owen Anderson2010-08-061-1/+1
| | | | llvm-svn: 110410
* Don't use PassInfo* as a type identifier for passes. Instead, use the ↵Owen Anderson2010-08-051-1/+1
| | | | | | | | address of the static ID member as the sole unique type identifier. Clean up APIs related to this change. llvm-svn: 110396
* simplify by using CallSite constructors; virtually eliminates CallSite::get ↵Gabor Greif2010-07-281-4/+3
| | | | | | from the tree llvm-svn: 109687
* Fix batch of converting RegisterPass<> to INTIALIZE_PASS().Owen Anderson2010-07-211-2/+2
| | | | llvm-svn: 109045
* cache result of operator*Gabor Greif2010-07-121-6/+9
| | | | llvm-svn: 108146
* 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
* introduce a new CallGraphSCC class, and pass it aroundChris Lattner2010-04-161-5/+6
| | | | | | | | 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
* 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
* 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
* Correct whitespace.Nick Lewycky2010-02-251-1/+1
| | | | llvm-svn: 97120
* There are two ways of checking for a given type, for example isa<PointerType>(T)Duncan Sands2010-02-161-2/+2
| | | | | | | and T->isPointerTy(). Convert most instances of the first form to the second form. Requested by Chris. llvm-svn: 96344
* Fix "the the" and similar typos.Dan Gohman2010-02-101-1/+1
| | | | llvm-svn: 95781
* Change errs() to dbgs().David Greene2010-01-051-5/+5
| | | | llvm-svn: 92639
* Remove includes of Support/Compiler.h that are no longer needed after theNick Lewycky2009-10-251-1/+0
| | | | | | VISIBILITY_HIDDEN removal. llvm-svn: 85043
* Remove VISIBILITY_HIDDEN from class/struct found inside anonymous namespaces.Nick Lewycky2009-10-251-1/+1
| | | | | | | Chris claims we should never have visibility_hidden inside any .cpp file but that's still not true even after this commit. llvm-svn: 85042
* add a new CallGraphNode::replaceCallEdge method and use it fromChris Lattner2009-09-151-4/+4
| | | | | | | | argpromote to avoid invalidating an iterator. This fixes PR4977. All clang tests now pass with expensive checking (on my system at least). llvm-svn: 81843
* remove CallGraphNode::replaceCallSite, it is redundant with other APIs.Chris Lattner2009-09-011-1/+3
| | | | llvm-svn: 80708
* add -debug outputChris Lattner2009-08-311-0/+4
| | | | llvm-svn: 80539
* Fix some nasty callgraph dangling pointer problems in Chris Lattner2009-08-311-22/+30
| | | | | | | | | | | | | | | | | | | | | | | | | argpromotion and structretpromote. Basically, when replacing a function, they used the 'changeFunction' api which changes the entry in the function map (and steals/reuses the callgraph node). This has some interesting effects: first, the problem is that it doesn't update the "callee" edges in any callees of the function in the call graph. Second, this covers for a major problem in all the CGSCC pass stuff, which is that it is completely broken when functions are deleted if they *don't* reuse a CGN. (there is a cute little fixme about this though :). This patch changes the protocol that CGSCC passes must obey: now the CGSCC pass manager copies the SCC and preincrements its iterator to avoid passes invalidating it. This allows CGSCC passes to mutate the current SCC. However multiple passes may be run on that SCC, so if passes do this, they are now required to *update* the SCC to be current when they return. Other less interesting parts of this patch are that it makes passes update the CG more directly, eliminates changeFunction, and requires clients of replaceCallSite to specify the new callee CGN if they are changing it. llvm-svn: 80527
* prune the #includes in raw_ostream.h by moving a Chris Lattner2009-08-241-0/+1
| | | | | | | member out of line. ftostr is not particularly speedy, so that method is presumably not perf sensitive. llvm-svn: 79885
* Make TargetData optional in GlobalOpt and ArgumentPromotion.Dan Gohman2009-08-141-3/+3
| | | | llvm-svn: 78967
* Push LLVMContexts through the IntegerType APIs.Owen Anderson2009-08-131-8/+13
| | | | llvm-svn: 78948
* Move a few more APIs back to 2.5 forms. The only remaining ones left to ↵Owen Anderson2009-07-311-3/+2
| | | | | | | | change back are metadata related, which I'm waiting on to avoid conflicting with Devang. llvm-svn: 77721
* Twines: Don't allow implicit conversion from integers, this is too tricky.Daniel Dunbar2009-07-301-2/+2
| | | | llvm-svn: 77605
* Switch obvious clients to Twine instead of utostr (when they were already usingDaniel Dunbar2009-07-301-3/+2
| | | | | | | | | a Twine, e.g., for names). - I am a little ambivalent about this; we don't want the string conversion of utostr, but using overload '+' mixed with string and integer arguments is sketchy. On the other hand, this particular usage is something of an idiom. llvm-svn: 77579
* Move types back to the 2.5 API.Owen Anderson2009-07-291-1/+1
| | | | llvm-svn: 77516
* More migration to raw_ostream, the water has dried up around the iostream hole.Daniel Dunbar2009-07-251-11/+12
| | | | | | | | | | - Some clients which used DOUT have moved to DEBUG. We are deprecating the "magic" DOUT behavior which avoided calling printing functions when the statement was disabled. In addition to being unnecessary magic, it had the downside of leaving code in -Asserts builds, and of hiding potentially unnecessary computations. llvm-svn: 77019
* Revert the ConstantInt constructors back to their 2.5 forms where possible, ↵Owen Anderson2009-07-241-5/+5
| | | | | | thanks to contexts-on-types. More to come. llvm-svn: 77011
* Remove unnecessary store to temporary std::string.Daniel Dunbar2009-07-221-3/+4
| | | | llvm-svn: 76782
* Get rid of the Pass+Context magic.Owen Anderson2009-07-221-8/+9
| | | | llvm-svn: 76702
* Revert yesterday's change by removing the LLVMContext parameter to ↵Owen Anderson2009-07-151-1/+1
| | | | | | AllocaInst and MallocInst. llvm-svn: 75863
* Move EVER MORE stuff over to LLVMContext.Owen Anderson2009-07-141-1/+1
| | | | llvm-svn: 75703
* More LLVMContext-ification.Owen Anderson2009-07-061-8/+9
| | | | llvm-svn: 74811
* Implement and use new method Function::hasAddressTaken().Jay Foad2009-06-101-11/+2
| | | | llvm-svn: 73164
* Use a safer iterator interface and get rid of std C++ library misuse.David Greene2009-04-171-3/+2
| | | | | | This fixes a --enable-expensive-checks problem. llvm-svn: 69353
* Add explicit keywords.Dan Gohman2009-02-181-2/+2
| | | | llvm-svn: 64915
* introduce a useful abstraction to find out if a Use is in the call position ↵Gabor Greif2009-01-221-1/+1
| | | | | | of an instruction llvm-svn: 62788
* Add the private linkage.Rafael Espindola2009-01-151-1/+1
| | | | llvm-svn: 62279
* If SI->size() is 0, we are not allowed to dereference ->begin().Torok Edwin2008-11-161-2/+4
| | | | | | This fixed PR3078. llvm-svn: 59416
* Now Attributes are divided in three groupsDevang Patel2008-09-261-5/+13
| | | | | | | | | | | | | - return attributes - inreg, zext and sext - parameter attributes - function attributes - nounwind, readonly, readnone, noreturn Return attributes use 0 as the index. Function attributes use ~0U as the index. This patch requires corresponding changes in llvm-gcc and clang. llvm-svn: 56704
* Large mechanical patch.Devang Patel2008-09-251-22/+22
| | | | | | | | | | | | | | | s/ParamAttr/Attribute/g s/PAList/AttrList/g s/FnAttributeWithIndex/AttributeWithIndex/g s/FnAttr/Attribute/g This sets the stage - to implement function notes as function attributes and - to distinguish between function attributes and return value attributes. This requires corresponding changes in llvm-gcc and clang. llvm-svn: 56622
* s/ParamAttrsWithIndex/FnAttributeWithIndex/gDevang Patel2008-09-241-6/+6
| | | | llvm-svn: 56535
* s/ParameterAttributes/Attributes/gDevang Patel2008-09-231-5/+5
| | | | llvm-svn: 56513
* Update the callgraph correctly in ArgumentPromotion.Duncan Sands2008-09-081-0/+7
| | | | llvm-svn: 55895
* Correct a comment and strip trailing whitespace.Duncan Sands2008-09-071-25/+25
| | | | llvm-svn: 55883
OpenPOWER on IntegriCloud