This is an archive of the discontinued LLVM Phabricator instance.

[flang] Enable target rewrite for int args/rets of bind(c) functions.
ClosedPublic

Authored by vzakhari on Mar 7 2023, 6:48 PM.

Details

Summary

BIND(C) subprograms must use the same target ABI as the C processor,
so 1/2-byte int args/rets must be rewritten to use signext attribute.
This change-set also sets fir.bindc_name for the math functions used
during lowering so that they can be fixed up as well (though, currently
none of them needs to be affected).

Diff Detail

Event Timeline

vzakhari created this revision.Mar 7 2023, 6:48 PM
Herald added a project: Restricted Project. · View Herald TranscriptMar 7 2023, 6:48 PM
vzakhari requested review of this revision.Mar 7 2023, 6:48 PM
This revision is now accepted and ready to land.Mar 7 2023, 6:58 PM