diff options
author | Chris Lattner <sabre@nondot.org> | 2009-11-10 22:26:15 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2009-11-10 22:26:15 +0000 |
commit | 40d8c28b27377199b7465ba2c5a2c59c6fd12fa9 (patch) | |
tree | 236e0fd587325e3ea4c3eedf68afa6e8e1470dd9 /include/llvm/Analysis/InstructionSimplify.h | |
parent | 5b37fbac1aece6bb970656a4f847a6af71dfff23 (diff) |
move some generally useful functions out of jump threading
into libanalysis and transformutils.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86735 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Analysis/InstructionSimplify.h')
-rw-r--r-- | include/llvm/Analysis/InstructionSimplify.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/include/llvm/Analysis/InstructionSimplify.h b/include/llvm/Analysis/InstructionSimplify.h index bb5c811fe2..aa5c0f554b 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 |