PATCH allow for promoting any size struct arguments

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

argpromotion-max.diff (4.4 KB)

Looks great to me, applied:
http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20080414/061276.html

Thanks,

-Chris