HomePhabricator

[AMDGPU] SILowerControlFlow::removeMBBifRedundant. Refactoring plus fix for the…

Authored by alex-t on Oct 28 2020, 9:01 AM.

Description

[AMDGPU] SILowerControlFlow::removeMBBifRedundant. Refactoring plus fix for the null MBB pointer in MF->splice

Detailed description: This change addresses the refactoring adviced by foad. It also contain the fix for the case when getNextNode is null if the successor block is the last in MachineFunction.

Reviewed By: foad

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