This is an archive of the discontinued LLVM Phabricator instance.

[AMDGPU] Merge flat with global in the SILoadStoreOptimizer
ClosedPublic

Authored by rampitec on Feb 23 2022, 12:46 PM.

Details

Summary

Flat can be merged with flat global since address cast is a no-op.
A combined memory operation needs to be promoted to flat.

Diff Detail

Event Timeline

rampitec created this revision.Feb 23 2022, 12:46 PM
rampitec requested review of this revision.Feb 23 2022, 12:46 PM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 23 2022, 12:46 PM
Herald added a subscriber: wdng. · View Herald Transcript
foad added inline comments.Feb 24 2022, 6:30 AM
llvm/lib/Target/AMDGPU/SILoadStoreOptimizer.cpp
81–82

You should at least comment that GLOBAL_LOAD/GLOBAL_STORE are never used as the InstClass of any CombineInfo, they are only ever returned by getCommonInstClass. Maybe move them to the end as they are kind of meta-classes.

533

Needs a comment saying what this does. It is not obvious from the name.

1591

This looks like part of D120370.

rampitec updated this revision to Diff 411201.Feb 24 2022, 11:47 AM
rampitec marked 3 inline comments as done.

Rebased and addressed review comments.

llvm/lib/Target/AMDGPU/SILoadStoreOptimizer.cpp
1591

Rebased.

Herald added a project: Restricted Project. · View Herald TranscriptMar 7 2022, 10:13 AM
foad accepted this revision.Mar 9 2022, 4:57 AM

Looks OK.

This revision is now accepted and ready to land.Mar 9 2022, 4:57 AM
This revision was landed with ongoing or failed builds.Mar 9 2022, 10:04 AM
This revision was automatically updated to reflect the committed changes.