[PATCH] Provide debug info for SRA optimized variables (PR debug/43983)

Jakub Jelinek jakub@redhat.com
Wed May 12 19:24:00 GMT 2010


On Wed, May 12, 2010 at 02:46:42PM -0400, Jason Merrill wrote:
> So, in this patch you're changing the var_loc_note field to be
> either a varloc note or a piece EXPR_LIST that does not appear
> anywhere else in the compiler, correct?  Please document this new
> data structure.

Yeah.  I can change even the field name to something else (suggestions?),
and will add the documentation.

> This code:
> 
> And this code:
> 
> are very similar.  Can we factor this out into another function?

Yeah, they are similar, but there are lots of differences too (primarily,
the first sequence modifies an existing chain, while the second one is
copying another chain and doing the same modifications on it as the
first sequence would do.  Doing a forceful copy and then just applying
the first sequence would work too, but would waste memory.

I'll try to see if merging both wouldn't be less maintainable than
the two separate sequences.

	Jakub



More information about the Gcc-patches mailing list