[RegisterCoalescer] Add wrapper for Erasing Instructions
authorSameer AbuAsal <sabuasal@codeaurora.org>
Thu, 3 Aug 2017 02:41:17 +0000 (02:41 +0000)
committerSameer AbuAsal <sabuasal@codeaurora.org>
Thu, 3 Aug 2017 02:41:17 +0000 (02:41 +0000)
commitc8befe687f613b12a64b7145ef32fc5685e175b4
tree55930f957190e19a13fad8dd534766db3d06b72c
parent993bbbf19ed4f6827bf9f3c2c0d7da0e504bac10
[RegisterCoalescer] Add wrapper for Erasing Instructions

Summary:
      To delete an instruction the coalescer needs to call eraseFromParent()
      on the MachineInstr, insert it in the ErasedInstrs list and update the
      Live Ranges structure. This patch re-factors the code to do all that in
      one function. This will also fix cases where previous code wasn't
      inserting deleted instructions in the ErasedList.

Reviewers: qcolombet, kparzysz

Reviewed By: qcolombet

Subscribers: MatzeB, llvm-commits, qcolombet

Differential Revision: https://reviews.llvm.org/D36204

llvm-svn: 309915
llvm/lib/CodeGen/RegisterCoalescer.cpp