/external/llvm/lib/CodeGen/ |
ShrinkWrapping.cpp | 126 bool PEI::isReturnBlock(MachineBasicBlock* MBB) { 127 return (MBB && !MBB->empty() && MBB->back().isReturn()); 197 /// for the given MBB by looking forward in the MCFG at MBB's 200 bool PEI::calcAnticInOut(MachineBasicBlock* MBB) { 203 // AnticOut[MBB] = INTERSECT(AnticIn[S] for S in SUCCESSORS(MBB)) 205 for (MachineBasicBlock::succ_iterator SI = MBB->succ_begin() [all...] |
PHIEliminationUtils.cpp | 17 // findCopyInsertPoint - Find a safe place in MBB to insert a copy from SrcReg 22 llvm::findPHICopyInsertPoint(MachineBasicBlock* MBB, MachineBasicBlock* SuccMBB, 25 if (MBB->empty()) 26 return MBB->begin(); 32 return MBB->getFirstTerminator(); 36 MachineRegisterInfo& MRI = MBB->getParent()->getRegInfo(); 40 if (DefUseMI->getParent() == MBB) 47 InsertPoint = MBB->begin(); 54 InsertPoint = MBB->end(); 60 return MBB->SkipPHIsAndLabels(InsertPoint) [all...] |
MachineVerifier.cpp | 99 // Is this MBB reachable from the MF entry point? 106 // Regs killed in MBB. They may be defined again, and will then be in both 110 // Regs defined in MBB and live out. Note that vregs passing through may 114 // Vregs that pass through MBB untouched. This set is disjoint from 118 // Vregs that must pass through MBB because they are needed by a successor 180 // Extra register info per MBB. 198 void visitMachineBasicBlockBefore(const MachineBasicBlock *MBB); 204 void visitMachineBasicBlockAfter(const MachineBasicBlock *MBB); 208 void report(const char *msg, const MachineBasicBlock *MBB); 213 void report(const char *msg, const MachineBasicBlock *MBB, [all...] |
BranchFolding.h | 43 void setBlock(MachineBasicBlock *MBB) { 44 Block = MBB; 79 void setBlock(MachineBasicBlock *MBB) { 80 getMergePotentialsElt().setBlock(MBB); 114 bool OptimizeBlock(MachineBasicBlock *MBB); 115 void RemoveDeadBlock(MachineBasicBlock *MBB); 116 bool OptimizeImpDefsBlock(MachineBasicBlock *MBB); 119 bool HoistCommonCodeInSuccs(MachineBasicBlock *MBB);
|
MachineTraceMetrics.cpp | 79 /// Compute the resource usage in basic block MBB. 81 MachineTraceMetrics::getResources(const MachineBasicBlock *MBB) { 82 assert(MBB && "No basic block"); 83 FixedBlockInfo *FBI = &BlockInfo[MBB->getNumber()]; 91 for (MachineBasicBlock::const_iterator I = MBB->begin(), E = MBB->end(); 117 MachineTraceMetrics::Ensemble::getLoopFor(const MachineBasicBlock *MBB) const { 118 return MTM.Loops->getLoopFor(MBB); 121 // Update resource-related information in the TraceBlockInfo for MBB. 122 // Only update resources related to the trace above MBB [all...] |
BranchFolding.cpp | 11 // directly to the target block. This pass often results in dead MBB's, which 106 void BranchFolder::RemoveDeadBlock(MachineBasicBlock *MBB) { 107 assert(MBB->pred_empty() && "MBB must be dead!"); 108 DEBUG(dbgs() << "\nRemoving MBB: " << *MBB); 110 MachineFunction *MF = MBB->getParent(); 112 while (!MBB->succ_empty()) 113 MBB->removeSuccessor(MBB->succ_end()-1) [all...] |
MachineBranchProbabilityInfo.cpp | 32 getSumForBlock(const MachineBasicBlock *MBB, uint32_t &Scale) const { 36 assert(MBB->succ_size() < UINT32_MAX); 39 for (MachineBasicBlock::const_succ_iterator I = MBB->succ_begin(), 40 E = MBB->succ_end(); I != E; ++I) { 41 uint32_t Weight = getEdgeWeight(MBB, I); 54 for (MachineBasicBlock::const_succ_iterator I = MBB->succ_begin(), 55 E = MBB->succ_end(); I != E; ++I) { 56 uint32_t Weight = getEdgeWeight(MBB, I); 88 MachineBranchProbabilityInfo::getHotSucc(MachineBasicBlock *MBB) const { 91 for (MachineBasicBlock::const_succ_iterator I = MBB->succ_begin() [all...] |
/external/llvm/lib/Target/Mips/ |
Mips16InstrInfo.cpp | 68 void Mips16InstrInfo::copyPhysReg(MachineBasicBlock &MBB, 91 MachineInstrBuilder MIB = BuildMI(MBB, I, DL, get(Opc)); 101 storeRegToStackSlot(MachineBasicBlock &MBB, MachineBasicBlock::iterator I, 106 if (I != MBB.end()) DL = I->getDebugLoc(); 107 MachineMemOperand *MMO = GetMemOperand(MBB, FI, MachineMemOperand::MOStore); 112 BuildMI(MBB, I, DL, get(Opc)).addReg(SrcReg, getKillRegState(isKill)) 117 loadRegFromStackSlot(MachineBasicBlock &MBB, MachineBasicBlock::iterator I, 122 if (I != MBB.end()) DL = I->getDebugLoc(); 123 MachineMemOperand *MMO = GetMemOperand(MBB, FI, MachineMemOperand::MOLoad); 129 BuildMI(MBB, I, DL, get(Opc), DestReg).addFrameIndex(FI).addImm(0 [all...] |
MipsSEInstrInfo.h | 47 virtual void copyPhysReg(MachineBasicBlock &MBB, 52 virtual void storeRegToStackSlot(MachineBasicBlock &MBB, 58 virtual void loadRegFromStackSlot(MachineBasicBlock &MBB, 69 void adjustStackPtr(unsigned SP, int64_t Amount, MachineBasicBlock &MBB, 75 unsigned loadImmediate(int64_t Imm, MachineBasicBlock &MBB, 82 void ExpandRetRA(MachineBasicBlock &MBB, MachineBasicBlock::iterator I, 84 void ExpandExtractElementF64(MachineBasicBlock &MBB, 86 void ExpandBuildPairF64(MachineBasicBlock &MBB, 88 void ExpandEhReturn(MachineBasicBlock &MBB,
|
/external/llvm/lib/Target/R600/ |
SILowerControlFlow.cpp | 118 for (MachineBasicBlock *MBB = From; MBB != To && !MBB->succ_empty(); 119 MBB = *MBB->succ_begin()) { 121 for (MachineBasicBlock::iterator I = MBB->begin(), E = MBB->end(); 146 MachineBasicBlock &MBB = *MI.getParent(); 149 if (!shouldSkip(&MBB, &MBB.getParent()->back()) [all...] |
AMDGPUIndirectAddressing.cpp | 83 MachineBasicBlock &MBB = *BB; 85 for (MachineBasicBlock::iterator I = MBB.begin(), Next = llvm::next(I); 86 I != MBB.end(); I = Next) { 106 BuildMI(MBB, I, MBB.findDebugLoc(I), TII->get(AMDGPU::COPY), DstReg) 129 for (MachineBasicBlock::succ_iterator Succ = MBB.succ_begin(), 130 SuccEnd = MBB.succ_end(); 145 MachineBasicBlock &MBB = *BB; 147 MachineBasicBlock::livein_iterator LI = MBB.livein_begin(); 148 while (LI != MBB.livein_end()) [all...] |
/external/llvm/lib/Target/X86/ |
X86PadShortFunction.cpp | 61 void findReturns(MachineBasicBlock *MBB, 64 bool cyclesUntilReturn(MachineBasicBlock *MBB, 67 void addPadding(MachineBasicBlock *MBB, 112 MachineBasicBlock *MBB; 118 MBB = I->first; 124 assert(MBB->size() > 0 && 126 MachineBasicBlock::iterator ReturnLoc = --MBB->end(); 133 addPadding(MBB, ReturnLoc, Threshold - Cycles); 142 /// findReturn - Starting at MBB, follow control flow and add all 144 void PadShortFunc::findReturns(MachineBasicBlock *MBB, unsigned int Cycles) [all...] |
/external/llvm/lib/Target/Hexagon/ |
HexagonFixupHwLoops.cpp | 109 for (MachineFunction::iterator MBB = MF.begin(), MBBe = MF.end(); 110 MBB != MBBe; ++MBB) { 111 BlockToInstOffset[MBB] = InstOffset; 112 InstOffset += (MBB->size() * 4); 122 for (MachineFunction::iterator MBB = MF.begin(), MBBe = MF.end(); 123 MBB != MBBe; ++MBB) { 124 InstOffset = BlockToInstOffset[MBB]; 125 RS.enterBasicBlock(MBB); [all...] |
HexagonFrameLowering.cpp | 77 MachineBasicBlock &MBB = MF.front(); 80 MachineBasicBlock::iterator MBBI = MBB.begin(); 83 DebugLoc dl = MBBI != MBB.end() ? MBBI->getDebugLoc() : DebugLoc(); 95 MachineBasicBlock::iterator InsertPt = MBB.begin(); 149 BuildMI(MBB, InsertPt, dl, TII.get(Hexagon::ALLOCFRAME)).addImm(0); 152 BuildMI(MBB, InsertPt, dl, TII.get(Hexagon::CONST32_Int_Real), 154 BuildMI(MBB, InsertPt, dl, TII.get(Hexagon::SUB_rr), 159 BuildMI(MBB, InsertPt, dl, TII.get(Hexagon::ALLOCFRAME)).addImm(NumBytes); 163 // Returns true if MBB has a machine instructions that indicates a tail call 165 bool HexagonFrameLowering::hasTailCall(MachineBasicBlock &MBB) const [all...] |
HexagonExpandPredSpillCode.cpp | 72 MachineBasicBlock* MBB = MBBb; 74 for (MachineBasicBlock::iterator MII = MBB->begin(); MII != MBB->end(); 90 BuildMI(*MBB, MII, MI->getDebugLoc(), 93 BuildMI(*MBB, MII, MI->getDebugLoc(), TII->get(Hexagon::ADD_rr), 96 BuildMI(*MBB, MII, MI->getDebugLoc(), TII->get(Hexagon::TFR_RsPd), 98 BuildMI(*MBB, MII, MI->getDebugLoc(), 103 BuildMI(*MBB, MII, MI->getDebugLoc(), TII->get(Hexagon::ADD_ri), 105 BuildMI(*MBB, MII, MI->getDebugLoc(), TII->get(Hexagon::TFR_RsPd), 107 BuildMI(*MBB, MII, MI->getDebugLoc() [all...] |
HexagonFrameLowering.h | 32 void emitEpilogue(MachineFunction &MF, MachineBasicBlock &MBB) const; 34 spillCalleeSavedRegisters(MachineBasicBlock &MBB, 40 MachineBasicBlock &MBB, 44 restoreCalleeSavedRegisters(MachineBasicBlock &MBB, 50 bool hasTailCall(MachineBasicBlock &MBB) const;
|
/external/llvm/lib/Target/MSP430/ |
MSP430FrameLowering.cpp | 42 MachineBasicBlock &MBB = MF.front(); // Prolog goes in entry BB 48 MachineBasicBlock::iterator MBBI = MBB.begin(); 49 DebugLoc DL = MBBI != MBB.end() ? MBBI->getDebugLoc() : DebugLoc(); 66 BuildMI(MBB, MBBI, DL, TII.get(MSP430::PUSH16r)) 70 BuildMI(MBB, MBBI, DL, TII.get(MSP430::MOV16rr), MSP430::FPW) 82 while (MBBI != MBB.end() && (MBBI->getOpcode() == MSP430::PUSH16r)) 85 if (MBBI != MBB.end()) 91 //NumBytes -= mergeSPUpdates(MBB, MBBI, true); 94 // mergeSPUpdatesDown(MBB, MBBI, &NumBytes); 98 BuildMI(MBB, MBBI, DL, TII.get(MSP430::SUB16ri), MSP430::SPW [all...] |
MSP430InstrInfo.cpp | 34 void MSP430InstrInfo::storeRegToStackSlot(MachineBasicBlock &MBB, 40 if (MI != MBB.end()) DL = MI->getDebugLoc(); 41 MachineFunction &MF = *MBB.getParent(); 51 BuildMI(MBB, MI, DL, get(MSP430::MOV16mr)) 55 BuildMI(MBB, MI, DL, get(MSP430::MOV8mr)) 62 void MSP430InstrInfo::loadRegFromStackSlot(MachineBasicBlock &MBB, 68 if (MI != MBB.end()) DL = MI->getDebugLoc(); 69 MachineFunction &MF = *MBB.getParent(); 79 BuildMI(MBB, MI, DL, get(MSP430::MOV16rm)) 82 BuildMI(MBB, MI, DL, get(MSP430::MOV8rm) [all...] |
MSP430BranchSelector.cpp | 61 // Measure each MBB and compute a size for the entire function. 65 MachineBasicBlock *MBB = MFI; 68 for (MachineBasicBlock::iterator MBBI = MBB->begin(), EE = MBB->end(); 72 BlockSizes[MBB->getNumber()] = BlockSize; 88 // bCC MBB 91 // b MBB 101 MachineBasicBlock &MBB = *MFI; 103 for (MachineBasicBlock::iterator I = MBB.begin(), E = MBB.end() [all...] |
/external/llvm/lib/Target/NVPTX/ |
NVPTXFrameLowering.cpp | 34 MachineBasicBlock &MBB = MF.front(); 36 MachineBasicBlock::iterator MBBI = MBB.begin(); 45 MachineInstr *MI = BuildMI(MBB, MBBI, dl, 48 BuildMI(MBB, MI, dl, 52 MachineInstr *MI = BuildMI(MBB, MBBI, dl, 55 BuildMI(MBB, MI, dl, 63 BuildMI(MBB, MBBI, dl, 67 BuildMI(MBB, MBBI, dl, 75 MachineBasicBlock &MBB) const { 81 eliminateCallFramePseudoInstr(MachineFunction &MF, MachineBasicBlock &MBB, [all...] |
NVPTXInstrInfo.cpp | 36 void NVPTXInstrInfo::copyPhysReg (MachineBasicBlock &MBB, 42 BuildMI(MBB, I, DL, get(NVPTX::IMOV32rr), DestReg) 46 BuildMI(MBB, I, DL, get(NVPTX::IMOV8rr), DestReg) 50 BuildMI(MBB, I, DL, get(NVPTX::IMOV1rr), DestReg) 54 BuildMI(MBB, I, DL, get(NVPTX::FMOV32rr), DestReg) 58 BuildMI(MBB, I, DL, get(NVPTX::IMOV16rr), DestReg) 62 BuildMI(MBB, I, DL, get(NVPTX::IMOV64rr), DestReg) 66 BuildMI(MBB, I, DL, get(NVPTX::FMOV64rr), DestReg) 156 /// AnalyzeBranch - Analyze the branching code at the end of MBB, returning 179 bool NVPTXInstrInfo::AnalyzeBranch(MachineBasicBlock &MBB, [all...] |
/external/llvm/lib/Target/ARM/ |
Thumb1FrameLowering.cpp | 37 emitSPUpdate(MachineBasicBlock &MBB, 42 emitThumbRegPlusImmediate(MBB, MBBI, dl, ARM::SP, ARM::SP, NumBytes, TII, 48 eliminateCallFramePseudoInstr(MachineFunction &MF, MachineBasicBlock &MBB, 71 emitSPUpdate(MBB, I, TII, dl, *RegInfo, -Amount); 74 emitSPUpdate(MBB, I, TII, dl, *RegInfo, Amount); 78 MBB.erase(I); 82 MachineBasicBlock &MBB = MF.front(); 83 MachineBasicBlock::iterator MBBI = MBB.begin(); 94 DebugLoc dl = MBBI != MBB.end() ? MBBI->getDebugLoc() : DebugLoc(); 108 emitSPUpdate(MBB, MBBI, TII, dl, *RegInfo, -VARegSaveSize [all...] |
/external/llvm/lib/Target/XCore/ |
XCoreFrameLowering.cpp | 45 static void loadFromStack(MachineBasicBlock &MBB, 55 BuildMI(MBB, I, dl, TII.get(Opcode), DstReg) 60 static void storeToStack(MachineBasicBlock &MBB, 70 BuildMI(MBB, I, dl, TII.get(Opcode)) 91 MachineBasicBlock &MBB = MF.front(); // Prolog goes in entry BB 92 MachineBasicBlock::iterator MBBI = MBB.begin(); 98 DebugLoc dl = MBBI != MBB.end() ? MBBI->getDebugLoc() : DebugLoc(); 104 loadFromStack(MBB, MBBI, XCore::R11, 0, dl, TII); 126 MBB.addLiveIn(XCore::LR); 132 BuildMI(MBB, MBBI, dl, TII.get(Opcode)).addImm(FrameSize) [all...] |
/external/llvm/lib/Target/PowerPC/ |
PPCBranchSelector.cpp | 71 // Measure each MBB and compute a size for the entire function. 75 MachineBasicBlock *MBB = MFI; 78 for (MachineBasicBlock::iterator MBBI = MBB->begin(), EE = MBB->end(); 82 BlockSizes[MBB->getNumber()] = BlockSize; 98 // bCC MBB 101 // b MBB 111 MachineBasicBlock &MBB = *MFI; 113 for (MachineBasicBlock::iterator I = MBB.begin(), E = MBB.end() [all...] |
/external/llvm/lib/Target/Sparc/ |
SparcInstrInfo.cpp | 127 bool SparcInstrInfo::AnalyzeBranch(MachineBasicBlock &MBB, 134 MachineBasicBlock::iterator I = MBB.end(); 135 MachineBasicBlock::iterator UnCondBrIter = MBB.end(); 136 while (I != MBB.begin()) { 159 while (llvm::next(I) != MBB.end()) 165 if (MBB.isLayoutSuccessor(I->getOperand(0).getMBB())) { 168 I = MBB.end(); 169 UnCondBrIter = MBB.end(); 185 if (AllowModify && UnCondBrIter != MBB.end() && 186 MBB.isLayoutSuccessor(TargetBB)) [all...] |