[PATCH] D147060: [MachineSink] Fix an assertion failure in isCycleInvariant
Sameer Sahasrabuddhe via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Mar 28 21:54:59 PDT 2023
sameerds added inline comments.
================
Comment at: llvm/lib/CodeGen/MachineCycleAnalysis.cpp:101-103
+ // DebugInstr cannot be moved, mark them as not invariant
+ if (I.isDebugInstr())
+ return false;
----------------
I am trying to understand how this is relevant to cycle invariance. It seems the intention is that debug instructions cannot be sunk by MachineSink. Then why not do this check there, in the function MachineSinking::FindCycleSinkCandidates()? The check can be done near the same line where isCycleInvariant() is called, ane it will be less confusing.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D147060/new/
https://reviews.llvm.org/D147060
More information about the llvm-commits
mailing list