[PATCH] D100371: [debug-info] SCCP should preserve the debug location for an one-to-one instruction replacement

Orlando Cazalet-Hyams via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 13 06:38:18 PDT 2021


Orlando added a comment.

In D100371#2685353 <https://reviews.llvm.org/D100371#2685353>, @yuanboli233 wrote:

> @Orlando, thanks for pointing out the debugify usage for me. I indeed use debugify to generate the test cases. I will update test case soon.
>
> @djtodoro, hope it is useful for the debug information updates! We are developing a static analysis tool based on the how-to-update-debug-info guide provided by the community. Some of the test cases are reduced from the test suite which can trigger the potential buggy code location. Some are generated using fuzzing and debugify.

That sounds interesting!



================
Comment at: llvm/test/Transforms/SCCP/sccp_preserve_debugloc.ll:2
+; RUN: opt -sccp -S < %s | FileCheck %s
+; COM: check whether the debug location is preserved
+; CHECK: %{{[a-zA-Z0-9_]*}} = zext i32 %tmp9 to i64, !dbg !{{[0-9]*}} 
----------------
Nit: Please can you capitalize 'check' and add a full stop to this sentence? I'm not sure if this is specified in the style guide but I tend to treat comments in tests the same as comments in source code.


================
Comment at: llvm/test/Transforms/SCCP/sccp_preserve_debugloc.ll:3
+; COM: check whether the debug location is preserved
+; CHECK: %{{[a-zA-Z0-9_]*}} = zext i32 %tmp9 to i64, !dbg !{{[0-9]*}} 
+source_filename = "abc.ll"
----------------
Rather than checking for the presence of any !dbg I think you could be more specific and check that the correct source location is propagated here?



Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D100371/new/

https://reviews.llvm.org/D100371



More information about the llvm-commits mailing list