[PATCH] Bugfix for debug intrinsic handling in InstCombiner

Adrian Prantl aprantl at apple.com
Tue Apr 16 18:28:48 PDT 2013


On Apr 16, 2013, at 10:56 AM, Eric Christopher <echristo at gmail.com> wrote:

> I'm not sure it's straightforward at all please tell me why you think so?
> 
> This comes down to whether or not the fix is best done in
> LowerDbgDeclare or elsewhere. I'm guessing what's happening is that
> the alloca for the original loads and stores have been nuked (likely
> by mem2reg) and therefore the assumptions through large portions of
> the backend aren't holding anymore. These assumptions are an
> unfortunate problem we've inherited. I don't have any visibility about
> how the testcase was produced (and yes, it definitely needs cleanup)
> and don't know how the IR got into the current state. I completely
> agree there's a lot of nasty problems in how we deal with non-alloca
> variables and value tracking. What's your longer term plan for dealing
> with the problem more generally?

The alloca is actually still there, otherwise LowerDbgDeclare() wouldn’t do anything. (i14 in the testcase).

-- adrian



More information about the llvm-commits mailing list