diff options
| author | Mark Seaborn <mseaborn@chromium.org> | 2013-05-29 22:47:23 -0700 |
|---|---|---|
| committer | Mark Seaborn <mseaborn@chromium.org> | 2013-05-29 22:47:23 -0700 |
| commit | 614c108c60ef2ea51d0e5d4db871a5d954f4ecda (patch) | |
| tree | d8d65d244ab1c7481ae61f8be5a3e9199f4bf32a /lib/Transforms/NaCl/PNaClABISimplify.cpp | |
| parent | cfcccc95343088d7d73e0d7be1da5d4c5de57e49 (diff) | |
PNaCl: Add ExpandSmallArguments pass to widen parameters to 32 bits
This widens i1, i8 and i16 function arguments and return types.
Factor out RecreateFunction() helper function from existing PNaCl
passes since this is a reoccurring code fragment.
BUG=https://code.google.com/p/nativeclient/issues/detail?id=3342
TEST=*.ll tests + PNaCl toolchain trybots + GCC torture tests + LLVM test suite
Review URL: https://codereview.chromium.org/15971007
Diffstat (limited to 'lib/Transforms/NaCl/PNaClABISimplify.cpp')
| -rw-r--r-- | lib/Transforms/NaCl/PNaClABISimplify.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/Transforms/NaCl/PNaClABISimplify.cpp b/lib/Transforms/NaCl/PNaClABISimplify.cpp index 47e5fb67e6..3c59546275 100644 --- a/lib/Transforms/NaCl/PNaClABISimplify.cpp +++ b/lib/Transforms/NaCl/PNaClABISimplify.cpp @@ -49,6 +49,12 @@ void llvm::PNaClABISimplifyAddPostOptPasses(PassManager &PM) { // ExpandByVal expands it to. PM.add(createExpandByValPass()); + // We place ExpandSmallArguments after optimization passes because + // some optimizations undo its changes. Note that + // ExpandSmallArguments requires that ExpandVarArgs has already been + // run. + PM.add(createExpandSmallArgumentsPass()); + // We place StripMetadata after optimization passes because // optimizations depend on the metadata. PM.add(createStripMetadataPass()); |
