This is an archive of the discontinued LLVM Phabricator instance.

[AMDGPU] Recompute liveness in SIOptimizeExecMaskingPreRA
ClosedPublic

Authored by Pierre-vh on May 8 2023, 12:31 AM.

Details

Summary

Instead of ad-hoc updating liveness, recompute it completely for the affected register.

This does not affect any existing test and fixes an edge case that
caused a "Non-empty but used interval" error in the register allocator
due to how the pass updated liveranges. It created a "isolated" live-through
segment.

Overall this change just seems to be a net positive with no side effect observed. There may be a compile time impact but it's expected to be minimal.

Fixes SWDEV-388279

Diff Detail

Event Timeline

Pierre-vh created this revision.May 8 2023, 12:31 AM
Herald added a project: Restricted Project. · View Herald TranscriptMay 8 2023, 12:31 AM
Pierre-vh requested review of this revision.May 8 2023, 12:31 AM
Herald added a project: Restricted Project. · View Herald TranscriptMay 8 2023, 12:31 AM
Pierre-vh updated this revision to Diff 520372.May 8 2023, 7:42 AM

Remove IR from test

critson accepted this revision.May 8 2023, 4:53 PM

LGTM

This revision is now accepted and ready to land.May 8 2023, 4:53 PM
This revision was landed with ongoing or failed builds.May 9 2023, 12:02 AM
This revision was automatically updated to reflect the committed changes.
foad added a comment.May 9 2023, 2:29 AM

Very nice!

arsenm added inline comments.May 9 2023, 5:28 AM
llvm/test/CodeGen/AMDGPU/optimize-exec-mask-pre-ra-non-empty-but-used-interval.mir
220

Can you cut down this testcase? All of these unconditional branch to blocks can probably be deleted