On Wed, Sep 09, 2009 at 10:38:14AM -0400, Stephen Magill wrote:
> 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.
The default pointer analysis module is
Olf, because "ptra
> 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
Hi,
Just to add to the list of suggestions...
I don't think there is a specific pass but, depending on your
application, the following might work and is fairly simple.
1) Use a visitor to identify all variables whose address is taken.
2) Use a visitor to identify all variables which have precis
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