Allow argpromote to promote struct arguments with a specified number

of elements.  Patch by Matthijs Kooijman!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49962 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner
2008-04-19 19:50:01 +00:00
parent 8608f2eff2
commit bcd203cf86
2 changed files with 20 additions and 12 deletions

View File

@@ -123,9 +123,10 @@ ModulePass *createDeadArgHackingPass();
//===----------------------------------------------------------------------===//
/// createArgumentPromotionPass - This pass promotes "by reference" arguments to
/// be passed by value.
/// be passed by value if the number of elements passed is smaller or
/// equal to maxElements (maxElements == 0 means always promote).
///
Pass *createArgumentPromotionPass();
Pass *createArgumentPromotionPass(unsigned maxElements = 3);
Pass *createStructRetPromotionPass();
//===----------------------------------------------------------------------===//