[PATCH] D138757: [zero-call-used-regs] Mark only non-debug instruction's register as used

Nick Desaulniers via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 23 13:09:36 PST 2023


nickdesaulniers added inline comments.


================
Comment at: llvm/test/CodeGen/X86/pr57962.mir:1
+# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
+# RUN: llc -run-pass=prologepilog -o - %s | FileCheck %s
----------------
Do you mind renaming this test from `pr57962.mir` to `zero-call-used-regs-debug-info.mir`.


================
Comment at: llvm/test/CodeGen/X86/pr57962.mir:3
+# RUN: llc -run-pass=prologepilog -o - %s | FileCheck %s
+
+--- |
----------------
Please add a comment along the lines of:

`# Test that the presence of debug instructions doesn't trigger arbitrary registers that are unused to be zeroed out.`


================
Comment at: llvm/test/CodeGen/X86/pr57962.mir:146-198
+---
+name:            main
+alignment:       16
+exposesReturnsTwice: false
+legalized:       false
+regBankSelected: false
+selected:        false
----------------
all of this will go away if you remove @main and rerun utils/update_mir_test_checks.py.




================
Comment at: llvm/test/CodeGen/X86/pr57962.mir:24-28
+  ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(none) uwtable
+  define dso_local void @main() local_unnamed_addr #1 !dbg !37 {
+  entry:
+    ret void, !dbg !41
+  }
----------------
you can delete @main from this test, it's unnecessary.

Probably the metadata it references will need to be cleaned up, too.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D138757



More information about the llvm-commits mailing list