This is the mail archive of the gcc-patches@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: [PATCH] shrink-wrap: Handle multiple predecessors of prologue


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.


Segher

---
 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
--- a/gcc/shrink-wrap.c
+++ b/gcc/shrink-wrap.c
@@ -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;
-- 
1.7.10.4


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