[PATCH] D37483: AMDGPU: AMDPAL scratch buffer support
Matt Arsenault via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 5 10:15:16 PDT 2017
arsenm added inline comments.
================
Comment at: lib/Target/AMDGPU/AMDGPUAsmPrinter.cpp:917
+ // function to its original state.
+ if (TM.getTargetTriple().getOS() != Triple::AMDPAL) {
+ OutStreamer->EmitIntValue(R_00B02C_SPI_SHADER_PGM_RSRC2_PS, 4);
----------------
I don't think we actually care what order these are printed in. Can you just move all of these to one place?
================
Comment at: lib/Target/AMDGPU/SIFrameLowering.cpp:359
- if (ResourceRegUsed && (ST.isMesaGfxShader(MF) || (PreloadedPrivateBufferReg == AMDGPU::NoRegister))) {
+ if (ResourceRegUsed && ST.isAmdPalOS()) {
+ // The pointer to the GIT is formed from the offset passed in and either
----------------
This looks like it breaks mesa
================
Comment at: lib/Target/AMDGPU/SIFrameLowering.cpp:396-397
+ .addImm(0) // glc
+ .addMemOperand(MMO)
+ .addReg(ScratchRsrcReg, RegState::ImplicitDefine);
+
----------------
Sort the add MMO to last
================
Comment at: lib/Target/AMDGPU/SIMachineFunctionInfo.cpp:163-164
+
+ if (F->hasFnAttribute("amdgpu-git-ptr-high")) {
+ Attribute A = F->getFnAttribute("amdgpu-git-ptr-high");
+ StringRef S = A.getValueAsString();
----------------
You can combine these and check if it's empty
================
Comment at: test/CodeGen/AMDGPU/amdpal.ll:11
+; RUN: llc < %s -mtriple=amdgcn--amdpal -mcpu=tahiti | FileCheck --check-prefix=PAL %s
+
----------------
-enable-var-scope on new tests
================
Comment at: test/CodeGen/AMDGPU/amdpal.ll:16
+
+; PAL: s_getpc_b64 s{{\[}}[[GITPTR:[0-9]+]]:
+; PAL: s_mov_b32 s[[GITPTR]], s0
----------------
mising -LABEL
https://reviews.llvm.org/D37483
More information about the llvm-commits
mailing list