[LLVMdev] Problem with missing support for non-zero contant initializers.
Chris Lattner
sabre at nondot.org
Mon Aug 20 12:13:37 PDT 2007
On Mon, 20 Aug 2007, Tomas Lindquist Olsen wrote:
> I'm working on a LLVM based compiler for the D programming language by
> Walter Bright.
Nifty.
> D allows static arrays up to 16MB in size. I'm initializing global
> static arrays with a constant initializer. But D requires that (per
> default) static arrays are initialized with the default initializer
> for the element type. For float this happens to be NaN, so I cannot
> use a 'zeroinitializer'.
Wow, this *is* bad. I think the solution to this is to add a new
ConstantFillArray node. It would always have array type, would take a
single Constant* value, and would give you the filled array with that
constant. Please file a bug if you're interested.
-Chris
--
http://nondot.org/sabre/
http://llvm.org/
More information about the llvm-dev
mailing list