[PATCH] D45637: [DebugInfo] Ignore DBG_VALUE instructions in PostRA Machine Sink
Bjorn Pettersson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 11 02:45:11 PDT 2018
bjope added a comment.
This comment in the description does not make sense to me:
> The original logic intentionally ignores all call instructions. Since debug intrinsics
> are represented as calls, the pass was skipping that block and not
> performing the sink.
The debug intrinsic is no longer a call after being lowered to DBG_VALUE. So it must have been something else that caused the debug invariant behavior, right?
I guess it was the call to `TII->trackRegDefsUses` (on trunk it is `LiveRegUnits::accumulateUsedDefed`), done for non COPY instructions, that would track register uses in debug instructions unless we avoid that somehow.
Could you update the description to make it less confusing?
================
Comment at: lib/CodeGen/MachineSink.cpp:1131
++I;
+ if (MI->isDebugValue())
+ continue;
----------------
Nowadays we have isDebugInstr() to cover all kinds of debug instructions. I suggest using that instead here, to make the check more general.
https://reviews.llvm.org/D45637
More information about the llvm-commits
mailing list