[CIL users] bug in handling __builtin_constant_p?

2009-12-01 Thread John Regehr
A Linux kernel header file contains code like the example below, which causes CIL to bomb with a complaint about non-constant array size. John Regehr int foo (int bit) { if (__builtin_constant_p(bit)) { return sizeof (char[bit]); } else { return 0

Re: [CIL users] optimizations with pointers

2009-09-09 Thread John Regehr
> 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/

Re: [CIL users] CIL performs invalid tranformations

2009-08-27 Thread John Regehr
>unsigned long a; >unsigned long *p; >p = (unsigned long *)&p; >a = ++(*p); Gabriel, since p refers to itself this code looks to me like an occurrence of the second clause of this type of undefined behavior: "Between two sequence points, an object is modified more than once, or

Re: [CIL users] CIL inliner

2009-07-17 Thread John Regehr
aned it up. John Regehr Mauro Baluda wrote: > in the cil documentation I read about a function inliner which I can't > find in the code... > http://hal.cs.berkeley.edu/cil/ext.html#toc14 > > Is it still available? or any