Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions llvm/lib/Transforms/Scalar/GuardWidening.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,6 @@ static cl::opt<bool>
"expressed as branches by widenable conditions"),
cl::init(true));

namespace {

// Get the condition of \p I. It can either be a guard or a conditional branch.
static Value *getCondition(Instruction *I) {
if (IntrinsicInst *GI = dyn_cast<IntrinsicInst>(I)) {
Expand Down Expand Up @@ -130,6 +128,8 @@ findInsertionPointForWideCondition(Instruction *WCOrGuard) {
return std::nullopt;
}

namespace {

class GuardWideningImpl {
DominatorTree &DT;
PostDominatorTree *PDT;
Expand Down Expand Up @@ -328,7 +328,7 @@ class GuardWideningImpl {
/// The entry point for this pass.
bool run();
};
}
} // namespace

static bool isSupportedGuardInstruction(const Instruction *Insn) {
if (isGuard(Insn))
Expand Down