[LLVMdev] [cfe-dev] !!! 3.2 Release RC2 deadline November 29th

David Chisnall David.Chisnall at cl.cam.ac.uk
Wed Nov 28 11:49:53 PST 2012


On 28 Nov 2012, at 19:41, Tanya Lattner wrote:

> So why isn't this caught by any of the regression testing (testsuite) if it nothing above -O1 can be compiled? I assume you mean for your project?

Any Objective-C on non-Apple platforms that uses cleanups (including those Clang inserts for blocks) breaks in certain cases with inlining.  There are also some cases in C++, and cases in LTO (or using C headers in C++) when C++ code and C code using __attribute__((cleanup)) are mixed.  We have an ugly hack in clang that avoids it in the most common case, but there are almost certainly cases that we are not catching.  

> I'm trying to understand how large of a problem this is. Ideally, we want everything we can to get fixed.. but since there is some confusion and debate on this bug, I'm thinking its not a quick or easy fix.

There is no debate in the bug.  The consensus (both in the bug report and in-person discussions at the DevMeeting) is that the inliner is doing an obviously wrong thing when it takes a function containing a catchall and one containing a cleanup, inlines one into the other, and ends up with one with just a cleanup.  The discussion in the bug report is due to the fact that there are probably also some corner cases where the wrong thing happens, but the inliner bug is the serious one.

David



More information about the llvm-dev mailing list