[cfe-dev] Passing StructType arguments directly
David Chisnall
theraven at sucs.org
Tue Sep 20 04:03:09 PDT 2011
On 20 Sep 2011, at 06:34, David Meyer wrote:
> * Front-ends would no longer need to implement the ABIs for each
> target architecture to get full ABI compliance. They would generate
> high-level bitcode, and the ABI lowering knowledge would be contained
> in LLVM.
I'd consider this to be a major benefit all by itself. Not only is the ABI-dependence of the IR a major layering violation, it's also incredibly badly documented. For example, I know that FreeBSD's x86 ABI returns small structures in registers, but I have no idea how I am supposed to know that this means that {float, float} is returned as an i64 (or why anyone thinks that's even a remotely sane representation in the IR of 'two floats in float registers').
Note that this wouldn't necessarily need a new IR format. A set of standard annotations on types and an pass that parsed these annotations and did the relevant transforms would be enough.
David
-- Sent from my brain
More information about the cfe-dev
mailing list