15 #ifndef LLVM_TRANSFORMS_SCALAR_JUMPTHREADING_H 16 #define LLVM_TRANSFORMS_SCALAR_JUMPTHREADING_H 45 class TargetLibraryInfo;
51 namespace jumpthreading {
83 std::unique_ptr<BlockFrequencyInfo>
BFI;
84 std::unique_ptr<BranchProbabilityInfo> BPI;
85 bool HasProfileData =
false;
86 bool HasGuards =
false;
93 unsigned BBDupThreshold;
101 std::unique_ptr<BlockFrequencyInfo> BFI_,
102 std::unique_ptr<BranchProbabilityInfo> BPI_);
115 bool DuplicateCondBranchOnPHIIntoPred(
118 bool ComputeValueKnownInPredecessorsImpl(
121 DenseSet<std::pair<Value *, BasicBlock *>> &RecursionSet,
129 return ComputeValueKnownInPredecessorsImpl(V, BB, Result, Preference,
137 bool ProcessBranchOnPHI(
PHINode *PN);
141 bool SimplifyPartiallyRedundantLoad(
LoadInst *LI);
147 bool TryToUnfoldSelectInCurrBB(
BasicBlock *BB);
158 bool doesBlockHaveProfileData(
BasicBlock *BB);
163 #endif // LLVM_TRANSFORMS_SCALAR_JUMPTHREADING_H
This class is the base class for the comparison instructions.
static bool runImpl(Function &F, TargetLibraryInfo &TLI, DominatorTree &DT)
This is the entry point for all transforms.
This class represents lattice values for constants.
Implements a dense probed hash-table based set.
An instruction for reading from memory.
This class represents the LLVM 'select' instruction.
This class consists of common code factored out of the SmallVector class to reduce code duplication b...
A CRTP mix-in to automatically provide informational APIs needed for passes.
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory)...
static bool ProcessBlock(BasicBlock &BB, DominatorTree &DT, LoopInfo &LI, AAResults &AA)
bool ComputeValueKnownInPredecessors(Value *V, BasicBlock *BB, jumpthreading::PredValueInfo &Result, jumpthreading::ConstantPreference Preference, Instruction *CxtI=nullptr)
A set of analyses that are preserved following a run of a transformation pass.
LLVM Basic Block Representation.
Conditional or Unconditional Branch instruction.
SmallSet - This maintains a set of unique values, optimizing for the case when the set is small (less...
SmallPtrSet - This class implements a set which is optimized for holding SmallSize or less elements...
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small...
Provides information about what library functions are available for the current target.
This pass performs 'jump threading', which looks at blocks that have multiple predecessors and multip...
This pass computes, caches, and vends lazy value constraint information.
LLVM Value Representation.
A container for analyses that lazily runs them and caches their results.
A wrapper class for inspecting calls to intrinsic functions.