This patch lowers TYPE(*) correctly to fir.box<none>.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Looking at the design doc, I do not remember if you have considered using fir.box<None> for TYPE(*). Since Type(*) usage is quite limited unlike class(), I do not know if it is really worth encoding it as a special class.
In fact, we are sort of already using fir.box<none> as a TYPE(*) equivalent around the runtime interface. So unless you see specific reasons to use and extend fir.class here, maybe using fir.box would be enough ?
Yes we can also use fir.type<none> for TYPE(*). At the moment, I do not see any specific reasons we need to distinguish between the current usage of fir.box<none> and TYPE(*) but of course we can always change that in case a reason arise. The motivation here was to keep all polymorphic entities represented as fir.class and since TYPE(*) is unlimited polymorphic then it would have fall in that representation as well. I'm fine with going with fir.box<none>. It would also remove the need of a custom assembly format.
OK, then I vote for making TYPE(*) be fir.box<none>. Given C709 restrictions about assumed types, I think it makes more sense to keep them separate from CLASS entities and reserve fir.class for CLASS.
flang/lib/Lower/CallInterface.cpp | ||
---|---|---|
863 | Beware builbot clang-format is complaining for this file. |
flang/lib/Lower/CallInterface.cpp | ||
---|---|---|
863 | Thanks. I had a bad clang-format config in arcanist for a while. |
Beware builbot clang-format is complaining for this file.