[m-users.] Best way to implement constants ?
Zoltan Somogyi
zoltan.somogyi at runbox.com
Fri Aug 18 19:48:29 AEST 2023
On 2023-08-18 11:37 +02:00 CEST, "Julien Fischer" <jfischer at opturion.com> wrote:
> At -O3 and above the Mercury compiler will (generally) evaluate a
> variety of operations (see compiler/const_prop.m for details).
> Float division is included in those operations
Actually, constant propagation is not enabled automatically at any
optimization level; you have to enable manually, with --optimize-constant-propagation.
What is enabled at -O3 is *constraint* propagation, which I also
misread as *constant* propagation at first :-(
I will add constant propagation to -O3.
Zoltan.
More information about the users
mailing list