[PATCH] Emit OpenCL local global variables without zeorinitializer
Joey Gouly
joey.gouly at gmail.com
Mon Nov 3 06:05:59 PST 2014
LGTM! (Apart from those tiny changes)
================
Comment at: lib/CodeGen/CGDecl.cpp:196
@@ +195,3 @@
+ if (Ty.getAddressSpace() != LangAS::opencl_local)
+ Init = EmitNullConstant(D.getType());
+ else
----------------
Use 'Ty' (initialised on line 179)
================
Comment at: lib/CodeGen/CGDecl.cpp:198
@@ +197,3 @@
+ else
+ Init = llvm::UndefValue::get(getTypes().ConvertTypeForMem(D.getType()));
+
----------------
Use 'LTy' (initialised on line 189)
http://reviews.llvm.org/D6077
More information about the cfe-commits
mailing list