Related articles |
---|
[2 earlier articles] |
Re: Selective Computation... saru@jeyan.eclipse.co.uk (Saru) (2002-12-30) |
Re: Selective Computation... joachim_d@gmx.de (Joachim Durchholz) (2002-12-31) |
Re: Selective Computation... thp@cs.ucr.edu (2003-01-17) |
Re: Selective Computation... Patrick.Volteau@st.com (Patrick Volteau) (2003-01-20) |
Re: Selective Computation... strohm@airmail.net (John R. Strohm) (2003-01-21) |
Re: Selective Computation... andreas.gieriet@externsoft.ch (Andreas Gieriet) (2003-01-21) |
Re: Selective Computation... liekweg@freenet.de (Florian Liekweg) (2003-01-21) |
Re: Selective Computation... marcov@toad.stack.nl (Marco van de Voort) (2003-02-06) |
From: | Florian Liekweg <liekweg@freenet.de> |
Newsgroups: | comp.compilers |
Date: | 21 Jan 2003 00:14:29 -0500 |
Organization: | Universit"at Karlsruhe |
References: | 02-12-116 03-01-077 |
Keywords: | optimize |
Posted-Date: | 21 Jan 2003 00:14:29 EST |
thp@cs.ucr.edu wrote:
> Saru <saru@jeyan.eclipse.co.uk> wrote:
> + I have a computation which evaluates X as
> +
> + X=k1*(p+q)+k2*(p+q')+k3*(p'+q);
> +
[with k1, k2, k3 \in \{0, 1\}]
>
> What's wrong with if-then-else, perhaps, in the form:
>
> X = ( k1 ? p+q : k2 ? p+q' : k3 ? p'+q : assert(0) );
>
> Tom Payne
> [On modern architectures, conditional branches can be slow. -John]
So, this calls for the use of predicated instructions, right?
While the resulting code (for, say, an ARM architecture) is
obvious, how would a programmer and a compiler cooperate to
produce it?
/Florian
--
Return to the
comp.compilers page.
Search the
comp.compilers archives again.