This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Lazy __FUNCTION__ processing.



Very cool.  This is something I'd wanted to do for *ages*; I've
definitely measured the memory impact before, and noticed it was
large.

This is exactly the kind of thing that functions-as-trees enables, and
it's great to see people taking advantage of that infrastructure.

A few things about the patch:

  - A bunch of functions need comments.  (For example `fname_as_string').

  - I'm not too happy about creating that new COMPOUND_STMT.  IIRC,
    there's something special about the first statement in a function.
    (It get's special treatment for STMT_LINENO, or something like
    that.)  Instead, you could -- at the some point where we presently
    create the declarations -- create a dummy DECL_STMT.  If it's
    not needed, zap it at the end of the function.  If it is needed,
    you have the perfect place to emit the new variables.

    That would be a little less risky, I think.

I don't think we can put this patch on the branch at this point; it's
hard to argue that it fixes a critical bug, despite the major memory
savings.

It would be a good candidate for a 3.0.1 release, though.

Thanks!

--
Mark Mitchell                   mark@codesourcery.com
CodeSourcery, LLC               http://www.codesourcery.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]