------- Additional Comments From law at redhat dot com 2005-05-02 16:46 ------- Subject: Re: Missed jump threading/bypassing optimization with loop and % (or ands)
On Sun, 2005-05-01 at 16:29 +0000, pinskia at gcc dot gnu dot org wrote: > ------- Additional Comments From pinskia at gcc dot gnu dot org 2005-05-01 > 16:29 ------- > We now get: > main () > { > int i.8; > int i; > > <bb 0>: > Invalid sum of outgoing probabilities 0.0% > i = 0; > i.8 = i + 1; > > Invalid sum of outgoing probabilities 98.9% > <L0>:; > if ((i.8 & 1) != 0) goto <L1>; else goto <L10>; > > <L1>:; > puts (&"hello"[0]); > > Invalid sum of incoming frequencies 9813, should be 10000 > <L10>:; > i.8 = i.8 + 1; > if (i.8 != 90) goto <L0>; else goto <L4>; > > <L4>:; > return; > > } Right. I mentioned earlier that what we need to figure out whether or not we want to allow the threader to keep threading the loop backedge over and over and over. Conceptually we should since potentially it makes the whole loop go away. The problem is that doing so can result in a huge compile-time explosion. I've got some ideas to deal with the compile-time explosion but I haven't tested them yet. Jeff -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17116