[PATCH] D140382: [CodeGen] Add user interface for DetectDeadLanes

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 4 21:19:12 PST 2023


craig.topper added inline comments.


================
Comment at: llvm/lib/CodeGen/DetectDeadLanes.cpp:441
   bool Again = false;
+  if (!NeedSetUndef)
+    return std::make_pair(Changed, Again);
----------------
Can we split this function into two functions above and below this point and check this flag in the while loop?


================
Comment at: llvm/lib/CodeGen/DetectDeadLanes.cpp:489
   if (!MRI->subRegLivenessEnabled()) {
     LLVM_DEBUG(dbgs() << "Skipping Detect dead lanes pass\n");
     return false;
----------------
This debug message doesn't make sense for the call from the RISC-V pass.


================
Comment at: llvm/lib/CodeGen/DetectDeadLanes.cpp:521
+bool DetectDeadLanes::runOnMachineFunction(MachineFunction &MF) {
+  // Don't bother if we won't track subregister liveness later.  This pass is
+  // required for correctness if subregister liveness is enabled because the
----------------
This comment belongs to the `if (!MRI->subRegLivenessEnabled())` that got moved.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D140382



More information about the llvm-commits mailing list