summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Utils/Local.cpp
Commit message (Collapse)AuthorAgeFilesLines
* rewrite RecursivelyDeleteTriviallyDeadInstructions to use a more efficientChris Lattner2008-11-281-16/+26
| | | | | | formulation that doesn't require set lookups or scanning a set. llvm-svn: 60203
* remove some weirdness that came from the LSR code that hasChris Lattner2008-11-281-8/+1
| | | | | | | nothing to do with dead instruction elimination. No tests in dejagnu depend on this, so I don't know what it was needed for. llvm-svn: 60202
* enhance RecursivelyDeleteTriviallyDeadInstructions to makeChris Lattner2008-11-271-0/+9
| | | | | | PHIs dead if they are single-value. llvm-svn: 60194
* Enhance RecursivelyDeleteTriviallyDeadInstructions to optionallyChris Lattner2008-11-271-7/+15
| | | | | | return a list of deleted instructions. llvm-svn: 60193
* remove doConstantPropagation and dceInstruction, they are justChris Lattner2008-11-271-30/+25
| | | | | | | | | | wrappers around the interesting code and use an obscure iterator abstraction that dates back many many years. Move EraseDeadInstructions to Transforms/Utils and name it RecursivelyDeleteTriviallyDeadInstructions. llvm-svn: 60191
* move MergeBasicBlockIntoOnlyPred to Transforms/Utils.Chris Lattner2008-11-271-0/+33
| | | | llvm-svn: 60162
* Use Instruction::eraseFromParent().Dan Gohman2008-06-211-1/+1
| | | | llvm-svn: 52606
* API changes for class Use size reduction, wave 1.Gabor Greif2008-04-061-2/+2
| | | | | | | | Specifically, introduction of XXX::Create methods for Users that have a potentially variable number of Uses. llvm-svn: 49277
* Remove attribution from file headers, per discussion on llvmdev.Chris Lattner2007-12-291-2/+2
| | | | llvm-svn: 45418
* dead calls to llvm.stacksave can be deleted, even though theyChris Lattner2007-12-291-1/+10
| | | | | | have potential side-effects. llvm-svn: 45392
* Move the GET_SIDE_EFFECT_INFO logic from isInstructionTriviallyDeadDan Gohman2007-07-261-7/+0
| | | | | | | to Instruction::mayWriteToMemory, fixing a FIXME, and helping various places that call mayWriteToMemory directly. llvm-svn: 40533
* move a bunch of constant folding code f rom Transforms/Utils/Local.cpp intoChris Lattner2007-01-301-152/+0
| | | | | | libanalysis/ConstantFolding.cpp. llvm-svn: 33679
* remove now-dead code.Chris Lattner2007-01-301-14/+0
| | | | llvm-svn: 33678
* Change constant folding APIs to take an optional TargetData, and changeChris Lattner2007-01-301-22/+15
| | | | | | | | | | | ConstantFoldInstOperands/ConstantFoldCall to take a pointer to an array of operands + size, instead of an std::vector. In some cases, switch to using a SmallVector instead of a vector. This allows us to get rid of some special case gross code that was there to avoid the cost of constructing a vector. llvm-svn: 33670
* Implement review feedback for the ConstantBool->ConstantInt merge. ChrisReid Spencer2007-01-121-2/+2
| | | | | | | | recommended that getBoolValue be replaced with getZExtValue and that get(bool) be replaced by get(const Type*, uint64_t). This implements those changes. llvm-svn: 33110
* For PR1043:Zhou Sheng2007-01-111-3/+3
| | | | | | | Merge ConstantIntegral and ConstantBool into ConstantInt. Remove ConstantIntegral and ConstantBool from LLVM. llvm-svn: 33073
* For PR950:Reid Spencer2006-12-231-10/+20
| | | | | | | | This patch removes the SetCC instructions and replaces them with the ICmp and FCmp instructions. The SetCondInst instruction has been removed and been replaced with ICmpInst and FCmpInst. llvm-svn: 32751
* For PR950:Reid Spencer2006-11-271-2/+13
| | | | | | | | | | The long awaited CAST patch. This introduces 12 new instructions into LLVM to replace the cast instruction. Corresponding changes throughout LLVM are provided. This passes llvm-test, llvm/test, and SPEC CPUINT2000 with the exception of 175.vpr which fails only on a slight floating point output difference. llvm-svn: 31931
* Remove redundant <cmath>.Jim Laskey2006-11-081-1/+0
| | | | llvm-svn: 31561
* For PR950:Reid Spencer2006-11-081-1/+2
| | | | | | | | This patch converts the old SHR instruction into two instructions, AShr (Arithmetic) and LShr (Logical). The Shr instructions now are not dependent on the sign of their operands. llvm-svn: 31542
* For PR950:Reid Spencer2006-10-201-7/+7
| | | | | | | | This patch implements the first increment for the Signless Types feature. All changes pertain to removing the ConstantSInt and ConstantUInt classes in favor of just using ConstantInt. llvm-svn: 31063
* Refactor some code to expose an interface to constant fold and instruction ↵Chris Lattner2006-05-271-35/+49
| | | | | | given it's opcode, typeand operands. llvm-svn: 28517
* Revert a patch that is unsafe, due to out of range array accesses in innerChris Lattner2006-05-251-2/+2
| | | | | | array scopes possibly accessing valid memory in outer subscripts. llvm-svn: 28478
* Patch for a new instcombine xform, patch contributed by Nick Lewycky!Chris Lattner2006-05-241-2/+4
| | | | | | This implements Transforms/InstCombine/2006-05-10-InvalidIndexUndef.ll llvm-svn: 28450
* Add supprot for shufflevectorChris Lattner2006-04-081-0/+5
| | | | llvm-svn: 27513
* Adjust to change in Intrinsics.gen interface.Chris Lattner2006-04-021-0/+1
| | | | llvm-svn: 27344
* use autogenerated side-effect informationChris Lattner2006-03-091-27/+5
| | | | llvm-svn: 26673
* ConstantFoldLoadThroughGEPConstantExpr wasn't handling pointers toRobert Bocchino2006-01-191-9/+22
| | | | | | packed types correctly. llvm-svn: 25470
* Constant folding support for the insertelement operation.Robert Bocchino2006-01-171-0/+3
| | | | llvm-svn: 25407
* For PR411:Reid Spencer2006-01-161-5/+16
| | | | | | | | | | | | | | | | This patch is an incremental step towards supporting a flat symbol table. It de-overloads the intrinsic functions by providing type-specific intrinsics and arranging for automatically upgrading from the old overloaded name to the new non-overloaded name. Specifically: llvm.isunordered -> llvm.isunordered.f32, llvm.isunordered.f64 llvm.sqrt -> llvm.sqrt.f32, llvm.sqrt.f64 llvm.ctpop -> llvm.ctpop.i8, llvm.ctpop.i16, llvm.ctpop.i32, llvm.ctpop.i64 llvm.ctlz -> llvm.ctlz.i8, llvm.ctlz.i16, llvm.ctlz.i32, llvm.ctlz.i64 llvm.cttz -> llvm.cttz.i8, llvm.cttz.i16, llvm.cttz.i32, llvm.cttz.i64 New code should not use the overloaded intrinsic names. Warnings will be emitted if they are used. llvm-svn: 25366
* Add bswap intrinsics as documented in the Language ReferenceNate Begeman2006-01-141-0/+3
| | | | llvm-svn: 25309
* it is ok to dce stacksave.Chris Lattner2006-01-131-0/+1
| | | | llvm-svn: 25295
* Added support for the extractelement operation.Robert Bocchino2006-01-101-0/+2
| | | | llvm-svn: 25181
* Fix #include orderChris Lattner2005-10-271-1/+1
| | | | llvm-svn: 24044
* Move some constant folding code shared by Analysis and Transform passesJohn Criswell2005-10-271-142/+1
| | | | | | | | into the LLVMAnalysis library. This allows LLVMTranform and LLVMTransformUtils to be archives and linked with LLVMAnalysis.a, which provides any missing definitions. llvm-svn: 24036
* Constant fold llvm.sqrtChris Lattner2005-09-281-1/+9
| | | | llvm-svn: 23487
* Move the ConstantFoldLoadThroughGEPConstantExpr function out of the InstCombineChris Lattner2005-09-261-1/+45
| | | | | | pass. llvm-svn: 23444
* Fix a fixme in CondPropagate.cpp by moving a PhiNode optimization intoNate Begeman2005-08-041-34/+0
| | | | | | | | BasicBlock's removePredecessor routine. This requires shuffling around the definition and implementation of hasContantValue from Utils.h,cpp into Instructions.h,cpp llvm-svn: 22664
* Eliminate all remaining tabs and trailing spaces.Jeff Cohen2005-07-271-3/+3
| | | | llvm-svn: 22523
* prevent DCE of vaarg intrinsics. This should take care of most regressionsAndrew Lenharth2005-06-191-2/+0
| | | | llvm-svn: 22263
* DCE intrinsic instructions without side effects.Chris Lattner2005-05-061-1/+20
| | | | llvm-svn: 21719
* Remove optimizations that don't require both operands to be constant. TheseReid Spencer2005-04-291-10/+0
| | | | | | are moved to simplify-libcalls pass. llvm-svn: 21614
* * Add constant folding for additional floating point library calls such asReid Spencer2005-04-281-26/+90
| | | | | | | | sinh, cosh, etc. * Make the name comparisons for the fp libcalls a little more efficient by switching on the first character of the name before doing comparisons. llvm-svn: 21611
* Remove trailing whitespaceMisha Brukman2005-04-211-11/+11
| | | | llvm-svn: 21427
* Enhance hasConstantValue to ignore undef values in phi nodes. This allows itChris Lattner2004-10-171-2/+3
| | | | | | to think that PHI[4, undef] == 4. llvm-svn: 17096
* Changes For Bug 352Reid Spencer2004-09-011-1/+1
| | | | | | | | Move include/Config and include/Support into include/llvm/Config, include/llvm/ADT and include/llvm/Support. From here on out, all LLVM public header files must be under include/llvm/. llvm-svn: 16137
* Use new IsNAN() wrapper.Brian Gaeke2004-06-231-15/+2
| | | | llvm-svn: 14340
* Comment out the isnan stuff until we get a proper autoconf test for itChris Lattner2004-06-211-1/+7
| | | | | | breaking the build on sparc is not acceptable. llvm-svn: 14277
* I love the smell of a freshly broken PowerPC build in the morning.Brian Gaeke2004-06-171-0/+1
| | | | llvm-svn: 14206
* Fix compilation problem on freebsd. Problem noted by Vladimir Merzliakov inChris Lattner2004-06-171-1/+1
| | | | | | PR371 llvm-svn: 14203
OpenPOWER on IntegriCloud