summaryrefslogtreecommitdiffstats
path: root/llvm/lib/VMCore/Instructions.cpp
Commit message (Collapse)AuthorAgeFilesLines
* 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
* Shrink the size of AllocationInst by using its SubclassDataDan Gohman2008-03-241-4/+10
| | | | | | | field to store the alignment value instead of haing a separate field. llvm-svn: 48727
* move a bunch of trivial methods to be inline.Chris Lattner2008-03-131-74/+2
| | | | llvm-svn: 48326
* Reimplement the parameter attributes support, phase #1. hilights:Chris Lattner2008-03-121-63/+16
| | | | | | | | | | | | | | | | | | | | | | | 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
* s/isReturnStruct()/hasStructRetAttr()/gDevang Patel2008-03-031-4/+6
| | | | llvm-svn: 47857
* Add a new ShuffleVectorInst::getMaskValue method.Chris Lattner2008-03-021-6/+24
| | | | llvm-svn: 47813
* Add comment.Devang Patel2008-02-271-1/+0
| | | | llvm-svn: 47653
* Remove unncessary ReturnInst constructors.Devang Patel2008-02-261-20/+0
| | | | llvm-svn: 47633
* Use SmallVector while constructing ReturnInst.Devang Patel2008-02-261-0/+18
| | | | llvm-svn: 47619
* Avoid const_castsDevang Patel2008-02-261-5/+5
| | | | llvm-svn: 47616
* Remove unnecessary getOperand/setOperand overriders.Devang Patel2008-02-261-11/+0
| | | | | | Simplify getReturnValue() llvm-svn: 47614
* Unify to ReturnInst::init() member functions.Devang Patel2008-02-261-22/+17
| | | | llvm-svn: 47611
* Optimize most common case by using single RetVal in ReturnInst.Devang Patel2008-02-261-20/+34
| | | | llvm-svn: 47607
* Pass const vectors by reference.Devang Patel2008-02-261-4/+4
| | | | llvm-svn: 47577
* To support multiple return values, now ret instruction supports multiple ↵Devang Patel2008-02-231-9/+53
| | | | | | operands instead of one aggregate operand. llvm-svn: 47508
* Split ParameterAttributes.h, putting the complicatedDale Johannesen2008-02-221-1/+1
| | | | | | | stuff into ParamAttrsList.h. Per feedback from ParamAttrs changes. llvm-svn: 47504
* Pass alignment on ByVal parameters, from FE, allDale Johannesen2008-02-221-0/+22
| | | | | | the way through. It is now used for codegen. llvm-svn: 47484
* getresult does not support nested aggregates.Devang Patel2008-02-201-3/+14
| | | | llvm-svn: 47396
* getresult type is the type of indexed aggregate elementDevang Patel2008-02-201-1/+1
| | | | llvm-svn: 47392
* Specify GetResultInst index as an unsigned.Devang Patel2008-02-201-10/+12
| | | | llvm-svn: 47390
* Unbreak build with gcc 4.3: provide missed includes and silence most ↵Anton Korobeynikov2008-02-201-7/+10
| | | | | | annoying warnings. llvm-svn: 47367
* Add GetResultInst. First step for multiple return value support.Devang Patel2008-02-191-0/+24
| | | | llvm-svn: 47348
* Expand ParameterAttributes to 32 bits (in preparationDale Johannesen2008-02-191-9/+9
| | | | | | | for adding alignment info, not there yet). Clean up interfaces to reference ParameterAttributes consistently. llvm-svn: 47342
* Simplify caller updating using a CallSite, asDuncan Sands2008-02-181-0/+4
| | | | | | | | requested by Chris. While there, do the same for an existing function committed by someone called "lattner" :) llvm-svn: 47273
* Handle some more combinations of extend and icmp. Fixes PR1940.Nick Lewycky2008-01-281-0/+13
| | | | llvm-svn: 46431
* Be consistent with other attribute methods, andDuncan Sands2008-01-211-1/+7
| | | | | | check the callee also if it is known. llvm-svn: 46206
* Simplify CallInst::hasByValArgument using a new method.Duncan Sands2008-01-141-4/+1
| | | | llvm-svn: 45974
* Simplify code.Evan Cheng2008-01-141-4/+1
| | | | llvm-svn: 45950
* Add hasByValArgument() to test if a call instruction has byval argument(s).Evan Cheng2008-01-121-0/+11
| | | | llvm-svn: 45913
* When transforming a call to a bitcast function intoDuncan Sands2008-01-061-1/+62
| | | | | | | | | | | a direct call with cast parameters and cast return value (if any), instcombine was prepared to cast any non-void return value into any other, whether castable or not. Add a new predicate for testing whether casting is valid, and check it both for the return value and (as a cleanup) for the parameters. llvm-svn: 45657
* Split param attr implementation out from Function.cpp into itsChris Lattner2008-01-021-9/+66
| | | | | | | own file. Don't #include ParameterAttributes.h into any major public header files: just move methods out of line as appropriate. llvm-svn: 45517
* remove blob of #if'd out code.Chris Lattner2008-01-021-37/+0
| | | | llvm-svn: 45512
* Remove attribution from file headers, per discussion on llvmdev.Chris Lattner2007-12-291-2/+2
| | | | llvm-svn: 45418
* When inlining through an 'nounwind' call, mark inlinedDuncan Sands2007-12-191-0/+24
| | | | | | | | | calls 'nounwind'. It is important for correct C++ exception handling that nounwind markings do not get lost, so this transformation is actually needed for correctness. llvm-svn: 45218
* Rename isNoReturn to doesNotReturn, and isNoUnwind toDuncan Sands2007-12-181-3/+3
| | | | | | doesNotThrow. llvm-svn: 45160
* Change the PointerType api for creating pointer types. The old functionality ↵Christopher Lamb2007-12-171-6/+8
| | | | | | of PointerType::get() has become PointerType::getUnqual(), which returns a pointer in the generic address space. The new prototype of PointerType::get() requires both a type and an address space. llvm-svn: 45082
* Make instcombine promote inline asm calls to 'nounwind'Duncan Sands2007-12-161-0/+6
| | | | | | | | | | | | | calls. Remove special casing of inline asm from the inliner. There is a potential problem: the verifier rejects invokes of inline asm (not sure why). If an asm call is not marked "nounwind" in some .ll, and instcombine is not run, but the inliner is run, then an illegal module will be created. This is bad but I'm not sure what the best approach is. I'm tempted to remove the check in the verifier... llvm-svn: 45073
* Implement address space attribute for LLVM pointer types. Address spaces are Christopher Lamb2007-12-111-2/+4
| | | | | | | | | | | | | | | | | regions of memory that have a target specific relationship, as described in the Embedded C Technical Report. This also implements the 2007-12-11-AddressSpaces test, which demonstrates how address space attributes can be used in LLVM IR. In addition, this patch changes the bitcode signature for stores (in a backwards compatible manner), such that the pointer type, rather than the pointee type, is encoded. This permits type information in the pointer (e.g. address space) to be preserved for stores. LangRef updates are forthcoming. llvm-svn: 44858
* Reverting dtor devirtualization patch.Gordon Henriksen2007-12-101-18/+32
| | | | | | | _sabre_: it has a major problem: by the time ~Value is run, all of the "parts" of the derived classes have been destroyed _sabre_: the vtable lives to fight another day llvm-svn: 44760
* Devirtualizing Value destructor (PR889). Patch by Pawel Kunio!Gordon Henriksen2007-12-091-32/+18
| | | | llvm-svn: 44747
* Rather than having special rules like "intrinsics cannotDuncan Sands2007-12-031-1/+12
| | | | | | | | | throw exceptions", just mark intrinsics with the nounwind attribute. Likewise, mark intrinsics as readnone/readonly and get rid of special aliasing logic (which didn't use anything more than this anyway). llvm-svn: 44544
* Small parameter attributes cleanup.Duncan Sands2007-11-291-4/+6
| | | | llvm-svn: 44433
* Add some convenience methods for querying attributes, andDuncan Sands2007-11-281-8/+18
| | | | | | use them. llvm-svn: 44403
* Fix PR1146: parameter attributes are longer part ofDuncan Sands2007-11-271-6/+38
| | | | | | | | | | | | the function type, instead they belong to functions and function calls. This is an updated and slightly corrected version of Reid Spencer's original patch. The only known problem is that auto-upgrading of bitcode files doesn't seem to work properly (see test/Bitcode/AutoUpgradeIntrinsics.ll). Hopefully a bitcode guru (who might that be? :) ) will fix it. llvm-svn: 44359
* Add support for vectors to int <-> float casts.Nate Begeman2007-11-171-2/+14
| | | | llvm-svn: 44204
* fix typoChris Lattner2007-10-181-1/+1
| | | | llvm-svn: 43129
* Update GEP constructors to use an iterator interface to fixDavid Greene2007-09-041-73/+0
| | | | | | GLIBCXX_DEBUG issues. llvm-svn: 41697
* Update InvokeInst to work like CallInstDavid Greene2007-08-271-22/+0
| | | | llvm-svn: 41506
* sink clone() down the class hierarchy from CmpInst into ICmpInst/FCmpInst.Chris Lattner2007-08-241-2/+5
| | | | | | | This eliminates a conditional on that path, and ensures ICmpInst/FCmpInst both have an out-of-line virtual method to home the class. llvm-svn: 41371
* New CallInst interface to address GLIBCXX_DEBUG errors caused byDavid Greene2007-08-011-6/+7
| | | | | | | | indexing an empty std::vector. Updates to all clients. llvm-svn: 40660
OpenPOWER on IntegriCloud