Re: How to eliminate redundant constant move instructions

amker <can.finner@gmail.com>
Tue, 1 Nov 2011 19:35:12 -0700 (PDT)

          From comp.compilers

Related articles
How to eliminate redundant constant move instructions amker.cheng@gmail.com (Amker.Cheng) (2011-10-31)
Re: How to eliminate redundant constant move instructions kaz@kylheku.com (Kaz Kylheku) (2011-10-31)
Re: How to eliminate redundant constant move instructions gneuner2@comcast.net (George Neuner) (2011-11-01)
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)
[7 later articles]
| List of all articles for this month |

From: amker <can.finner@gmail.com>
Newsgroups: comp.compilers
Date: Tue, 1 Nov 2011 19:35:12 -0700 (PDT)
Organization: Compilers Central
References: 11-10-019 11-11-004 11-11-005
Keywords: optimize

On Nov 2, 6:35 am, glen herrmannsfeldt <g...@ugcs.caltech.edu> wrote:
> George Neuner <gneun...@comcast.net> wrote:
>
> (big snip on optimization and register loads)
>


> 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.
>
> This is especially important for IA32, with so few registers,
> and for S/360 and S/370 floating point, again with few registers.


Well, for my original case, I mean optimize the codes


  rx <- 0
  ...
  use rx
  ...
  ry <- 0 <----which is redundant and can be removed
  use ry


into


  rx <- 0
  ...
  use rx
  ...
  use rx <-----------------


In this case, the 2nd 'use rx' instruction introduces true dependency
on "rx <- 0",
So register renaming won't help here, right?


Thanks


Post a followup to this message

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