From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10f8a1,c95fd329226ae099 X-Google-Attributes: gid10f8a1,public X-Google-Thread: 1164f8,c95fd329226ae099 X-Google-Attributes: gid1164f8,public X-Google-Thread: 102b75,b29bd286830e0ed8 X-Google-Attributes: gid102b75,public From: jchall@ichips.intel.com (Jonathan C Hall) Subject: Re: DEC RIP Date: 1998/02/12 Message-ID: <6btivi$hna@news.or.intel.com>#1/1 X-Deja-AN: 324314105 References: <34D02C2C.131E@EasyInternet.net> Followup-To: comp.arch,comp.sys.dec,vmsnet.alpha Organization: Intel Corp., Hillsboro, Oregon Newsgroups: comp.arch,comp.sys.dec,vmsnet.alpha Andrew Reilly (reilly@zeta.org.au) wrote: : In article <34E11E9E.5994@easyinternet.net>, : Paul DeMone writes: : > Andrew Essen wrote: : > [snip] : >> assuming adding full predication was free, it's theoretically superior : >> since the instruction counts are lower. but what additional optimizations : >> does it enable (that are precluded by using only conditional moves)? : >> it's certainly a neat concept, but not a panacea. : > : > The main benefit of predication is that it allows many conditional branches : > to be eliminated. This allows basic blocks (a code segment that is entered : > from the beginning and exits from the end; this is maximum portion of code : > that many compiler optimizations can be applied to) to be coalesced into : > larger basic blocks. This opens up the code to further optimizations and : > more efficient scheduling, especially on wide issue machines. : : But you can do this anyway, with something like the Alpha : architecture, provided you have enough registers to store the : intermediate results of both branches. You just go ahead and : compute both sides of the branch, and at the point where you : know that your original condition will have been resolved, you : ditch one half or the other. That could be with a conditional : move if only one value is involved, or a branch. I'm afraid : that I don't see how predication helps at all, really. : I am by no means an expert on predication, but I think that I can answer this. The method you propose will not work if there are instructions on the speculative path that could cause traps or exceptions. I don't know about Alpha, but on x86, there are many instructions that can produce exceptions. This makes it very difficult for the compiler to insert optimizations involving a conditional move. Jon : : -- : Andrew Reilly: reilly@zeta.org.au +61 2 9559 5029 (h) : : "He stares out over the city he has sworn to..stare out over." the Tick -- Jonathan Hall jchall@ichips.intel.com Employed by Intel, but not speaking for them