[patch] Back-port ifcvt.c changes from PR54146

Steven Bosscher stevenb.gcc@gmail.com
Sun Oct 14 20:49:00 GMT 2012


Hello,

This patch is a back-port of one of the scalability improvements I
made to perform, well, maybe not well but at least not so poorly on
the test case of PR54146, which has an extremely large function.

The problem in ifcvt.c has two parts. The first is that clearing
several arrays of size(max_reg_num) for every basic block slowed down
things. The second part is that this memory was being allocated with
alloca, so that a sufficiently large function could blow out the
stack.

The latter problem was now also found by a user trying to compile a
sensible and well-known piece of software (see
http://gcc.gnu.org/ml/gcc/2012-10/msg00202.html). This code compiles
with older GCC releases, so this problem is a regression. To fix the
problem in GCC 4.7, I'd like to propose this back-port.

Bootstrapped&tested with release and default development checking on
x86_64-unknown-linux-gnu and on powerpc64-unknown-linux-gnu. The patch
has also already spent more than two months on the trunk now without
problems. OK for the GCC 4.7 release branch? Maybe also for the GCC
4.6 branch after testing?

Ciao!
Steven
-------------- next part --------------
A non-text attachment was scrubbed...
Name: PR54146_ifcvt_47.diff
Type: application/octet-stream
Size: 8571 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20121014/ba445748/attachment.obj>


More information about the Gcc-patches mailing list