[LLVMdev] PATCH allow for promoting any size struct arguments

Matthijs Kooijman matthijs at stdin.nl
Fri Apr 18 06:53:11 PDT 2008


Hi,

the ArgumentPromotion pass replaces aggregrate function arguments by multiple
individual arguments. The default pass only does this when the aggregrate has
3 or less elements, otherwise the code will be unchanged.

I have a need to always promote aggregrate arguments, even when there are a
lot of them.

The attached patch adds a "maxElements" argument to ArgPromotion's constructor
and to createArgumentPromotionPass with a default value of 3 to preserve the
original behaviour.

Please review and commit this patch.

Gr.

Matthijs
-------------- next part --------------
A non-text attachment was scrubbed...
Name: argpromotion-max.diff
Type: text/x-diff
Size: 4412 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20080418/28fcb3d3/attachment.diff>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20080418/28fcb3d3/attachment.sig>


More information about the llvm-dev mailing list