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" |
11 // and "-pnacl-abi-simplify-postopt". It lists their constituent | 11 // and "-pnacl-abi-simplify-postopt". It lists their constituent |
12 // passes. | 12 // passes. |
13 // | 13 // |
14 //===----------------------------------------------------------------------===// | 14 //===----------------------------------------------------------------------===// |
15 | 15 |
16 #include "llvm/ADT/Triple.h" | 16 #include "llvm/ADT/Triple.h" |
17 #include "llvm/Analysis/NaCl.h" | 17 #include "llvm/Analysis/NaCl.h" |
18 #include "llvm/PassManager.h" | 18 #include "llvm/IR/LegacyPassManager.h" |
19 #include "llvm/Transforms/IPO.h" | 19 #include "llvm/Transforms/IPO.h" |
20 #include "llvm/Transforms/NaCl.h" | 20 #include "llvm/Transforms/NaCl.h" |
21 #include "llvm/Transforms/Scalar.h" | 21 #include "llvm/Transforms/Scalar.h" |
22 | 22 |
23 using namespace llvm; | 23 using namespace llvm; |
24 | 24 |
25 static cl::opt<bool> | 25 static cl::opt<bool> |
26 EnableSjLjEH("enable-pnacl-sjlj-eh", | 26 EnableSjLjEH("enable-pnacl-sjlj-eh", |
27 cl::desc("Enable use of SJLJ-based C++ exception handling " | 27 cl::desc("Enable use of SJLJ-based C++ exception handling " |
28 "as part of the pnacl-abi-simplify passes"), | 28 "as part of the pnacl-abi-simplify passes"), |
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
230 if (!isEmscripten) // Dead prototypes ignored by JSBackend. | 230 if (!isEmscripten) // Dead prototypes ignored by JSBackend. |
231 PM.add(createStripDeadPrototypesPass()); | 231 PM.add(createStripDeadPrototypesPass()); |
232 | 232 |
233 // Eliminate simple dead code that the post-opt passes could have created. | 233 // Eliminate simple dead code that the post-opt passes could have created. |
234 PM.add(createDeadCodeEliminationPass()); | 234 PM.add(createDeadCodeEliminationPass()); |
235 | 235 |
236 // This should be the last step before PNaCl ABI validation. | 236 // This should be the last step before PNaCl ABI validation. |
237 if (!isEmscripten) | 237 if (!isEmscripten) |
238 PM.add(createCleanupUsedGlobalsMetadataPass()); | 238 PM.add(createCleanupUsedGlobalsMetadataPass()); |
239 } | 239 } |
OLD | NEW |