On 07/02/14 22:06, Jeff Law wrote: > On 02/07/14 11:20, Vladimir Makarov wrote: >> The following patch improves code size for ARM. Before the patch >> CSiBE size generated by GCC configured --with-arch=armv7-a >> --with-fpu=vfpv3-d16 --with-float=hard (with -mthumb) was >> >> 2414926 >> >> After the patch the size is >> >> 2396798 >> >> For comparison, when the reload pass is used the size is >> >> 2400154 >> >> The change in arm.h is to prevent reloading sp as an address by LRA. >> Reload has no such problem as it uses legitimate address hook and LRA >> mostly relies on base_reg_class. >> >> Richard, is this part ok to commit to the trunk? > I think so. It's fixing a P1 regression, that makes it "in scope" as > far as I'm concerned. >
While this is a useful fix for Thumb2 (which had regressed slightly), the PR is for Thumb1. I tried this patch when compiling CSiBE with -mthumb -mcpu=arm7tdmi -Os. Sadly it made no difference at all to the numbers there. So this does not resolve PR59535. R. > >> >> The change in lra-constraints.c is for correct alternative choice in >> move patterns when pseudo is of class of general reg and one alternative >> contains lo regs and another one contains hi regs. >> >> The patch was bootstrapped on x86/x86-64 and arm. >> >> 2014-02-07 Vladimir Makarov <vmaka...@redhat.com> >> >> PR rtl-optimization/59535 >> * lra-constraints.c (process_alt_operands): Encourage alternative >> when unassigned pseudo class is superset of the alternative class. >> * config/arm/arm.h (MODE_BASE_REG_CLASS): Return CORE_REGS for >> Thumb2 for LRA. > Just one nit in the comment in lra-constraints.c > s/stil/still/ > Jeff > > >