summaryrefslogtreecommitdiffstats
path: root/llvm/lib/VMCore/Instructions.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Add functions to enable adding a single attribute to a function andEric Christopher2008-05-161-0/+12
| | | | | | its associated call site. llvm-svn: 51204
* API change for {BinaryOperator|CmpInst|CastInst}::create*() --> Create. ↵Gabor Greif2008-05-161-44/+44
| | | | | | Legacy interfaces will be in place for some time. (Merge from use-diet branch.) llvm-svn: 51200
* Revert the change from r51157 inDan Gohman2008-05-161-1/+1
| | | | | | | | test/Verifier/2002-11-05-GetelementptrPointers.ll, which was incorrect. Instead, fix getIndexedType to not follow pointer types, as PointerType is a subclass of CompositeType. llvm-svn: 51171
* IR support for extractvalue and insertvalue instructions. Also, beginDan Gohman2008-05-151-32/+37
| | | | | | moving toward making structs and arrays first-class types. llvm-svn: 51157
* Fix a bunch of 80col violations that arose from the Create API change. Tweak ↵Gabor Greif2008-05-151-26/+39
| | | | | | makefile targets to find these better. llvm-svn: 51143
* Merge of r51073-51074 from use-diet branch.Gabor Greif2008-05-131-1/+1
| | | | | | | | | | | Do not rely on std::swap<Use>, provide a (faster) member function instead. This change is primarily necessitated by MSVC++'s incompatibility with declaring std::swap<Use> to be a friend of Use. Also contains some minor tweaks to Use inline functions, to undo pointless changes that sneaked in with the last merge. llvm-svn: 51078
* Derive GetResultInst from UnaryInstruction, this simplifies code and removes ↵Gabor Greif2008-05-131-8/+6
| | | | | | a FIXME. llvm-svn: 51023
* Pointer comparisons should be handled by icmp, not vicmp :)Nate Begeman2008-05-121-2/+2
| | | | llvm-svn: 50994
* Hard code CmpInst back to i1 for now while I go track down what in the ↵Nate Begeman2008-05-121-2/+2
| | | | | | | | bitcode reader/writer is assuming i1 This was breaking a bunch of tests llvm-svn: 50992
* Add two new instructions to the llvm IR, vicmp and vfcmp. see updated LangRefNate Begeman2008-05-121-61/+39
| | | | | | for details. CodeGen support coming in a follow up patch llvm-svn: 50985
* Update comments.Dan Gohman2008-05-121-4/+3
| | | | llvm-svn: 50974
* merge of use-diet branch to trunkGabor Greif2008-05-101-161/+251
| | | | llvm-svn: 50943
* Enforce that multiple return values have to have at least one result.Chris Lattner2008-04-231-1/+1
| | | | llvm-svn: 50137
* 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
OpenPOWER on IntegriCloud