[RFC] Fix findloc prototype
Thomas Koenig
tkoenig@netcologne.de
Sun Oct 4 21:59:35 GMT 2020
Am 04.10.20 um 21:32 schrieb FX:
> Hi Thomas,
>
> The approach is clear, and it’s also a bit of a hack.
I concur :-)
> I don’t know how it could impact other code, obviously.
Not a lot, I guess.
> What I am wondering is: for generating code calling intrinsics,
> the mechanism seems to be generic on the surface, but it is > (ab)used in a weird way in a lot of cases.
That is a fairly good description of a lot of trans-*, I guess.
> What I am wondering is: would it make more sense (and be > more maintainable) to actually emit those special cases
> directly with ad hoc code (as we already do for some intrinsics) > rather than (ab)use the generic mechanism in roundabout ways with>
tricks?
In principle, you're right. That was what I was setting out to
do, when I saw that the code could already work "as is"
for a proof of principle.
For generating the prototypes, we can indeed use the mechanisms that are
there. For emitting the calls themselves, it would definitely be
cleaner to separate that into its own code path.
But even if we do nothing more than what was in the patch, with
just correcting the prototypes, we could at least factor out
se->ignore_optional, which would make the code a tiny little
bit clearer.
However, there is one important question: Does this patch actually
work in the sense that it at least partially resolves the ABI issues
on the MacOS ARM? Unfortunately, I don't have a machine to test this
on (or would it be possible to get access?).
Best regards
Thomas
More information about the Fortran
mailing list