This is an archive of the discontinued LLVM Phabricator instance.

[AMDGPU] Reorder SIMemoryLegalizer functions to be consistent
ClosedPublic

Authored by t-tye on Oct 21 2020, 6:34 AM.

Details

Summary
  • Make the SIMemoryLegalizer insertAcquire function be in the same order for each target to be consistent.

Diff Detail

Event Timeline

t-tye created this revision.Oct 21 2020, 6:34 AM
Herald added a project: Restricted Project. · View Herald TranscriptOct 21 2020, 6:34 AM
t-tye requested review of this revision.Oct 21 2020, 6:34 AM
scott.linder accepted this revision.Oct 21 2020, 8:28 AM
This revision is now accepted and ready to land.Oct 21 2020, 8:28 AM

One nit, could you add "[NFC]" to the commit message before committing?

rampitec accepted this revision.Oct 21 2020, 9:11 AM
This revision was landed with ongoing or failed builds.Oct 21 2020, 10:39 PM
This revision was automatically updated to reflect the committed changes.

If we're nitpicking over such details, I would point out that it would be better to structure the whole thing differently, with a single legalizer class in which the insertAcquire etc. methods have different paths based on the hardware generation.

The reasoning is that code of the form "gfx10 behaves like gfx7 except ABC, gfx7 behaves like gfx6 except DEF" becomes increasingly difficult to reason about or refactor the more hardware generations we add.