class FortifiedLibCallSimplifier
Declaration
class FortifiedLibCallSimplifier { /* full declaration omitted */ };
Description
This class implements simplifications for calls to fortified library functions (__st*cpy_chk, __memcpy_chk, __memmove_chk, __memset_chk), to, when possible, replace them with their non-checking counterparts. Other optimizations can also be done, but it's possible to disable them and only simplify needless use of the checking versions (when the object size is unknown) by passing true for OnlyLowerUnknownSize.
Declared at: llvm/include/llvm/Transforms/Utils/SimplifyLibCalls.h:40
Method Overview
- public FortifiedLibCallSimplifier(const llvm::TargetLibraryInfo * TLI, bool OnlyLowerUnknownSize = false)
- public llvm::Value * optimizeCall(llvm::CallInst * CI)
Methods
¶FortifiedLibCallSimplifier(
const llvm::TargetLibraryInfo* TLI,
bool OnlyLowerUnknownSize = false)
FortifiedLibCallSimplifier(
const llvm::TargetLibraryInfo* TLI,
bool OnlyLowerUnknownSize = false)
Declared at: llvm/include/llvm/Transforms/Utils/SimplifyLibCalls.h:46
Parameters
- const llvm::TargetLibraryInfo* TLI
- bool OnlyLowerUnknownSize = false
¶llvm::Value* optimizeCall(llvm::CallInst* CI)
llvm::Value* optimizeCall(llvm::CallInst* CI)
Description
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. The call must not be an indirect call.
Declared at: llvm/include/llvm/Transforms/Utils/SimplifyLibCalls.h:53
Parameters
- llvm::CallInst* CI