diff options
author | Chris Lattner <sabre@nondot.org> | 2009-11-09 23:28:39 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2009-11-09 23:28:39 +0000 |
commit | 9dbb42944c4d7caddab21016b24cca31019a3faf (patch) | |
tree | 26a4ee2c7012d277e6747bf7a8290ecf5699b1d7 /include/llvm/Analysis/InstructionSimplify.h | |
parent | 803b48a155eb2b3f9fe3823ecd7cbbd0089b2809 (diff) | |
download | llvm-9dbb42944c4d7caddab21016b24cca31019a3faf.tar.gz llvm-9dbb42944c4d7caddab21016b24cca31019a3faf.tar.bz2 llvm-9dbb42944c4d7caddab21016b24cca31019a3faf.tar.xz |
rename SimplifyCompare -> SimplifyCmpInst and split it into
Simplify[IF]Cmp pieces. Add some predicates to CmpInst to
determine whether a predicate is fp or int.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86624 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Analysis/InstructionSimplify.h')
-rw-r--r-- | include/llvm/Analysis/InstructionSimplify.h | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/include/llvm/Analysis/InstructionSimplify.h b/include/llvm/Analysis/InstructionSimplify.h index 7d75435575..7d452ba348 100644 --- a/include/llvm/Analysis/InstructionSimplify.h +++ b/include/llvm/Analysis/InstructionSimplify.h @@ -20,11 +20,24 @@ namespace llvm { class Value; class TargetData; - /// SimplifyCompare - Given operands for a CmpInst, see if we can + /// SimplifyICmpInst - Given operands for an ICmpInst, see if we can /// fold the result. If not, this returns null. - Value *SimplifyCompare(unsigned Predicate, Value *LHS, Value *RHS, + Value *SimplifyICmpInst(unsigned Predicate, Value *LHS, Value *RHS, const TargetData *TD = 0); + /// SimplifyFCmpInst - Given operands for an FCmpInst, see if we can + /// fold the result. If not, this returns null. + Value *SimplifyFCmpInst(unsigned Predicate, Value *LHS, Value *RHS, + const TargetData *TD = 0); + + + //=== Helper functions for higher up the class hierarchy. + + + /// SimplifyCmpInst - Given operands for a CmpInst, see if we can + /// fold the result. If not, this returns null. + Value *SimplifyCmpInst(unsigned Predicate, Value *LHS, Value *RHS, + const TargetData *TD = 0); /// SimplifyBinOp - Given operands for a BinaryOperator, see if we can /// fold the result. If not, this returns null. |