[PATCH] D61491: AMDGPU: Be explicit about whether the high-word in SI_PC_ADD_REL_OFFSET is 0

Nicolai Hähnle via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue May 7 04:37:30 PDT 2019


nhaehnle added a comment.

In D61491#1489425 <https://reviews.llvm.org/D61491#1489425>, @arsenm wrote:

> But these are often -1?


Not sure what you're saying here? The point is that when the GAFlags are MO_NONE, there was previously magic behavior to force the high dword to 0. This patch removes the magic behavior of MO_NONE, or perhaps it's more accurate to say that it pushes the magic behavior forward into buildPCRelGlobalAddress, so that it's confined locally. The MO_NONE case is only hit in the badly named `shouldEmitFixup` case, which applies to constants that should be emitted to the .text section, where they will always be after the code.

(The shouldEmitConstantsToTextSection is itself a gross hack that is applied based on the triple. We'll soon be able to remove it for Mesa, once the proper linking lands, and then hopefully later on for PAL as well.)


Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D61491/new/

https://reviews.llvm.org/D61491





More information about the llvm-commits mailing list