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 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
87 | 87 |
88 // We should not place arbitrary passes after ExpandConstantExpr | 88 // We should not place arbitrary passes after ExpandConstantExpr |
89 // because they might reintroduce ConstantExprs. | 89 // because they might reintroduce ConstantExprs. |
90 PM.add(createExpandConstantExprPass()); | 90 PM.add(createExpandConstantExprPass()); |
91 // PromoteIntegersPass does not handle constexprs and creates GEPs, | 91 // PromoteIntegersPass does not handle constexprs and creates GEPs, |
92 // so it goes between those passes. | 92 // so it goes between those passes. |
93 PM.add(createPromoteIntegersPass()); | 93 PM.add(createPromoteIntegersPass()); |
94 // ExpandGetElementPtr must follow ExpandConstantExpr to expand the | 94 // ExpandGetElementPtr must follow ExpandConstantExpr to expand the |
95 // getelementptr instructions it creates. | 95 // getelementptr instructions it creates. |
96 PM.add(createExpandGetElementPtrPass()); | 96 PM.add(createExpandGetElementPtrPass()); |
97 // Rewrite atomic and volatile instructions with intrinsic calls. | |
98 PM.add(createRewriteAtomicsPass()); | |
jvoung (off chromium)
2013/07/03 17:50:26
This doesn't introduce constant exprs, etc. right?
JF
2013/07/03 22:28:30
It doesn't introduce any, and I'd rather rely on v
| |
97 // ReplacePtrsWithInts assumes that getelementptr instructions and | 99 // ReplacePtrsWithInts assumes that getelementptr instructions and |
98 // ConstantExprs have already been expanded out. | 100 // ConstantExprs have already been expanded out. |
99 PM.add(createReplacePtrsWithIntsPass()); | 101 PM.add(createReplacePtrsWithIntsPass()); |
100 | 102 |
101 // We place StripAttributes after optimization passes because many | 103 // We place StripAttributes after optimization passes because many |
102 // analyses add attributes to reflect their results. | 104 // analyses add attributes to reflect their results. |
103 // StripAttributes must come after ExpandByVal and | 105 // StripAttributes must come after ExpandByVal and |
104 // ExpandSmallArguments. | 106 // ExpandSmallArguments. |
105 PM.add(createStripAttributesPass()); | 107 PM.add(createStripAttributesPass()); |
106 | 108 |
107 // Strip dead prototytes to appease the intrinsic ABI checks. | 109 // Strip dead prototytes to appease the intrinsic ABI checks. |
108 // ExpandVarArgs leaves around vararg intrinsics, and | 110 // ExpandVarArgs leaves around vararg intrinsics, and |
109 // ReplacePtrsWithInts leaves the lifetime.start/end intrinsics. | 111 // ReplacePtrsWithInts leaves the lifetime.start/end intrinsics. |
110 PM.add(createStripDeadPrototypesPass()); | 112 PM.add(createStripDeadPrototypesPass()); |
111 } | 113 } |
OLD | NEW |