diff options
author | Chris Lattner <sabre@nondot.org> | 2009-11-10 00:55:12 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2009-11-10 00:55:12 +0000 |
commit | d06094f0682f2ede03caff4892b1a57469896d48 (patch) | |
tree | 0ec34b787866a86a69ad27140a8ae5bca81dc0d3 /include/llvm/Analysis/InstructionSimplify.h | |
parent | c2e8a7e8d2ab156afaa8ab0d0317dd9ee3db7d30 (diff) | |
download | llvm-d06094f0682f2ede03caff4892b1a57469896d48.tar.gz llvm-d06094f0682f2ede03caff4892b1a57469896d48.tar.bz2 llvm-d06094f0682f2ede03caff4892b1a57469896d48.tar.xz |
factor simplification logic for AND and OR out to InstSimplify from instcombine.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86635 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Analysis/InstructionSimplify.h')
-rw-r--r-- | include/llvm/Analysis/InstructionSimplify.h | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/include/llvm/Analysis/InstructionSimplify.h b/include/llvm/Analysis/InstructionSimplify.h index 7d452ba348..2398cf694f 100644 --- a/include/llvm/Analysis/InstructionSimplify.h +++ b/include/llvm/Analysis/InstructionSimplify.h @@ -20,15 +20,26 @@ namespace llvm { class Value; class TargetData; + + /// SimplifyAndInst - Given operands for an And, see if we can + /// fold the result. If not, this returns null. + Value *SimplifyAndInst(Value *LHS, Value *RHS, + const TargetData *TD = 0); + + /// SimplifyOrInst - Given operands for an Or, see if we can + /// fold the result. If not, this returns null. + Value *SimplifyOrInst(Value *LHS, Value *RHS, + const TargetData *TD = 0); + /// SimplifyICmpInst - Given operands for an ICmpInst, see if we can /// fold the result. If not, this returns null. Value *SimplifyICmpInst(unsigned Predicate, Value *LHS, Value *RHS, - const TargetData *TD = 0); + 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); + const TargetData *TD = 0); //=== Helper functions for higher up the class hierarchy. |