Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.compilers > #325

Re: How to eliminate redundant constant move instructions

Path csiph.com!x330-a1.tempe.blueboxinc.net!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!border3.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!news.iecc.com!nerds-end
From George Neuner <gneuner2@comcast.net>
Newsgroups comp.compilers
Subject Re: How to eliminate redundant constant move instructions
Date Fri, 04 Nov 2011 13:27:43 -0400
Organization A noiseless patient Spider
Lines 28
Sender news@iecc.com
Approved comp.compilers@iecc.com
Message-ID <11-11-023@comp.compilers> (permalink)
References <11-10-019@comp.compilers> <11-11-004@comp.compilers> <11-11-005@comp.compilers> <11-11-014@comp.compilers> <11-11-018@comp.compilers>
NNTP-Posting-Host news.iecc.com
X-Trace leila.iecc.com 1320437163 97723 64.57.183.58 (4 Nov 2011 20:06:03 GMT)
X-Complaints-To abuse@iecc.com
NNTP-Posting-Date Fri, 4 Nov 2011 20:06:03 +0000 (UTC)
Keywords optimize
Posted-Date 04 Nov 2011 16:06:03 EDT
X-submission-address compilers@iecc.com
X-moderator-address compilers-request@iecc.com
X-FAQ-and-archives http://compilers.iecc.com
Xref x330-a1.tempe.blueboxinc.net comp.compilers:325

Show key headers only | View raw


On Thu, 3 Nov 2011 03:20:32 +0000 (UTC), Kaz Kylheku <kaz@kylheku.com>
wrote:

>On 2011-11-02, George Neuner <gneuner2@comcast.net> wrote:
>> 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.
>
>If the register holds a value that is used, but not clobbered, then renaming is
>moot. The two blocks of code both depend on rx being zero, and so nothing is
>achieved by splitting the instruction set register into two physical registers.

Yes.  But the original question involve 2 registers both being loaded
with the same constant value.  The OP asked why use a 2nd register.  I
gave a couple of reasons why that might be, and then Glen brought up
renaming.

We haven't seen the actual code, but from the description it appears
that the compiler could have reused the original register but instead
chose to use a different one.  We also don't know what CPU, but
regardless, renaming only might have been done if the compiler had
used a copy instruction.  With the use of constant loads there was no
possibility of renaming being performed.

George

Back to comp.compilers | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

How to eliminate redundant constant move instructions "Amker.Cheng" <amker.cheng@gmail.com> - 2011-10-31 17:53 +0800
  Re: How to eliminate redundant constant move instructions Kaz Kylheku <kaz@kylheku.com> - 2011-10-31 17:08 +0000
    Re: How to eliminate redundant constant move instructions amker <can.finner@gmail.com> - 2011-11-01 19:01 -0700
    Re: How to eliminate redundant constant move instructions mac <acolvin@efunct.com> - 2011-11-03 02:20 +0000
  Re: How to eliminate redundant constant move instructions George Neuner <gneuner2@comcast.net> - 2011-11-01 14:32 -0400
    Re: How to eliminate redundant constant move instructions glen herrmannsfeldt <gah@ugcs.caltech.edu> - 2011-11-01 22:35 +0000
      Re: How to eliminate redundant constant move instructions amker <can.finner@gmail.com> - 2011-11-01 19:35 -0700
      Re: How to eliminate redundant constant move instructions amker <amker.cheng@gmail.com> - 2011-11-01 21:04 -0700
      Re: How to eliminate redundant constant move instructions George Neuner <gneuner2@comcast.net> - 2011-11-02 12:38 -0400
        Re: How to eliminate redundant constant move instructions Kaz Kylheku <kaz@kylheku.com> - 2011-11-03 03:20 +0000
          Re: How to eliminate redundant constant move instructions George Neuner <gneuner2@comcast.net> - 2011-11-04 13:27 -0400
            Re: How to eliminate redundant constant move instructions glen herrmannsfeldt <gah@ugcs.caltech.edu> - 2011-11-04 21:19 +0000
        Re: How to eliminate redundant constant move instructions glen herrmannsfeldt <gah@ugcs.caltech.edu> - 2011-11-03 03:32 +0000
    Re: How to eliminate redundant constant move instructions amker <can.finner@gmail.com> - 2011-11-01 19:21 -0700
      Re: How to eliminate redundant constant move instructions George Neuner <gneuner2@comcast.net> - 2011-11-04 17:26 -0400
        Re: How to eliminate redundant constant move instructions amker <amker.cheng@gmail.com> - 2011-11-07 17:33 -0800
          Re: How to eliminate redundant constant move instructions Wei-Jen Chen <chenwj@cs.NCTU.edu.tw> - 2011-11-10 08:04 +0000
          Re: How to eliminate redundant constant move instructions George Neuner <gneuner2@comcast.net> - 2011-11-10 18:18 -0500
    Re: How to eliminate redundant constant move instructions amker <amker.cheng@gmail.com> - 2011-11-01 20:58 -0700

csiph-web