15 #ifndef LLVM_TRANSFORMS_SCALAR_JUMPTHREADING_H 16 #define LLVM_TRANSFORMS_SCALAR_JUMPTHREADING_H 37 class DeferredDominance;
44 class TargetLibraryInfo;
50 namespace jumpthreading {
82 std::unique_ptr<BlockFrequencyInfo>
BFI;
83 std::unique_ptr<BranchProbabilityInfo> BPI;
84 bool HasProfileData =
false;
85 bool HasGuards =
false;
93 unsigned BBDupThreshold;
96 struct RecursionSetRemover {
98 std::pair<Value *, BasicBlock *> ThePair;
100 RecursionSetRemover(
DenseSet<std::pair<Value *, BasicBlock *>> &S,
101 std::pair<Value *, BasicBlock *>
P)
102 : TheSet(S), ThePair(P) {}
104 ~RecursionSetRemover() { TheSet.
erase(ThePair); }
113 bool HasProfileData_, std::unique_ptr<BlockFrequencyInfo> BFI_,
114 std::unique_ptr<BranchProbabilityInfo> BPI_);
127 bool DuplicateCondBranchOnPHIIntoPred(
139 bool ProcessBranchOnPHI(
PHINode *PN);
143 bool SimplifyPartiallyRedundantLoad(
LoadInst *LI);
145 bool TryToUnfoldSelectInCurrBB(
BasicBlock *BB);
156 bool doesBlockHaveProfileData(
BasicBlock *BB);
161 #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.
Compute iterated dominance frontiers using a linear time algorithm.
Implements a dense probed hash-table based set.
bool erase(const ValueT &V)
An instruction for reading from memory.
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)
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...
Class to defer updates to a DominatorTree.
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.