Page MenuHomePhabricator

AMDGPU/SILoadStoreOptimizer: Add helper functions for working with CombineInfo
ClosedPublic

Authored by tstellar on Jul 30 2019, 8:46 PM.

Details

Summary

This is a refactoring that will make future improvements to this pass easier.
This change should not change the behavior of the pass.

Diff Detail

Repository
rL LLVM

Event Timeline

tstellar created this revision.Jul 30 2019, 8:46 PM
Herald added a project: Restricted Project. · View Herald TranscriptJul 30 2019, 8:46 PM
vpykhtin accepted this revision.Aug 1 2019, 8:11 AM

LGTM, with tips :)

llvm/lib/Target/AMDGPU/SILoadStoreOptimizer.cpp
533 ↗(On Diff #212499)

This can be a member of CombineInfo, or even a constructor of it.

606 ↗(On Diff #212499)

This can be a member of CombineInfo

This revision is now accepted and ready to land.Aug 1 2019, 8:11 AM
tstellar marked an inline comment as done.Aug 1 2019, 9:05 AM
tstellar added inline comments.
llvm/lib/Target/AMDGPU/SILoadStoreOptimizer.cpp
533 ↗(On Diff #212499)

The reason I didn't do it this way originally was because I would also need to pass in TTI and STI to the function or to the constructor for CombineInfo, but I don't mind turning it into a member function.

tstellar marked an inline comment as not done.Aug 5 2019, 8:32 AM
tstellar updated this revision to Diff 214012.Aug 7 2019, 2:59 PM

Make helper function members of CombineInfo class.

tstellar requested review of this revision.Sep 18 2019, 8:56 PM

Ping.

nhaehnle accepted this revision.Sep 30 2019, 11:12 AM

LGTM, with two nitpicks inline.

llvm/lib/Target/AMDGPU/SILoadStoreOptimizer.cpp
254–255 ↗(On Diff #214012)

Move the default branch to the end for readability? (I realize that's what the original code looks like...)

298–299 ↗(On Diff #214012)

Same here.

This revision is now accepted and ready to land.Sep 30 2019, 11:12 AM
This revision was automatically updated to reflect the committed changes.