Re: How to eliminate redundant constant move instructions

amker <amker.cheng@gmail.com>
Tue, 1 Nov 2011 20:58:48 -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)
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)
[5 later articles]
| List of all articles for this month |

From: amker <amker.cheng@gmail.com>
Newsgroups: comp.compilers
Date: Tue, 1 Nov 2011 20:58:48 -0700 (PDT)
Organization: Compilers Central
References: 11-10-019 11-11-004
Keywords: optimize, GCC
Posted-Date: 02 Nov 2011 22:40:53 EDT

On Nov 2, 2:32 am, George Neuner <gneuner2@comcast.net> wrote:
> It's very hard to tell anything without more context - we need to know
> what CPU, what compiler, and we need to see the surrounding code.


Sorry for the misleading message, the test case comes from a reported
gcc bug, at:
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44025




> -fcprop-register, which is a peephole pass that eliminates redundant
> register moves (introduced by other optimizations), but that is


Yes, I found that pass, and seems it can solve the problem if I:
1, extend the pass in a value numbering way, at least for const
values;
2, extend the pass in a global data analysis way;


> performed after register allocation.


After register allocation also brings advantages, like no register
pressure issue.


> 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.


This is What I have missed. But in this manner I will never know which
codes is better since the performance depends on scheduling and
out-of- ordering... right?


Thanks for your explanation.



Post a followup to this message

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