OLD | NEW |
1 //===-- PNaClABISimplify.cpp - Lists PNaCl ABI simplification passes ------===// | 1 //===-- PNaClABISimplify.cpp - Lists PNaCl ABI simplification passes ------===// |
2 // | 2 // |
3 // The LLVM Compiler Infrastructure | 3 // The LLVM Compiler Infrastructure |
4 // | 4 // |
5 // This file is distributed under the University of Illinois Open Source | 5 // This file is distributed under the University of Illinois Open Source |
6 // License. See LICENSE.TXT for details. | 6 // License. See LICENSE.TXT for details. |
7 // | 7 // |
8 //===----------------------------------------------------------------------===// | 8 //===----------------------------------------------------------------------===// |
9 // | 9 // |
10 // This file implements the meta-passes "-pnacl-abi-simplify-preopt" | 10 // This file implements the meta-passes "-pnacl-abi-simplify-preopt" |
(...skipping 10 matching lines...) Expand all Loading... |
21 | 21 |
22 using namespace llvm; | 22 using namespace llvm; |
23 | 23 |
24 void llvm::PNaClABISimplifyAddPreOptPasses(PassManager &PM) { | 24 void llvm::PNaClABISimplifyAddPreOptPasses(PassManager &PM) { |
25 // LowerInvoke prevents use of C++ exception handling, which is not | 25 // LowerInvoke prevents use of C++ exception handling, which is not |
26 // yet supported in the PNaCl ABI. | 26 // yet supported in the PNaCl ABI. |
27 PM.add(createLowerInvokePass()); | 27 PM.add(createLowerInvokePass()); |
28 // Remove landingpad blocks made unreachable by LowerInvoke. | 28 // Remove landingpad blocks made unreachable by LowerInvoke. |
29 PM.add(createCFGSimplificationPass()); | 29 PM.add(createCFGSimplificationPass()); |
30 | 30 |
| 31 PM.add(createExpandArithWithOverflowPass()); |
31 PM.add(createExpandVarArgsPass()); | 32 PM.add(createExpandVarArgsPass()); |
32 PM.add(createExpandCtorsPass()); | 33 PM.add(createExpandCtorsPass()); |
33 PM.add(createResolveAliasesPass()); | 34 PM.add(createResolveAliasesPass()); |
34 PM.add(createExpandTlsPass()); | 35 PM.add(createExpandTlsPass()); |
35 // GlobalCleanup needs to run after ExpandTls because | 36 // GlobalCleanup needs to run after ExpandTls because |
36 // __tls_template_start etc. are extern_weak before expansion | 37 // __tls_template_start etc. are extern_weak before expansion |
37 PM.add(createGlobalCleanupPass()); | 38 PM.add(createGlobalCleanupPass()); |
38 // Strip dead prototytes to appease the intrinsic ABI checks | 39 // Strip dead prototytes to appease the intrinsic ABI checks |
39 // (ExpandVarArgs leaves around var-arg intrinsics). | 40 // (ExpandVarArgs leaves around var-arg intrinsics). |
40 PM.add(createStripDeadPrototypesPass()); | 41 PM.add(createStripDeadPrototypesPass()); |
(...skipping 18 matching lines...) Expand all Loading... |
59 // We should not place arbitrary passes after ExpandConstantExpr | 60 // We should not place arbitrary passes after ExpandConstantExpr |
60 // because they might reintroduce ConstantExprs. | 61 // because they might reintroduce ConstantExprs. |
61 PM.add(createExpandConstantExprPass()); | 62 PM.add(createExpandConstantExprPass()); |
62 // ExpandGetElementPtr must follow ExpandConstantExpr to expand the | 63 // ExpandGetElementPtr must follow ExpandConstantExpr to expand the |
63 // getelementptr instructions it creates. | 64 // getelementptr instructions it creates. |
64 PM.add(createExpandGetElementPtrPass()); | 65 PM.add(createExpandGetElementPtrPass()); |
65 // ReplacePtrsWithInts assumes that getelementptr instructions and | 66 // ReplacePtrsWithInts assumes that getelementptr instructions and |
66 // ConstantExprs have already been expanded out. | 67 // ConstantExprs have already been expanded out. |
67 PM.add(createReplacePtrsWithIntsPass()); | 68 PM.add(createReplacePtrsWithIntsPass()); |
68 } | 69 } |
OLD | NEW |