[PATCH] D59626: [AMDGPU] Add MachineDCE pass after RenameIndependentSubregs

Stanislav Mekhanoshin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 4 12:47:31 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;
 
----------------
rampitec wrote:
> 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?
I have reverted the check and only add it from AMDGPU. If any other target feels it may need it there is an option to do the same.
If this is committed it will be possible since pass will not destroy liveness anymore.


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

https://reviews.llvm.org/D59626





More information about the llvm-commits mailing list