[PATCH] D48843: [mips] Warn when crc, ginv, virt flags are used with too old revision
Simon Atanasyan via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 3 04:19:41 PDT 2018
atanasyan accepted this revision.
atanasyan added a comment.
This revision is now accepted and ready to land.
LGTM with one minor note.
================
Comment at: lib/Target/Mips/MipsSubtarget.cpp:202
}
CallLoweringInfo.reset(new MipsCallLowering(*getTargetLowering()));
----------------
Looks good. But maybe the code below is a bit shorter?
```
StringRef ArchName = hasMips64() ? "MIPS64" : "MIPS32";
if (!hasMips32r5() && hasMSA() && !MSAWarningPrinted) {
errs() << "warning: the 'msa' ASE requires " << ArchName
<< " revision 5 or greater\n";
MSAWarningPrinted = true;
}
if (!hasMips32r5() && hasVirt() && !VirtWarningPrinted) {
errs() << "warning: the 'virt' ASE requires " << ArchName
<< " revision 5 or greater\n";
VirtWarningPrinted = true;
}
if (!hasMips32r6() && hasCRC() && !CRCWarningPrinted) {
errs() << "warning: the 'crc' ASE requires " << ArchName
<< " revision 6 or greater\n";
CRCWarningPrinted = true;
}
if (hasMips32r6() && hasGINV() && !GINVWarningPrinted) {
errs() << "warning: the 'ginv' ASE requires " << ArchName
<< " revision 6 or greater\n";
GINVWarningPrinted = true;
}
```
Repository:
rL LLVM
https://reviews.llvm.org/D48843
More information about the llvm-commits
mailing list