This is an archive of the discontinued LLVM Phabricator instance.

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

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

Details

Summary

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.

Diff Detail

Event Timeline

alex-t created this revision.Oct 28 2020, 9:04 AM
Herald added a project: Restricted Project. · View Herald TranscriptOct 28 2020, 9:04 AM
alex-t requested review of this revision.Oct 28 2020, 9:04 AM
foad accepted this revision.Oct 28 2020, 9:52 AM

LGTM.

This revision is now accepted and ready to land.Oct 28 2020, 9:52 AM
alex-t updated this revision to Diff 301580.Oct 29 2020, 5:00 AM

assert expression fixed.

foad added inline comments.Oct 29 2020, 5:29 AM
llvm/lib/Target/AMDGPU/SILowerControlFlow.cpp
705

Typo "than".

The patch is passed PSDB.

alex-t updated this revision to Diff 301854.Oct 30 2020, 4:09 AM

Typo in assert message corrected.

alex-t marked an inline comment as done.Oct 30 2020, 4:10 AM
alex-t added inline comments.
llvm/lib/Target/AMDGPU/SILowerControlFlow.cpp
705

Thanks :)

foad accepted this revision.Oct 30 2020, 4:33 AM
This revision was landed with ongoing or failed builds.Oct 30 2020, 4:46 AM
This revision was automatically updated to reflect the committed changes.
alex-t marked an inline comment as done.