Re: How to eliminate redundant constant move instructions

amker <amker.cheng@gmail.com>
Mon, 7 Nov 2011 17:33:29 -0800 (PST)

          From comp.compilers

Related articles
[10 earlier articles]
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)
Re: How to eliminate redundant constant move instructions amker.cheng@gmail.com (amker) (2011-11-07)
Re: How to eliminate redundant constant move instructions chenwj@cs.NCTU.edu.tw (Wei-Jen Chen) (2011-11-10)
Re: How to eliminate redundant constant move instructions gneuner2@comcast.net (George Neuner) (2011-11-10)
| List of all articles for this month |
From: amker <amker.cheng@gmail.com>
Newsgroups: comp.compilers
Date: Mon, 7 Nov 2011 17:33:29 -0800 (PST)
Organization: Compilers Central
References: 11-10-019 11-11-004 11-11-009 11-11-025
Keywords: optimize
Posted-Date: 09 Nov 2011 11:03:00 EST

On Nov 5, 5:26 am, George Neuner <gneun...@comcast.net> wrote:
> On Tue, 1 Nov 2011 19:21:54 -0700 (PDT), amker <can.fin...@gmail.com>
> wrote:


> >Yes, I have noticed this pass. Seems it can solve the problem if I
> >can:
> >1, extend the pass in value numbering way, at least for const values.
> >2, extend the pass in global data analysis way.
>
> Yes. But value numbering doesn't know or care what specific value is
> in the register - it cares only whether the value in the register
> might have been changed between read uses.
>
> Variable value tracking is the related technique used for constant
> propagation. However what you are after is variable equivalence
> testing - I don't think GCC even tries to do this.


Yes, I guess it is the variable value tracking. But I think GCC does
do such work in some passes, at least cse.c. In this pass gcc records
the constant value if a quantity has a known constant value. Then gcc
simplify expressions containing such constant value by calling
fold_rtx.


Unfortunately, cse only works on basis of extended basic block.
Nothing it can do for global cases as reported in mentioned bug.


Also, could you point me some papers of implementation of such
variable value tracking technique? I googled and found nothing
about it.


Thanks


Post a followup to this message

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