summaryrefslogtreecommitdiff
path: root/include/llvm/Analysis/InstructionSimplify.h
diff options
context:
space:
mode:
authorDuncan Sands <baldrick@free.fr>2010-11-14 18:36:10 +0000
committerDuncan Sands <baldrick@free.fr>2010-11-14 18:36:10 +0000
commiteff0581583ef10e2872e9baf537a04b67d992101 (patch)
tree4aff00b570f7058263f492f0ec91f8e59119547a /include/llvm/Analysis/InstructionSimplify.h
parent0094345184bc0a791f0811c8d7f5b6f9c8296e0f (diff)
downloadllvm-eff0581583ef10e2872e9baf537a04b67d992101.tar.gz
llvm-eff0581583ef10e2872e9baf537a04b67d992101.tar.bz2
llvm-eff0581583ef10e2872e9baf537a04b67d992101.tar.xz
If dom tree information is available, make it possible to pass
it to get better phi node simplification. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119055 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Analysis/InstructionSimplify.h')
-rw-r--r--include/llvm/Analysis/InstructionSimplify.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/include/llvm/Analysis/InstructionSimplify.h b/include/llvm/Analysis/InstructionSimplify.h
index 9825caff8f..d1ad061d5c 100644
--- a/include/llvm/Analysis/InstructionSimplify.h
+++ b/include/llvm/Analysis/InstructionSimplify.h
@@ -17,6 +17,7 @@
#define LLVM_ANALYSIS_INSTRUCTIONSIMPLIFY_H
namespace llvm {
+ class DominatorTree;
class Instruction;
class Value;
class TargetData;
@@ -73,7 +74,8 @@ namespace llvm {
/// instruction. If not, this returns null.
/// WARNING: If called on unreachable code, an instruction may be reported
/// to simplify to itself.
- Value *SimplifyInstruction(Instruction *I, const TargetData *TD = 0);
+ Value *SimplifyInstruction(Instruction *I, const TargetData *TD = 0,
+ const DominatorTree *DT = 0);
/// ReplaceAndSimplifyAllUses - Perform From->replaceAllUsesWith(To) and then
@@ -83,7 +85,8 @@ namespace llvm {
/// simplifies and deletes scalar operations, it does not change the CFG.
///
void ReplaceAndSimplifyAllUses(Instruction *From, Value *To,
- const TargetData *TD = 0);
+ const TargetData *TD = 0,
+ const DominatorTree *DT = 0);
} // end namespace llvm
#endif