Re: How to eliminate redundant constant move instructions

George Neuner <gneuner2@comcast.net>
Wed, 02 Nov 2011 12:38:56 -0400

          From comp.compilers

Related articles
[3 earlier articles]
Re: How to eliminate redundant constant move instructions gah@ugcs.caltech.edu (glen herrmannsfeldt) (2011-11-01)
Re: How to eliminate redundant constant move instructions can.finner@gmail.com (amker) (2011-11-01)
Re: How to eliminate redundant constant move instructions can.finner@gmail.com (amker) (2011-11-01)
Re: How to eliminate redundant constant move instructions can.finner@gmail.com (amker) (2011-11-01)
Re: How to eliminate redundant constant move instructions amker.cheng@gmail.com (amker) (2011-11-01)
Re: How to eliminate redundant constant move instructions amker.cheng@gmail.com (amker) (2011-11-01)
Re: How to eliminate redundant constant move instructions gneuner2@comcast.net (George Neuner) (2011-11-02)
Re: How to eliminate redundant constant move instructions acolvin@efunct.com (mac) (2011-11-03)
Re: How to eliminate redundant constant move instructions kaz@kylheku.com (Kaz Kylheku) (2011-11-03)
Re: How to eliminate redundant constant move instructions gah@ugcs.caltech.edu (glen herrmannsfeldt) (2011-11-03)
Re: How to eliminate redundant constant move instructions gneuner2@comcast.net (George Neuner) (2011-11-04)
Re: How to eliminate redundant constant move instructions gah@ugcs.caltech.edu (glen herrmannsfeldt) (2011-11-04)
Re: How to eliminate redundant constant move instructions gneuner2@comcast.net (George Neuner) (2011-11-04)
[3 later articles]
| List of all articles for this month |
From: George Neuner <gneuner2@comcast.net>
Newsgroups: comp.compilers
Date: Wed, 02 Nov 2011 12:38:56 -0400
Organization: A noiseless patient Spider
References: 11-10-019 11-11-004 11-11-005
Keywords: optimize
Posted-Date: 02 Nov 2011 22:43:37 EDT

On Tue, 1 Nov 2011 22:35:04 +0000 (UTC), glen herrmannsfeldt
<gah@ugcs.caltech.edu> wrote:


>George Neuner <gneuner2@comcast.net> wrote:
>
>(big snip on optimization and register loads)
>
>> You might be asking "if the value already is in a register, why not
>> just use it rather than load a second register?" The answer to that
>> likely is a scheduling issue which depends on the use of the first
>> register. You have to remember that many CPUs can execute multiple
>> instructions in parallel, and those parallel instruction streams may
>> be executed out of order with respect to a program listing.
>
>That is what register renaming is for. Usually using more than
>the architecturally specified number of registers, the CPU
>internally remaps the registers such that it can keep one value
>in a register while an instruction is being executed out of order.


Yes. But the compiler can't count on register renaming ... it can see
only the architectural named registers. If the code in question had
copied Rx-> Ry then renaming would have been possible, but instead the
code performed a constant load to each register. No possibility of
rename sharing there.


George


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.