summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Analysis/ValueTracking.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Split the Add, Sub, and Mul instruction opcodes into separateDan Gohman2009-06-041-1/+1
| | | | | | | | | | | | | | | integer and floating-point opcodes, introducing FAdd, FSub, and FMul. For now, the AsmParser, BitcodeReader, and IRBuilder all preserve backwards compatability, and the Core LLVM APIs preserve backwards compatibility for IR producers. Most front-ends won't need to change immediately. This implements the first step of the plan outlined here: http://nondot.org/sabre/LLVMNotes/IntegerOverflow.txt llvm-svn: 72897
* When the low bits of one operand of an add are zero, that numberDan Gohman2009-05-241-10/+31
| | | | | | of low bits of the other operand are preserved in the output. llvm-svn: 72365
* Teach ValueTracking a new way to analyze PHI nodes, and and teachDan Gohman2009-05-211-2/+27
| | | | | | | | Instcombine to be more aggressive about using SimplifyDemandedBits on shift nodes. This allows a shift to be simplified to zero in the included test case. llvm-svn: 72204
* Rename PaddedSize to AllocSize, in the hope that thisDuncan Sands2009-05-091-1/+1
| | | | | | | will make it more obvious what it represents, and stop it being confused with the StoreSize. llvm-svn: 71349
* Oops...I committed too much.Bill Wendling2009-03-131-82/+38
| | | | llvm-svn: 66867
* Temporarily XFAIL this test.Bill Wendling2009-03-131-38/+82
| | | | llvm-svn: 66866
* Fix a ValueTracking rule: RHS means operand 1, not 0. Add a simpleDan Gohman2009-02-241-1/+1
| | | | | | | ashr instcombine to help expose this code. And apply the fix to SelectionDAG's copy of this code too. llvm-svn: 65364
* Eliminate use of uint32_t to improve compatibility with cygwinChris Lattner2009-01-201-6/+6
| | | | llvm-svn: 62590
* Rename getABITypeSize to getTypePaddedSize, asDuncan Sands2009-01-121-1/+1
| | | | | | suggested by Chris. llvm-svn: 62099
* ValueTracker can't assume that an alloca with no specified alignment Chris Lattner2009-01-081-1/+1
| | | | | | | | will get its preferred alignment. It has to be careful and cautiously assume it will just get the ABI alignment. This prevents instcombine from rounding up the alignment of a load/store without adjusting the alignment of the alloca. llvm-svn: 61934
* Re-apply 55137 with fixes.David Greene2008-10-271-4/+7
| | | | llvm-svn: 58296
* Temporarily reverting r55137. This was causing the bootstrap to go into anBill Wendling2008-08-211-7/+3
| | | | | | infinite loop. llvm-svn: 55149
* Fix ComputeMaskedBits to handle phis correctly. We need to take theDavid Greene2008-08-211-3/+7
| | | | | | minimum of the known zeros. llvm-svn: 55137
* Fix a bogus srem rule - a negative value srem'd by a power-of-2Dan Gohman2008-08-131-5/+3
| | | | | | | can have a non-negative result; for example, -16%16 is 0. Also, clarify the related comments. This fixes PR2670. llvm-svn: 54767
* Don't use ++idx_begin when I actually mean idx_begin + 1, especially since weMatthijs Kooijman2008-07-161-1/+1
| | | | | | | | also use *idx_begin in the same expression, giving unpredictable results. This fixes this bug: http://lists.cs.uiuc.edu/pipermail/llvmdev/2008-July/015877.html llvm-svn: 53670
* - Re-apply 52748 and friends with fix. GetConstantStringInfo() returns an ↵Evan Cheng2008-06-301-0/+100
| | | | | | | | empty string for ConstantAggregateZero case which surprises selectiondag. - Correctly handle memcpy from constant string which is zero-initialized. llvm-svn: 52891
* Revert (52748 and friends):Anton Korobeynikov2008-06-291-100/+0
| | | | | | | | | | | | Move GetConstantStringInfo to lib/Analysis. Remove string output routine from Constant. Update all callers. Change debug intrinsic api slightly to accomodate move of routine, these now return values instead of strings. This unbreaks llvm-gcc bootstrap. llvm-svn: 52884
* Add back the capability to include nul characters in strings with Chris Lattner2008-06-281-5/+7
| | | | | | | GetConstantStringInfo. This will hopefully restore llvm-gcc to happy bootstrap land. llvm-svn: 52851
* Tighten up checking.Chris Lattner2008-06-281-4/+10
| | | | llvm-svn: 52850
* fix the regressions from Eric's patch by making GetConstantStringInfoChris Lattner2008-06-271-29/+34
| | | | | | | tolerate a non-nul-terminated string, and handling a direct global reference. llvm-svn: 52813
* Reserve the size we'll need in advance.Owen Anderson2008-06-261-0/+1
| | | | llvm-svn: 52763
* Move GetConstantStringInfo to lib/Analysis. RemoveEric Christopher2008-06-261-0/+86
| | | | | | | | | string output routine from Constant. Update all callers. Change debug intrinsic api slightly to accomodate move of routine, these now return values instead of strings. llvm-svn: 52748
* Fix some warnings reported by gcc-4.3. HopefullyDuncan Sands2008-06-191-1/+2
| | | | | | this still compiles on windows - I can't test! llvm-svn: 52488
* Use a SmallVector instead of an array, since auto_ptr doesn't handle arraysMatthijs Kooijman2008-06-171-11/+8
| | | | | | properly. llvm-svn: 52390
* Make BuildSubAggregate use FindInsertedElement again to prevent it fromMatthijs Kooijman2008-06-161-20/+48
| | | | | | | | inserting extractvalues. In particular, this prevents the insertion of extractvalues that can't be folded away later. Also add an example of when this stuff is needed. llvm-svn: 52328
* Make the InsertBefore argument to FindInsertedValue optional, so you can ↵Matthijs Kooijman2008-06-161-3/+8
| | | | | | find an inserted value without modifying the code. llvm-svn: 52319
* Pass around Instruction* instead of Instruction& in FindInsertedValue and ↵Matthijs Kooijman2008-06-161-5/+5
| | | | | | friends. llvm-svn: 52318
* 80 column fixes.Matthijs Kooijman2008-06-161-15/+31
| | | | llvm-svn: 52316
* Move FindScalarValue from InstructionCombining.cpp to ValueTracking.cpp. WhileMatthijs Kooijman2008-06-161-0/+128
| | | | | | | | | | I'm at it, rename it to FindInsertedValue. The only functional change is that newly created instructions are no longer added to instcombine's worklist, but that is not really necessary anyway (and I'll commit some improvements next that will completely remove the need). llvm-svn: 52315
* Add #includes required by GCC 4.3, thanks for Zhongxing XuChris Lattner2008-06-041-0/+1
| | | | | | for reporting this. llvm-svn: 51926
* Remove unneeded code I added.Chris Lattner2008-06-021-6/+3
| | | | llvm-svn: 51878
* move CannotBeNegativeZero to ValueTracking. Simplify some signbit comparisons.Chris Lattner2008-06-021-0/+50
| | | | llvm-svn: 51864
* move ComputeMaskedBits, MaskedValueIsZero, and ComputeNumSignBitsChris Lattner2008-06-021-0/+709
out of instcombine into a new file in libanalysis. This also teaches ComputeNumSignBits about the number of sign bits in a constantint. llvm-svn: 51863
OpenPOWER on IntegriCloud