[cfe-dev] Clang and packing/unmacking struts uses as arguments/return values

Renato Golin renato.golin at linaro.org
Mon Feb 17 03:09:28 PST 2014


On 17 February 2014 11:04, David Chisnall <David.Chisnall at cl.cam.ac.uk> wrote:
> We've talked in the past about having some ABI builders, factoring out the code in Clang so that you'd have a generic library that could construct LLVM types from C types, construct calls to LLVM functions from C types, and extract IR values that directly correspond to C types after calls.


I think his needs are slightly different. What we talked about was to
have a PCSBuilder or to add PCS-aware function lowering in the
IRBuilder, but in his case, if I got it right, he has to interact with
already-built IR from his own functions, which happens to be compiled
to one target and been lowered a bit too much.

I wouldn't advise on keeping the IR on a higher level *after*
emission, ie. not a good idea to store half-lowered IR in bitcode
files, or we'll end up creating a new form of IR, which will open a
can of worms.

cheers,
--renato




More information about the cfe-dev mailing list