[PATCH 1/X, i386, PR54232] Enable EBX for x86 in 32bits PIC code

Evgeny Stupachenko evstupac@gmail.com
Fri Oct 10 07:43:00 GMT 2014


Hi,

The patch enables EBX in RA for x86 32bits PIC mode.
It was discussed here: https://gcc.gnu.org/ml/gcc-patches/2014-09/msg02513.html
Now there is working version with good performance and stability level
- it could be a solid first step of EBX enabling.

Bootstrap and make check passed.
There are several changes in "-m32" make check.

New pass:
gcc.target/i386/pr57003.c - before patch there was not enough registers to PASS

New fails:

gcc.target/i386/pic-1.c (test for errors, line 12) - now there are no
errors as we can do asm insertions with EBX
gcc.target/i386/pr23098.c scan-assembler-not .LC[0-9] - potential
performance opportunity using constant immediate
gcc.target/i386/pr55458.c (test for errors, line 10) - now there are
no errors as there enough registers

Performance on Silvermont (for the group of 3 patches):

at -Ofast -flto -funroll-loops -fPIC
EEMBC benchs:
 +6% CoreMark
 +3% Denmark
Individual test gained up to +25%

SPEC2000int is almost unchanged, SPEC2000fp +1,7%:

at -O2 -fPIC
EEMBC benchs:
 +2% CoreMark
 +5% Denmark
Individual test gained up to +25%

SPEC2000int and SPEC2000fp are almost unchanged:

ChangeLog:

2014-10-08  Ilya Enkovich  <ilya.enkovich@intel.com>
            Vladimir Makarov  <vmakarov@redhat.com>
        * doc/tm.texi.in (TARGET_USE_PSEUDO_PIC_REG, TARGET_INIT_PIC_REG):
        Document.
        * doc/tm.texi: Regenerate.
        * gcc/function.c (assign_parms): Generate pseudo register for PIC.
        * gcc/init-regs.c (initialize_uninitialized_regs): Ignor pseudo PIC
        register.
        * gcc/ira-color.c (color_pass): Add check on pseudo register.
        * gcc/ira-emit.c (change_loop): Don't create copies for PIC pseudo
        register.
        * gcc/ira.c (split_live_ranges_for_shrink_wrap): Add check on pseudo
        register.
        (ira): Add target specific PIC register initialization.
        (do_reload): Keep PIC pseudo register.
        * gcc/lra-assigns.c (spill_for): Add checks on pseudo register.
        * gcc/lra-constraints.c (contains_symbol_ref_p): New.
        (lra_constraints): Enable lra risky transformations when PIC is pseudo
        register.
        * gcc/shrink-wrap.c (try_shrink_wrapping): Add check on pseudo register.
        * gcc/target.def (use_pseudo_pic_reg): New.
        (init_pic_reg): New.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: enabling_ebx_general.patch
Type: application/octet-stream
Size: 10633 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20141010/487e029c/attachment.obj>


More information about the Gcc-patches mailing list