Chris Lattner
a643d528bd
Patch for a new instcombine xform, patch contributed by Nick Lewycky!
...
This implements Transforms/InstCombine/2006-05-10-InvalidIndexUndef.ll
llvm-svn: 28450
2006-05-24 17:34:30 +00:00
Chris Lattner
17bd60588c
Add supprot for shufflevector
...
llvm-svn: 27513
2006-04-08 01:19:12 +00:00
Chris Lattner
70ec96fa32
Adjust to change in Intrinsics.gen interface.
...
llvm-svn: 27344
2006-04-02 03:35:01 +00:00
Chris Lattner
60f6833376
use autogenerated side-effect information
...
llvm-svn: 26673
2006-03-09 22:38:10 +00:00
Robert Bocchino
027c18da98
ConstantFoldLoadThroughGEPConstantExpr wasn't handling pointers to
...
packed types correctly.
llvm-svn: 25470
2006-01-19 23:53:23 +00:00
Robert Bocchino
e6336a9b69
Constant folding support for the insertelement operation.
...
llvm-svn: 25407
2006-01-17 20:07:07 +00:00
Reid Spencer
b4f9a6f110
For PR411:
...
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
2006-01-16 21:12:35 +00:00
Nate Begeman
82049eba2c
Add bswap intrinsics as documented in the Language Reference
...
llvm-svn: 25309
2006-01-14 01:25:24 +00:00
Chris Lattner
5fba6e6696
it is ok to dce stacksave.
...
llvm-svn: 25295
2006-01-13 21:31:54 +00:00
Robert Bocchino
230044839d
Added support for the extractelement operation.
...
llvm-svn: 25181
2006-01-10 19:05:34 +00:00
Chris Lattner
479911f971
Fix #include order
...
llvm-svn: 24044
2005-10-27 16:34:00 +00:00
John Criswell
fe5f33b120
Move some constant folding code shared by Analysis and Transform passes
...
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
2005-10-27 15:54:34 +00:00
Chris Lattner
ea7214b23d
Constant fold llvm.sqrt
...
llvm-svn: 23487
2005-09-28 01:34:32 +00:00
Chris Lattner
c13c7b9376
Move the ConstantFoldLoadThroughGEPConstantExpr function out of the InstCombine
...
pass.
llvm-svn: 23444
2005-09-26 05:27:10 +00:00
Nate Begeman
b392321cae
Fix a fixme in CondPropagate.cpp by moving a PhiNode optimization into
...
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
2005-08-04 23:24:19 +00:00
Jeff Cohen
5f4ef3c5a8
Eliminate all remaining tabs and trailing spaces.
...
llvm-svn: 22523
2005-07-27 06:12:32 +00:00
Andrew Lenharth
d4b103107e
prevent DCE of vaarg intrinsics. This should take care of most regressions
...
llvm-svn: 22263
2005-06-19 14:41:20 +00:00
Chris Lattner
a36d525741
DCE intrinsic instructions without side effects.
...
llvm-svn: 21719
2005-05-06 05:27:34 +00:00
Reid Spencer
c968ea0495
Remove optimizations that don't require both operands to be constant. These
...
are moved to simplify-libcalls pass.
llvm-svn: 21614
2005-04-29 05:55:35 +00:00
Reid Spencer
ed55a6b5e0
* Add constant folding for additional floating point library calls such as
...
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
2005-04-28 23:01:59 +00:00
Misha Brukman
b1c9317bb4
Remove trailing whitespace
...
llvm-svn: 21427
2005-04-21 23:48:37 +00:00
Chris Lattner
96db59e48a
Enhance hasConstantValue to ignore undef values in phi nodes. This allows it
...
to think that PHI[4, undef] == 4.
llvm-svn: 17096
2004-10-17 21:23:26 +00:00
Reid Spencer
7c16caa336
Changes For Bug 352
...
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
2004-09-01 22:55:40 +00:00
Brian Gaeke
1ea8447089
Use new IsNAN() wrapper.
...
llvm-svn: 14340
2004-06-23 00:25:35 +00:00
Chris Lattner
46f60890a3
Comment out the isnan stuff until we get a proper autoconf test for it
...
breaking the build on sparc is not acceptable.
llvm-svn: 14277
2004-06-21 06:17:21 +00:00
Brian Gaeke
27b13253d9
I love the smell of a freshly broken PowerPC build in the morning.
...
llvm-svn: 14206
2004-06-17 22:27:04 +00:00
Chris Lattner
f03f320b79
Fix compilation problem on freebsd. Problem noted by Vladimir Merzliakov in
...
PR371
llvm-svn: 14203
2004-06-17 21:20:52 +00:00
Brian Gaeke
20e09e5c7b
Um, did someone make a typo or something?
...
llvm-svn: 14192
2004-06-15 23:09:50 +00:00
Chris Lattner
5a542aadc8
Remove support for the isnan intrinsic
...
llvm-svn: 14186
2004-06-15 21:37:54 +00:00
Brian Gaeke
21370771ba
Quick hack to get this file compiling again on Mac OS X. The right thing to do
...
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().
llvm-svn: 14171
2004-06-14 06:33:19 +00:00
Alkis Evlogimenos
e395468ae5
Add constant folding capabilities to the isunordered intrinsic.
...
llvm-svn: 14168
2004-06-13 01:23:56 +00:00
Chris Lattner
ec941f7abb
Constant fold the isnan intrinsic
...
llvm-svn: 14150
2004-06-11 06:16:23 +00:00
Chris Lattner
c6e21fbd5c
Implement constant folding of fmod, which is used a lot in povray
...
llvm-svn: 13823
2004-05-27 07:25:00 +00:00
Chris Lattner
06158d140c
Restructure call constant folding code a bit to make it simpler
...
Add support for acos/asin/atan. 188.ammp contains three calls to acos with
constant arguments. Constant folding it allows elimination of those 3 calls
and three FP divisions of the results.
llvm-svn: 13821
2004-05-27 06:26:28 +00:00
Alkis Evlogimenos
f68f40ea42
Include cerrno (gcc-3.4 fix)
...
llvm-svn: 13091
2004-04-21 16:11:40 +00:00
Chris Lattner
a43312d30b
Add support for evaluation of exp/log/log10/pow
...
llvm-svn: 13011
2004-04-16 22:35:33 +00:00
Brian Gaeke
174633b078
Include <cmath> for compatibility with gcc 3.0.x (the system compiler on
...
Debian.)
llvm-svn: 12986
2004-04-16 15:57:32 +00:00
Chris Lattner
ca52d0468e
Add a simple call constant propagation interface.
...
llvm-svn: 12919
2004-04-13 19:28:52 +00:00
Chris Lattner
cb015ee6c0
Add constant folding wrapper support for select instructions.
...
llvm-svn: 12319
2004-03-12 05:53:03 +00:00
Chris Lattner
6b052f2154
Clean up #includes
...
llvm-svn: 10799
2004-01-12 19:56:36 +00:00
Chris Lattner
429963742e
Remove use of ConstantExpr::getShift
...
llvm-svn: 10792
2004-01-12 19:10:58 +00:00
Chris Lattner
2853a7ed22
Remove use of ConstantHandling
...
llvm-svn: 10789
2004-01-12 18:35:03 +00:00
Chris Lattner
fc6c859a0c
Move llvm::ConstantFoldInstruction from VMCore to here, next to ConstantFoldTerminator
...
llvm-svn: 10785
2004-01-12 18:25:22 +00:00
Chris Lattner
04efa4b155
Add new function
...
llvm-svn: 10529
2003-12-19 05:56:28 +00:00
Brian Gaeke
960707c335
Put all LLVM code into the llvm namespace, as per bug 109.
...
llvm-svn: 9903
2003-11-11 22:41:34 +00:00
John Criswell
482202a601
Added LLVM project notice to the top of every C++ source file.
...
Header files will be on the way.
llvm-svn: 9298
2003-10-20 19:43:21 +00:00
Chris Lattner
c54d608377
Implement SimplifyCFG/2003-08-17-FoldSwitch.ll:test5
...
llvm-svn: 8093
2003-08-23 23:18:19 +00:00
Chris Lattner
821deeeffa
Implement folding of switch instructions.
...
Implements SimplifyCFG/2003-08-17-FoldSwitch.ll
llvm-svn: 7923
2003-08-17 20:21:14 +00:00
Chris Lattner
031340a551
Fix bug: SimplifyCFG/2003-08-17-BranchFoldOrdering.ll
...
llvm-svn: 7921
2003-08-17 19:41:53 +00:00
Chris Lattner
4b7e3364c7
The fixme is irrelevant: if that happens, the LLVM bytecode is malformed.
...
This fixes testcase: SimplifyCFG/2003-08-17-BranchFold.ll
llvm-svn: 7919
2003-08-17 19:34:55 +00:00