[cfe-dev] Rewrite of codegen-level struct/union layout

Devang Patel dpatel at apple.com
Wed May 21 16:25:05 PDT 2008


On May 21, 2008, at 7:37 AM, Eli Friedman wrote:

> Per subject, attached patch almost completely rewrites the
> struct/union algorithm.  The new version is a lot simpler; some of
> that was refactoring code, and some of that was depending a lot more
> on the information already calculated by the ASTContext.
>
> Depending on the ASTContext to do struct layout should make it easier
> to add support for constructs like packed and aligned, because this
> will pick up any changes in the way the ASTContext does struct layout
> for free.

One thing to note is, struct layout is very much target specific and  
not all target specific information is required for Semantic Analysis.

I have not looked at your patch at all. I'll look at it and get back  
to you as soon as I can.

> On a side note, after I finished this patch, PHP compiled with clang
> started working.  I'm not sure if I fixed a struct layout bug, or some
> other change in my tree helped, but it was crashing on startup before
> this patch, and now it passes most of its testsuite (although this is
> with most of the extensions disabled).

Cool.
-
Devang






More information about the cfe-dev mailing list