[PATCH] D73168: Improvements to call site register worklist

Djordje Todorovic via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 22 04:07:41 PST 2020


djtodoro added a comment.

Nice! Thanks!



================
Comment at: llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp:638
 
-    // If the MI clobbers more then one forwarding register we must remove
-    // all of them from the working list.
-    for (auto Reg : FwdRegDefs)
-      ForwardedRegWorklist.erase(Reg);
-
+    SmallSet<unsigned, 2> RegsToKeep;
     for (auto ParamFwdReg : FwdRegDefs) {
----------------
Can we describe the usage of it with a comment?


================
Comment at: llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp:665
+                   "Can't handle a register that is described by itself");
+            // The worklist register was described by a non-callee saved
+            // register. Add the new register to the worklist if not already
----------------
`The register worklist` ?


================
Comment at: llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp:669
+            auto I = ForwardedRegWorklist.insert({RegLoc, {}});
+            for (auto R : ForwardedRegWorklist[ParamFwdReg])
+              I.first->second.push_back(R);
----------------
`auto Reg`


================
Comment at: llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp:693
+      DbgValueLoc DbgLocVal(EntryExpr, MachineLocation(RegEntry.first));
+      finishCallSiteParams(DbgLocVal, RegEntry.second);
     }
----------------
Good NFC, thanks.


================
Comment at: llvm/test/DebugInfo/MIR/X86/dbgcall-site-reg-shuffle.mir:50
+name:            move_around_args
+tracksRegLiveness: true
+liveins:
----------------
I believe you don't need all the attributes.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D73168





More information about the llvm-commits mailing list