I'm hardly an expert on this stuff - but just curious: what sort of testing
did you put this through? Bootstrap Clang? Were you able to gather any
stats on reduced stack usage with this improvement to lifetime markers?

On Mon, Sep 15, 2014 at 4:05 PM, Arnaud A. de Grandmaison <
[email protected]> wrote:

> Hi All,
>
>
>
> Please find attached a patch which teaches clang to emit lifetime.start /
> lifetime.end markers for unnamed temporary objects.
>
>
>
> This patch can greatly reduce the stack usage of some C++ code, where it
> is so easy to have short lived unnamed temporaries.
>
>
>
> As noted in the subject, this is my third attempt: my previous attempts
> failed to handle correctly the lifetime extended temporaries, and I have
> had a hard time to understand the CleanupScope. It all boiled down to the
> fact that the body of a function is not considered a full CleanupScope (for
> debug information reasons), so in the case of lifetime extended objects at
> the top level of the function body, with a trivial destructor  +
> lifetime.end marker, the lifetime markers were simply not considered,
> firing an assert in ~CodeGenFunction. All cases are now covered by
> testcases.
>
>
>
> I would appreciate if someone knowledgeable with the lifetime extended
> temporaries & cleanup scopes could give a look to this patch.
>
>
>
> Cheers,
>
> --
>
> Arnaud A. de Grandmaison
>
>
>
> _______________________________________________
> cfe-commits mailing list
> [email protected]
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
>
>
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to