[PATCH] D111317: [DebugInfo][InstrRef] Track instructions that write-to-stack after having a spill fused into them
Stephen Tozer via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 12 04:02:53 PDT 2021
StephenTozer added a comment.
Aside from the current comments, LGTM.
================
Comment at: llvm/lib/CodeGen/InlineSpiller.cpp:935
+ // the simple common case where operand 0 is the one being folded, plus when
+ // the destination operand is also a tied def. More values could bex
+ // substituted / preserved with more analysis.
----------------
================
Comment at: llvm/lib/CodeGen/LiveDebugValues/InstrRefBasedImpl.cpp:1321
+ // Reject any memory operand that's aliased -- we can't guarantee its value.
+ auto MMOI = MI.memoperands_begin();
----------------
Just out of curiosity, does this represent a bug prior to this patch, or is this just needed for the new functionality?
================
Comment at: llvm/lib/CodeGen/MachineFunction.cpp:976
assert(A.first != B.first);
+ // Don't allow any substituitions _from_ the memory operand number.
+ assert(A.second != DebugOperandMemNumber);
----------------
================
Comment at: llvm/test/DebugInfo/MIR/InstrRef/memory-operand-folding-tieddef.mir:37
+
+ !0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 12.0.0 (git at github.com:llvm/llvm-project 79a35789efdf2378f97642ae4a5f3099b9087a11)", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, splitDebugInlining: false, nameTableKind: None)
+ !1 = !DIFile(filename: "test.c", directory: "/fast/fs/llvm3/llvm/test/DebugInfo/MIR/InstrRef")
----------------
Nit, the unnecessary metadata (some of the long directories and version strings) can be removed.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D111317/new/
https://reviews.llvm.org/D111317
More information about the llvm-commits
mailing list