Repository navigation
More Flexible ABI Support #427
daveedvdv-nvidia
started this conversation in
Ideas
Replies: 1 comment 1 reply
|
It might be worth trying to make the class/variable representing the ABI target (as a configuration option) a constexpr variable so that optimizers can more easily strip branches if a binary only cares about a particular ABI. For instance if We've talked about plumbing more compiler state as a class that's passed around instead of a global variable; that might be worth exploring ... but I suspect it's a secondary concern and would make the above more complicated. |
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Currently, the EDG front end supports two major ABIs, each with some minor variations: Cfront-based ABIs when the configuration macro
IA64_ABIis false and Itanium-based ABIs when that macro is true. With an eye toward eventually improving MSVC ABI compatibility, I'd like to first reorganize the ABI-handling code such that:I've started sketching this out:
src/code — front-end semantics, class layout, IL, name mangling (lower_name.c), IL lowering (lower_il.c,lower_init.c,lower_eh.c), and the C-generating back end (c_gen_be.c).lib_src/remains build-time configured via the__EDG_*macros emitted bymacro.c..cfiles by ABI: Keep existing translation units intact (layout.c,class_decl.c,lower_name.c,lower_il.c,lower_init.c,lower_eh.c,c_gen_be.c). Use a runtime ABI descriptor/traits struct (an_abi_config curr_abi;) combined with in-file modular helpers and per-ABI dispatch tables.ABI_COMPATIBILITY_VERSION,CFRONT_*_COMPATIBILITY, andABI_CHANGES_FOR_*semantics, moving them from preprocessor#ifconditionals to tests of fields incurr_abi.I expect this will (unfortunately) cause some significant churn throughout the codebase.
All reactions