14#ifndef LLVM_TRANSFORMS_UTILS_SIMPLIFYLIBCALLS_H
15#define LLVM_TRANSFORMS_UTILS_SIMPLIFYLIBCALLS_H
28class OptimizationRemarkEmitter;
29class BlockFrequencyInfo;
30class ProfileSummaryInfo;
41 bool OnlyLowerUnknownSize;
45 bool OnlyLowerUnknownSize =
false);
91 bool isFortifiedCallFoldable(
CallInst *CI,
unsigned ObjSizeOp,
92 std::optional<unsigned> SizeOp = std::nullopt,
93 std::optional<unsigned> StrOp = std::nullopt,
94 std::optional<unsigned> FlagsOp = std::nullopt);
108 bool UnsafeFPShrink =
false;
117 I->replaceAllUsesWith(With);
121 static void eraseFromParentDefault(
Instruction *
I) {
I->eraseFromParent(); }
131 replaceAllUsesWith(
I, With);
141 &replaceAllUsesWithDefault,
248 Value *Bound =
nullptr);
MachineBasicBlock MachineBasicBlock::iterator DebugLoc DL
static GCRegistry::Add< OcamlGC > B("ocaml", "ocaml 3.10-compatible GC")
BlockFrequencyInfo pass uses BlockFrequencyInfoImpl implementation to estimate IR basic block frequen...
This class represents a function call, abstracting a target machine's calling convention.
A parsed version of the target data layout string in and methods for querying it.
This class implements simplifications for calls to fortified library functions (__st*cpy_chk,...
Value * optimizeCall(CallInst *CI, IRBuilderBase &B)
Take the given call instruction and return a more optimal value to replace the instruction with or 0 ...
Common base class shared among various IRBuilders.
LibCallSimplifier - This class implements a collection of optimizations that replace well formed call...
Value * optimizeCall(CallInst *CI, IRBuilderBase &B)
optimizeCall - Take the given call instruction and return a more optimal value to replace the instruc...
A Module instance is used to store all the information related to an LLVM module.
Analysis providing profile information.
This class consists of common code factored out of the SmallVector class to reduce code duplication b...
StringRef - Represent a constant reference to a string, i.e.
Provides information about what library functions are available for the current target.
LLVM Value Representation.
An efficient, type-erasing, non-owning reference to a callable.
This is an optimization pass for GlobalISel generic memory operations.