[PATCH] D123515: [RISCV] Support '.option arch' directive
luxufan via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu May 18 19:40:45 PDT 2023
StephenFan added inline comments.
================
Comment at: llvm/lib/Target/RISCV/AsmParser/RISCVAsmParser.cpp:2498
+ if (getSTI().hasFeature(Feature.Value) &&
+ Feature.Implies.test(Ext->Value))
+ return Error(Parser.getTok().getLoc(),
----------------
craig.topper wrote:
> I don't think the implies list is normalized to include transitive implications. For example if A implies B and B implies C. I don't think the C is A's implies list.
>
> This also doesn't cover cases that can't be expressed in the .td file. At one point Zve32f required either F or Zfinx. But F and Zfinx are mutually exclusive so we could't have Zve32f imply either of them in the .td file. All we could do is check it in `RISCVISAInfo::checkDependency`.
> I don't think the implies list is normalized to include transitive implications. For example if A implies B and B implies C. I don't think the C is A's implies list.
>
Can this be handled by RISCVISAInfo? When I parse RISCVIAInfo from featureBits, it always updates implication.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D123515/new/
https://reviews.llvm.org/D123515
More information about the llvm-commits
mailing list