aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm/Analysis/InstructionSimplify.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/llvm/Analysis/InstructionSimplify.h')
-rw-r--r--include/llvm/Analysis/InstructionSimplify.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/llvm/Analysis/InstructionSimplify.h b/include/llvm/Analysis/InstructionSimplify.h
index bb5c811..aa5c0f5 100644
--- a/include/llvm/Analysis/InstructionSimplify.h
+++ b/include/llvm/Analysis/InstructionSimplify.h
@@ -59,6 +59,15 @@ namespace llvm {
/// instruction. If not, this returns null.
Value *SimplifyInstruction(Instruction *I, const TargetData *TD = 0);
+
+ /// ReplaceAndSimplifyAllUses - Perform From->replaceAllUsesWith(To) and then
+ /// delete the From instruction. In addition to a basic RAUW, this does a
+ /// recursive simplification of the updated instructions. This catches
+ /// things where one simplification exposes other opportunities. This only
+ /// simplifies and deletes scalar operations, it does not change the CFG.
+ ///
+ void ReplaceAndSimplifyAllUses(Instruction *From, Value *To,
+ const TargetData *TD = 0);
} // end namespace llvm
#endif