This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Trouble understanding reload dump file format..
- From: Jim Wilson <wilson at specifix dot com>
- To: Dave Korn <dave dot korn at artimi dot com>
- Cc: gcc at gcc dot gnu dot org
- Date: Mon, 19 Mar 2007 12:43:35 -0700
- Subject: Re: Trouble understanding reload dump file format..
- References: <031801c76a20$25d60830$2e08a8c0@CAM.ARTIMI.COM>
Dave Korn wrote:
In particular, I really don't understand what a RELOAD_FOR_INPUT_ADDRESS
means when all the operands are regs, or why there should be three reloads for
the same operand when it's just a clobber scratch. Is there something special
about how reload handles clobber and match_scratch?
Reload types are used for a number of purposes. One of them is the
ordering used when emitting the actual reload fixup insns. A fixup for
an input reload must come before the insn. A fixup for an output reload
must come after the insn. A fixup for an address used by an input
reload must come before the input reloads. A fixup for an address used
by an output reload must come after the insn, but before the output
reloads. Etc. Careful ordering allows us to know the lifetimes of
every reload, and hence allows us to share reload registers between
reload types that don't overlap, thus reducing the total number of spill
regs required.
In this case, we have an input reload that requires secondary reloads.
Obviously, the secondary reloads must be emitted before the input
reload, so we just use the "input address" reload type for convenience,
even though there is no actual address involved here. That gets the
reloads emitted in the right place.
As usual, I'm over simplifying.
--
Jim Wilson, GNU Tools Support, http://www.specifix.com