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);
168 bool hasFloatVersion(
StringRef FuncName);
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 ...
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 provides a uniform API for creating instructions and inserting them into a basic block: either a...
static GCRegistry::Add< OcamlGC > B("ocaml","ocaml 3.10-compatible GC")
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.
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)