On 07/15/2011 04:24 PM, Bernd Schmidt wrote:
> What's wrong with -freorder-blocks-and-partition? Something preexisting,
> or introduced with these changes?

Pre-existing.

The .gcc_except_table format includes a encoded displacement from
a call site to a handler.  We cannot represent this displacement
when the handler and the call site are in different sections.

There is a weak attempt at fixing up this situation in except.c,
convert_to_eh_region_ranges, but (1) the exception data is not
updated, and more importantly, (2) the code that is generated
violates the constraints that are assumed for the exception_receiver
and nonlocal_goto_receiver named patterns.  In particular, targets
like alpha and mips that want to re-compute the GP from some
kind of pc-relative relocation will compute the wrong GP.

The problem appears in the dwarf2 pass only because of (1), in
that when we validate that all extended basic blocks have had
unwind info propagated into them, we find that there are blocks
that are unvisited.

All this cross-segment fixup stuff should have been handled in
pass_partition_blocks, not delayed until it's too late to do
the right thing.

And of course pass_partition_blocks is... well, let's just say
it's due for a bit of maintenance.



r~

Reply via email to