[PATCH] D121768: [X86][tablgen] Auto-generate trivial fields and trivial interfaces for target features

Kan Shengchen via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 18 21:34:21 PDT 2022


skan added a comment.

In D121768#3393916 <https://reviews.llvm.org/D121768#3393916>, @craig.topper wrote:

> In D121768#3393915 <https://reviews.llvm.org/D121768#3393915>, @skan wrote:
>
>> In D121768#3393913 <https://reviews.llvm.org/D121768#3393913>, @craig.topper wrote:
>>
>>> So you want feature specific knobs that you have to pass through those front end command line interfaces with something like clang’s -mllvm?
>>>
>>> In my opinion we should add more interfaces  in X86TargetParser.cpp so that all frontends can learn what features llvm supports without a hardcoded list like in Options.td. And those frontends should use the target-feature attribute.
>>
>> Some front-ends are not open-source. We could not teach it.
>
> If we provide good library interfaces the non open source projects can implement it themselves.
>
> There’s no guarantee that a way to set an llvm override exists in another frontend. Last I knew ispc for example didn’t have an equivalent of -mllvm. I think I heard once that Apples version of clang doesn’t support -mllvm.

First, we don't have such "good library interfaces" by now,  so we should keep the flexibility until that. Second, it does not help even the front end supports "-mllvm". Let me take AOCC just for an example, whose code is not visiable to all the developers. We could use it as a front-end and use another LLVM to translate the IR w/ new target features. We can override the target features set by the front end, it's guranteed.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D121768



More information about the llvm-commits mailing list