summaryrefslogtreecommitdiff
path: root/lib/Transforms/Scalar/PredicateSimplifier.cpp
Commit message (Collapse)AuthorAge
* Use 'static const char' instead of 'static const int'.Devang Patel2007-05-02
| | | | | | | | Due to darwin gcc bug, one version of darwin linker coalesces static const int, which defauts PassID based pass identification. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36652 91177308-0d34-0410-b5e6-96231b3b80d8
* Do not use typeinfo to identify pass in pass manager.Devang Patel2007-05-01
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36632 91177308-0d34-0410-b5e6-96231b3b80d8
* Using APInt more efficiently.Zhou Sheng2007-04-26
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36475 91177308-0d34-0410-b5e6-96231b3b80d8
* Undo my previous changes. Since my approach to this problem is being revised,Owen Anderson2007-04-25
| | | | | | | this approach is no longer appropriate. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36421 91177308-0d34-0410-b5e6-96231b3b80d8
* Make PredicateSimplifier not use DominatorTree.Owen Anderson2007-04-21
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36300 91177308-0d34-0410-b5e6-96231b3b80d8
* Make the operations of APInt variables more efficient.Zhou Sheng2007-04-19
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36260 91177308-0d34-0410-b5e6-96231b3b80d8
* fix long linesChris Lattner2007-04-14
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36031 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support for cast instructions.Nick Lewycky2007-04-07
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35734 91177308-0d34-0410-b5e6-96231b3b80d8
* Support NE inequality in ValueRanges.Nick Lewycky2007-04-07
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35724 91177308-0d34-0410-b5e6-96231b3b80d8
* Cleanup. Refactor out the applying of value ranges to its own method.Nick Lewycky2007-04-07
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35719 91177308-0d34-0410-b5e6-96231b3b80d8
* Use TargetData to find the size of a type.Nick Lewycky2007-04-07
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35718 91177308-0d34-0410-b5e6-96231b3b80d8
* Strengthen icmp snuggling by doing 'compare-or-equal-to' to 'compare'Nick Lewycky2007-04-07
| | | | | | | first and then range testing second. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35715 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix broken optimization disabled by a logic bug.Nick Lewycky2007-03-22
| | | | | | | | | | Analyze GEPs. If the indices are all zero, transfer whether the pointer is known to be not null through the GEP. Add a few more cases for xor and shift instructions. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35257 91177308-0d34-0410-b5e6-96231b3b80d8
* Clean up this code and fix subtract miscompile.Nick Lewycky2007-03-18
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35146 91177308-0d34-0410-b5e6-96231b3b80d8
* Propagate ValueRanges across equality.Nick Lewycky2007-03-18
| | | | | | | Add some more micro-optimizations: x * 0 = 0, a - x = a --> x = 0. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35138 91177308-0d34-0410-b5e6-96231b3b80d8
* Silence warningAnton Korobeynikov2007-03-17
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35137 91177308-0d34-0410-b5e6-96231b3b80d8
* Add more comments and update to new asm syntax.Nick Lewycky2007-03-16
| | | | | | | | | | | Add new micro-optimizations. Add icmp predicate snuggling. Given %x ULT 4, "icmp ugt %x, 2" becomes "icmp eq %x, 3". This doesn't apply in any non-trivial cases yet due to missing support for NE values in ValueRanges. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35119 91177308-0d34-0410-b5e6-96231b3b80d8
* Add value ranges. Currently inefficient in both execution time andNick Lewycky2007-03-10
| | | | | | | optimization power. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35058 91177308-0d34-0410-b5e6-96231b3b80d8
* Unbreak VC++ build.Jeff Cohen2007-03-05
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34917 91177308-0d34-0410-b5e6-96231b3b80d8
* Translate bit operations to English.Nick Lewycky2007-03-03
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34868 91177308-0d34-0410-b5e6-96231b3b80d8
* APIntify this pass.Reid Spencer2007-03-03
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34863 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix indenting, remove tabs.Nick Lewycky2007-02-04
| | | | | | | | | | | | | Learn from sext and zext. The destination value falls within the range of the source type. Generalize properties regarding constant ints. Get smarter about marking blocks as unreachable. If 1 >= 2 in order for this block to execute, then it isn't reachable. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33889 91177308-0d34-0410-b5e6-96231b3b80d8
* For PR1163:Reid Spencer2007-02-04
| | | | | | | | Make the Module's dependent library use a std::vector instead of SetVector adjust #includes in .cpp files because SetVector.h is no longer included. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33855 91177308-0d34-0410-b5e6-96231b3b80d8
* Simplify names of lattice values. SGTUNE becomes SGT, for example.Nick Lewycky2007-01-29
| | | | | | | | | | | | | | Fix initializeConstant, now initializeInt. Fixes major performance bottleneck. X == Y || X->DominatedBy(Y) is redundant. Remove the X == Y part. Fix crasher in makeEqual where getOrInsertNode would add a new constant, producing an NE relationship between the two members we're trying to make equal. This now allows us to mark more BBs as unreachable. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33612 91177308-0d34-0410-b5e6-96231b3b80d8
* For PR1094:Reid Spencer2007-01-17
| | | | | | | | Adjust the use of SetVector for changes in SetVector's interface. Patch by Gordon Henriksen. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33280 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't print address of ETNode. Print the DFSNumIn which uniquely identifiesNick Lewycky2007-01-15
| | | | | | | | | | | | | | | | the basic block and is stable across runs in gdb or valgrind. Make Node::update handle edges which dominate and are tighter than existing edges. Replace makeEqual's "squeeze theorem" code. Fixes miscompilation. Gate the calls to defToOps and opsToDef. Before this, we were getting IG edges about values which weren't even defined in the dominated area. This reduces the size of the IG by about half. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33236 91177308-0d34-0410-b5e6-96231b3b80d8
* "Default context" blocks can occur after a non-default one. This meantNick Lewycky2007-01-13
| | | | | | | | | | that properties were being applied where they didn't belong. Fixes crash in new MiBench testcase. Also mark debugging code as such in #ifdef. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33177 91177308-0d34-0410-b5e6-96231b3b80d8
* If we know that it's a constant being casted, propagate through the castNick Lewycky2007-01-12
| | | | | | | | instruction. Doesn't work the other way though (can't recover bits that have been truncated). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33104 91177308-0d34-0410-b5e6-96231b3b80d8
* Clean up logic after ConstantBool removal.Nick Lewycky2007-01-12
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33096 91177308-0d34-0410-b5e6-96231b3b80d8
* Rename BoolTy as Int1Ty. Patch by Sheng Zhou.Reid Spencer2007-01-11
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33076 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
* Quiet compiler warning. The only reason the function is marked virtualNick Lewycky2007-01-11
| | | | | | | is so that it can be called from inside a debugger. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33067 91177308-0d34-0410-b5e6-96231b3b80d8
* New predicate simplifier!Nick Lewycky2007-01-11
| | | | | | | Please do not enable, there is still some known miscompile problem. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33066 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
* Convert more Statistic's over to STATISTICChris Lattner2006-12-19
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32692 91177308-0d34-0410-b5e6-96231b3b80d8
* Removing even more <iostream> includes.Bill Wendling2006-12-07
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32320 91177308-0d34-0410-b5e6-96231b3b80d8
* add missing #includeChris Lattner2006-12-06
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32280 91177308-0d34-0410-b5e6-96231b3b80d8
* Detemplatize the Statistic class. The only type it is instantiated withChris Lattner2006-12-06
| | | | | | | is 'unsigned'. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32279 91177308-0d34-0410-b5e6-96231b3b80d8
* Unbreak VC++ build.Jeff Cohen2006-12-02
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32113 91177308-0d34-0410-b5e6-96231b3b80d8
* Update to new predicate simplifier VRP design. Fixes PR966 and PR967.Nick Lewycky2006-11-22
| | | | | | | | | Remove predicate simplifier from default gcc3 pipeline. New design is too slow to enable by default. Add new testcases for problems encountered in development. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31895 91177308-0d34-0410-b5e6-96231b3b80d8
* Unbreak VC++ build.Jeff Cohen2006-11-05
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31464 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove commented line from earlier debugging.Nick Lewycky2006-11-05
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31460 91177308-0d34-0410-b5e6-96231b3b80d8
* For PR950:Reid Spencer2006-11-02
| | | | | | | Replace the REM instruction with UREM, SREM and FREM. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31369 91177308-0d34-0410-b5e6-96231b3b80d8
* For PR950:Reid Spencer2006-10-26
| | | | | | | | | Make necessary changes to support DIV -> [SUF]Div. This changes llvm to have three division instructions: signed, unsigned, floating point. The bytecode and assembler are bacwards compatible, however. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31195 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix 2006-10-25-AddSetCC. A relational operator (like setlt) can neverNick Lewycky2006-10-26
| | | | | | | produce an EQ property. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31193 91177308-0d34-0410-b5e6-96231b3b80d8
* Resurrect r1.25.Nick Lewycky2006-10-25
| | | | | | | Fix and comment the "or", "and" and "xor" transformations. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31189 91177308-0d34-0410-b5e6-96231b3b80d8
* hide symbols properlyChris Lattner2006-10-25
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31184 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert back to r1.21, which was the last revision of predsimplify thatChris Lattner2006-10-24
| | | | | | | passes llvm-gcc bootstrap. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31146 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove the Backwards operation. Resolving now works at the time when aNick Lewycky2006-10-23
| | | | | | | | property is added by running through the list of uses of the value and adding resolved properties to the property set. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31126 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix similar missing optimization opportunity in XOR.Nick Lewycky2006-10-22
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31123 91177308-0d34-0410-b5e6-96231b3b80d8