summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/IPO/ArgumentPromotion.cpp
Commit message (Collapse)AuthorAgeFilesLines
* 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
* Tidy up several unbeseeming casts from pointer to intptr_t.Dan Gohman2008-09-041-1/+1
| | | | llvm-svn: 55779
* Restructure ArgumentPromotion a bit. Instead of just having a single booleanMatthijs Kooijman2008-07-291-99/+235
| | | | | | | | | | | | | that says "unconditional loads from this argument are safe", we now keep track of the safety per set of indices from which loads happen. This prevents ArgPromotion from promoting loads that aren't really valid. As an added effect, this will now disregard the the type of the indices passed to a GEP, so "load GEP %A, i32 1" and "load GEP %A, i64 1" will result in a single argument, not two. This fixes PR2598, for which a testcase has been added as well. llvm-svn: 54159
* convert more operand loops to iterator formulationGabor Greif2008-05-291-2/+3
| | | | llvm-svn: 51663
* Fix some constructs that gcc-4.4 warns about.Duncan Sands2008-05-271-1/+2
| | | | llvm-svn: 51591
* Factor code to copy global value attributes likeDuncan Sands2008-05-261-4/+2
| | | | | | | | | | | | | | | the section or the visibility from one global value to another: copyAttributesFrom. This is particularly useful for duplicating functions: previously this was done by explicitly copying each attribute in turn at each place where a new function was created out of an old one, with the result that obscure attributes were regularly forgotten (like the collector or the section). Hopefully now everything is uniform and nothing is forgotten. llvm-svn: 51567
* Indent fix.Matthijs Kooijman2008-05-231-2/+2
| | | | llvm-svn: 51477
* Use isSingleValueType instead of isFirstClassType toDan Gohman2008-05-231-2/+2
| | | | | | exclude struct and array types. llvm-svn: 51459
* 80 col / tabs fixesNate Begeman2008-05-131-4/+5
| | | | llvm-svn: 51021
* Clean up the use of static and anonymous namespaces. This turned upDan Gohman2008-05-131-4/+4
| | | | | | | several things that were neither in an anonymous namespace nor static but not intended to be global. llvm-svn: 51017
* Allow argpromote to promote struct arguments with a specified numberChris Lattner2008-04-191-10/+17
| | | | | | of elements. Patch by Matthijs Kooijman! llvm-svn: 49962
* API changes for class Use size reduction, wave 1.Gabor Greif2008-04-061-12/+12
| | | | | | | | Specifically, introduction of XXX::Create methods for Users that have a potentially variable number of Uses. llvm-svn: 49277
* Take the old function's name.Zhou Sheng2008-03-201-0/+1
| | | | llvm-svn: 48588
* Reimplement the parameter attributes support, phase #1. hilights:Chris Lattner2008-03-121-17/+14
| | | | | | | | | | | | | | | | | | | | | | | 1. There is now a "PAListPtr" class, which is a smart pointer around the underlying uniqued parameter attribute list object, and manages its refcount. It is now impossible to mess up the refcount. 2. PAListPtr is now the main interface to the underlying object, and the underlying object is now completely opaque. 3. Implementation details like SmallVector and FoldingSet are now no longer part of the interface. 4. You can create a PAListPtr with an arbitrary sequence of ParamAttrsWithIndex's, no need to make a SmallVector of a specific size (you can just use an array or scalar or vector if you wish). 5. All the client code that had to check for a null pointer before dereferencing the pointer is simplified to just access the PAListPtr directly. 6. The interfaces for adding attrs to a list and removing them is a bit simpler. Phase #2 will rename some stuff (e.g. PAListPtr) and do other less invasive changes. llvm-svn: 48289
* Split ParameterAttributes.h, putting the complicatedDale Johannesen2008-02-221-1/+1
| | | | | | | stuff into ParamAttrsList.h. Per feedback from ParamAttrs changes. llvm-svn: 47504
OpenPOWER on IntegriCloud