On Tue, Sep 08, 2009 at 10:33:46PM -0700, Benjamin Ylvisaker wrote:
> Does anyone know if there is any existing optimization in Cil that
> will do the translation of
>
>int a;
>int *b = &a;
>*b = 4;
>...
>
> into
>
>int a;
>int *b = &a;
>a = 4;
>...
>
> ?
This
Hello,
On Tue, Sep 08, 2009 at 04:32:23PM -0400, Jiří Šimša wrote:
> let varsUsesMap (vars:varinfo list) (ic:varinfo list) (oc:varinfo list) =
> let _ = List.iter (
> fun vi ->
> Printf.printf "%s %d\n" vi.vname vi.vid
> ) vars in
Here you print out vars.
> let _ = List.iter (
>
Does anyone know if there is any existing optimization in Cil that
will do the translation of
int a;
int *b = &a;
*b = 4;
...
into
int a;
int *b = &a;
a = 4;
...
?
Thanks,
Ben
--
Let Crystal
Hello,
I am a Ph.D. student at CMU and use CIL as my front end for C to HW
compilation. In the course of developing my back-end I have encountered
something unexpected that I do not understand.
At one point in the program I collect global variables, merge the with
locals of a given function f and
is there a transformation in CIL to translate something like
a= b==c
to
a= (b==c ?1:0)
or
if (b==c) a=1; else b=0;
thank you
Mauro
--
Computer science is no more about computers than astronomy is about telescopes
- Edsger W. Dijkstra
--