This is an archive of the discontinued LLVM Phabricator instance.

AMDGPU: Move LICM after AMDGPUCodeGenPrepare
ClosedPublic

Authored by arsenm on Jun 8 2023, 7:30 AM.

Details

Reviewers
rampitec
piotr
foad
aeubanks
dstuttard
Group Reviewers
Restricted Project
Summary

The commit that added the run says it's to hoist uniform parts of
integer division expansion. That expansion is performed later, so this
didn't do anything in that case. Move this later so the original test
shows the improvement.

This also saves a run of "Canonicalize natural loops". Not sure why
this appears to be still getting a separate loop PM run. Also feels a
bit heavy to run this just for divide. Is there a way to specifically
hoist the divide sequence when it expands?

Diff Detail

Event Timeline

arsenm created this revision.Jun 8 2023, 7:30 AM
Herald added a project: Restricted Project. · View Herald TranscriptJun 8 2023, 7:30 AM
arsenm requested review of this revision.Jun 8 2023, 7:30 AM
Herald added a project: Restricted Project. · View Herald TranscriptJun 8 2023, 7:30 AM
Herald added a subscriber: wdng. · View Herald Transcript
rampitec accepted this revision.Jun 8 2023, 11:26 AM

A separate Loop PM is still something to explore.

This revision is now accepted and ready to land.Jun 8 2023, 11:26 AM