summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorMatt Arsenault <Matthew.Arsenault@amd.com>2014-05-21 22:59:17 +0000
committerMatt Arsenault <Matthew.Arsenault@amd.com>2014-05-21 22:59:17 +0000
commit40100887b62ce3fd828ca6049b918dacd0752ceb (patch)
tree755a442db15b7cfab282b8b631f19a2324b28553 /llvm/lib
parent44fa45034bb6cc1896b812e2e0b6256ac70b71b9 (diff)
downloadbcm5719-llvm-40100887b62ce3fd828ca6049b918dacd0752ceb.tar.gz
bcm5719-llvm-40100887b62ce3fd828ca6049b918dacd0752ceb.zip
R600: Add comment describing problems with LowerConstantInitializer
llvm-svn: 209333
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/Target/R600/AMDGPUISelLowering.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/llvm/lib/Target/R600/AMDGPUISelLowering.cpp b/llvm/lib/Target/R600/AMDGPUISelLowering.cpp
index e7cc2067373..d63cd1d281c 100644
--- a/llvm/lib/Target/R600/AMDGPUISelLowering.cpp
+++ b/llvm/lib/Target/R600/AMDGPUISelLowering.cpp
@@ -514,6 +514,16 @@ void AMDGPUTargetLowering::ReplaceNodeResults(SDNode *N,
}
}
+// FIXME: This implements accesses to initialized globals in the constant
+// address space by copying them to private and accessing that. It does not
+// properly handle illegal types or vectors. The private vector loads are not
+// scalarized, and the illegal scalars hit an assertion. This technique will not
+// work well with large initializers, and this should eventually be
+// removed. Initialized globals should be placed into a data section that the
+// runtime will load into a buffer before the kernel is executed. Uses of the
+// global need to be replaced with a pointer loaded from an implicit kernel
+// argument into this buffer holding the copy of the data, which will remove the
+// need for any of this.
SDValue AMDGPUTargetLowering::LowerConstantInitializer(const Constant* Init,
const GlobalValue *GV,
const SDValue &InitPtr,
OpenPOWER on IntegriCloud