[PATCH] D81939: [deadargelim] Attach dbg info to the insert/extractvalue instructions

Vedant Kumar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 9 10:19:00 PDT 2020


vsk added a comment.

Are test{1,2,3,4,5,6} and main all necessary to exercise the changes in this patch? On the surface, it looks like there are two primary changes -- one that affects the case when deadargelim changes the function return type, and another that affects the case where deadargelim modifies a function that returns an array/struct. Can the test be pared down to just cover those two cases?



================
Comment at: llvm/test/DebugInfo/X86/dbgloc-insert-extract-val-instrs.ll:4
+
+; RUN: opt < %s -deadargelim -check-debugify -S 2>&1 \
+; RUN:     | FileCheck %s -check-prefix=DEBUG
----------------
It doesn't look like the -check-debugify output is important, so it shouldn't be necessary to run the pass.

Also, since the dbg.values are also not important, please run -debugify with -debugify-level=locations to omit those intrinsics.


================
Comment at: llvm/test/DebugInfo/X86/dbgloc-insert-extract-val-instrs.ll:7
+
+; DEBUG: %oldret = extractvalue { i16, i32 } %B, 1, !dbg ![[RET1:.*]]
+; DEBUG: %oldret = extractvalue { i32, i16 } %B, 0, !dbg ![[RET2:.*]]
----------------
Please restructure these checks so they have a clear correspondence to a test function. The typical way to write this is:

```
; CHECK-LABEL: some_test1
; CHECK: ...
define void @some_test1

; CHECK-LABEL: some_test2
; CHECK: ...
define void @some_test2
```
etc.


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

https://reviews.llvm.org/D81939





More information about the llvm-commits mailing list