[PATCH] D105168: [RISCV] Unify the arch string parsing logic to RISCVISAInfo.

Kito Cheng via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Jul 12 20:44:53 PDT 2021


kito-cheng added inline comments.


================
Comment at: llvm/include/llvm/Support/RISCVISAInfo.h:42
+  // keep entries in canonical order of extension.
+  typedef std::map<std::string, RISCVExtensionInfo, ExtensionComparator>
+      OrderedExtensionMap;
----------------
craig.topper wrote:
> Could this be a sorted vector? Would require a good spot to sort it after all extensions have been added. Are all the extensions added from the parse functions?
All extension are added in parse function, but there might require a lookup and add if not found loop when implementing (more complete*) implied extension rule in future, so using ordered container would make this easier.

* We don't implement full implied extension rule, like f implied zicsr, d implied f...


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D105168/new/

https://reviews.llvm.org/D105168



More information about the cfe-commits mailing list