This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Backend port: Minimizing register usage in favor of memory accesses
- From: Jim Wilson <wilson at specifixinc dot com>
- To: xyzzy at hotpop dot com
- Cc: gcc at gcc dot gnu dot org
- Date: Thu, 01 Apr 2004 11:48:42 -0800
- Subject: Re: Backend port: Minimizing register usage in favor of memory accesses
- References: <200403301148.19194.xyzzy@hotpop.com> <4069D937.9000507@specifixinc.com> <200403311111.08108.xyzzy@hotpop.com>
xyzzy@hotpop.com wrote:
Can you point me in the right place to look in the i386 target so I don't mess
this up? Is what Joem said about "lowering MEMORY_MOVE_COST" the only thing
to do? Is there other black magic involved?
If your target has patterns that allow MEMs, then gcc will use them.
Since some gcc optimizations (like combine) try to reduce the total
number of instructions, you will naturally get code that uses MEM in
preference to REG.
You shouldn't really need to do anything else to get started. There are
other things that you can do to fine tune the result and address
specific problems, such as setting MEMORY_MOVE_COST. However, since you
haven't reported any specific problems, I can't offer any specific
suggestions.
--
Jim Wilson, GNU Tools Support, http://www.SpecifixInc.com