From: Matt Arsenault Date: Wed, 21 May 2014 22:59:17 +0000 (+0000) Subject: R600: Add comment describing problems with LowerConstantInitializer X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=afd1747bbca94fa666910e42edcf016495a42dad;p=oota-llvm.git R600: Add comment describing problems with LowerConstantInitializer git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@209333 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Target/R600/AMDGPUISelLowering.cpp b/lib/Target/R600/AMDGPUISelLowering.cpp index e7cc2067373..d63cd1d281c 100644 --- a/lib/Target/R600/AMDGPUISelLowering.cpp +++ b/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,