[PATCH] D70116: [RISCV] add subtargets initialized with target feature

Kuan Hsu Chen (Zakk) via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 14 05:58:58 PST 2019


khchen planned changes to this revision.
khchen added a comment.

I found RISCVABI::computeTargetABI will check <https://github.com/llvm-mirror/llvm/blob/master/lib/Target/RISCV/Utils/RISCVBaseInfo.cpp#L40-L50> ABI with target feature, 
so when I apply this patch and enabling lto, the checking get failed and set ABI to ABI_Unknown.
This is a problem because target-features is per-function basis but ABI is not.

I'm also thinking my testcase is so weird and it does not make sense there are different extension are used in the same compilation unit.
maybe before the invalid ABI  checking, backend need to gather all target-feature attribute to decide which standard extension should used in current compilation unit if user does not specific `-march`.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D70116





More information about the llvm-commits mailing list