aboutsummaryrefslogtreecommitdiff
path: root/include/llvm/Transforms/Utils/SimplifyLibCalls.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/llvm/Transforms/Utils/SimplifyLibCalls.h')
-rw-r--r--include/llvm/Transforms/Utils/SimplifyLibCalls.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/include/llvm/Transforms/Utils/SimplifyLibCalls.h b/include/llvm/Transforms/Utils/SimplifyLibCalls.h
index 5db2d00181..fde452bca2 100644
--- a/include/llvm/Transforms/Utils/SimplifyLibCalls.h
+++ b/include/llvm/Transforms/Utils/SimplifyLibCalls.h
@@ -19,6 +19,7 @@ namespace llvm {
class Value;
class CallInst;
class DataLayout;
+ class Instruction;
class TargetLibraryInfo;
class LibCallSimplifierImpl;
@@ -35,8 +36,16 @@ namespace llvm {
/// optimizeCall - Take the given call instruction and return a more
/// optimal value to replace the instruction with or 0 if a more
- /// optimal form can't be found.
+ /// optimal form can't be found. Note that the returned value may
+ /// be equal to the instruction being optimized. In this case all
+ /// other instructions that use the given instruction were modified
+ /// and the given instruction is dead.
Value *optimizeCall(CallInst *CI);
+
+ /// replaceAllUsesWith - This method is used when the library call
+ /// simplifier needs to replace instructions other than the library
+ /// call being modified.
+ virtual void replaceAllUsesWith(Instruction *I, Value *With) const;
};
} // End llvm namespace