This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Question about Register Class Allocation
- From: Ian Lance Taylor <iant at google dot com>
- To: "Balaji V. Iyer" <bviyer at ncsu dot edu>
- Cc: <gcc at gcc dot gnu dot org>
- Date: 29 Jan 2008 18:37:07 -0800
- Subject: Re: Question about Register Class Allocation
- References: <009301c862d2$81a02730$33160e98@ece.ncsu.edu>
"Balaji V. Iyer" <bviyer@ncsu.edu> writes:
> I saw that regclass() function determines which class of register
> the registers in the current units should be assigned to. The question I
> have is: Will this decision change in any other parts of the compiler?
> or is this this the final place where they fix the register class? So,
> if I add my own priority-based register-class assigner, can I just
> replace this function and add my own?
regclass sets preferences. Those preferences will not change later.
The register allocator will honor those preferences if possible.
However, it is not required to honor them. It is only required to
honor the constraints in the MD file.
Ian