[Bug c/14816] New: -fno-crossjumping not working for large code?

mj_ at gazeta dot pl gcc-bugzilla@gcc.gnu.org
Fri Apr 2 00:25:00 GMT 2004


I'm not sure if it really belongs here, but I hope it won't hurt..

I am working on kind-of interpreter, which consists of series of indirect branches:

label1:
    ...
    goto *ip;
    ...
labelN:
    ...
    goto *ip;

After optimization it is translated to more-or-less assembly equivalent of:

label0:
    goto *ip;
label1:
    ...
    goto label0;
    ...
labelN:
    ...
    goto label0;

That layout is hurting branch prediction, so I tried to disable it with
-fno-crossjumping, which I believe is responsible for this optimization.

For small code [tens of cases] it worked, but for larger one [hundreds] the
compiler still performed that optimization.

For comparison I ran GCC 3.3 with:
--param max-crossjump-edges=400 -fno-crossjumping
and it worked as expected.
[with default values it didn't link indirect branches in the larger case anyway]

-- 
           Summary: -fno-crossjumping not working for large code?
           Product: gcc
           Version: 3.4.0
            Status: UNCONFIRMED
          Severity: minor
          Priority: P2
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: mj_ at gazeta dot pl
                CC: gcc-bugs at gcc dot gnu dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14816



More information about the Gcc-bugs mailing list