summaryrefslogtreecommitdiffstats
path: root/llvm/lib/VMCore/Instructions.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Move some code from Verifier into SVI::isValidOperands. This allows us to ↵Nate Begeman2010-08-131-2/+17
| | | | | | catch bad shufflevector operations when they are created, rather than waiting for someone to notice later on. llvm-svn: 110986
* remove the private hack from CallInst, it was not supposed to hit the branch ↵Gabor Greif2010-08-051-1/+1
| | | | | | | | | anyway as a positive consequence the CallSite::getCallee() methods now can be rewritten to be a bit more efficient llvm-svn: 110380
* Define a maximum supported alignment value for load, store, andDan Gohman2010-07-281-0/+8
| | | | | | | | | alloca instructions (constrained by their internal encoding), and add error checking for it. Fix an instcombine bug which generated huge alignment values (null is infinitely aligned). This fixes undefined behavior noticed by John Regehr. llvm-svn: 109643
* eliminate CallInst::ArgOffsetGabor Greif2010-07-161-12/+10
| | | | llvm-svn: 108522
* Convert some tab stops into spaces.Duncan Sands2010-07-121-1/+1
| | | | llvm-svn: 108130
* fix PR7311 by avoiding breaking casts when a bitcast from scalar->vectorChris Lattner2010-07-121-0/+8
| | | | | | is involved. llvm-svn: 108117
* make the prototypes for CreateMalloc and CreateFree more consistent. PatchChris Lattner2010-07-121-3/+4
| | | | | | by Hans Vandierendonck from PR7605 llvm-svn: 108116
* reformulate CallSite::getCallee to adapt to CallInst::ArgOffset, and make it ↵Gabor Greif2010-07-011-1/+3
| | | | | | work even if CallInst::op_* are private llvm-svn: 107390
* encode operand initializations (at fixed index)Gabor Greif2010-06-291-12/+8
| | | | | | | | | in terms of Op<> and ArgOffset. This works for values of {0, 1} for ArgOffset. Please note that ArgOffset will become 0 soon and will go away eventually. llvm-svn: 107129
* Use A.append(...) instead of A.insert(A.end(), ...) when A is aDan Gohman2010-06-211-2/+2
| | | | | | SmallVector, and other SmallVector simplifications. llvm-svn: 106452
* Split the logic behind CastInst::isNoopCast into a separate static function,Dan Gohman2010-05-281-5/+13
| | | | | | as is done with most other cast opcode predicates. llvm-svn: 105008
* Eliminate the restriction that the array size in an alloca must be i32.Dan Gohman2010-05-281-2/+2
| | | | | | This will help reduce the amount of casting required on 64-bit targets. llvm-svn: 104911
* Remove the API compatibility layer which converted add, sub, and mulDan Gohman2010-05-031-18/+4
| | | | | | | | to fadd, fsub, and fmul, when used with a floating-point type. LLVM has supported the new instructions since 2.6, so it's time to get on board. llvm-svn: 102971
* Revert 101465, it broke internal OpenGL testing.Eric Christopher2010-04-161-11/+13
| | | | | | | Probably the best way to know that all getOperand() calls have been handled is to replace that API instead of updating. llvm-svn: 101579
* reapply r101434Gabor Greif2010-04-161-13/+11
| | | | | | | | | | | | | with a fix for self-hosting rotate CallInst operands, i.e. move callee to the back of the operand array the motivation for this patch are laid out in my mail to llvm-commits: more efficient access to operands and callee, faster callgraph-construction, smaller compiler binary llvm-svn: 101465
* back out r101423 and r101397, they break llvm-gcc self-host on darwin10Gabor Greif2010-04-161-11/+13
| | | | llvm-svn: 101434
* reapply r101364, which has been backed out in r101368Gabor Greif2010-04-151-13/+11
| | | | | | | | | | | | | with a fix rotate CallInst operands, i.e. move callee to the back of the operand array the motivation for this patch are laid out in my mail to llvm-commits: more efficient access to operands and callee, faster callgraph-construction, smaller compiler binary llvm-svn: 101397
* back out r101364, as it trips the linux nightlybot on some clang C++ testsGabor Greif2010-04-151-11/+13
| | | | llvm-svn: 101368
* rotate CallInst operands, i.e. move callee to the backGabor Greif2010-04-151-13/+11
| | | | | | | | | | of the operand array the motivation for this patch are laid out in my mail to llvm-commits: more efficient access to operands and callee, faster callgraph-construction, smaller compiler binary llvm-svn: 101364
* Move a bunch of methods from CallSite to CallSiteBase, so that they canDan Gohman2010-04-141-77/+0
| | | | | | be used in ImmutableCallSite too. llvm-svn: 101292
* Say bitcast instead of bitconvert.Dan Gohman2010-04-071-1/+1
| | | | llvm-svn: 100720
* Introduce ImmutableCallSite, useful for contexts where no mutationGabor Greif2010-04-011-5/+0
| | | | | | | | | is necessary. Inherits from new templated baseclass CallSiteBase<> which is highly customizable. Base CallSite on it too, in a configuration that allows full mutation. Adapt some call sites in analyses to employ ImmutableCallSite. llvm-svn: 100100
* Reapply r99451 with a fix to move the NoInline check to the cost functionsEric Christopher2010-03-251-2/+13
| | | | | | instead of InlineFunction. llvm-svn: 99483
* Temporarily revert this, it's causing an issue with an internal project.Eric Christopher2010-03-241-13/+2
| | | | llvm-svn: 99451
* Finally land the InvokeInst operand reordering.Gabor Greif2010-03-241-5/+12
| | | | | | | | | | | | I have audited all getOperandNo calls now, fixing hidden assumptions. CallSite related uglyness will be eliminated successively. Note this patch has a long and griveous history, for all the back-and-forths have a look at CallSite.h's log. llvm-svn: 99399
* add some accessors to callsite/callinst/invokeinst to checkChris Lattner2010-03-231-2/+13
| | | | | | | | for the noinline attribute, and make the inliner refuse to inline a call site when the call site is marked noinline even if the callee isn't. This fixes PR6682. llvm-svn: 99341
* word-oGabor Greif2010-03-231-1/+1
| | | | llvm-svn: 99275
* backing out r99170 because it still fails on clang-x86_64-darwin10-fntGabor Greif2010-03-221-12/+5
| | | | llvm-svn: 99171
* Now that hopefully all direct accesses to InvokeInst operands are fixedGabor Greif2010-03-221-5/+12
| | | | | | we can reapply the InvokeInst operand reordering patch. (see r98957). llvm-svn: 99170
* back out r98957, it broke ↵Gabor Greif2010-03-191-12/+5
| | | | | | http://smooshlab.apple.com:8010/builders/clang-x86_64-darwin10-fnt/builds/703 in the nightly test suite llvm-svn: 98958
* Recommit r80858 again (which has been backed out in r80871).Gabor Greif2010-03-191-5/+12
| | | | | | | | | | | This time I did a self-hosted bootstrap on Linux x86-64, with no problems. Let's see how darwin 64-bit self-hosting goes. At the first sign of failure I'll back this out. Maybe the valgrind bots give me a hint of what may be wrong (it at all). llvm-svn: 98957
* There are two ways of checking for a given type, for example isa<PointerType>(T)Duncan Sands2010-02-161-31/+31
| | | | | | | and T->isPointerTy(). Convert most instances of the first form to the second form. Requested by Chris. llvm-svn: 96344
* Uniformize the names of type predicates: rather than having isFloatTy andDuncan Sands2010-02-151-63/+64
| | | | | | isInteger, we now have isFloatTy and isIntegerTy. Requested by Chris! llvm-svn: 96223
* Adding missing methods for creating Add, Mul, Neg and Sub with NUW.Duncan Sands2010-02-021-0/+12
| | | | llvm-svn: 95086
* fix CastInst::castIsValid to reject aggregate types, fixing PR6153:Chris Lattner2010-01-261-1/+2
| | | | | | | | llvm-as: t.ll:1:25: error: invalid cast opcode for cast from '[4 x i8]' to '[1 x i32]' @x = constant [1 x i32] bitcast ([4 x i8] c"abcd" to [1 x i32]) ^ llvm-svn: 94595
* Fix ICmpInst::makeConstantRange to use ConstantRange's API properlyDan Gohman2010-01-261-2/+30
| | | | | | in the case of empty and full ranges. llvm-svn: 94548
* simplify code a bit.Chris Lattner2010-01-231-5/+5
| | | | llvm-svn: 94281
* InstCombine should not fold sext/zext of a vector and a bitcast to a scalar ↵Mon P Wang2010-01-231-2/+3
| | | | | | to a sext/zext llvm-svn: 94280
* add an out-of-line virtual method to CmpInst to give it a home.Chris Lattner2010-01-221-0/+2
| | | | llvm-svn: 94161
* fix a buggy assertion, CreateIntegerCast should allow Chris Lattner2010-01-101-1/+2
| | | | | | integer vectors as well as just integers. llvm-svn: 93126
* Move remaining stuff to the isInteger predicate.Benjamin Kramer2010-01-051-4/+3
| | | | llvm-svn: 92771
* Convert a ton of simple integer type equality tests to the new predicate.Benjamin Kramer2010-01-051-2/+2
| | | | llvm-svn: 92760
* Avoid going through the LLVMContext for type equality where it's safe to ↵Benjamin Kramer2010-01-051-8/+7
| | | | | | dereference the type pointer. llvm-svn: 92726
* sink the Instruction::HasMetadata bit into SubclassData.Chris Lattner2009-12-291-5/+5
| | | | llvm-svn: 92240
* add a layer of accessors around the Value::SubClassData member, and use Chris Lattner2009-12-291-7/+11
| | | | | | | | | | | a convention (shadowing the setter with private forwarding function) to prevent subclasses from accidentally using it. This exposed some bogosity in ConstantExprs, which was propaging the opcode of the constant expr into the NUW/NSW/Exact field in the getWithOperands/getWithOperandReplaced methods. llvm-svn: 92239
* Add utility routines for creating integer negation operators with NSW set.Dan Gohman2009-12-181-0/+12
| | | | | | Integer negation only overflows with INT_MIN, but that's an important case. llvm-svn: 91662
* make this handle redefinition of malloc function with different prototype ↵Victor Hernandez2009-11-101-7/+9
| | | | | | correctly llvm-svn: 86712
* make this handle redefinition of malloc with different prototype correctly.Chris Lattner2009-11-091-3/+3
| | | | llvm-svn: 86525
* prune #include / layering violationChris Lattner2009-11-071-2/+0
| | | | llvm-svn: 86365
* Fit in 80 columnsVictor Hernandez2009-11-071-2/+4
| | | | llvm-svn: 86316
OpenPOWER on IntegriCloud