This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: interesting case of DCE with dataflow.


On Wed, Feb 06, 2008 at 10:59:12AM -0500, Kenneth Zadeck wrote:
> > The final code generated appears something like the following.
> >
> > foo:
> >         cmpslt  $c6,$zero,$c1
> >         brz     $c6,$link
> >         i2cs    $c6,@MID_11(4660)
> >         i2c     $c6,@BOT_11(4660)
> >         incsi   $c1,-1
> > .L5:
> >         stw     ($c3[0]),$c6
> >         addzi   $c2,$c2,4  -----> This is a redundant add instruction.
> >         addzi   $c3,$c3,4
> >         brinzdec        $c1,.L5
> >         brz     $zero,$link
> >
> >   
> I am completely missing your question.  i do not see any redundancy of
> the insn that you say is redundant.  that insn is indexing thru in and
> the next insn is indexing thru res. 
> 
> Obviously i am missing something.

Except the load from in has been removed (it's redundant); so only the
indexing is left.

-- 
Daniel Jacobowitz
CodeSourcery


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]