[PATCH] shrink-wrap: Handle multiple predecessors of prologue
Tue Sep 22 21:09:00 GMT 2015
On Tue, Sep 22, 2015 at 11:11:47AM -0500, Segher Boessenkool wrote:
> > So, given that your solution seems to work, the patch is ok.
> Thanks! Here is what I will commit after bootstrap+test (the superfluous
> assert removed, and the comment for the code quoted above tweaked a bit).
I added the following tiny patchlet for a paper bag problem revealed
by testing on x86-64. Committed together with the rest.
gcc/shrink-wrap.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/gcc/shrink-wrap.c b/gcc/shrink-wrap.c
index 94b1228..a99474d 100644
@@ -822,6 +822,9 @@ try_shrink_wrapping (edge *entry_edge, bitmap_head *bb_with,
den += e->src->frequency;
+ if (den == 0)
+ den = 1;
/* All is okay, so do it. */
crtl->shrink_wrapped = true;
More information about the Gcc-patches