This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH, ira] handle all fixed register classes
- From: Jim Wilson <wilson at codesourcery dot com>
- To: gcc-patches at gcc dot gnu dot org
- Cc: Vladimir Makarov <vmakarov at redhat dot com>
- Date: Mon, 19 Apr 2010 18:33:08 -0700
- Subject: [PATCH, ira] handle all fixed register classes
This is the rest of the solution for PR43520. The IA-64 port has some
register classes in which all of the registers are fixed. The
scheduling reg pressure code in ira sees that we have a class with 0
allocatable registers and decides to add extra dependencies to prevent
increasing register pressure. But if we have no allocatable registers,
then we can't possibly have a register pressure problem. So ira should
be ignoring classes with no allocatable registers.
This patch was tested with an ia64-linux C and C++ bootstrap and make
check. I also verified by hand that is solves the original problem.
I also tested this with an x86-linux bootstrap (all default languages)
and make check. There were no regressions. I did this with an extra
line added
ira_assert (ira_available_class_regs[cl] != 0);
The assert never triggered showing that this patch has no effect on
32-bit x86-linux code.
OK?
Jim
2010-04-19 James E. Wilson <wilson@codesourcery.com>
PR rtl-optimization/43520
* ira-lives.c (ira_implicitly_set_insn_hard_regs): Exclude classes with
zero available registers.
Index: ira-lives.c
===================================================================
--- ira-lives.c (revision 158495)
+++ ira-lives.c (working copy)
@@ -805,6 +805,9 @@ ira_implicitly_set_insn_hard_regs (HARD_
? GENERAL_REGS
: REG_CLASS_FROM_CONSTRAINT (c, p));
if (cl != NO_REGS
+ /* There is no register pressure problem if all of the
+ regs in this class are fixed. */
+ && ira_available_class_regs[cl] != 0
&& (ira_available_class_regs[cl]
<= ira_reg_class_nregs[cl][mode]))
IOR_HARD_REG_SET (*set, reg_class_contents[cl]);