Skip to content

Commit 533a414

Browse files
committed
!fixup rename to terminatorIsComputedGotoWithSuccessors
1 parent 42df25c commit 533a414

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

llvm/include/llvm/CodeGen/MachineBasicBlock.h

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -323,9 +323,10 @@ class MachineBasicBlock
323323
const MachineFunction *getParent() const { return xParent; }
324324
MachineFunction *getParent() { return xParent; }
325325

326-
/// Returns true if the original IR terminator is an `indirectbr`. This
327-
/// typically corresponds to a `goto` in C, rather than jump tables.
328-
bool terminatorIsComputedGoto() const {
326+
/// Returns true if the original IR terminator is an `indirectbr` with
327+
/// successor blocks. This typically corresponds to a `goto` in C, rather than
328+
/// jump tables.
329+
bool terminatorIsComputedGotoWithSuccessors() const {
329330
return back().isIndirectBranch() && !succ_empty() &&
330331
llvm::all_of(successors(), [](const MachineBasicBlock *Succ) {
331332
return Succ->isIRBlockAddressTaken();

llvm/lib/CodeGen/TailDuplicator.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -604,7 +604,7 @@ bool TailDuplicator::shouldTailDuplicate(bool IsSimple,
604604
bool HasComputedGoto = false;
605605
if (!TailBB.empty()) {
606606
HasIndirectbr = TailBB.back().isIndirectBranch();
607-
HasComputedGoto = TailBB.terminatorIsComputedGoto();
607+
HasComputedGoto = TailBB.terminatorIsComputedGotoWithSuccessors();
608608
}
609609

610610
if (HasIndirectbr && PreRegAlloc)

0 commit comments

Comments
 (0)