[PATCH] D77576: [globalisel] Add lost debug locations verifier

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 6 11:57:50 PDT 2020


arsenm added inline comments.


================
Comment at: llvm/include/llvm/CodeGen/GlobalISel/LostDebugLocObserver.h:1
+//===----- llvm/CodeGen/GlobalISel/LostDebugLocObserver.h -----------------===//
+//
----------------
Missing C++ mode comment


================
Comment at: llvm/include/llvm/CodeGen/GlobalISel/LostDebugLocObserver.h:36-39
+  void createdInstr(MachineInstr &MI) override;
+  void erasingInstr(MachineInstr &MI) override;
+  void changingInstr(MachineInstr &MI) override;
+  void changedInstr(MachineInstr &MI) override;
----------------
Defined to no-op calls in debug build?


================
Comment at: llvm/lib/CodeGen/GlobalISel/Legalizer.cpp:64
+// installed.
+DebugLocVerifyLevel VerifyDebugLocs = DebugLocVerifyLevel::None;
+#endif
----------------
Missing static const?


================
Comment at: llvm/lib/CodeGen/GlobalISel/Legalizer.cpp:370
+    R << "lost " << std::to_string(LocObserver.getNumLostDebugLocs())
+      << " debug locations during pass";
+    reportGISelFailure(MF, TPC, MORE, R);
----------------
Missing newline?


================
Comment at: llvm/test/CodeGen/AMDGPU/GlobalISel/legalize-fdiv.mir:3
 # RUN: llc -mtriple=amdgcn-mesa-mesa3d -mcpu=tahiti -run-pass=legalizer  %s -o - | FileCheck -check-prefix=SI  %s
+# RUN: llc -mtriple=amdgcn-mesa-mesa3d -mcpu=tahiti -run-pass=mir-debugify,legalizer -mir-debug-loc=0  %s -o - | FileCheck -check-prefix=SI  %s
 # RUN: llc -mtriple=amdgcn-mesa-mesa3d -mcpu=fiji -run-pass=legalizer  %s -o - | FileCheck -check-prefix=VI  %s
----------------
Do we really need to double the number of run lines in every test?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D77576





More information about the llvm-commits mailing list