diff options
| author | Mark Seaborn <mseaborn@chromium.org> | 2013-06-05 11:20:20 -0700 |
|---|---|---|
| committer | Mark Seaborn <mseaborn@chromium.org> | 2013-06-05 11:20:20 -0700 |
| commit | c0d9b337419b72e69cbd9c64f84ae39560ab344f (patch) | |
| tree | 357d707887775feadeb1fa26a94dfbff96e2605b /lib/Transforms/NaCl/PNaClABISimplify.cpp | |
| parent | 69a8e32d4f4451e11cda6d48b318ba4f7e01c683 (diff) | |
PNaCl ABI: Strip out attributes on functions and function calls
Add a pass, StripAttributes, for doing this, and enable it.
Add an ABI check to reject these attributes.
BUG=https://code.google.com/p/nativeclient/issues/detail?id=2346
BUG=https://code.google.com/p/nativeclient/issues/detail?id=3415
TEST=*.ll tests + PNaCl toolchain trybots
Review URL: https://codereview.chromium.org/16325025
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 684be734c2..db9f9e6ebf 100644 --- a/lib/Transforms/NaCl/PNaClABISimplify.cpp +++ b/lib/Transforms/NaCl/PNaClABISimplify.cpp @@ -78,6 +78,12 @@ void llvm::PNaClABISimplifyAddPostOptPasses(PassManager &PM) { // ConstantExprs have already been expanded out. PM.add(createReplacePtrsWithIntsPass()); + // We place StripAttributes after optimization passes because many + // analyses add attributes to reflect their results. + // StripAttributes must come after ExpandByVal and + // ExpandSmallArguments. + PM.add(createStripAttributesPass()); + // Strip dead prototytes to appease the intrinsic ABI checks. // ExpandVarArgs leaves around vararg intrinsics, and // ReplacePtrsWithInts leaves the lifetime.start/end intrinsics. |
