Backend port: Minimizing register usage in favor of memory accesses
Jim Wilson
wilson@specifixinc.com
Thu Apr 1 19:48:00 GMT 2004
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
More information about the Gcc
mailing list