LLVM API Documentation
#include <SimplifyLibCalls.h>
Public Member Functions | |
LibCallSimplifier (const DataLayout *TD, const TargetLibraryInfo *TLI, bool UnsafeFPShrink) | |
virtual | ~LibCallSimplifier () |
Value * | optimizeCall (CallInst *CI) |
virtual void | replaceAllUsesWith (Instruction *I, Value *With) const |
LibCallSimplifier - This class implements a collection of optimizations that replace well formed calls to library functions with a more optimal form. For example, replacing 'printf("Hello!")' with 'puts("Hello!")'.
Definition at line 29 of file SimplifyLibCalls.h.
llvm::LibCallSimplifier::LibCallSimplifier | ( | const DataLayout * | TD, |
const TargetLibraryInfo * | TLI, | ||
bool | UnsafeFPShrink | ||
) |
Definition at line 2183 of file SimplifyLibCalls.cpp.
|
virtual |
Definition at line 2189 of file SimplifyLibCalls.cpp.
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. 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.
Definition at line 2193 of file SimplifyLibCalls.cpp.
References llvm::CallInst::isNoBuiltin(), and llvm::LibCallSimplifierImpl::optimizeCall().
|
virtual |
replaceAllUsesWith - This method is used when the library call simplifier needs to replace instructions other than the library call being modified.
Definition at line 2198 of file SimplifyLibCalls.cpp.
References llvm::Instruction::eraseFromParent(), and llvm::Value::replaceAllUsesWith().