[PATCH] D146054: [RISCV] Add -print-supported-marchs and -march=help support

Kito Cheng via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 16 00:18:15 PDT 2023


kito-cheng added inline comments.


================
Comment at: clang/lib/Driver/Driver.cpp:4231-4235
+  // marchs and quits.
+  if (Args.getLastArg(options::OPT_print_supported_marchs)) {
+    RISCVMarchHelp();
+    exit(0);
+  }
----------------
Plz did the similar action like what OPT_print_supported_cpus did instead of just exti 0

And check the triple to make sure only invoke that for riscv


================
Comment at: llvm/lib/Support/RISCVISAInfo.cpp:152
+  errs() << '\t' << left_justify("Name", 20) << "Version\n";
+  std::set<RISCVSupportedExtension, decltype(Cmp)> TempSet(Cmp);
+  for (auto E : SupportedExtensions)
----------------
I would prefer that print by canonical order *IF* we want to print in some order.

And then you can just use RISCVISAInfo::OrderedExtensionMap here.


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