Jason Merrill wrote:
> Jan Hubicka wrote:
>> Thanks for explanation - the space optimization seems relatively
>> chalenging to implement, in particular because the variables in scope
>> might change in between the time abstract copy is output and the time
>> the block referencing to the block via abstract pointer is output.
>
> The block is a lexical thing, optimizations don't change that.
>
>> We have origin pointers in declarations and origin pointers in blocks.
>> I guess optimization willing to know all variables same from user POV
>> (for lets say setting watchpoint on something in inline function)
>> probably cares about origins of declarations rather than blocks.
>> At what time the blocks actually matters?
>
> So the debugger knows which declarations are in scope at a particular PC.
>
>> For example if I have block that contians just single block and declare
>> no new variables, can I simply remove it and replace it by the inner
>> block?
>
> Yes.
>
Two more general questions
1) if i have a block A with several children C1...Cn and A does not
declare any variable, can i remove A and have C1...Cn point to A's parent.

2) can you remove leaf blocks that have no declarations?
> Jason
>

Reply via email to