[llvm] r209333 - R600: Add comment describing problems with LowerConstantInitializer

Matt Arsenault Matthew.Arsenault at amd.com
Wed May 21 15:59:17 PDT 2014


Author: arsenm
Date: Wed May 21 17:59:17 2014
New Revision: 209333

URL: http://llvm.org/viewvc/llvm-project?rev=209333&view=rev
Log:
R600: Add comment describing problems with LowerConstantInitializer

Modified:
    llvm/trunk/lib/Target/R600/AMDGPUISelLowering.cpp

Modified: llvm/trunk/lib/Target/R600/AMDGPUISelLowering.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/R600/AMDGPUISelLowering.cpp?rev=209333&r1=209332&r2=209333&view=diff
==============================================================================
--- llvm/trunk/lib/Target/R600/AMDGPUISelLowering.cpp (original)
+++ llvm/trunk/lib/Target/R600/AMDGPUISelLowering.cpp Wed May 21 17:59:17 2014
@@ -514,6 +514,16 @@ void AMDGPUTargetLowering::ReplaceNodeRe
   }
 }
 
+// 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,





More information about the llvm-commits mailing list