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!lnews.iecc.com!nerds-end From: amker Newsgroups: comp.compilers Subject: Re: How to eliminate redundant constant move instructions Date: Tue, 1 Nov 2011 19:35:12 -0700 (PDT) Organization: Compilers Central Lines: 36 Sender: news@iecc.com Approved: comp.compilers@iecc.com Message-ID: <11-11-008@comp.compilers> References: <11-10-019@comp.compilers> <11-11-004@comp.compilers> <11-11-005@comp.compilers> NNTP-Posting-Host: lnews.iecc.com X-Trace: gal.iecc.com 1320287967 6065 64.57.183.34 (3 Nov 2011 02:39:27 GMT) X-Complaints-To: abuse@iecc.com NNTP-Posting-Date: Thu, 3 Nov 2011 02:39:27 +0000 (UTC) Keywords: optimize Posted-Date: 02 Nov 2011 22:39:27 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:310 On Nov 2, 6:35 am, glen herrmannsfeldt wrote: > George Neuner 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