summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/IPO/StructRetPromotion.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-1/+4
| | | | llvm-svn: 116443
* Now with fewer extraneous semicolons!Owen Anderson2010-10-071-1/+1
| | | | llvm-svn: 115996
* zap dead code.Chris Lattner2010-08-261-13/+1
| | | | llvm-svn: 112130
* 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-2/+2
| | | | | | from the tree llvm-svn: 109687
* mass elimination of reliance on automatic iterator dereferencingGabor Greif2010-07-221-1/+1
| | | | llvm-svn: 109103
* Fix batch of converting RegisterPass<> to INTIALIZE_PASS().Owen Anderson2010-07-211-2/+2
| | | | llvm-svn: 109045
* cache dereferenced iteratorsGabor Greif2010-07-121-3/+3
| | | | llvm-svn: 108134
* Use pre-increment instead of post-increment when the result is not used.Dan Gohman2010-06-221-2/+2
| | | | llvm-svn: 106542
* introduce a new CallGraphSCC class, and pass it aroundChris Lattner2010-04-161-5/+5
| | | | | | | | 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
* Avoid going through the LLVMContext for type equality where it's safe to ↵Benjamin Kramer2010-01-051-3/+2
| | | | | | dereference the type pointer. llvm-svn: 92726
* Change errs() to dbgs().David Greene2010-01-051-3/+3
| | | | llvm-svn: 92627
* 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
* remove CallGraphNode::replaceCallSite, it is redundant with other APIs.Chris Lattner2009-09-011-1/+3
| | | | llvm-svn: 80708
* cleanup/simplifyChris Lattner2009-09-011-17/+13
| | | | llvm-svn: 80706
* Fix some nasty callgraph dangling pointer problems in Chris Lattner2009-08-311-26/+39
| | | | | | | | | | | | | | | | | | | | | | | | | 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
* remove a few DOUTs here and there.Chris Lattner2009-08-231-2/+2
| | | | llvm-svn: 79832
* Push LLVMContexts through the IntegerType APIs.Owen Anderson2009-08-131-3/+4
| | | | llvm-svn: 78948
* Move types back to the 2.5 API.Owen Anderson2009-07-291-2/+1
| | | | llvm-svn: 77516
* Remove Value::getName{Start,End}, the last of the old Name APIs.Daniel Dunbar2009-07-261-1/+3
| | | | llvm-svn: 77152
* Get rid of the Pass+Context magic.Owen Anderson2009-07-221-1/+2
| | | | llvm-svn: 76702
* Revert yesterday's change by removing the LLVMContext parameter to ↵Owen Anderson2009-07-151-2/+2
| | | | | | 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-1/+2
| | | | llvm-svn: 74811
* introduce a useful abstraction to find out if a Use is in the call position ↵Gabor Greif2009-01-221-4/+1
| | | | | | of an instruction llvm-svn: 62788
* Add the private linkage.Rafael Espindola2009-01-151-1/+1
| | | | llvm-svn: 62279
* Now Attributes are divided in three groupsDevang Patel2008-09-261-4/+12
| | | | | | | | | | | | | - 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-18/+18
| | | | | | | | | | | | | | | 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-4/+4
| | | | llvm-svn: 56513
* Update the callgraph correctly.Duncan Sands2008-09-081-1/+4
| | | | llvm-svn: 55896
* Tidy up several unbeseeming casts from pointer to intptr_t.Dan Gohman2008-09-041-1/+1
| | | | llvm-svn: 55779
* Replace two for loops with while(!X->use_empty()) loops. This preventsMatthijs Kooijman2008-08-141-10/+8
| | | | | | | | | invalidating the iterator by deleting the current use. This fixes a segfault on 64 bit linux reported in PR2675. Also remove an unneeded if. llvm-svn: 54778
* Let SRETPromotion properly preserve the function name instead of (implicitly)Matthijs Kooijman2008-08-071-1/+2
| | | | | | postfixing it with a number. llvm-svn: 54468
* Fix SRETPromotion, it was generating functions without returns statements sinceMatthijs Kooijman2008-08-071-1/+1
| | | | | | | r53941 (but this was not noticed due to the lack of a basic test for SRETPromotion). llvm-svn: 54467
* Add some debug output to SRETPromotion.Matthijs Kooijman2008-08-071-0/+4
| | | | llvm-svn: 54464
* Enable first-class aggregates support.Dan Gohman2008-07-231-19/+5
| | | | | | | | | | | | Remove the GetResultInst instruction. It is still accepted in LLVM assembly and bitcode, where it is now auto-upgraded to ExtractValueInst. Also, remove support for return instructions with multiple values. These are auto-upgraded to use InsertValueInst instructions. The IRBuilder still accepts multiple-value returns, and auto-upgrades them to InsertValueInst instructions. llvm-svn: 53941
* Let StructRetPromotion check if all if its users are really calls or invokesn,Matthijs Kooijman2008-06-051-0/+4
| | | | | | not other instructions. This fixes a crash with the added testcase. llvm-svn: 51992
* Let StructRetPromotion check if it's users are really calling it and notMatthijs Kooijman2008-06-051-0/+4
| | | | | | passing its pointer. Fixes test with added testcase. llvm-svn: 51991
* Factor code to copy global value attributes likeDuncan Sands2008-05-261-1/+1
| | | | | | | | | | | | | | | 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
* Use isSingleValueType instead of isFirstClassType toDan Gohman2008-05-231-1/+1
| | | | | | exclude struct and array types. llvm-svn: 51456
* 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
* Fix a type and formatting.Duncan Sands2008-05-091-2/+2
| | | | llvm-svn: 50900
* Improve pass documentation and comments.Gordon Henriksen2008-05-081-2/+11
| | | | | | Patch by Matthijs Kooijman! llvm-svn: 50861
* Check linkage.Devang Patel2008-05-081-1/+1
| | | | llvm-svn: 50851
* API changes for class Use size reduction, wave 1.Gabor Greif2008-04-061-8/+8
| | | | | | | | Specifically, introduction of XXX::Create methods for Users that have a potentially variable number of Uses. llvm-svn: 49277
OpenPOWER on IntegriCloud