[cfe-dev] Passing StructType arguments directly
matthieu.monrocq at gmail.com
Tue Sep 20 12:57:51 CDT 2011
2011/9/20 Reid Kleckner <reid.kleckner at gmail.com>
> On Sun, Sep 18, 2011 at 10:48 PM, David Meyer <pdox at google.com> wrote:
> > One idea would be to have a bitcode -> bitcode pass which is
> > responsible for lowering the higher-level representations (structs,
> > unions, complex) down to simple types, in a target-specific way. This
> > includes coercing parameters, expanding va_arg, and so on. This would
> > move the target-specific lowering into LLVM and out of the front-ends.
> > (This pass would be idempotent)
> This idea of a ABI-neutral IR layer has come up before (can't find the
> link), which probably means that it's worth considering. I don't know
> if it means it's a good idea or if it's just a bad idea that looks
> good. :)
> In any case, the ability to generate target-neutral bitcode seems to
> me like the most commonly requested enhancement. I think the LLVM
> project should either reject it outright as a non-goal or decide on
> the future direction for how to achieve it. OTOH this is an open
> source project with many stakeholders with different priorities, so
> it's hard to make that kind of decision.
> If you do want to add the target-neutral IR layer, it's probably best
> to completely avoid optimizing such bitcode, because it's likely to
> create bugs in the optimizers that don't expect FCAs, unions,
> bitfields, pointer-sized integers, etc to be there.
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
Since we are talking about target independent representation I feel
compelled to post a link to one of the presentation of the last LLVM
Developer meeting (Sept 16th):
The author explains at lengths the various ways in which LLVM is target
dependent and speaks about WordCode, a target independent IR that can be
lowered in a subsequent pass.
I don't know whether it's immediately usable for PNaCl, but I hope it might
help the discussion.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the cfe-dev