[PATCH] D141387: [DebugInfo] Store instr-ref/DBG_VALUE mode of a MachineFunction in a member variable

Orlando Cazalet-Hyams via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 11 00:45:11 PST 2023


Orlando accepted this revision.
Orlando added a comment.
This revision is now accepted and ready to land.

Looking at other MF flags this seems reasonable. LGTM plus some nits.



================
Comment at: llvm/lib/CodeGen/MIRPrinter.cpp:216
       MachineFunctionProperties::Property::TracksDebugUserValues);
+  YamlMF.UseDebugInstrRef = MF.useDebugInstrRef();
 
----------------
nit: I think it would make sense to move this to line 203, underneath `YamlMF.HasEHFunclets = MF.hasEHFunclets();`


================
Comment at: llvm/test/DebugInfo/MIR/InstrRef/stack-coloring-dbg-phi.mir:6-14
 # Test that DBG_PHI instructions do not add "weight" to stack slots and cause
 # their coalescing / coloring to change. This is hard to trigger, because it's
 # closely coupled with the register allocator. Thus, the test is very
 # complicated and hard to reduce.
 #
 # In block 13 there are two implementations of variable location tracking, but
 # both are commented out. Use sed in the command lines above to un-comment
----------------
nit: out of date comment


================
Comment at: llvm/test/DebugInfo/MIR/X86/entry-value-of-modified-param.mir:25
 ## TODO: Support KILL instruction, which doesn't clobber parameter value.
 # VARLOCLDV: DBG_VALUE $edi, $noreg, ![[ARG_A]], !DIExpression()
 # CHECK: DBG_VALUE $edx, $noreg, ![[ARG_C]], !DIExpression(DW_OP_LLVM_entry_value, 1)
----------------
Possibly worth either deleting the `VARLOCLDV` check and/or mentioning in both tests that they're clones other than the RUN lines (same for other duplicated tests). YMMV.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D141387



More information about the llvm-commits mailing list