summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Analysis/ConstantFolding.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Add sqrt and powi intrinsics for long double.Dale Johannesen2007-09-281-0/+6
| | | | llvm-svn: 42423
* Next round of APFloat changes.Dale Johannesen2007-09-061-14/+41
| | | | | | | | | | | | | | Use APFloat in UpgradeParser and AsmParser. Change all references to ConstantFP to use the APFloat interface rather than double. Remove the ConstantFP double interfaces. Use APFloat functions for constant folding arithmetic and comparisons. (There are still way too many places APFloat is just a wrapper around host float/double, but we're getting there.) llvm-svn: 41747
* constant fold ptrtoint(inttoptr) with target data when available. This allowsChris Lattner2007-08-111-2/+17
| | | | | | | | | | us to fold the entry block of PR1602 to false instead of: br i1 icmp eq (i32 and (i32 ptrtoint (void (%struct.S*)* inttoptr (i64 1 to void (%struct.S*)*) to i32), i32 1), i32 0), label %cond_next, label %cond_true llvm-svn: 41023
* Handle functions with no name better.Chris Lattner2007-08-081-1/+2
| | | | llvm-svn: 40926
* significantly speed up constant folding of calls (and thus all clients that useChris Lattner2007-08-081-94/+131
| | | | | | | | ConstantFoldInstruction on calls) by avoiding Value::getName(). getName() constructs and returns an std::string, which does heap allocation stuff. This slightly speeds up instcombine. llvm-svn: 40924
* This is the patch to provide clean intrinsic function overloading support in ↵Chandler Carruth2007-08-041-3/+3
| | | | | | | | LLVM. It cleans up the intrinsic definitions and generally smooths the process for more complicated intrinsic writing. It will be used by the upcoming atomic intrinsics as well as vector and float intrinsics in the future. This also changes the syntax for llvm.bswap, llvm.part.set, llvm.part.select, and llvm.ct* intrinsics. They are automatically upgraded by both the LLVM ASM reader and the bitcode reader. The test cases have been updated, with special tests added to ensure the automatic upgrading is supported. llvm-svn: 40807
* Use ConstantFoldFP for folding all unary floating-point operations which mayDan Gohman2007-07-161-20/+25
| | | | | | | | | have an error, and refector out the code for binary operators into ConstantFoldBinaryFP and use it for all binary floating-point operations which may have an error. These functions still rely exclusively on errno to detect errors though. llvm-svn: 39923
* The bit counting intrinsics return i32 not the operand type. This fixesReid Spencer2007-04-011-4/+3
| | | | | | last night's regression in SingleSource/UnitTests/2005-05-11-Popcount-ffs-fls llvm-svn: 35556
* For PR1297:Reid Spencer2007-04-011-23/+17
| | | | | | Support overloaded intrinsics bswap, ctpop, cttz, ctlz. llvm-svn: 35547
* Unbreak VC++ build.Jeff Cohen2007-03-051-2/+2
| | | | llvm-svn: 34917
* For PR1195:Reid Spencer2007-02-151-2/+2
| | | | | | | Rename PackedType -> VectorType, ConstantPacked -> ConstantVector, and PackedTyID -> VectorTyID. No functional changes. llvm-svn: 34293
* completely eliminate a temporary vectorChris Lattner2007-02-101-2/+2
| | | | llvm-svn: 34162
* Privatize StructLayout::MemberOffsets, adding an accessorChris Lattner2007-02-101-1/+1
| | | | llvm-svn: 34156
* Changes to support making the shift instructions be true BinaryOperators.Reid Spencer2007-02-021-4/+0
| | | | | | | | | | | | This feature is needed in order to support shifts of more than 255 bits on large integer types. This changes the syntax for llvm assembly to make shl, ashr and lshr instructions look like a binary operator: shl i32 %X, 1 instead of shl i32 %X, i8 1 Additionally, this should help a few passes perform additional optimizations. llvm-svn: 33776
* Fix a minor bug in my patch yesterday that broken ConstProp/bswap.llChris Lattner2007-01-311-1/+1
| | | | llvm-svn: 33704
* elimiante a temporary vectorChris Lattner2007-01-311-3/+1
| | | | llvm-svn: 33694
* Move some symbolic constant folding code out of instcombine into a placeChris Lattner2007-01-311-3/+136
| | | | | | | it can be used by multiple clients. This specifically allows the inliner to constant fold symbolically. llvm-svn: 33687
* move a bunch of constant folding code f rom Transforms/Utils/Local.cpp intoChris Lattner2007-01-301-2/+155
| | | | | | libanalysis/ConstantFolding.cpp. llvm-svn: 33679
* adjust to constant folding api changes.Chris Lattner2007-01-301-5/+6
| | | | llvm-svn: 33673
* Constant fold llvm.powi.*. This speeds up tramp3d--v4 by 9.5%Chris Lattner2007-01-151-1/+12
| | | | llvm-svn: 33229
* remove llvm.isunorderedChris Lattner2007-01-071-5/+0
| | | | llvm-svn: 32991
* For PR950:Reid Spencer2006-12-311-1/+0
| | | | | | | | | | | | | This patch replaces signed integer types with signless ones: 1. [US]Byte -> Int8 2. [U]Short -> Int16 3. [U]Int -> Int32 4. [U]Long -> Int64. 5. Removal of isSigned, isUnsigned, getSignedVersion, getUnsignedVersion and other methods related to signedness. In a few places this warranted identifying the signedness information from other sources. llvm-svn: 32785
* Unbreak VC++ build.Jeff Cohen2006-12-021-0/+1
| | | | llvm-svn: 32113
* Remove redundant <cmath>.Jim Laskey2006-11-081-1/+0
| | | | llvm-svn: 31561
* For PR950:Reid Spencer2006-10-201-5/+6
| | | | | | | | 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
* Constant fold sqrtfChris Lattner2006-06-171-1/+4
| | | | llvm-svn: 28853
* For PR411:Reid Spencer2006-01-161-7/+18
| | | | | | | | | | | | | | | | 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/+15
| | | | llvm-svn: 25309
* Move some constant folding functions into LLVMAnalysis since they are usedJohn Criswell2005-10-271-0/+172
by Analysis and Transformation passes. llvm-svn: 24038
OpenPOWER on IntegriCloud