From: | Danny Dube <dube@brachio.IRO.UMontreal.CA> |
Newsgroups: | comp.compilers |
Date: | 11 Nov 1997 14:34:18 -0500 |
Organization: | Universite de Montreal |
References: | 97-11-038 |
Keywords: | arithmetic, optimize, bibliography |
An algorithm that produces good sequences of instructions and that is
reasonably efficient is the one from Bernstein:
@Article{bernstein86,
author = {Robert L. Bernstein},
title = {Multiplication by Integer Constants},
journal = {Software --- Practice and Experience},
year = 1986,
volume = 16,
number = 7,
month = {jul},
pages = {641--652}
}
The algorithm doesn't produce an optimal sequence in general. Neither
did `gcc' when I checked it. So it may be the algorithm used in it.
--
Danny Dubé
dube@IRO.UMontreal.CA
--
Return to the
comp.compilers page.
Search the
comp.compilers archives again.