Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(144)

Side by Side Diff: lib/Transforms/NaCl/PNaClABISimplify.cpp

Issue 15688011: PNaCl: Extend ExpandMulWithOverflow pass to handle uadd.with.overflow too (Closed) Base URL: http://git.chromium.org/native_client/pnacl-llvm.git@master
Patch Set: Rebase Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « lib/Transforms/NaCl/ExpandMulWithOverflow.cpp ('k') | test/Transforms/NaCl/expand-arith-with-overflow.ll » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698