[PATCH] D59626: Add MachineDCE pass after RenameIndependentSubregs

Stanislav Mekhanoshin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 4 11:04:08 PDT 2019


rampitec marked an inline comment as done.
rampitec added inline comments.


================
Comment at: lib/CodeGen/DeadMachineInstructionElim.cpp:120
+  if (LIS && !MRI->subRegLivenessEnabled())
+    return false;
 
----------------
qcolombet wrote:
> I feel that the pass shouldn't be making that decision.
> If someone put that in their pipeline, the pass should just run.
TargetPassConfig does not have subtarget access when it adds a pass to the pipeline.
So the choice is: 1) always run even if it will not find anything 2) perform this check 3) insert it from the target and not from common TargetPassConfig.
In all cases code to handle LIS is needed though.

I can make it only running from AMDGPU target since we always track subreg liveness. Would that be better?


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

https://reviews.llvm.org/D59626





More information about the llvm-commits mailing list