[llvm-commits] [Review request] Constant folding insertvalue instructions.

Frits van Bommel fvbommel at gmail.com
Sat Nov 27 11:24:26 PST 2010


The attached patch implements constant folding for insertvalue instructions.

Okay to commit?

One possible issues is that this could create large constants when
folding e.g. "insertvalue [1000 x i8*] zeroinitializer, i8* @global,
23". Given that that kind of code will already perform quite badly
when it comes to register allocation though, I figured it wasn't that
big of a deal -- people shouldn't be using such large aggregate
constants as first-class values anyway.


P.S. Am I correct in assuming that the only possible types of
aggregate constants are UndefValue, ConstantAggregateZero,
ConstantArray and ConstantStruct?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 001-ConstantFold-InsertValue.patch
Type: text/x-patch
Size: 4970 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20101127/e0c949f7/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 002-constprop-insertvalue-test.patch
Type: text/x-patch
Size: 2376 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20101127/e0c949f7/attachment-0001.bin>


More information about the llvm-commits mailing list