14 #ifndef LLVM_TRANSFORMS_UTILS_SIMPLIFYLIBCALLS_H 15 #define LLVM_TRANSFORMS_UTILS_SIMPLIFYLIBCALLS_H 27 class TargetLibraryInfo;
30 class OptimizationRemarkEmitter;
31 class BlockFrequencyInfo;
32 class ProfileSummaryInfo;
43 bool OnlyLowerUnknownSize;
47 bool OnlyLowerUnknownSize =
false);
91 bool isFortifiedCallFoldable(
CallInst *CI,
unsigned ObjSizeOp,
131 replaceAllUsesWith(I, With);
143 &replaceAllUsesWithDefault,
242 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 ...
Analysis providing profile information.
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)
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.
BlockFrequencyInfo pass uses BlockFrequencyInfoImpl implementation to estimate IR basic block frequen...
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.