This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: PowerPC shrink-wrap support 0 of 3


On 09/22/11 16:40, Alan Modra wrote:
> The bootstrap breakage happens on libmudflap/mf-hooks1.c, compiling
> __wrap_malloc.  Eliding some detail, this function starts off as
> 
> void *__wrap_malloc (size_t c)
> {
>   if (__mf_starting_p)
>     return __real_malloc (c);
> 
> The "if" is bb2, the sibling call bb3, and shrink wrap rather nicely
> puts the prologue for the rest of the function in bb4.  A great
> example of shrink wrap doing as it should, if you ignore the fact that
> optimizing for startup isn't so clever.  However, bb-reorder inverts
> the "if" and moves the sibling call past other blocks in the function.
> That's wrong, because the dwarf unwind info for the prologue is not
> applicable for the sibling call block:  The prologue hasn't been
> executed for that block.  (The unwinder sequentially executes all
> unwind opcodes from the start of the function to find the unwind state
> at any instruction address.)  Exactly the same sort of problem is
> generated by your "unconverted_simple_returns" code.

dwarf2cfi should be able to figure this out. I'd need to see RTL dumps
to get an idea what's going on.


Bernd


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]