home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!zaphod.mps.ohio-state.edu!uwm.edu!biosci!agate!ames!sun-barr!news2me.EBay.Sun.COM!exodus.Eng.Sun.COM!flayout.Eng.Sun.COM!tremblay
- From: tremblay@flayout.Eng.Sun.COM (Marc Tremblay)
- Newsgroups: comp.arch
- Subject: Re: DEC Alpha architecture issues
- Message-ID: <lgqbs2INNfh3@exodus.Eng.Sun.COM>
- Date: 20 Nov 92 18:33:38 GMT
- References: <1992Nov18.112407.2518@doug.cae.wisc.edu> <1992Nov18.191730.1044@meiko.com> <lgnojjINN627@exodus.Eng.Sun.COM> <1992Nov19.204729.24714@crl.dec.com>
- Organization: Sun Microsystems, Mt. View, Ca.
- Lines: 48
- NNTP-Posting-Host: flayout
-
- In article <1992Nov19.204729.24714@crl.dec.com> payne@crl.dec.com (Andrew Payne) writes:
- >>The last sentence is key here. If branches can be predicted with decent
- >>accuracy then it is hard to obtain benefits from conditional moves
- >>over using conditional branches.
- >
- >Do you have any data to back up this claim?
-
- Sure do. If branches can be predicted with 100% accuracy then the
- version with conditional branches may run up to twice as fast. :-)
- Seriously, the silly example above should nonetheless show that if
- there are many instructions to guard, then potentially only half of the
- functional units will accomplish useful work while running the code
- surrounded with conditional moves.
-
- As a previous poster mentioned, it would be nice to get some
- numbers on the impact of conditional moves on a superscalar processor
- with good branch prediction. Not on a 10 line function but on a large
- integer program (some of the SPECint92 programs).
-
- >Don't forget that conditional move sequences can be shorter than the
- >corresponding branch sequence. In other words, the two instruction
- >sequence branch/op can sometimes be replaced with a single conditional move
- >instruction.
-
- True. I have seen some great little examples where conditional moves
- perform very well [e.g. if (a>b) then c=3 else c=5] or finding max (a,b).
- Notice that in most examples, either the guarded code is very small
- and/or the branches could not be predicted well.
-
- >Second, I believe the second order effect of providing larger basic blocks
- >is the conditional move's greatest benefit. Larger basic blocks offer
- >more scheduling opportunities. I don't have any data (yet), but I've
- >certainly seen it happen.
-
- Since conditional moves won't replace all of the conditional branches,
- a good compiler will have to handle moving instructions across
- conditional branches anyway, otherwise performance will be low.
- Large basic blocks can be created through several methods
- (e.g.superblocks from Illinois) that basically group basic blocks together.
- Conditional moves will help wherever branches were hard to predict
- or where the trace did not show any definite direction for the branch
- (once again, hard to predict branches).
-
- Finally, as you may know, SPARC V9 (64-bit) does include conditional moves
- and we do think that we can get some benefits out of them.
-
- - Marc Tremblay.
- Sun Microsystems.
-