[llvm-commits] [PATCH] Compress Repeated Byte Output

Chris Lattner clattner at apple.com
Tue Aug 30 16:08:14 PDT 2011


On Aug 29, 2011, at 12:18 PM, David Greene wrote:

> 
> Emit a repeated sequence of bytes using .zero.  This saves an enormous
> amount of asm file space for certain programs.
> ---
> 
> Here's another updated version of the patch, including testcase.

Looks good with a few changes:

+      if ((Value & 0xffull) != Byte) return -1;

Please use a cast instead of ffull

+    for (int i = 1, e = CA->getNumOperands(); i != e; ++i) {

Please declare 'i' as 'unsigned' instead of 'int'.

+ at x = global [500 x i64] zeroinitializer, align 64 ; <[500 x i64]*>
+; CHECK: .zero	4000

Please add a "CHECK: x:" line above this, similarly for y.  Please remove the main function from the testcase.


Please commit with these changes, thanks David.

-Chris






More information about the llvm-commits mailing list