15 #ifndef LLVM_TRANSFORMS_UTILS_SIMPLIFYLIBCALLS_H 16 #define LLVM_TRANSFORMS_UTILS_SIMPLIFYLIBCALLS_H 28 class TargetLibraryInfo;
31 class OptimizationRemarkEmitter;
42 bool OnlyLowerUnknownSize;
46 bool OnlyLowerUnknownSize =
false);
65 bool isFortifiedCallFoldable(
CallInst *CI,
unsigned ObjSizeOp,
66 unsigned SizeOp,
bool isString);
106 &replaceAllUsesWithDefault,
198 bool hasFloatVersion(
StringRef FuncName);
LibCallSimplifier - This class implements a collection of optimizations that replace well formed call...
SymbolTableList< Instruction >::iterator eraseFromParent()
This method unlinks 'this' from the containing basic block and deletes it.
A parsed version of the target data layout string in and methods for querying it. ...
This class represents lattice values for constants.
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...
void replaceAllUsesWith(Value *V)
Change all uses of this to point to a new Value.
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.
static GCRegistry::Add< OcamlGC > B("ocaml", "ocaml 3.10-compatible GC")
Provides information about what library functions are available for the current target.
LLVM Value Representation.
StringRef - Represent a constant reference to a string, i.e.