Buildv.sac appears to be missing reuse code
Extended Description
Created an attachment (id=848)
C code generated by sac2c -doawlf -nowlf -bopt
This code runs about twice as slow with -doawlf -nowlf as without:
use Array:all;
int main()
{
x = with {
([0] <= iv=[i] < [2000]) : iota(i);
} : fold( ++, [:int]);
z = sum(x);
StdIO::show(z);
return(0);
}
The IL codes at -bopt look, to my not-tutored-enough eyeballs, to be
almost identical. However, the generated C code shows that
the -doawlf version contains 15 for()-loops, whereas the -doawlf
version has only 13.
sac2c -V
sac2c v1.00-beta (Haggis And Apple)
developer rev 17729:MODIFIED linux-gnu_x86_64
(Mon Feb 13 09:44:42 EST 2012 by sac)
This is not a new bug. Attached are the generated C codes and
the -bopt codes.