mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-22 10:42:39 +01:00
[Target] Use llvm::any_of (NFC)
This commit is contained in:
parent
e247c5cb6c
commit
2fb3d0d5a0
@ -333,9 +333,9 @@ bool AArch64RegisterInfo::isReservedReg(const MachineFunction &MF,
|
||||
}
|
||||
|
||||
bool AArch64RegisterInfo::isAnyArgRegReserved(const MachineFunction &MF) const {
|
||||
return std::any_of(std::begin(*AArch64::GPR64argRegClass.MC),
|
||||
std::end(*AArch64::GPR64argRegClass.MC),
|
||||
[this, &MF](MCPhysReg r){return isReservedReg(MF, r);});
|
||||
return llvm::any_of(*AArch64::GPR64argRegClass.MC, [this, &MF](MCPhysReg r) {
|
||||
return isReservedReg(MF, r);
|
||||
});
|
||||
}
|
||||
|
||||
void AArch64RegisterInfo::emitReservedArgRegCallError(
|
||||
|
@ -325,9 +325,10 @@ bool AMDGPURewriteOutArguments::runOnFunction(Function &F) {
|
||||
Value *ReplVal = Store.second->getValueOperand();
|
||||
|
||||
auto &ValVec = Replacements[Store.first];
|
||||
if (llvm::find_if(ValVec,
|
||||
if (llvm::any_of(ValVec,
|
||||
[OutArg](const std::pair<Argument *, Value *> &Entry) {
|
||||
return Entry.first == OutArg;}) != ValVec.end()) {
|
||||
return Entry.first == OutArg;
|
||||
})) {
|
||||
LLVM_DEBUG(dbgs()
|
||||
<< "Saw multiple out arg stores" << *OutArg << '\n');
|
||||
// It is possible to see stores to the same argument multiple times,
|
||||
|
@ -560,8 +560,9 @@ static bool tryToFoldACImm(const SIInstrInfo *TII,
|
||||
if (!UseReg.isVirtual())
|
||||
return false;
|
||||
|
||||
if (llvm::find_if(FoldList, [UseMI](const FoldCandidate &FC) {
|
||||
return FC.UseMI == UseMI; }) != FoldList.end())
|
||||
if (llvm::any_of(FoldList, [UseMI](const FoldCandidate &FC) {
|
||||
return FC.UseMI == UseMI;
|
||||
}))
|
||||
return false;
|
||||
|
||||
MachineRegisterInfo &MRI = UseMI->getParent()->getParent()->getRegInfo();
|
||||
|
@ -3434,7 +3434,7 @@ void RISCVTargetLowering::validateCCReservedRegs(
|
||||
const Function &F = MF.getFunction();
|
||||
const RISCVSubtarget &STI = MF.getSubtarget<RISCVSubtarget>();
|
||||
|
||||
if (std::any_of(std::begin(Regs), std::end(Regs), [&STI](auto Reg) {
|
||||
if (llvm::any_of(Regs, [&STI](auto Reg) {
|
||||
return STI.isRegisterReservedByUser(Reg.first);
|
||||
}))
|
||||
F.getContext().diagnose(DiagnosticInfoUnsupported{
|
||||
|
@ -538,9 +538,8 @@ static void updateAlignments(Range &Slices,
|
||||
static void checkUnusedAlignments(ArrayRef<Slice> Slices,
|
||||
const StringMap<const uint32_t> &Alignments) {
|
||||
auto HasArch = [&](StringRef Arch) {
|
||||
return llvm::find_if(Slices, [Arch](Slice S) {
|
||||
return S.getArchString() == Arch;
|
||||
}) != Slices.end();
|
||||
return llvm::any_of(Slices,
|
||||
[Arch](Slice S) { return S.getArchString() == Arch; });
|
||||
};
|
||||
for (StringRef Arch : Alignments.keys())
|
||||
if (!HasArch(Arch))
|
||||
|
Loading…
Reference in New Issue
Block a user