[PATCH] D102582: [RISCV] Report an error when ABI mismatch with target-abi module flag.
Craig Topper via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon May 17 18:24:43 PDT 2021
craig.topper added inline comments.
================
Comment at: llvm/lib/Target/RISCV/MCTargetDesc/RISCVBaseInfo.h:293
ABI getTargetABI(StringRef ABIName);
+StringRef getTargetABI(ABI ABIName);
----------------
Is ABIName still the right name here since it isn't a string?
================
Comment at: llvm/lib/Target/RISCV/RISCVTargetMachine.cpp:108
+ if (TargetABI != RISCVABI::getTargetABI(ModuleABIName))
+ errs() << "Mismatch ABI. Currnet ABI is '" +
+ RISCVABI::getTargetABI(TargetABI) +
----------------
This just prints to std::error, but doesn't stop the build. That makes it easy for the user to ignore. Is that what we want?
================
Comment at: llvm/test/CodeGen/RISCV/module-target-abi2.ll:6
-; RV32IF-ILP32: -target-abi option != target-abi module flag
-
-; FLAGS: Flags: 0x0
-; // this should be "Flags :0x2, single-float ABI", it will be fixed later.
+; CHECK: Mismatch ABI. Currnet ABI is 'ilp32', but IR target-abi module flag is 'ilp32f'.
----------------
Currnet->Current
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D102582/new/
https://reviews.llvm.org/D102582
More information about the llvm-commits
mailing list