summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/IPO/StructRetPromotion.cpp
Commit message (Collapse)AuthorAgeFilesLines
* 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
* Reimplement the parameter attributes support, phase #1. hilights:Chris Lattner2008-03-121-24/+20
| | | | | | | | | | | | | | | | | | | | | | | 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
* Fix attribute handling.Devang Patel2008-03-121-14/+14
| | | | llvm-svn: 48262
* Initialize.Devang Patel2008-03-111-2/+2
| | | | llvm-svn: 48253
* Skip, for now, callsites where use of sret argument is not dominated by ↵Devang Patel2008-03-051-0/+4
| | | | | | callsite. llvm-svn: 47980
* Filter nested structsDevang Patel2008-03-041-0/+16
| | | | llvm-svn: 47906
* Use appropriate index to get the result value.Devang Patel2008-03-041-1/+3
| | | | llvm-svn: 47897
* Skip sret attribute while preparing attribute list forDevang Patel2008-03-041-11/+21
| | | | | | new function and new call sites. llvm-svn: 47896
* Increment counter that keeps track of total number of sret promoted.Devang Patel2008-03-041-0/+1
| | | | llvm-svn: 47892
* Skip declarations.Devang Patel2008-03-041-1/+1
| | | | llvm-svn: 47890
* Process externally visible functions also. Later on code generator will do ↵Devang Patel2008-03-041-2/+1
| | | | | | the right thing. llvm-svn: 47889
* Collect statistics.Devang Patel2008-03-041-5/+11
| | | | llvm-svn: 47888
* s/isReturnStruct()/hasStructRetAttr()/gDevang Patel2008-03-031-1/+1
| | | | llvm-svn: 47857
* Preserve paramater attributes.Devang Patel2008-03-031-2/+31
| | | | llvm-svn: 47847
* Fix cut-n-pasto.Devang Patel2008-02-291-19/+1
| | | | llvm-svn: 47777
* Add pass to promote sret.Devang Patel2008-02-291-0/+292
This pass transforms %struct._Point = type { i32, i32, i32, i32, i32, i32 } define internal void @foo(%struct._Point* sret %agg.result) into %struct._Point = type { i32, i32, i32, i32, i32, i32 } define internal %struct._Point @foo() This pass updates foo() clients appropriately to use getresult instruction to extract return values. This pass is not yet ready for prime time. llvm-svn: 47776
OpenPOWER on IntegriCloud