This is an archive of the discontinued LLVM Phabricator instance.

[AMDGPU] Use multi-dword flat scratch for spilling
ClosedPublic

Authored by rampitec on Dec 10 2020, 1:32 PM.

Diff Detail

Event Timeline

rampitec created this revision.Dec 10 2020, 1:32 PM
rampitec requested review of this revision.Dec 10 2020, 1:32 PM
Herald added a project: Restricted Project. · View Herald TranscriptDec 10 2020, 1:32 PM
Herald added a subscriber: wdng. · View Herald Transcript
arsenm added inline comments.Dec 10 2020, 2:28 PM
llvm/lib/Target/AMDGPU/SIRegisterInfo.cpp
750

Move TII to first parameter since it behaves like this

923

Register constructor should be unnecessary?

959

Comment what this offset is

rampitec updated this revision to Diff 311035.Dec 10 2020, 3:01 PM
rampitec marked 2 inline comments as done.
rampitec added inline comments.
llvm/lib/Target/AMDGPU/SIRegisterInfo.cpp
923

It gives the error otherwise: error: conditional expression is ambiguous; 'llvm::MCRegister' can be converted to 'llvm::Register' and vice versa.

Note, it is the same code as originally existed on line 848.

sebastian-ne added inline comments.Dec 11 2020, 1:53 AM
llvm/lib/Target/AMDGPU/SIRegisterInfo.cpp
897

Can this be moved into the if? I think LoadStoreOp doesn’t change otherwise.

rampitec added inline comments.Dec 11 2020, 10:51 AM
llvm/lib/Target/AMDGPU/SIRegisterInfo.cpp
897

It cannot. Desc is also modified at line 956 below in the same loop.

arsenm added inline comments.Dec 12 2020, 6:47 AM
llvm/lib/Target/AMDGPU/SIRegisterInfo.cpp
808

Why use CHAR_BIT? This now technically makes this host compiler dependent

rampitec updated this revision to Diff 311655.Dec 14 2020, 11:01 AM
rampitec marked an inline comment as done.

Removed CHAR_WIDTH.

FYI, PSDB and ePSDN passed with and without flat scratch enabled.

llvm/lib/Target/AMDGPU/SIRegisterInfo.cpp
808

I don't know. It is there since D49448. Fixed.

arsenm accepted this revision.Dec 14 2020, 1:59 PM
This revision is now accepted and ready to land.Dec 14 2020, 1:59 PM
This revision was automatically updated to reflect the committed changes.