diff options
author | Tom Stellard <thomas.stellard@amd.com> | 2014-07-21 14:01:14 +0000 |
---|---|---|
committer | Tom Stellard <thomas.stellard@amd.com> | 2014-07-21 14:01:14 +0000 |
commit | 067c81567bf35e04b2c9b3d360a6f15dedbfe8aa (patch) | |
tree | 1031a76ce68e6100ccade83f3b1ccc15cf2ecba5 /llvm/lib/Target/R600/MCTargetDesc/AMDGPUELFObjectWriter.cpp | |
parent | b2114caf627f38eaa7905d3ad911971206b1caa9 (diff) | |
download | bcm5719-llvm-067c81567bf35e04b2c9b3d360a6f15dedbfe8aa.tar.gz bcm5719-llvm-067c81567bf35e04b2c9b3d360a6f15dedbfe8aa.zip |
R600/SI: Store constant initializer data in constant memory
This implements a solution for constant initializers suggested
by Vadim Girlin, where we store the data after the shader code
and then use the S_GETPC instruction to compute its address.
This saves use the trouble of creating a new buffer for constant data
and then having to pass the pointer to the kernel via user SGPRs or the
input buffer.
llvm-svn: 213530
Diffstat (limited to 'llvm/lib/Target/R600/MCTargetDesc/AMDGPUELFObjectWriter.cpp')
-rw-r--r-- | llvm/lib/Target/R600/MCTargetDesc/AMDGPUELFObjectWriter.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/Target/R600/MCTargetDesc/AMDGPUELFObjectWriter.cpp b/llvm/lib/Target/R600/MCTargetDesc/AMDGPUELFObjectWriter.cpp index 53b0e85751d..5fb94d5914d 100644 --- a/llvm/lib/Target/R600/MCTargetDesc/AMDGPUELFObjectWriter.cpp +++ b/llvm/lib/Target/R600/MCTargetDesc/AMDGPUELFObjectWriter.cpp @@ -10,6 +10,7 @@ #include "AMDGPUMCTargetDesc.h" #include "llvm/MC/MCELFObjectWriter.h" +#include "llvm/MC/MCFixup.h" using namespace llvm; @@ -21,7 +22,7 @@ public: protected: unsigned GetRelocType(const MCValue &Target, const MCFixup &Fixup, bool IsPCRel) const override { - llvm_unreachable("Not implemented"); + return Fixup.getKind(); } }; |