Path: utzoo!attcan!uunet!husc6!rutgers!rochester!cornell!ho From: ho@svax.cs.cornell.edu (Alex Ho) Newsgroups: comp.arch Subject: Re: getting rid of branches Message-ID: <18830@cornell.UUCP> Date: 4 Jul 88 18:21:16 GMT References: <28200173@urbsdc> <53161@ti-csl.CSNET> Sender: nobody@cornell.UUCP Reply-To: ho@svax.cs.cornell.edu (Alex Ho) Followup-To: comp.arch Organization: Cornell Univ. CS Dept, Ithaca NY Lines: 34 i have a copy of a paper by allen, kennedy, porterfield, and warren from rice university (published by the acm, i don't have the exact source) describing a scheme for eliminating fortran goto statements though the use of if conversion. in essence, they assign a boolean guard expression to statements which are executed conditionally. for example (from the paper)... original: do 100 i = 1, 100 statement1 if (x(i)) goto 200 statement2 100 continue statement3 200 statement4 transformed: ex1 = .true. do 100 i = 1, 100 if (ex1) statement1 if (ex1) ex1 = .not. x(i) if (ex1) statement2 100 continue if (.not. ex1) goto 200 statement3 200 statement4 the do loop can now be vectorized. has anyone else had experience with this procedure? --- alex ho university of california, berkeley ho@svax.cs.cornell.edu a confused eecs major (spending the summer at) cornell university