Gordon Henriksen | 82a0e74 | 2008-03-16 16:32:40 +0000 | [diff] [blame] | 1 | //===-- Scalar.cpp --------------------------------------------------------===// |
| 2 | // |
| 3 | // The LLVM Compiler Infrastructure |
| 4 | // |
| 5 | // This file is distributed under the University of Illinois Open Source |
| 6 | // License. See LICENSE.TXT for details. |
| 7 | // |
| 8 | //===----------------------------------------------------------------------===// |
| 9 | // |
Nadav Rotem | 465834c | 2012-07-24 10:51:42 +0000 | [diff] [blame] | 10 | // This file implements common infrastructure for libLLVMScalarOpts.a, which |
Owen Anderson | 4698c5d | 2010-10-07 17:55:47 +0000 | [diff] [blame] | 11 | // implements several scalar transformations over the LLVM intermediate |
| 12 | // representation, including the C bindings for that library. |
Gordon Henriksen | 82a0e74 | 2008-03-16 16:32:40 +0000 | [diff] [blame] | 13 | // |
| 14 | //===----------------------------------------------------------------------===// |
| 15 | |
Chandler Carruth | ed0881b | 2012-12-03 16:50:05 +0000 | [diff] [blame] | 16 | #include "llvm/Transforms/Scalar.h" |
Owen Anderson | 4698c5d | 2010-10-07 17:55:47 +0000 | [diff] [blame] | 17 | #include "llvm-c/Initialization.h" |
Chandler Carruth | ed0881b | 2012-12-03 16:50:05 +0000 | [diff] [blame] | 18 | #include "llvm-c/Transforms/Scalar.h" |
Chandler Carruth | 17e0bc3 | 2015-08-06 07:33:15 +0000 | [diff] [blame] | 19 | #include "llvm/Analysis/BasicAliasAnalysis.h" |
Rafael Espindola | 6aafb64 | 2011-04-13 15:44:58 +0000 | [diff] [blame] | 20 | #include "llvm/Analysis/Passes.h" |
Chandler Carruth | 42ff448 | 2015-08-14 02:55:50 +0000 | [diff] [blame] | 21 | #include "llvm/Analysis/ScopedNoAliasAA.h" |
Chandler Carruth | 1db2282 | 2015-08-14 03:33:48 +0000 | [diff] [blame] | 22 | #include "llvm/Analysis/TypeBasedAliasAnalysis.h" |
Chandler Carruth | 89c45a1 | 2016-03-11 08:50:55 +0000 | [diff] [blame] | 23 | #include "llvm/Transforms/Scalar/GVN.h" |
Chandler Carruth | 9fb823b | 2013-01-02 11:36:10 +0000 | [diff] [blame] | 24 | #include "llvm/IR/DataLayout.h" |
Chandler Carruth | 5ad5f15 | 2014-01-13 09:26:24 +0000 | [diff] [blame] | 25 | #include "llvm/IR/Verifier.h" |
Chandler Carruth | ed0881b | 2012-12-03 16:50:05 +0000 | [diff] [blame] | 26 | #include "llvm/InitializePasses.h" |
Chandler Carruth | 30d69c2 | 2015-02-13 10:01:29 +0000 | [diff] [blame] | 27 | #include "llvm/IR/LegacyPassManager.h" |
Gordon Henriksen | 82a0e74 | 2008-03-16 16:32:40 +0000 | [diff] [blame] | 28 | |
| 29 | using namespace llvm; |
| 30 | |
Nadav Rotem | 465834c | 2012-07-24 10:51:42 +0000 | [diff] [blame] | 31 | /// initializeScalarOptsPasses - Initialize all passes linked into the |
Owen Anderson | 4698c5d | 2010-10-07 17:55:47 +0000 | [diff] [blame] | 32 | /// ScalarOpts library. |
| 33 | void llvm::initializeScalarOpts(PassRegistry &Registry) { |
Justin Bogner | 19b6799 | 2015-10-30 23:13:18 +0000 | [diff] [blame] | 34 | initializeADCELegacyPassPass(Registry); |
Hal Finkel | 2bb61ba | 2015-02-17 01:36:59 +0000 | [diff] [blame] | 35 | initializeBDCEPass(Registry); |
Hal Finkel | d67e463 | 2014-09-07 20:05:11 +0000 | [diff] [blame] | 36 | initializeAlignmentFromAssumptionsPass(Registry); |
Juergen Ributzka | f26beda | 2014-01-25 02:02:55 +0000 | [diff] [blame] | 37 | initializeConstantHoistingPass(Registry); |
Owen Anderson | 4698c5d | 2010-10-07 17:55:47 +0000 | [diff] [blame] | 38 | initializeConstantPropagationPass(Registry); |
| 39 | initializeCorrelatedValuePropagationPass(Registry); |
Justin Bogner | 395c212 | 2016-04-22 19:40:41 +0000 | [diff] [blame] | 40 | initializeDCELegacyPassPass(Registry); |
Owen Anderson | 4698c5d | 2010-10-07 17:55:47 +0000 | [diff] [blame] | 41 | initializeDeadInstEliminationPass(Registry); |
Richard Sandiford | 8ee1b77 | 2013-11-22 16:58:05 +0000 | [diff] [blame] | 42 | initializeScalarizerPass(Registry); |
Owen Anderson | 4698c5d | 2010-10-07 17:55:47 +0000 | [diff] [blame] | 43 | initializeDSEPass(Registry); |
Chandler Carruth | 89c45a1 | 2016-03-11 08:50:55 +0000 | [diff] [blame] | 44 | initializeGVNLegacyPassPass(Registry); |
Chandler Carruth | d649c0a | 2015-01-27 01:34:14 +0000 | [diff] [blame] | 45 | initializeEarlyCSELegacyPassPass(Registry); |
Jan Vesely | 5a956d4 | 2014-08-13 20:31:52 +0000 | [diff] [blame] | 46 | initializeFlattenCFGPassPass(Registry); |
Sanjoy Das | a1837a3 | 2015-01-16 01:03:22 +0000 | [diff] [blame] | 47 | initializeInductiveRangeCheckEliminationPass(Registry); |
Owen Anderson | 4698c5d | 2010-10-07 17:55:47 +0000 | [diff] [blame] | 48 | initializeIndVarSimplifyPass(Registry); |
| 49 | initializeJumpThreadingPass(Registry); |
| 50 | initializeLICMPass(Registry); |
Adam Nemet | fb31d58 | 2016-02-22 21:41:22 +0000 | [diff] [blame] | 51 | initializeLoopDataPrefetchPass(Registry); |
Owen Anderson | 4698c5d | 2010-10-07 17:55:47 +0000 | [diff] [blame] | 52 | initializeLoopDeletionPass(Registry); |
Adam Nemet | 3bfd93d | 2015-02-19 19:15:04 +0000 | [diff] [blame] | 53 | initializeLoopAccessAnalysisPass(Registry); |
Cameron Zwarich | cab9a0a | 2011-01-03 00:25:16 +0000 | [diff] [blame] | 54 | initializeLoopInstSimplifyPass(Registry); |
Karthik Bhat | 88db86d | 2015-03-06 10:11:25 +0000 | [diff] [blame] | 55 | initializeLoopInterchangePass(Registry); |
Owen Anderson | 4698c5d | 2010-10-07 17:55:47 +0000 | [diff] [blame] | 56 | initializeLoopRotatePass(Registry); |
| 57 | initializeLoopStrengthReducePass(Registry); |
Hal Finkel | bf45efd | 2013-11-16 23:59:05 +0000 | [diff] [blame] | 58 | initializeLoopRerollPass(Registry); |
Owen Anderson | 4698c5d | 2010-10-07 17:55:47 +0000 | [diff] [blame] | 59 | initializeLoopUnrollPass(Registry); |
| 60 | initializeLoopUnswitchPass(Registry); |
Ashutosh Nema | df6763a | 2016-02-06 07:47:48 +0000 | [diff] [blame] | 61 | initializeLoopVersioningLICMPass(Registry); |
Chris Lattner | 2ef535a | 2010-12-26 19:32:44 +0000 | [diff] [blame] | 62 | initializeLoopIdiomRecognizePass(Registry); |
Owen Anderson | 4698c5d | 2010-10-07 17:55:47 +0000 | [diff] [blame] | 63 | initializeLowerAtomicPass(Registry); |
Jakub Staszak | 3f158fd | 2011-07-06 18:22:43 +0000 | [diff] [blame] | 64 | initializeLowerExpectIntrinsicPass(Registry); |
Sanjoy Das | 021de05 | 2016-03-31 00:18:46 +0000 | [diff] [blame] | 65 | initializeLowerGuardIntrinsicPass(Registry); |
Owen Anderson | 4698c5d | 2010-10-07 17:55:47 +0000 | [diff] [blame] | 66 | initializeMemCpyOptPass(Registry); |
Gerolf Hoflehner | f27ae6c | 2014-07-18 19:13:09 +0000 | [diff] [blame] | 67 | initializeMergedLoadStoreMotionPass(Registry); |
Jingyue Wu | 8cb6b2a | 2015-04-14 04:59:22 +0000 | [diff] [blame] | 68 | initializeNaryReassociatePass(Registry); |
Richard Sandiford | 37cd6cf | 2013-08-23 10:27:02 +0000 | [diff] [blame] | 69 | initializePartiallyInlineLibCallsPass(Registry); |
Justin Bogner | c2bf63d | 2016-04-26 23:39:29 +0000 | [diff] [blame^] | 70 | initializeReassociateLegacyPassPass(Registry); |
Owen Anderson | 4698c5d | 2010-10-07 17:55:47 +0000 | [diff] [blame] | 71 | initializeRegToMemPass(Registry); |
Philip Reames | d16a9b1 | 2015-02-20 01:06:44 +0000 | [diff] [blame] | 72 | initializeRewriteStatepointsForGCPass(Registry); |
Owen Anderson | 4698c5d | 2010-10-07 17:55:47 +0000 | [diff] [blame] | 73 | initializeSCCPPass(Registry); |
| 74 | initializeIPSCCPPass(Registry); |
Chandler Carruth | 29a18a4 | 2015-09-12 09:09:14 +0000 | [diff] [blame] | 75 | initializeSROALegacyPassPass(Registry); |
Cameron Zwarich | 4694e69 | 2011-01-18 03:53:26 +0000 | [diff] [blame] | 76 | initializeSROA_DTPass(Registry); |
Chris Lattner | 9987a6f | 2011-01-14 08:13:00 +0000 | [diff] [blame] | 77 | initializeSROA_SSAUpPass(Registry); |
Tom Stellard | aa664d9 | 2013-08-06 02:43:45 +0000 | [diff] [blame] | 78 | initializeCFGSimplifyPassPass(Registry); |
Matt Arsenault | d46fce1 | 2013-06-19 20:18:24 +0000 | [diff] [blame] | 79 | initializeStructurizeCFGPass(Registry); |
Justin Bogner | b939490 | 2016-04-22 19:54:10 +0000 | [diff] [blame] | 80 | initializeSinkingLegacyPassPass(Registry); |
Owen Anderson | 4698c5d | 2010-10-07 17:55:47 +0000 | [diff] [blame] | 81 | initializeTailCallElimPass(Registry); |
Eli Bendersky | a108a65 | 2014-05-01 18:38:36 +0000 | [diff] [blame] | 82 | initializeSeparateConstOffsetFromGEPPass(Registry); |
Jingyue Wu | 154eb5a | 2015-05-15 17:54:48 +0000 | [diff] [blame] | 83 | initializeSpeculativeExecutionPass(Registry); |
Jingyue Wu | d7966ff | 2015-02-03 19:37:06 +0000 | [diff] [blame] | 84 | initializeStraightLineStrengthReducePass(Registry); |
Michael J. Spencer | 289067c | 2014-05-29 01:55:07 +0000 | [diff] [blame] | 85 | initializeLoadCombinePass(Registry); |
Philip Reames | 47cc673 | 2015-02-04 00:37:33 +0000 | [diff] [blame] | 86 | initializePlaceBackedgeSafepointsImplPass(Registry); |
| 87 | initializePlaceSafepointsPass(Registry); |
James Molloy | 0cbb2a86 | 2015-03-27 10:36:57 +0000 | [diff] [blame] | 88 | initializeFloat2IntPass(Registry); |
Adam Nemet | 938d3d6 | 2015-05-14 12:05:18 +0000 | [diff] [blame] | 89 | initializeLoopDistributePass(Registry); |
Adam Nemet | e54a4fa | 2015-11-03 23:50:08 +0000 | [diff] [blame] | 90 | initializeLoopLoadEliminationPass(Registry); |
Fiona Glaser | b417d46 | 2016-01-29 22:35:36 +0000 | [diff] [blame] | 91 | initializeLoopSimplifyCFGPass(Registry); |
Adam Nemet | d52ed84 | 2016-02-03 00:06:10 +0000 | [diff] [blame] | 92 | initializeLoopVersioningPassPass(Registry); |
Owen Anderson | 4698c5d | 2010-10-07 17:55:47 +0000 | [diff] [blame] | 93 | } |
| 94 | |
| 95 | void LLVMInitializeScalarOpts(LLVMPassRegistryRef R) { |
| 96 | initializeScalarOpts(*unwrap(R)); |
| 97 | } |
| 98 | |
Chris Lattner | e48f897 | 2009-03-06 16:52:18 +0000 | [diff] [blame] | 99 | void LLVMAddAggressiveDCEPass(LLVMPassManagerRef PM) { |
| 100 | unwrap(PM)->add(createAggressiveDCEPass()); |
Gordon Henriksen | 82a0e74 | 2008-03-16 16:32:40 +0000 | [diff] [blame] | 101 | } |
| 102 | |
Hal Finkel | 2bb61ba | 2015-02-17 01:36:59 +0000 | [diff] [blame] | 103 | void LLVMAddBitTrackingDCEPass(LLVMPassManagerRef PM) { |
| 104 | unwrap(PM)->add(createBitTrackingDCEPass()); |
| 105 | } |
| 106 | |
Hal Finkel | d67e463 | 2014-09-07 20:05:11 +0000 | [diff] [blame] | 107 | void LLVMAddAlignmentFromAssumptionsPass(LLVMPassManagerRef PM) { |
| 108 | unwrap(PM)->add(createAlignmentFromAssumptionsPass()); |
| 109 | } |
| 110 | |
Chris Lattner | e48f897 | 2009-03-06 16:52:18 +0000 | [diff] [blame] | 111 | void LLVMAddCFGSimplificationPass(LLVMPassManagerRef PM) { |
| 112 | unwrap(PM)->add(createCFGSimplificationPass()); |
Gordon Henriksen | 82a0e74 | 2008-03-16 16:32:40 +0000 | [diff] [blame] | 113 | } |
| 114 | |
Chris Lattner | e48f897 | 2009-03-06 16:52:18 +0000 | [diff] [blame] | 115 | void LLVMAddDeadStoreEliminationPass(LLVMPassManagerRef PM) { |
| 116 | unwrap(PM)->add(createDeadStoreEliminationPass()); |
Gordon Henriksen | 82a0e74 | 2008-03-16 16:32:40 +0000 | [diff] [blame] | 117 | } |
| 118 | |
Richard Sandiford | 8ee1b77 | 2013-11-22 16:58:05 +0000 | [diff] [blame] | 119 | void LLVMAddScalarizerPass(LLVMPassManagerRef PM) { |
| 120 | unwrap(PM)->add(createScalarizerPass()); |
| 121 | } |
| 122 | |
Gordon Henriksen | 82a0e74 | 2008-03-16 16:32:40 +0000 | [diff] [blame] | 123 | void LLVMAddGVNPass(LLVMPassManagerRef PM) { |
| 124 | unwrap(PM)->add(createGVNPass()); |
| 125 | } |
| 126 | |
Gerolf Hoflehner | f27ae6c | 2014-07-18 19:13:09 +0000 | [diff] [blame] | 127 | void LLVMAddMergedLoadStoreMotionPass(LLVMPassManagerRef PM) { |
| 128 | unwrap(PM)->add(createMergedLoadStoreMotionPass()); |
| 129 | } |
| 130 | |
Chris Lattner | e48f897 | 2009-03-06 16:52:18 +0000 | [diff] [blame] | 131 | void LLVMAddIndVarSimplifyPass(LLVMPassManagerRef PM) { |
| 132 | unwrap(PM)->add(createIndVarSimplifyPass()); |
| 133 | } |
| 134 | |
| 135 | void LLVMAddInstructionCombiningPass(LLVMPassManagerRef PM) { |
| 136 | unwrap(PM)->add(createInstructionCombiningPass()); |
| 137 | } |
| 138 | |
| 139 | void LLVMAddJumpThreadingPass(LLVMPassManagerRef PM) { |
| 140 | unwrap(PM)->add(createJumpThreadingPass()); |
| 141 | } |
| 142 | |
| 143 | void LLVMAddLICMPass(LLVMPassManagerRef PM) { |
| 144 | unwrap(PM)->add(createLICMPass()); |
| 145 | } |
| 146 | |
| 147 | void LLVMAddLoopDeletionPass(LLVMPassManagerRef PM) { |
| 148 | unwrap(PM)->add(createLoopDeletionPass()); |
| 149 | } |
| 150 | |
Rafael Espindola | e4e4e37 | 2011-04-07 18:20:46 +0000 | [diff] [blame] | 151 | void LLVMAddLoopIdiomPass(LLVMPassManagerRef PM) { |
| 152 | unwrap(PM)->add(createLoopIdiomPass()); |
| 153 | } |
| 154 | |
Chris Lattner | e48f897 | 2009-03-06 16:52:18 +0000 | [diff] [blame] | 155 | void LLVMAddLoopRotatePass(LLVMPassManagerRef PM) { |
| 156 | unwrap(PM)->add(createLoopRotatePass()); |
| 157 | } |
| 158 | |
Hal Finkel | bf45efd | 2013-11-16 23:59:05 +0000 | [diff] [blame] | 159 | void LLVMAddLoopRerollPass(LLVMPassManagerRef PM) { |
| 160 | unwrap(PM)->add(createLoopRerollPass()); |
| 161 | } |
| 162 | |
Fiona Glaser | b417d46 | 2016-01-29 22:35:36 +0000 | [diff] [blame] | 163 | void LLVMAddLoopSimplifyCFGPass(LLVMPassManagerRef PM) { |
| 164 | unwrap(PM)->add(createLoopSimplifyCFGPass()); |
| 165 | } |
| 166 | |
Chris Lattner | e48f897 | 2009-03-06 16:52:18 +0000 | [diff] [blame] | 167 | void LLVMAddLoopUnrollPass(LLVMPassManagerRef PM) { |
| 168 | unwrap(PM)->add(createLoopUnrollPass()); |
| 169 | } |
| 170 | |
| 171 | void LLVMAddLoopUnswitchPass(LLVMPassManagerRef PM) { |
| 172 | unwrap(PM)->add(createLoopUnswitchPass()); |
| 173 | } |
| 174 | |
| 175 | void LLVMAddMemCpyOptPass(LLVMPassManagerRef PM) { |
| 176 | unwrap(PM)->add(createMemCpyOptPass()); |
| 177 | } |
| 178 | |
Richard Sandiford | 37cd6cf | 2013-08-23 10:27:02 +0000 | [diff] [blame] | 179 | void LLVMAddPartiallyInlineLibCallsPass(LLVMPassManagerRef PM) { |
| 180 | unwrap(PM)->add(createPartiallyInlineLibCallsPass()); |
| 181 | } |
| 182 | |
Juergen Ributzka | 14ae604 | 2014-09-11 21:32:32 +0000 | [diff] [blame] | 183 | void LLVMAddLowerSwitchPass(LLVMPassManagerRef PM) { |
| 184 | unwrap(PM)->add(createLowerSwitchPass()); |
| 185 | } |
| 186 | |
Chris Lattner | e48f897 | 2009-03-06 16:52:18 +0000 | [diff] [blame] | 187 | void LLVMAddPromoteMemoryToRegisterPass(LLVMPassManagerRef PM) { |
| 188 | unwrap(PM)->add(createPromoteMemoryToRegisterPass()); |
| 189 | } |
| 190 | |
| 191 | void LLVMAddReassociatePass(LLVMPassManagerRef PM) { |
| 192 | unwrap(PM)->add(createReassociatePass()); |
| 193 | } |
| 194 | |
| 195 | void LLVMAddSCCPPass(LLVMPassManagerRef PM) { |
| 196 | unwrap(PM)->add(createSCCPPass()); |
| 197 | } |
| 198 | |
| 199 | void LLVMAddScalarReplAggregatesPass(LLVMPassManagerRef PM) { |
| 200 | unwrap(PM)->add(createScalarReplAggregatesPass()); |
| 201 | } |
| 202 | |
Rafael Espindola | e4e4e37 | 2011-04-07 18:20:46 +0000 | [diff] [blame] | 203 | void LLVMAddScalarReplAggregatesPassSSA(LLVMPassManagerRef PM) { |
| 204 | unwrap(PM)->add(createScalarReplAggregatesPass(-1, false)); |
| 205 | } |
| 206 | |
Nate Begeman | 5daa235 | 2010-03-11 23:06:07 +0000 | [diff] [blame] | 207 | void LLVMAddScalarReplAggregatesPassWithThreshold(LLVMPassManagerRef PM, |
| 208 | int Threshold) { |
| 209 | unwrap(PM)->add(createScalarReplAggregatesPass(Threshold)); |
| 210 | } |
| 211 | |
Chris Lattner | e48f897 | 2009-03-06 16:52:18 +0000 | [diff] [blame] | 212 | void LLVMAddSimplifyLibCallsPass(LLVMPassManagerRef PM) { |
Meador Inge | dfb08a2 | 2013-06-20 19:48:07 +0000 | [diff] [blame] | 213 | // NOTE: The simplify-libcalls pass has been removed. |
Chris Lattner | e48f897 | 2009-03-06 16:52:18 +0000 | [diff] [blame] | 214 | } |
| 215 | |
| 216 | void LLVMAddTailCallEliminationPass(LLVMPassManagerRef PM) { |
| 217 | unwrap(PM)->add(createTailCallEliminationPass()); |
| 218 | } |
| 219 | |
| 220 | void LLVMAddConstantPropagationPass(LLVMPassManagerRef PM) { |
| 221 | unwrap(PM)->add(createConstantPropagationPass()); |
| 222 | } |
| 223 | |
| 224 | void LLVMAddDemoteMemoryToRegisterPass(LLVMPassManagerRef PM) { |
| 225 | unwrap(PM)->add(createDemoteRegisterToMemoryPass()); |
Gordon Henriksen | 82a0e74 | 2008-03-16 16:32:40 +0000 | [diff] [blame] | 226 | } |
Nate Begeman | 5daa235 | 2010-03-11 23:06:07 +0000 | [diff] [blame] | 227 | |
| 228 | void LLVMAddVerifierPass(LLVMPassManagerRef PM) { |
| 229 | unwrap(PM)->add(createVerifierPass()); |
| 230 | } |
Rafael Espindola | e4e4e37 | 2011-04-07 18:20:46 +0000 | [diff] [blame] | 231 | |
| 232 | void LLVMAddCorrelatedValuePropagationPass(LLVMPassManagerRef PM) { |
| 233 | unwrap(PM)->add(createCorrelatedValuePropagationPass()); |
| 234 | } |
| 235 | |
| 236 | void LLVMAddEarlyCSEPass(LLVMPassManagerRef PM) { |
| 237 | unwrap(PM)->add(createEarlyCSEPass()); |
| 238 | } |
Rafael Espindola | 6aafb64 | 2011-04-13 15:44:58 +0000 | [diff] [blame] | 239 | |
| 240 | void LLVMAddTypeBasedAliasAnalysisPass(LLVMPassManagerRef PM) { |
Chandler Carruth | 7b560d4 | 2015-09-09 17:55:00 +0000 | [diff] [blame] | 241 | unwrap(PM)->add(createTypeBasedAAWrapperPass()); |
Rafael Espindola | 6aafb64 | 2011-04-13 15:44:58 +0000 | [diff] [blame] | 242 | } |
| 243 | |
Hal Finkel | 9414665 | 2014-07-24 14:25:39 +0000 | [diff] [blame] | 244 | void LLVMAddScopedNoAliasAAPass(LLVMPassManagerRef PM) { |
Chandler Carruth | 7b560d4 | 2015-09-09 17:55:00 +0000 | [diff] [blame] | 245 | unwrap(PM)->add(createScopedNoAliasAAWrapperPass()); |
Hal Finkel | 9414665 | 2014-07-24 14:25:39 +0000 | [diff] [blame] | 246 | } |
| 247 | |
Rafael Espindola | 6aafb64 | 2011-04-13 15:44:58 +0000 | [diff] [blame] | 248 | void LLVMAddBasicAliasAnalysisPass(LLVMPassManagerRef PM) { |
Chandler Carruth | 7b560d4 | 2015-09-09 17:55:00 +0000 | [diff] [blame] | 249 | unwrap(PM)->add(createBasicAAWrapperPass()); |
Rafael Espindola | 6aafb64 | 2011-04-13 15:44:58 +0000 | [diff] [blame] | 250 | } |
Rafael Espindola | 7281395 | 2011-07-25 20:57:59 +0000 | [diff] [blame] | 251 | |
| 252 | void LLVMAddLowerExpectIntrinsicPass(LLVMPassManagerRef PM) { |
| 253 | unwrap(PM)->add(createLowerExpectIntrinsicPass()); |
| 254 | } |