[PATCH] D146054: [RISCV] Add -print-supported-marchs and -march=help support
Fangrui Song via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Mar 20 10:28:35 PDT 2023
MaskRay requested changes to this revision.
MaskRay added inline comments.
This revision now requires changes to proceed.
================
Comment at: clang/test/Driver/print-supported-marchs.c:17
+// CHECK-RISCV: i 2.0
+// CHECK-RISCV: e 1.9
+// CHECK-RISCV: m 2.0
----------------
Use `-NEXT:` whenever applicable so that new extensions can be caught by the test.
================
Comment at: clang/tools/driver/cc1_main.cpp:197
+ if (TargetStr.find("riscv") == std::string::npos) {
+ llvm::errs() << "The -march=help only supports for RISCV target.\n";
+ return 1;
----------------
The check should be added to lib/Driver
================
Comment at: clang/tools/driver/cc1_main.cpp:201
+
+ llvm::RISCVMarchHelp();
+
----------------
`riscvMarchHelp`
Use camelCase for new function names.
================
Comment at: llvm/lib/Support/RISCVISAInfo.cpp:162
+
+ errs() << '\n';
+
----------------
Move '\n' into the "Use -march to specify the target's extension.\n..." string.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D146054/new/
https://reviews.llvm.org/D146054
More information about the llvm-commits
mailing list