[PATCH] D72877: [FastISel] Lower `llvm.dbg.value(undef, ...` correctly.

Adrian Prantl via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 16 14:53:25 PST 2020


aprantl added a comment.

Thanks!



================
Comment at: llvm/lib/CodeGen/SelectionDAG/FastISel.cpp:1417
       // Currently the optimizer can produce this; insert an undef to
       // help debugging.  Probably the optimizer should not do this.
       BuildMI(*FuncInfo.MBB, FuncInfo.InsertPt, DbgLoc, II, false, 0U,
----------------
This comment is no longer correct. It may fits for the !V case, but `dbg.value(undef)`s are a feature and not a bug.


================
Comment at: llvm/test/CodeGen/AArch64/fastisel-debugvalue-undef.ll:4
+; Check that we emit a DBG_VALUE for the `@llvm.dbg.value` which has `undef` has first arg.
+; CHECK: DBG_VALUE $noreg, $noreg, !"MyStruct", !DIExpression(), debug-location !34
+
----------------
Can you drop the `!34`? It's not relevant anyway.


================
Comment at: llvm/test/CodeGen/AArch64/fastisel-debugvalue-undef.ll:52
+!14 = !{!15, !17, !19}
+!15 = !DIImportedEntity(tag: DW_TAG_imported_module, scope: !12, entity: !16, file: !12)
+!16 = !DIModule(scope: null, name: "a", includePath: "/Users/local/lldb-swift-device/llvm-project/lldb/packages/Python/lldbsuite/test/lang/swift/swift_reference_counting")
----------------
You could drop all these by just pointing every type to the DIFile directly.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D72877





More information about the llvm-commits mailing list