<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Hi,<br class=""><br class="">I've prototyped a pair of passes which 1) add synthetic debug info to a Module and 2) determine how much of that info is lost. The idea is to make it easier to write targeted test cases for debug info preservation. For example, here is a quick way to test that Mem2Reg doesn't drop debug info from one test input:<br class=""><br class=""><blockquote type="cite" class="">; RUN: opt < %s <b class="">-debugify</b> -mem2reg <b class="">-check-debugify</b> -S 2>&1 | FileCheck %s<br class="">; CHECK: CheckDebugify: PASS</blockquote><br class=""><span class="">So far, I've used this utility to identify problems in LSR and instcombine (haven't gotten around to filing bugs yet). There's some more discussion about this utility on the thread "RFC: [GlobalISel] Towards a generic MI combiner framework", where Amara and Daniel suggested trying something similar at the MI level.<br class=""></span><span class=""><br class=""></span><div class="">I've put the passes up for review here <a href="https://reviews.llvm.org/D40512" class="">https://reviews.llvm.org/D40512</a>. I just wanted to ping llvm-dev to raise awareness about the proposed passes, and to see if anyone in the community has concerns/feedback.</div><div class=""><br class=""></div><div class="">thanks,</div><div class="">vedant</div></body></html>