On Jul 5, 2010, at 11:55 PM, Nick Lewycky wrote:

> This patch adds support for an attribute used to indicate that the function 
> in question will not loop indefinitely. This is a counter-part to the LLVM 
> patch 
> http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20100705/103672.html
>  which must be applied first.
> 
> The idea is that we can't currently delete the dead code:
>   void foo(set<int> *s) { s->find(10); }
> because the compiler is afraid that set<>::find may have the side-effect of 
> infinite looping. With a halting attribute manually applied in key places, 
> such as the declaration of find(), we can unstick dead code elimination and 
> ultimately reduce code size.
> 
> Please review!


The patch looks good, although you're missing PCH (de-)serialization code for 
the new attribute.

        - Doug
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to