On Fri, Mar 4, 2011 at 4:10 PM, Jakub Jelinek <ja...@redhat.com> wrote:
> On Fri, Mar 04, 2011 at 04:00:06PM +0100, Richard Guenther wrote:
>> But then location lists for those variables depend on the function context
>> and cannot be shared for different callers.  Am I missing something?
>
> Sure, they can't be shared between different functions.  If Richard's patch
> does that, it is wrong.
>
>> Likewise I don't see how they could be shared for multiple inline instances
>> in the same function.
>
> But there is no reason why it can't be shared within one function, across
> many inline instances.  There is just a single nonlocalized decl in all
> those cases you cache, and even if it appears in multiple BLOCKs
> BLOCK_NONLOCALIZED_VARS, VAR_LOCATION notes referencing it are still
> all queued for that DECL_UID from the whole function and any time you
> want to create a location list from what has been queued in the VAR_LOCATION
> notes, you will get the same list.

Ah, ok - that makes sense.  We have a single location list covering all
BLOCKs where the decl appears in BLOCK_NONLOCALIZED_VARS.
Somehow I thought this would already happen.

Richard.

>        Jakub
>

Reply via email to