Patch for mem2reg pass

David Blaikie dblaikie at gmail.com
Fri Jul 12 14:50:15 PDT 2013


> The mem2reg pass loses the debug info for the affected variables. I have
> created a patch to fix it. Please review.

Thanks for working on this!

The patch seems fairly simple, though I'm unfamiliar with that area of
the code & can't sign off on it immediately.

For testing - we're trying to move to a model in which we simplify C++
(or C) source code as much as possible, compile that with Clang & use
it as a test case (which it looks like you've done, more or less - it
could, perhaps, be simpler source, though? (do you need a loop to
demonstrate the problem?) - except you're missing the original C++
source in your test case).

-> Could you simplify the source and add it in comments to the test case?


Would it be beneficial to constrain the check any further than simply
"there is a dbg.value for i.0"? Maybe where it exists in the code?
What about other i.N SSA values produced by mem2reg? Or is that the
only one?

>
> Best regards,
> Piotr
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>



More information about the llvm-commits mailing list