Jim Grosbach | 31c24bf | 2009-11-07 22:00:39 +0000 | [diff] [blame] | 1 | //===-- Thumb2ITBlockPass.cpp - Insert Thumb IT blocks ----------*- C++ -*-===// |
Evan Cheng | 06e1658 | 2009-07-10 01:54:42 +0000 | [diff] [blame] | 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 | |
| 10 | #define DEBUG_TYPE "thumb2-it" |
| 11 | #include "ARM.h" |
Evan Cheng | 06e1658 | 2009-07-10 01:54:42 +0000 | [diff] [blame] | 12 | #include "ARMMachineFunctionInfo.h" |
Evan Cheng | ed338e8 | 2009-07-11 07:26:20 +0000 | [diff] [blame] | 13 | #include "Thumb2InstrInfo.h" |
Evan Cheng | 06e1658 | 2009-07-10 01:54:42 +0000 | [diff] [blame] | 14 | #include "llvm/CodeGen/MachineInstr.h" |
| 15 | #include "llvm/CodeGen/MachineInstrBuilder.h" |
| 16 | #include "llvm/CodeGen/MachineFunctionPass.h" |
Evan Cheng | d847124 | 2010-06-09 01:46:50 +0000 | [diff] [blame] | 17 | #include "llvm/ADT/SmallSet.h" |
Evan Cheng | 06e1658 | 2009-07-10 01:54:42 +0000 | [diff] [blame] | 18 | #include "llvm/ADT/Statistic.h" |
| 19 | using namespace llvm; |
| 20 | |
Evan Cheng | d847124 | 2010-06-09 01:46:50 +0000 | [diff] [blame] | 21 | STATISTIC(NumITs, "Number of IT blocks inserted"); |
| 22 | STATISTIC(NumMovedInsts, "Number of predicated instructions moved"); |
Evan Cheng | 06e1658 | 2009-07-10 01:54:42 +0000 | [diff] [blame] | 23 | |
| 24 | namespace { |
Evan Cheng | d847124 | 2010-06-09 01:46:50 +0000 | [diff] [blame] | 25 | class Thumb2ITBlockPass : public MachineFunctionPass { |
| 26 | bool PreRegAlloc; |
| 27 | |
| 28 | public: |
Evan Cheng | 06e1658 | 2009-07-10 01:54:42 +0000 | [diff] [blame] | 29 | static char ID; |
Evan Cheng | d847124 | 2010-06-09 01:46:50 +0000 | [diff] [blame] | 30 | Thumb2ITBlockPass(bool PreRA) : |
| 31 | MachineFunctionPass(&ID), PreRegAlloc(PreRA) {} |
Evan Cheng | 06e1658 | 2009-07-10 01:54:42 +0000 | [diff] [blame] | 32 | |
Evan Cheng | ed338e8 | 2009-07-11 07:26:20 +0000 | [diff] [blame] | 33 | const Thumb2InstrInfo *TII; |
Evan Cheng | 06e1658 | 2009-07-10 01:54:42 +0000 | [diff] [blame] | 34 | ARMFunctionInfo *AFI; |
| 35 | |
| 36 | virtual bool runOnMachineFunction(MachineFunction &Fn); |
| 37 | |
| 38 | virtual const char *getPassName() const { |
| 39 | return "Thumb IT blocks insertion pass"; |
| 40 | } |
| 41 | |
| 42 | private: |
Evan Cheng | d847124 | 2010-06-09 01:46:50 +0000 | [diff] [blame] | 43 | bool MoveCPSRUseUp(MachineBasicBlock &MBB, |
| 44 | MachineBasicBlock::iterator MBBI, |
| 45 | MachineBasicBlock::iterator E, |
| 46 | unsigned PredReg, |
| 47 | ARMCC::CondCodes CC, ARMCC::CondCodes OCC, |
| 48 | bool &Done); |
| 49 | |
| 50 | void FindITBlockRanges(MachineBasicBlock &MBB, |
| 51 | SmallVector<MachineInstr*,4> &FirstUses, |
| 52 | SmallVector<MachineInstr*,4> &LastUses); |
| 53 | bool InsertITBlock(MachineInstr *First, MachineInstr *Last); |
Evan Cheng | 06e1658 | 2009-07-10 01:54:42 +0000 | [diff] [blame] | 54 | bool InsertITBlocks(MachineBasicBlock &MBB); |
Evan Cheng | d847124 | 2010-06-09 01:46:50 +0000 | [diff] [blame] | 55 | bool InsertITInstructions(MachineBasicBlock &MBB); |
Evan Cheng | 06e1658 | 2009-07-10 01:54:42 +0000 | [diff] [blame] | 56 | }; |
| 57 | char Thumb2ITBlockPass::ID = 0; |
| 58 | } |
| 59 | |
Evan Cheng | 5adb66a | 2009-09-28 09:14:39 +0000 | [diff] [blame] | 60 | static ARMCC::CondCodes getPredicate(const MachineInstr *MI, unsigned &PredReg){ |
Evan Cheng | ed338e8 | 2009-07-11 07:26:20 +0000 | [diff] [blame] | 61 | unsigned Opc = MI->getOpcode(); |
| 62 | if (Opc == ARM::tBcc || Opc == ARM::t2Bcc) |
| 63 | return ARMCC::AL; |
Evan Cheng | 68fc2da | 2010-06-09 19:26:01 +0000 | [diff] [blame^] | 64 | return llvm::getInstrPredicate(MI, PredReg); |
Evan Cheng | d847124 | 2010-06-09 01:46:50 +0000 | [diff] [blame] | 65 | } |
| 66 | |
| 67 | bool |
| 68 | Thumb2ITBlockPass::MoveCPSRUseUp(MachineBasicBlock &MBB, |
| 69 | MachineBasicBlock::iterator MBBI, |
| 70 | MachineBasicBlock::iterator E, |
| 71 | unsigned PredReg, |
| 72 | ARMCC::CondCodes CC, ARMCC::CondCodes OCC, |
| 73 | bool &Done) { |
| 74 | SmallSet<unsigned, 4> Defs, Uses; |
| 75 | MachineBasicBlock::iterator I = MBBI; |
| 76 | // Look for next CPSR use by scanning up to 4 instructions. |
| 77 | for (unsigned i = 0; i < 4; ++i) { |
| 78 | MachineInstr *MI = &*I; |
| 79 | unsigned MPredReg = 0; |
| 80 | ARMCC::CondCodes MCC = getPredicate(MI, MPredReg); |
| 81 | if (MCC != ARMCC::AL) { |
| 82 | if (MPredReg != PredReg || (MCC != CC && MCC != OCC)) |
| 83 | return false; |
| 84 | |
| 85 | // Check if the instruction is using any register that's defined |
| 86 | // below the previous predicated instruction. Also return false if |
| 87 | // it defines any register which is used in between. |
| 88 | for (unsigned i = 0, e = MI->getNumOperands(); i != e; ++i) { |
| 89 | const MachineOperand &MO = MI->getOperand(i); |
| 90 | if (!MO.isReg()) |
| 91 | continue; |
| 92 | unsigned Reg = MO.getReg(); |
| 93 | if (!Reg) |
| 94 | continue; |
| 95 | if (MO.isDef()) { |
| 96 | if (Reg == PredReg || Uses.count(Reg)) |
| 97 | return false; |
| 98 | } else { |
| 99 | if (Defs.count(Reg)) |
| 100 | return false; |
| 101 | } |
| 102 | } |
| 103 | |
| 104 | Done = (I == E); |
| 105 | MBB.remove(MI); |
| 106 | MBB.insert(MBBI, MI); |
| 107 | ++NumMovedInsts; |
| 108 | return true; |
| 109 | } |
| 110 | |
| 111 | for (unsigned i = 0, e = MI->getNumOperands(); i != e; ++i) { |
| 112 | const MachineOperand &MO = MI->getOperand(i); |
| 113 | if (!MO.isReg()) |
| 114 | continue; |
| 115 | unsigned Reg = MO.getReg(); |
| 116 | if (!Reg) |
| 117 | continue; |
| 118 | if (MO.isDef()) { |
| 119 | if (Reg == PredReg) |
| 120 | return false; |
| 121 | Defs.insert(Reg); |
| 122 | } else |
| 123 | Uses.insert(Reg); |
| 124 | } |
| 125 | |
| 126 | if (I == E) |
| 127 | break; |
| 128 | ++I; |
| 129 | } |
| 130 | return false; |
| 131 | } |
| 132 | |
| 133 | static bool isCPSRLiveout(MachineBasicBlock &MBB) { |
| 134 | for (MachineBasicBlock::succ_iterator I = MBB.succ_begin(), |
| 135 | E = MBB.succ_end(); I != E; ++I) { |
| 136 | if ((*I)->isLiveIn(ARM::CPSR)) |
| 137 | return true; |
| 138 | } |
| 139 | return false; |
| 140 | } |
| 141 | |
| 142 | void Thumb2ITBlockPass::FindITBlockRanges(MachineBasicBlock &MBB, |
| 143 | SmallVector<MachineInstr*,4> &FirstUses, |
| 144 | SmallVector<MachineInstr*,4> &LastUses) { |
| 145 | bool SeenUse = false; |
| 146 | MachineOperand *LastDef = 0; |
| 147 | MachineOperand *LastUse = 0; |
| 148 | MachineBasicBlock::iterator MBBI = MBB.begin(), E = MBB.end(); |
| 149 | while (MBBI != E) { |
| 150 | MachineInstr *MI = &*MBBI; |
| 151 | ++MBBI; |
| 152 | |
| 153 | MachineOperand *Def = 0; |
| 154 | MachineOperand *Use = 0; |
| 155 | for (unsigned i = 0, e = MI->getNumOperands(); i != e; ++i) { |
| 156 | MachineOperand &MO = MI->getOperand(i); |
| 157 | if (!MO.isReg() || MO.getReg() != ARM::CPSR) |
| 158 | continue; |
| 159 | if (MO.isDef()) { |
| 160 | assert(Def == 0 && "Multiple defs of CPSR?"); |
| 161 | Def = &MO; |
| 162 | } else { |
| 163 | assert(Use == 0 && "Multiple uses of CPSR?"); |
| 164 | Use = &MO; |
| 165 | } |
| 166 | } |
| 167 | |
| 168 | if (Use) { |
| 169 | LastUse = Use; |
| 170 | if (!SeenUse) { |
| 171 | FirstUses.push_back(MI); |
| 172 | SeenUse = true; |
| 173 | } |
| 174 | } |
| 175 | if (Def) { |
| 176 | if (LastUse) { |
| 177 | LastUses.push_back(LastUse->getParent()); |
| 178 | LastUse = 0; |
| 179 | } |
| 180 | LastDef = Def; |
| 181 | SeenUse = false; |
| 182 | } |
| 183 | } |
| 184 | |
| 185 | if (LastUse) { |
| 186 | // Is the last use a kill? |
| 187 | if (isCPSRLiveout(MBB)) |
| 188 | LastUses.push_back(0); |
| 189 | else |
| 190 | LastUses.push_back(LastUse->getParent()); |
| 191 | } |
| 192 | } |
| 193 | |
| 194 | bool Thumb2ITBlockPass::InsertITBlock(MachineInstr *First, MachineInstr *Last) { |
| 195 | if (First == Last) |
| 196 | return false; |
| 197 | |
| 198 | bool Modified = false; |
| 199 | MachineBasicBlock *MBB = First->getParent(); |
| 200 | MachineBasicBlock::iterator MBBI = First; |
| 201 | MachineBasicBlock::iterator E = Last; |
| 202 | |
| 203 | if (First->getDesc().isBranch() || First->getDesc().isReturn()) |
| 204 | return false; |
| 205 | |
| 206 | unsigned PredReg = 0; |
| 207 | ARMCC::CondCodes CC = getPredicate(First, PredReg); |
| 208 | if (CC == ARMCC::AL) |
| 209 | return Modified; |
| 210 | |
| 211 | // Move uses of the CPSR together if possible. |
| 212 | ARMCC::CondCodes OCC = ARMCC::getOppositeCondition(CC); |
| 213 | |
| 214 | do { |
| 215 | ++MBBI; |
| 216 | if (MBBI->getDesc().isBranch() || MBBI->getDesc().isReturn()) |
| 217 | return Modified; |
| 218 | MachineInstr *NMI = &*MBBI; |
| 219 | unsigned NPredReg = 0; |
| 220 | ARMCC::CondCodes NCC = getPredicate(NMI, NPredReg); |
| 221 | if (NCC != CC && NCC != OCC) { |
| 222 | if (NCC != ARMCC::AL) |
| 223 | return Modified; |
| 224 | assert(MBBI != E); |
| 225 | bool Done = false; |
| 226 | if (!MoveCPSRUseUp(*MBB, MBBI, E, PredReg, CC, OCC, Done)) |
| 227 | return Modified; |
| 228 | Modified = true; |
| 229 | if (Done) |
| 230 | MBBI = E; |
| 231 | } |
| 232 | } while (MBBI != E); |
| 233 | |
| 234 | // Insert a new block for consecutive predicated instructions. |
| 235 | MachineFunction *MF = MBB->getParent(); |
| 236 | MachineBasicBlock *NewMBB = MF->CreateMachineBasicBlock(MBB->getBasicBlock()); |
Evan Cheng | 68fc2da | 2010-06-09 19:26:01 +0000 | [diff] [blame^] | 237 | MachineFunction::iterator InsertPos = MBB; |
| 238 | MF->insert(++InsertPos, NewMBB); |
Evan Cheng | d847124 | 2010-06-09 01:46:50 +0000 | [diff] [blame] | 239 | |
| 240 | // Move all the successors of this block to the specified block. |
| 241 | NewMBB->transferSuccessors(MBB); |
| 242 | |
| 243 | // Add an edge from CurMBB to NewMBB for the fall-through. |
| 244 | MBB->addSuccessor(NewMBB); |
Evan Cheng | 68fc2da | 2010-06-09 19:26:01 +0000 | [diff] [blame^] | 245 | NewMBB->splice(NewMBB->end(), MBB, ++MBBI, MBB->end()); |
Evan Cheng | d847124 | 2010-06-09 01:46:50 +0000 | [diff] [blame] | 246 | return true; |
Evan Cheng | ed338e8 | 2009-07-11 07:26:20 +0000 | [diff] [blame] | 247 | } |
| 248 | |
Evan Cheng | 06e1658 | 2009-07-10 01:54:42 +0000 | [diff] [blame] | 249 | bool Thumb2ITBlockPass::InsertITBlocks(MachineBasicBlock &MBB) { |
Evan Cheng | d847124 | 2010-06-09 01:46:50 +0000 | [diff] [blame] | 250 | SmallVector<MachineInstr*, 4> FirstUses; |
| 251 | SmallVector<MachineInstr*, 4> LastUses; |
| 252 | FindITBlockRanges(MBB, FirstUses, LastUses); |
| 253 | assert(FirstUses.size() == LastUses.size() && "Incorrect range information!"); |
| 254 | |
| 255 | bool Modified = false; |
| 256 | for (unsigned i = 0, e = FirstUses.size(); i != e; ++i) { |
| 257 | if (LastUses[i] == 0) |
| 258 | // Must be the last pair where CPSR is live out of the block. |
| 259 | return Modified; |
| 260 | Modified |= InsertITBlock(FirstUses[i], LastUses[i]); |
| 261 | } |
| 262 | return Modified; |
| 263 | } |
| 264 | |
| 265 | static void TrackDefUses(MachineInstr *MI, SmallSet<unsigned, 4> &Defs, |
| 266 | SmallSet<unsigned, 4> &Uses) { |
| 267 | for (unsigned i = 0, e = MI->getNumOperands(); i != e; ++i) { |
| 268 | MachineOperand &MO = MI->getOperand(i); |
| 269 | if (!MO.isReg()) |
| 270 | continue; |
| 271 | unsigned Reg = MO.getReg(); |
| 272 | if (!Reg) |
| 273 | continue; |
| 274 | if (MO.isDef()) |
| 275 | Defs.insert(Reg); |
| 276 | else |
| 277 | Uses.insert(Reg); |
| 278 | } |
| 279 | } |
| 280 | |
| 281 | bool Thumb2ITBlockPass::InsertITInstructions(MachineBasicBlock &MBB) { |
Evan Cheng | 06e1658 | 2009-07-10 01:54:42 +0000 | [diff] [blame] | 282 | bool Modified = false; |
| 283 | |
Evan Cheng | d847124 | 2010-06-09 01:46:50 +0000 | [diff] [blame] | 284 | SmallSet<unsigned, 4> Defs; |
| 285 | SmallSet<unsigned, 4> Uses; |
Evan Cheng | 06e1658 | 2009-07-10 01:54:42 +0000 | [diff] [blame] | 286 | MachineBasicBlock::iterator MBBI = MBB.begin(), E = MBB.end(); |
| 287 | while (MBBI != E) { |
| 288 | MachineInstr *MI = &*MBBI; |
Evan Cheng | 5adb66a | 2009-09-28 09:14:39 +0000 | [diff] [blame] | 289 | DebugLoc dl = MI->getDebugLoc(); |
| 290 | unsigned PredReg = 0; |
| 291 | ARMCC::CondCodes CC = getPredicate(MI, PredReg); |
Evan Cheng | 06e1658 | 2009-07-10 01:54:42 +0000 | [diff] [blame] | 292 | if (CC == ARMCC::AL) { |
| 293 | ++MBBI; |
| 294 | continue; |
| 295 | } |
| 296 | |
Evan Cheng | d847124 | 2010-06-09 01:46:50 +0000 | [diff] [blame] | 297 | Defs.clear(); |
| 298 | Uses.clear(); |
| 299 | TrackDefUses(MI, Defs, Uses); |
| 300 | |
Evan Cheng | 06e1658 | 2009-07-10 01:54:42 +0000 | [diff] [blame] | 301 | // Insert an IT instruction. |
Evan Cheng | 06e1658 | 2009-07-10 01:54:42 +0000 | [diff] [blame] | 302 | MachineInstrBuilder MIB = BuildMI(MBB, MBBI, dl, TII->get(ARM::t2IT)) |
| 303 | .addImm(CC); |
Evan Cheng | d847124 | 2010-06-09 01:46:50 +0000 | [diff] [blame] | 304 | MachineBasicBlock::iterator InsertPos = MIB; |
Evan Cheng | 06e1658 | 2009-07-10 01:54:42 +0000 | [diff] [blame] | 305 | ++MBBI; |
| 306 | |
Evan Cheng | bc9b754 | 2009-08-15 07:59:10 +0000 | [diff] [blame] | 307 | // Finalize IT mask. |
Evan Cheng | 06e1658 | 2009-07-10 01:54:42 +0000 | [diff] [blame] | 308 | ARMCC::CondCodes OCC = ARMCC::getOppositeCondition(CC); |
Evan Cheng | bc9b754 | 2009-08-15 07:59:10 +0000 | [diff] [blame] | 309 | unsigned Mask = 0, Pos = 3; |
Sandeep Patel | 452b54a | 2009-10-15 22:25:32 +0000 | [diff] [blame] | 310 | // Branches, including tricky ones like LDM_RET, need to end an IT |
| 311 | // block so check the instruction we just put in the block. |
Jim Grosbach | 8077e76 | 2010-06-07 21:48:47 +0000 | [diff] [blame] | 312 | for (; MBBI != E && Pos && |
| 313 | (!MI->getDesc().isBranch() && !MI->getDesc().isReturn()) ; ++MBBI) { |
| 314 | if (MBBI->isDebugValue()) |
| 315 | continue; |
Evan Cheng | d847124 | 2010-06-09 01:46:50 +0000 | [diff] [blame] | 316 | |
Evan Cheng | fd84711 | 2009-09-28 20:47:15 +0000 | [diff] [blame] | 317 | MachineInstr *NMI = &*MBBI; |
Sandeep Patel | 452b54a | 2009-10-15 22:25:32 +0000 | [diff] [blame] | 318 | MI = NMI; |
Evan Cheng | d847124 | 2010-06-09 01:46:50 +0000 | [diff] [blame] | 319 | |
Evan Cheng | fd84711 | 2009-09-28 20:47:15 +0000 | [diff] [blame] | 320 | unsigned NPredReg = 0; |
| 321 | ARMCC::CondCodes NCC = getPredicate(NMI, NPredReg); |
Johnny Chen | b675e25 | 2010-03-17 23:14:23 +0000 | [diff] [blame] | 322 | if (NCC == CC || NCC == OCC) |
| 323 | Mask |= (NCC & 1) << Pos; |
Evan Cheng | d847124 | 2010-06-09 01:46:50 +0000 | [diff] [blame] | 324 | else { |
| 325 | unsigned SrcReg, DstReg, SrcSubIdx, DstSubIdx; |
| 326 | if (NCC == ARMCC::AL && |
| 327 | TII->isMoveInstr(*NMI, SrcReg, DstReg, SrcSubIdx, DstSubIdx)) { |
| 328 | assert(SrcSubIdx == 0 && DstSubIdx == 0 && |
| 329 | "Sub-register indices still around?"); |
| 330 | // llvm models select's as two-address instructions. That means a copy |
| 331 | // is inserted before a t2MOVccr, etc. If the copy is scheduled in |
| 332 | // between selects we would end up creating multiple IT blocks. |
| 333 | if (!Uses.count(DstReg) && !Defs.count(SrcReg)) { |
| 334 | --MBBI; |
| 335 | MBB.remove(NMI); |
| 336 | MBB.insert(InsertPos, NMI); |
| 337 | ++NumMovedInsts; |
| 338 | continue; |
| 339 | } |
| 340 | } |
Evan Cheng | 06e1658 | 2009-07-10 01:54:42 +0000 | [diff] [blame] | 341 | break; |
Evan Cheng | d847124 | 2010-06-09 01:46:50 +0000 | [diff] [blame] | 342 | } |
| 343 | TrackDefUses(NMI, Defs, Uses); |
Evan Cheng | bc9b754 | 2009-08-15 07:59:10 +0000 | [diff] [blame] | 344 | --Pos; |
Evan Cheng | 06e1658 | 2009-07-10 01:54:42 +0000 | [diff] [blame] | 345 | } |
Evan Cheng | d847124 | 2010-06-09 01:46:50 +0000 | [diff] [blame] | 346 | |
Evan Cheng | bc9b754 | 2009-08-15 07:59:10 +0000 | [diff] [blame] | 347 | Mask |= (1 << Pos); |
Johnny Chen | b675e25 | 2010-03-17 23:14:23 +0000 | [diff] [blame] | 348 | // Tag along (firstcond[0] << 4) with the mask. |
| 349 | Mask |= (CC & 1) << 4; |
Evan Cheng | 06e1658 | 2009-07-10 01:54:42 +0000 | [diff] [blame] | 350 | MIB.addImm(Mask); |
| 351 | Modified = true; |
| 352 | ++NumITs; |
| 353 | } |
| 354 | |
| 355 | return Modified; |
| 356 | } |
| 357 | |
| 358 | bool Thumb2ITBlockPass::runOnMachineFunction(MachineFunction &Fn) { |
| 359 | const TargetMachine &TM = Fn.getTarget(); |
| 360 | AFI = Fn.getInfo<ARMFunctionInfo>(); |
Evan Cheng | ed338e8 | 2009-07-11 07:26:20 +0000 | [diff] [blame] | 361 | TII = static_cast<const Thumb2InstrInfo*>(TM.getInstrInfo()); |
Evan Cheng | 06e1658 | 2009-07-10 01:54:42 +0000 | [diff] [blame] | 362 | |
| 363 | if (!AFI->isThumbFunction()) |
| 364 | return false; |
| 365 | |
| 366 | bool Modified = false; |
Evan Cheng | d847124 | 2010-06-09 01:46:50 +0000 | [diff] [blame] | 367 | for (MachineFunction::iterator MFI = Fn.begin(), E = Fn.end(); MFI != E; ) { |
Evan Cheng | 06e1658 | 2009-07-10 01:54:42 +0000 | [diff] [blame] | 368 | MachineBasicBlock &MBB = *MFI; |
Evan Cheng | d847124 | 2010-06-09 01:46:50 +0000 | [diff] [blame] | 369 | ++MFI; |
| 370 | if (PreRegAlloc) |
| 371 | Modified |= InsertITBlocks(MBB); |
| 372 | else |
| 373 | Modified |= InsertITInstructions(MBB); |
Evan Cheng | 06e1658 | 2009-07-10 01:54:42 +0000 | [diff] [blame] | 374 | } |
| 375 | |
| 376 | return Modified; |
| 377 | } |
| 378 | |
Evan Cheng | 34f8a02 | 2009-08-08 02:54:37 +0000 | [diff] [blame] | 379 | /// createThumb2ITBlockPass - Returns an instance of the Thumb2 IT blocks |
Evan Cheng | 06e1658 | 2009-07-10 01:54:42 +0000 | [diff] [blame] | 380 | /// insertion pass. |
Evan Cheng | d847124 | 2010-06-09 01:46:50 +0000 | [diff] [blame] | 381 | FunctionPass *llvm::createThumb2ITBlockPass(bool PreAlloc) { |
| 382 | return new Thumb2ITBlockPass(PreAlloc); |
Evan Cheng | 06e1658 | 2009-07-10 01:54:42 +0000 | [diff] [blame] | 383 | } |