> On Apr 13, 2010, at 3:04 PM, Nuno Lopes wrote: > >> Thanks! >> I assume it's now ok to turn padding into undef again? (btw, do you want >> to >> review the patch before commit?) > > Yes, iff it doesn't break anything. Please verify that sqlite works in > the jit etc,
Ok, thank you; will do it in my next llvm hacking session :) Nuno >> ----- Original Message ----- >> From: "Chris Lattner" <[email protected]> >> To: <[email protected]> >> Sent: Tuesday, April 13, 2010 7:16 PM >> Subject: [cfe-commits] r101155 - in >> /cfe/trunk:lib/CodeGen/CGExprConstant.cpp test/CodeGen/decl.c >> >> >>> Author: lattner >>> Date: Tue Apr 13 13:16:19 2010 >>> New Revision: 101155 >>> >>> URL: http://llvm.org/viewvc/llvm-project?rev=101155&view=rev >>> Log: >>> Rework the ConstStructBuilder code to emit missing initializer >>> elements with explicit zero values instead of with tail padding. >>> On an example like this: >>> >>> struct foo { int a; int b; }; >>> >>> struct foo fooarray[] = { >>> {1, 2}, >>> {4}, >>> }; >>> >>> We now lay this out as: >>> >>> @fooarray = global [2 x %struct.foo] [%struct.foo { i32 1, i32 2 }, >>> %struct.foo { i32 4, i32 0 }] >>> >>> instead of as: >>> >>> @fooarray = global %0 <{ %struct.foo { i32 1, i32 2 }, %1 { i32 4, [4 x >>> i8] zeroinitializer } }> >>> >>> Preserving both the struct type of the second element, but also the >>> array >>> type of the entire thing. _______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
