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
16 changes: 5 additions & 11 deletions llvm/lib/Target/RISCV/RISCVFrameLowering.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -573,16 +573,12 @@ getPushOrLibCallsSavedInfo(const MachineFunction &MF,
// `QC.CM.PUSH(FP)`. In these cases, prioritise the CFI info that points
// to the versions saved by `QC.C.MIENTER(.NEST)` which is what FP
// unwinding would use.
const auto *FII = llvm::find_if(FixedCSRFIQCIInterruptMap, [&](auto P) {
return P.first == CS.getReg();
});
if (FII != std::end(FixedCSRFIQCIInterruptMap))
if (llvm::is_contained(llvm::make_first_range(FixedCSRFIQCIInterruptMap),
CS.getReg()))
continue;
}

const auto *FII = llvm::find_if(
FixedCSRFIMap, [&](MCPhysReg P) { return P == CS.getReg(); });
if (FII != std::end(FixedCSRFIMap))
if (llvm::is_contained(FixedCSRFIMap, CS.getReg()))
PushOrLibCallsCSI.push_back(CS);
}

Expand All @@ -599,10 +595,8 @@ getQCISavedInfo(const MachineFunction &MF,
return QCIInterruptCSI;

for (const auto &CS : CSI) {
const auto *FII = llvm::find_if(FixedCSRFIQCIInterruptMap, [&](auto P) {
return P.first == CS.getReg();
});
if (FII != std::end(FixedCSRFIQCIInterruptMap))
if (llvm::is_contained(llvm::make_first_range(FixedCSRFIQCIInterruptMap),
CS.getReg()))
QCIInterruptCSI.push_back(CS);
}

Expand Down