[PATCH] D48843: [mips] Warn when crc, ginv, virt flags are used with too old revision
Vladimir Stefanovic via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 4 06:16:48 PDT 2018
vstefanovic marked an inline comment as done.
vstefanovic added inline comments.
================
Comment at: lib/Target/Mips/MipsSubtarget.cpp:202
}
CallLoweringInfo.reset(new MipsCallLowering(*getTargetLowering()));
----------------
atanasyan wrote:
> 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;
> }
> ```
Yes, this one's better, thanks.
Repository:
rL LLVM
https://reviews.llvm.org/D48843
More information about the llvm-commits
mailing list