This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug rtl-optimization/70961] Regrename ignores preferred_rename_class


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70961

Eric Botcazou <ebotcazou at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2016-05-05
                 CC|                            |ebotcazou at gcc dot gnu.org
     Ever confirmed|0                           |1

--- Comment #1 from Eric Botcazou <ebotcazou at gcc dot gnu.org> ---
> When deciding which register to use regrename.c calls the target function
> preferred_rename_class. However in pass 2 in find_rename_reg it then just
> ignores this preference. This results in significantly increased codesize on
> targets which prefer a subset of allocatable registers in order to use
> smaller instructions.

Pass #2 ignores it since the preference simply couldn't be honored.

> Also the computed super_class appears to be the union of all uses and defs
> instead of the intersection. This should be the intersection as that is the
> set of registers that all uses and defs support. 

The super_class has nothing to do with the class that is searched for renaming
registers though, it's just the info passed to the back-end to compute this
class.  For example, on the ARM, the preferred_class will be LO_REGS for any
chain of GENERAL_REGS.

> If the preferred class doesn't result in a valid rename then it could search
> a wider class, but then it would need to check that the size of the newly
> selected patterns does not increase.

The size is an arbitrary criterion, this could also be the latency, etc.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]