This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Register allocator question
- From: Ian Lance Taylor <iant at google dot com>
- To: Hendrik Greving <hendrik dot greving dot intel at gmail dot com>
- Cc: gcc at gcc dot gnu dot org
- Date: Fri, 21 Jun 2013 22:14:09 -0700
- Subject: Re: Register allocator question
- References: <CANc4vhp4mEGg3YnTkf+To9iu-z8vpr+1f7wUsC+nan6uVDKojA at mail dot gmail dot com>
On Fri, Jun 21, 2013 at 9:22 AM, Hendrik Greving
<hendrik.greving.intel@gmail.com> wrote:
> A question regarding regalloc (probably greg?)
>
> I understand that matching constraints can constrain allocation to
> re-use registers, e.g. for an 'add' actually has 2 instruction
> operands (instead of 3). This is documented well. But what about if I
> do not necessarily constrain the output template, e.g. zero extend
> output template <myzeroextend> %1, %0. Does the register allocator by
> default assume the machine can have %1==%0 (e.g. use edge of %0
> interferes with define edge %1)? Anything else would surprise me, just
> making sure?
If you don't use constraints such as & to say that %1 and %0 can not
be in the same register, then they can be.
By the way, you do know that this has all changed in current mainline, right?
Ian