summaryrefslogtreecommitdiff
path: root/lib/Transforms/Utils/Local.cpp
Commit message (Collapse)AuthorAge
* Use Instruction::eraseFromParent().Dan Gohman2008-06-21
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52606 91177308-0d34-0410-b5e6-96231b3b80d8
* API changes for class Use size reduction, wave 1.Gabor Greif2008-04-06
| | | | | | | | | Specifically, introduction of XXX::Create methods for Users that have a potentially variable number of Uses. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49277 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove attribution from file headers, per discussion on llvmdev.Chris Lattner2007-12-29
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45418 91177308-0d34-0410-b5e6-96231b3b80d8
* dead calls to llvm.stacksave can be deleted, even though theyChris Lattner2007-12-29
| | | | | | | have potential side-effects. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45392 91177308-0d34-0410-b5e6-96231b3b80d8
* Move the GET_SIDE_EFFECT_INFO logic from isInstructionTriviallyDeadDan Gohman2007-07-26
| | | | | | | | to Instruction::mayWriteToMemory, fixing a FIXME, and helping various places that call mayWriteToMemory directly. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40533 91177308-0d34-0410-b5e6-96231b3b80d8
* move a bunch of constant folding code f rom Transforms/Utils/Local.cpp intoChris Lattner2007-01-30
| | | | | | | libanalysis/ConstantFolding.cpp. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33679 91177308-0d34-0410-b5e6-96231b3b80d8
* remove now-dead code.Chris Lattner2007-01-30
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33678 91177308-0d34-0410-b5e6-96231b3b80d8
* Change constant folding APIs to take an optional TargetData, and changeChris Lattner2007-01-30
| | | | | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33670 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement review feedback for the ConstantBool->ConstantInt merge. ChrisReid Spencer2007-01-12
| | | | | | | | | recommended that getBoolValue be replaced with getZExtValue and that get(bool) be replaced by get(const Type*, uint64_t). This implements those changes. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33110 91177308-0d34-0410-b5e6-96231b3b80d8
* For PR1043:Zhou Sheng2007-01-11
| | | | | | | | Merge ConstantIntegral and ConstantBool into ConstantInt. Remove ConstantIntegral and ConstantBool from LLVM. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33073 91177308-0d34-0410-b5e6-96231b3b80d8
* For PR950:Reid Spencer2006-12-23
| | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32751 91177308-0d34-0410-b5e6-96231b3b80d8
* For PR950:Reid Spencer2006-11-27
| | | | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31931 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove redundant <cmath>.Jim Laskey2006-11-08
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31561 91177308-0d34-0410-b5e6-96231b3b80d8
* For PR950:Reid Spencer2006-11-08
| | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31542 91177308-0d34-0410-b5e6-96231b3b80d8
* For PR950:Reid Spencer2006-10-20
| | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31063 91177308-0d34-0410-b5e6-96231b3b80d8
* Refactor some code to expose an interface to constant fold and instruction ↵Chris Lattner2006-05-27
| | | | | | given it's opcode, typeand operands. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28517 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert a patch that is unsafe, due to out of range array accesses in innerChris Lattner2006-05-25
| | | | | | | array scopes possibly accessing valid memory in outer subscripts. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28478 91177308-0d34-0410-b5e6-96231b3b80d8
* Patch for a new instcombine xform, patch contributed by Nick Lewycky!Chris Lattner2006-05-24
| | | | | | | This implements Transforms/InstCombine/2006-05-10-InvalidIndexUndef.ll git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28450 91177308-0d34-0410-b5e6-96231b3b80d8
* Add supprot for shufflevectorChris Lattner2006-04-08
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27513 91177308-0d34-0410-b5e6-96231b3b80d8
* Adjust to change in Intrinsics.gen interface.Chris Lattner2006-04-02
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27344 91177308-0d34-0410-b5e6-96231b3b80d8
* use autogenerated side-effect informationChris Lattner2006-03-09
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26673 91177308-0d34-0410-b5e6-96231b3b80d8
* ConstantFoldLoadThroughGEPConstantExpr wasn't handling pointers toRobert Bocchino2006-01-19
| | | | | | | packed types correctly. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25470 91177308-0d34-0410-b5e6-96231b3b80d8
* Constant folding support for the insertelement operation.Robert Bocchino2006-01-17
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25407 91177308-0d34-0410-b5e6-96231b3b80d8
* For PR411:Reid Spencer2006-01-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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25366 91177308-0d34-0410-b5e6-96231b3b80d8
* Add bswap intrinsics as documented in the Language ReferenceNate Begeman2006-01-14
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25309 91177308-0d34-0410-b5e6-96231b3b80d8
* it is ok to dce stacksave.Chris Lattner2006-01-13
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25295 91177308-0d34-0410-b5e6-96231b3b80d8
* Added support for the extractelement operation.Robert Bocchino2006-01-10
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25181 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix #include orderChris Lattner2005-10-27
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24044 91177308-0d34-0410-b5e6-96231b3b80d8
* Move some constant folding code shared by Analysis and Transform passesJohn Criswell2005-10-27
| | | | | | | | | into the LLVMAnalysis library. This allows LLVMTranform and LLVMTransformUtils to be archives and linked with LLVMAnalysis.a, which provides any missing definitions. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24036 91177308-0d34-0410-b5e6-96231b3b80d8
* Constant fold llvm.sqrtChris Lattner2005-09-28
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23487 91177308-0d34-0410-b5e6-96231b3b80d8
* Move the ConstantFoldLoadThroughGEPConstantExpr function out of the InstCombineChris Lattner2005-09-26
| | | | | | | pass. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23444 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a fixme in CondPropagate.cpp by moving a PhiNode optimization intoNate Begeman2005-08-04
| | | | | | | | | BasicBlock's removePredecessor routine. This requires shuffling around the definition and implementation of hasContantValue from Utils.h,cpp into Instructions.h,cpp git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22664 91177308-0d34-0410-b5e6-96231b3b80d8
* Eliminate all remaining tabs and trailing spaces.Jeff Cohen2005-07-27
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22523 91177308-0d34-0410-b5e6-96231b3b80d8
* prevent DCE of vaarg intrinsics. This should take care of most regressionsAndrew Lenharth2005-06-19
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22263 91177308-0d34-0410-b5e6-96231b3b80d8
* DCE intrinsic instructions without side effects.Chris Lattner2005-05-06
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21719 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove optimizations that don't require both operands to be constant. TheseReid Spencer2005-04-29
| | | | | | | are moved to simplify-libcalls pass. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21614 91177308-0d34-0410-b5e6-96231b3b80d8
* * Add constant folding for additional floating point library calls such asReid Spencer2005-04-28
| | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21611 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove trailing whitespaceMisha Brukman2005-04-21
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21427 91177308-0d34-0410-b5e6-96231b3b80d8
* Enhance hasConstantValue to ignore undef values in phi nodes. This allows itChris Lattner2004-10-17
| | | | | | | to think that PHI[4, undef] == 4. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17096 91177308-0d34-0410-b5e6-96231b3b80d8
* Changes For Bug 352Reid Spencer2004-09-01
| | | | | | | | | 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/. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16137 91177308-0d34-0410-b5e6-96231b3b80d8
* Use new IsNAN() wrapper.Brian Gaeke2004-06-23
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14340 91177308-0d34-0410-b5e6-96231b3b80d8
* Comment out the isnan stuff until we get a proper autoconf test for itChris Lattner2004-06-21
| | | | | | | breaking the build on sparc is not acceptable. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14277 91177308-0d34-0410-b5e6-96231b3b80d8
* I love the smell of a freshly broken PowerPC build in the morning.Brian Gaeke2004-06-17
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14206 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix compilation problem on freebsd. Problem noted by Vladimir Merzliakov inChris Lattner2004-06-17
| | | | | | | PR371 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14203 91177308-0d34-0410-b5e6-96231b3b80d8
* Um, did someone make a typo or something?Brian Gaeke2004-06-15
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14192 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove support for the isnan intrinsicChris Lattner2004-06-15
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14186 91177308-0d34-0410-b5e6-96231b3b80d8
* Quick hack to get this file compiling again on Mac OS X. The right thing to doBrian Gaeke2004-06-14
| | | | | | | | | is write an autoconf macro that checks whether __isnan or isnan actually works **using the C++ compiler after #include <cmath>**, instead of doing it the easy way with AC_CHECK_FUNCS(). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14171 91177308-0d34-0410-b5e6-96231b3b80d8
* Add constant folding capabilities to the isunordered intrinsic.Alkis Evlogimenos2004-06-13
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14168 91177308-0d34-0410-b5e6-96231b3b80d8
* Constant fold the isnan intrinsicChris Lattner2004-06-11
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14150 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement constant folding of fmod, which is used a lot in povrayChris Lattner2004-05-27
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13823 91177308-0d34-0410-b5e6-96231b3b80d8