[llvm] 1ce5a80 - [Mips] Use MachineBasicBlock::pred_size (NFC)
Kazu Hirata via llvm-commits
llvm-commits at lists.llvm.org
Sat Jan 20 18:57:46 PST 2024
Author: Kazu Hirata
Date: 2024-01-20T18:57:33-08:00
New Revision: 1ce5a80d08ad68f53e04d4b7c413d0dbb0065991
URL: https://github.com/llvm/llvm-project/commit/1ce5a80d08ad68f53e04d4b7c413d0dbb0065991
DIFF: https://github.com/llvm/llvm-project/commit/1ce5a80d08ad68f53e04d4b7c413d0dbb0065991.diff
LOG: [Mips] Use MachineBasicBlock::pred_size (NFC)
Added:
Modified:
llvm/lib/Target/Mips/MipsAsmPrinter.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Target/Mips/MipsAsmPrinter.cpp b/llvm/lib/Target/Mips/MipsAsmPrinter.cpp
index 30ff82dd911cfcb..718844bc36ff93b 100644
--- a/llvm/lib/Target/Mips/MipsAsmPrinter.cpp
+++ b/llvm/lib/Target/Mips/MipsAsmPrinter.cpp
@@ -491,10 +491,7 @@ bool MipsAsmPrinter::isBlockOnlyReachableByFallthrough(const MachineBasicBlock*
return false;
// If there isn't exactly one predecessor, it can't be a fall through.
- MachineBasicBlock::const_pred_iterator PI = MBB->pred_begin(), PI2 = PI;
- ++PI2;
-
- if (PI2 != MBB->pred_end())
+ if (MBB->pred_size() != 1)
return false;
// The predecessor has to be immediately before this block.
More information about the llvm-commits
mailing list