mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-10-19 02:52:53 +02:00
[MachineOutliner][NFC] Gardening: use std::any_of instead of bool + loop
River Riddle suggested to use std::any_of instead of the bool + loop thing on r320229. This commit does that. llvm-svn: 321028
This commit is contained in:
parent
a5f511668f
commit
db3d79d789
@ -4963,16 +4963,9 @@ void AArch64InstrInfo::insertOutlinerEpilogue(
|
||||
MachineBasicBlock &MBB, MachineFunction &MF,
|
||||
const MachineOutlinerInfo &MInfo) const {
|
||||
|
||||
bool ContainsCalls = false;
|
||||
|
||||
for (MachineInstr &MI : MBB) {
|
||||
if (MI.isCall()) {
|
||||
ContainsCalls = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (ContainsCalls) {
|
||||
// Is there a call in the outlined range?
|
||||
if (std::any_of(MBB.instr_begin(), MBB.instr_end(),
|
||||
[](MachineInstr &MI) { return MI.isCall(); })) {
|
||||
// Fix up the instructions in the range, since we're going to modify the
|
||||
// stack.
|
||||
fixupPostOutline(MBB);
|
||||
|
Loading…
Reference in New Issue
Block a user