Path: utzoo!attcan!uunet!lll-winken!lll-lcc!pyramid!markhall From: markhall@pyramid.pyramid.com (Mark Hall) Newsgroups: comp.arch Subject: Re: Branch Delay Annullment Message-ID: <27527@pyramid.pyramid.com> Date: 15 Jun 88 23:35:42 GMT References: <22065@amdcad.AMD.COM> <12211@apple.Apple.COM> Reply-To: markhall@pyramid.UUCP (Mark Hall) Organization: Pyramid Technology Corp., Mountain View, CA Lines: 36 In article <12211@apple.Apple.COM> baum@apple.UUCP (Allen Baum) writes: >[] >>In article <22065@amdcad.AMD.COM> tim@amdcad.AMD.COM (Tim Olson) writes: >> >>Any thoughts as to the benefits of annul-taken form? > >In the looping case, obviously squash-on-non-taken works. However, in the >standard if-then-else case (which can occur inside a loop remember, so it >can occur even more frequently than loop-closers dynamically) just the ^^^^^^^^ >opposite is true. ^^^^^^^^^^^^^^^^ Let's see if I have this right. I assume when dynamic annulment happens it means ``this branch took the unexpected path''. For a loop then, branching out is the unexpected thing, and so, using squash-on-not-taken, we annul on exit only. Fine. By saying ``squash-on-taken'' works for if-then-else statements, you imply that it is unexpected to branch to the else part. I can live with that. But doesn't ``squash-on-taken'' also mean we annul when branching around a simple IF statement (with no ELSE part)? Do you feel that it is unexpected to branch around such IF's? You don't really say so in your posting, and I am just curious. Given the number of such IF-THENs I see in code that do fatal error checking (like malloc returning NULL), I think there would be a LOT of dynamic annulment for squash-on-taken. Anyone have any simulations or traces showing whether it is more common for branches to be taken or not taken? Is it very lopsided one way or the other, or is it about even? How about stats on the number of IF-THENs in source code as opposed to IF-THEN-ELSEs? -Mark Hall (smart mailer): markhall@pyramid.pyramid.com (uucp paths ): {decwrl|sun|seismo|lll-lcc}!pyramid!markhall