This is an archive of the discontinued LLVM Phabricator instance.

[RegisterCoalescer] Account for instructions deleted by removePartialredunduncy and in WorkList
ClosedPublic

Authored by sabuasal on Jun 30 2017, 12:19 PM.

Details

Summary

removePartialRedundency optimization introduces a state in the
RegisterCoalescer where an instruction pointed to in the WorkList
is deleted from the MBB and then removed from the ErasedList. Update
ErasedList to be used globally by not erasing erased Instructions from
it to solve the problem. The patch also accounts for the case where an Instruction was previously
deleted and the same memory was reused by BuildMI to create a new instruction.

I discovered these problem in an out of tree build.

Diff Detail

Repository
rL LLVM

Event Timeline

sabuasal created this revision.Jun 30 2017, 12:19 PM
qcolombet accepted this revision.Jun 30 2017, 3:37 PM

Nice findings!

I supposed you cannot add a test case that exposes the problem?

This revision is now accepted and ready to land.Jun 30 2017, 3:37 PM

Thanks!

Unfortunately I tried get it to show in upstream with no luck.

This revision was automatically updated to reflect the committed changes.