Draft "Unsafe fp optimizations" project description.
Adam Schrotenboer
ajschrotenboer@lycosmail.com
Sun Aug 5 09:20:00 GMT 2001
dewar@gnat.com wrote:
><<That's certainly interesting, but still, what if I want to know what the
>compiler did to my code (at least as much as can be), but I don't know
>RTL? (Or perhaps if I learn it, can I get that to be output so that I
>can improve my own coding practices?)
>
>
>A fair point .. but not one with an easy solution
>
>In GNAT, we have a very useful option to print out the optimized code in
>source form, it only covers front end optimizations, not gcc backend ones,
>but it is an interesting model. For example, you put in the source:
>
All well and good, but what of C or C++? Perhaps an almost unfair q, but
C is where most (at least UNIX) development is taking place.
>
>procedure p is
> a,b : float;
>begin
> a := b ** 4;
>end;
>
>and you compile with the -gnatG switch, and you get
>
>procedure p is
> a : float;
> b : float;
>begin
> E1b : constant float := b * b;
> a := E1b * E1b;
> return;
>end p;
>
>
>
More information about the Gcc
mailing list