This is an alternative to D140382. This moves the first part of runOnce into a new class that can be reused by D129735. This encapsulates the ownership of the worklist, and VRegInfos into the new class. The code for updating the dead lanes stays in the DetectDeadLanes class. The new class is created on the stack during runOnMachineFunction so all the data structures will be deleted after each run. Previously we only cleared them after each run so the memory might have stayed allocated across runs. Except for VRegInfo which was always deleted. Hopefully this allocation change isn't a big deal. Reviewed By: BeMg Differential Revision: https://reviews.llvm.org/D141993
19 KiB
19 KiB