14#ifndef LLVM_TRANSFORMS_UTILS_SIMPLIFYLIBCALLS_H
15#define LLVM_TRANSFORMS_UTILS_SIMPLIFYLIBCALLS_H
29class OptimizationRemarkEmitter;
30class BlockFrequencyInfo;
31class ProfileSummaryInfo;
42 bool OnlyLowerUnknownSize;
46 bool OnlyLowerUnknownSize =
false);
92 bool isFortifiedCallFoldable(
CallInst *CI,
unsigned ObjSizeOp,
93 std::optional<unsigned> SizeOp = std::nullopt,
94 std::optional<unsigned> StrOp = std::nullopt,
95 std::optional<unsigned> FlagsOp = std::nullopt);
110 bool UnsafeFPShrink =
false;
119 I->replaceAllUsesWith(With);
123 static void eraseFromParentDefault(
Instruction *
I) {
I->eraseFromParent(); }
133 replaceAllUsesWith(
I, With);
143 &replaceAllUsesWithDefault,
257 Value *Bound =
nullptr);
MachineBasicBlock MachineBasicBlock::iterator DebugLoc DL
static GCRegistry::Add< OcamlGC > B("ocaml", "ocaml 3.10-compatible GC")
A cache of @llvm.assume calls within a function.
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.