From patchwork Thu Oct 21 06:51:56 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [2/3] tm.texi documentation on macro PREFERRED_RENAME_CLASS Date: Wed, 20 Oct 2010 20:51:56 -0000 From: Yao Qi X-Patchwork-Id: 68528 Message-Id: <4CBFE30C.7090308@codesourcery.com> To: gcc-patches@gcc.gnu.org gcc/ * doc/tm.texi: Documentation on new macro PREFERRED_RENAME_CLASS. diff --git a/gcc/doc/tm.texi b/gcc/doc/tm.texi index e1e0957..40fc204 100644 --- a/gcc/doc/tm.texi +++ b/gcc/doc/tm.texi @@ -2581,6 +2581,19 @@ only if neither labeling works. This macro also has strict and non-strict variants. @end defmac +@defmac PREFERRED_RENAME_CLASS (@var{class}) +A C expression that places additional restrictions on the register class +to use when it is necessary to rename a register in class +@var{class} to another class, or perhaps still @var{class}, +if you don't define this macro. + +Sometimes returning a more restrictive class makes better code. For +example, on ARM, thumb-2 instructions using @code{LOW_REGS} may be smaller than +instructions using @code{GENERIC_REGS}. By returning @code{LOW_REGS} from +@code{PREFERRED_RENAME_CLASS}, code size can be reduced. + +@end defmac + @defmac PREFERRED_RELOAD_CLASS (@var{x}, @var{class}) A C expression that places additional restrictions on the register class to use when it is necessary to copy value @var{x} into a register in class