[AMDGPU] SIFoldOperands: eagerly erase dead REG_SEQUENCEs
authorJay Foad <jay.foad@amd.com>
Fri, 9 Apr 2021 12:52:35 +0000 (13:52 +0100)
committerJay Foad <jay.foad@amd.com>
Mon, 19 Apr 2021 11:05:41 +0000 (12:05 +0100)
commit323ef0eb45909fe34435a387663659ea07902dc9
tree6674538e49525067bcb3d21bdfef51e5fd42354b
parentf0bc2782f281ca05221d2f1735bbaff6c4b81ebb
[AMDGPU] SIFoldOperands: eagerly erase dead REG_SEQUENCEs

This is fairly cheap to implement and means less work for future
passes like MachineDCE.

Reapply with a fix for using InstToErase after it had been erased.

Differential Revision: https://reviews.llvm.org/D100188
llvm/lib/Target/AMDGPU/SIFoldOperands.cpp