[PATCH] D147697: [IR] Add TargetExtTypeClass
Nikita Popov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 21 00:22:29 PDT 2023
nikic added a subscriber: jcranmer-intel.
nikic added inline comments.
================
Comment at: llvm/docs/LangRef.rst:3837
+ hasZeroInit: i1 true,
+ }
----------------
nhaehnle wrote:
> nikic wrote:
> > This could use some clarification on how the properties for target types with different arguments relate, if at all. If you define properties for `target("mytype")`, do those also apply to `target("mytype", i32)`?
> >
> > Do you need to repeat the properties for every combination of arguments in the IR, or is there some inheritance?
> They don't relate and there is no inheritance, every target type is distinct and has its own properties. I did briefly consider the possibility of inheritance, but it seemed to quickly get very complex and not that useful. I'm going to try to clarify that.
I see. I think this point could use some input from people who are using target types, in particular @jcranmer-intel.
The way I originally expected this to work is that the target type properties are independent of the type arguments entirely, so that `target("mytype")` and all `target("mytype", Ti, Ni)` share the same properties.
I'm not familiar enough with how these types are used to say whether independent properties for each argument combination makes sense or not.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D147697/new/
https://reviews.llvm.org/D147697
More information about the llvm-commits
mailing list