20 Jan 2003 23:55:27 -0500

Related articles |
---|

Selective Computation... saru@jeyan.eclipse.co.uk (Saru) (2002-12-26) |

Re: Selective Computation... jeyan@jeyan.eclipse.co.uk (Saru) (2002-12-30) |

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: | Patrick Volteau <Patrick.Volteau@st.com> |

Newsgroups: | comp.compilers |

Date: | 20 Jan 2003 23:55:27 -0500 |

Organization: | STMicroelectronics |

References: | 02-12-116 03-01-077 |

Keywords: | performance, comment |

Posted-Date: | 20 Jan 2003 23:55:27 EST |

*> [On modern architectures, conditional branches can be slow. -John]*

Yes but now some architecture provide predicated instructions where an

instruction is executed conditionally.

For example for the expression proposed here, one could use:

(k1, k2, k3, p, q, p', q and X are symbolique names for registers

p0, p1, p2 are predicates (true or false)

I'm using an algebraic assembly syntax)

p0 = (k1 == 1)

p1 = (k2 == 1)

p2 = (k3 == 1)

p0 ? X = p + q

p1 ? X = p + q'

p2 ? X = p' + q

Nice, isn't it?

Patrick.

[Not new, either. I programmed a Varian mini in about 1969 that had

conditional execute instructions that we used for similar

things. -John]

Post a followup to this message

Return to the
comp.compilers page.

Search the
comp.compilers archives again.