[PATCH 3/6] Allow jumps in epilogues

Bernd Schmidt bernds@codesourcery.com
Thu Mar 31 22:36:00 GMT 2011


On 03/31/2011 11:28 PM, Richard Henderson wrote:
>> Rather than use a CFG, I've tried to do something similar to
>> compute_barrier_args_size, using JUMP_LABELs etc.
> 
> A reasonable solution for now, I suppose.

Ok, sounds like you haven't discovered a fatal flaw; I'll keep hacking
on it.

>> Summary of the patches:
>> 001 - just create a dwarf2out_frame_debug_init function.
> 
> Ok.
> 
>> 003 - Store dw_cfi_refs in VECs rather than linked lists. Looks
>>       larger than it is due to reindentation
> 
> Like 001, this one looks like it's totally independent of and of
> the other changes, and a good cleanup.  Please go ahead and test
> and commit this one independently.

Will do.

>> 002 - Make it walk the function in a first pass and record CFIs to
>>       be output later
>
> Do I correctly understand that NOTE_INSN_CFI isn't actually being
> used in this patch?

No, it's used - but it looks like I forgot to quilt refresh and the
final.c changes weren't included. New patch below. After this patch, the
whole function is processed before final, and rather than emitting cfi
directives immediately, we create these notes which cause the directives
to be emitted during final.

This probably shouldn't be committed separately when these changes go
in, as (I think) it breaks -freorder-blocks-and-partition as well as the
code in i386.c; it's split out simply to show an intermediate stage.

>> 004 - Change the function walk introduced in 002 so that it records
>>       and restores state when reaching jumps/barriers
> 
> I'm not too fond of vec_is_prefix_of.  The Problem is that you're
> not applying any understanding of the actual data, just doing a
> string comparison (effectively).

Yes, this falls under "inefficient CFI insns". I wanted to post a
preliminary proof-of-concept patch set now which generates
correct(-looking) output, but not necessarily optimized output. Not
quite sure yet how to tackle this but I'll think of something.


Bernd
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: 002-scanfirst.diff
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20110331/baf4e2bc/attachment.ksh>


More information about the Gcc-patches mailing list