15 #ifndef LLVM_TRANSFORMS_UTILS_SIMPLIFYLIBCALLS_H
16 #define LLVM_TRANSFORMS_UTILS_SIMPLIFYLIBCALLS_H
28 class TargetLibraryInfo;
41 bool OnlyLowerUnknownSize;
45 bool OnlyLowerUnknownSize =
false);
64 bool isFortifiedCallFoldable(
CallInst *CI,
unsigned ObjSizeOp,
65 unsigned SizeOp,
bool isString);
91 &replaceAllUsesWithDefault);
LibCallSimplifier - This class implements a collection of optimizations that replace well formed call...
A parsed version of the target data layout string in and methods for querying it. ...
Value * optimizeCall(CallInst *CI)
Take the given call instruction and return a more optimal value to replace the instruction with or 0 ...
CallInst - This class represents a function call, abstracting a target machine's calling convention...
An efficient, type-erasing, non-owning reference to a callable.
FortifiedLibCallSimplifier(const TargetLibraryInfo *TLI, bool OnlyLowerUnknownSize=false)
This class consists of common code factored out of the SmallVector class to reduce code duplication b...
This provides a uniform API for creating instructions and inserting them into a basic block: either a...
static cl::opt< std::string > FuncName("cppfname", cl::desc("Specify the name of the generated function"), cl::value_desc("function name"))
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.
LLVM Basic Block Representation.
Provides information about what library functions are available for the current target.
Value * optimizeCall(CallInst *CI)
optimizeCall - Take the given call instruction and return a more optimal value to replace the instruc...
LLVM Value Representation.
StringRef - Represent a constant reference to a string, i.e.
LibCallSimplifier(const DataLayout &DL, const TargetLibraryInfo *TLI, function_ref< void(Instruction *, Value *)> Replacer=&replaceAllUsesWithDefault)