> On a big tangent, has anyone ever been tempted to recast Cil's
> analyses and optimizations in a composable framework, a la [1]?
We did a bit of work in this direction:
http://www.cs.utah.edu/~regehr/papers/lctes06_1/
http://www.cs.utah.edu/~coop/research/cxprop/
John Regehr
---
I understand that _in general_ determining what a pointer points to at
compile time is undecidable. I think what I want is a conservative
points-to enhanced constant propagation (followed by dead code
elimination to hopefully remove the address-of expression entirely).
It sounds like I ca
Hello,
On Wed, Sep 09, 2009 at 05:39:46PM +0100, Alastair Reid wrote:
> 1) Use a visitor to identify all variables whose address is taken.
Cil does it for you. Cf. type varinfo, mutable vaddrof in the doc:
http://hal.cs.berkeley.edu/cil/api/Cil.html#TYPEvarinfo
Regards,
--
Gabriel Kerneis
e-
From: Benjamin Ylvisaker [mailto:benjam...@fastmail.fm]
Sent: 09 September 2009 06:34
To: CIL Mailing List
Subject: [CIL users] optimizations with pointers
Does anyone know if there is any existing optimization in Cil that will
do the translation of
int a
I haven't tried this, but I suspect a pointer analysis could help you obtain
a more general solution. Take a look at ptranal.ml in the cil src/ext/pta
directory. There will still be a lot of cases where this won't work though
(due, as Gabriel pointed out, to the undecidability of the problem in
g
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
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