/external/swiftshader/third_party/llvm-10.0/llvm/lib/CodeGen/ |
D | BranchRelaxation.cpp | 67 unsigned postOffset(const MachineBasicBlock &MBB) const { in postOffset() 69 const Align Alignment = MBB.getAlignment(); in postOffset() 73 const Align ParentAlign = MBB.getParent()->getAlignment(); in postOffset() 103 uint64_t computeBlockSize(const MachineBasicBlock &MBB) const; 130 for (MachineBasicBlock &MBB : *MF) { in INITIALIZE_PASS() 131 const unsigned Num = MBB.getNumber(); in INITIALIZE_PASS() 132 assert(isAligned(MBB.getAlignment(), BlockInfo[Num].Offset)); in INITIALIZE_PASS() 133 assert(!Num || BlockInfo[PrevNum].postOffset(MBB) <= BlockInfo[Num].Offset); in INITIALIZE_PASS() 134 assert(BlockInfo[Num].Size == computeBlockSize(MBB)); in INITIALIZE_PASS() 143 for (auto &MBB : *MF) { in dumpBBs() [all …]
|
D | BranchFolding.cpp | 159 void BranchFolder::RemoveDeadBlock(MachineBasicBlock *MBB) { in RemoveDeadBlock() argument 160 assert(MBB->pred_empty() && "MBB must be dead!"); in RemoveDeadBlock() 161 LLVM_DEBUG(dbgs() << "\nRemoving MBB: " << *MBB); in RemoveDeadBlock() 163 MachineFunction *MF = MBB->getParent(); in RemoveDeadBlock() 165 while (!MBB->succ_empty()) in RemoveDeadBlock() 166 MBB->removeSuccessor(MBB->succ_end()-1); in RemoveDeadBlock() 169 TriedMerging.erase(MBB); in RemoveDeadBlock() 172 std::for_each(MBB->begin(), MBB->end(), [MF](const MachineInstr &MI) { in RemoveDeadBlock() 177 MF->erase(MBB); in RemoveDeadBlock() 178 EHScopeMembership.erase(MBB); in RemoveDeadBlock() [all …]
|
D | CFIInstrInserter.cpp | 70 MachineBasicBlock *MBB; member 107 int getCorrectCFAOffset(MachineBasicBlock *MBB) { in getCorrectCFAOffset() argument 108 return -MBBVector[MBB->getNumber()].IncomingCFAOffset; in getCorrectCFAOffset() 137 for (MachineBasicBlock &MBB : MF) { in calculateCFAInfo() 139 MBBInfo.MBB = &MBB; in calculateCFAInfo() 144 MBBVector[MBB.getNumber()] = MBBInfo; in calculateCFAInfo() 151 for (MachineBasicBlock &MBB : MF) { in calculateCFAInfo() 152 if (MBBVector[MBB.getNumber()].Processed) continue; in calculateCFAInfo() 153 updateSuccCFAInfo(MBBVector[MBB.getNumber()]); in calculateCFAInfo() 163 MBBInfo.MBB->getParent()->getFrameInstructions(); in calculateOutgoingCFAInfo() [all …]
|
D | MIRCanonicalizerPass.cpp | 88 for (auto MBB : RPOT) { in GetRPOList() local 89 RPOList.push_back(MBB); in GetRPOList() 97 MachineBasicBlock *MBB, in rescheduleLexographically() argument 130 MBB->splice(getPos(), MBB, II.second); in rescheduleLexographically() 137 MachineBasicBlock *MBB) { in rescheduleCanonically() argument 155 for (auto &MI : *MBB) { in rescheduleCanonically() 221 MachineRegisterInfo *MRI = &MBB->getParent()->getRegInfo(); in rescheduleCanonically() 241 const auto BBE = MBB->instr_end(); in rescheduleCanonically() 245 for (auto BBI = MBB->instr_begin(); BBI != BBE; ++BBI) { in rescheduleCanonically() 273 MBB->splice(UseI, MBB, DefI); in rescheduleCanonically() [all …]
|
/external/llvm/lib/Target/WebAssembly/ |
D | WebAssemblyCFGStackify.cpp | 77 for (MachineBasicBlock *MBB : Loop->blocks()) in LoopBottom() 78 if (MBB->getNumber() > Bottom->getNumber()) in LoopBottom() 79 Bottom = MBB; in LoopBottom() 83 static void MaybeUpdateTerminator(MachineBasicBlock *MBB) { in MaybeUpdateTerminator() argument 88 for (const MachineInstr &Term : MBB->terminators()) { in MaybeUpdateTerminator() 97 MBB->updateTerminator(); in MaybeUpdateTerminator() 140 for (MachineBasicBlock &MBB : MF) { in SortBlocks() 141 unsigned N = MBB.pred_size(); in SortBlocks() 142 if (MachineLoop *L = MLI.getLoopFor(&MBB)) in SortBlocks() 143 if (L->getHeader() == &MBB) in SortBlocks() [all …]
|
/external/swiftshader/third_party/llvm-10.0/llvm/lib/Target/AArch64/ |
D | AArch64SpeculationHardening.cpp | 150 bool instrumentControlFlow(MachineBasicBlock &MBB, 152 bool endsWithCondControlFlow(MachineBasicBlock &MBB, MachineBasicBlock *&TBB, 157 void insertSPToRegTaintPropagation(MachineBasicBlock &MBB, 159 void insertRegToSPTaintPropagation(MachineBasicBlock &MBB, 162 void insertFullSpeculationBarrier(MachineBasicBlock &MBB, 166 bool slhLoads(MachineBasicBlock &MBB); 167 bool makeGPRSpeculationSafe(MachineBasicBlock &MBB, 170 bool lowerSpeculationSafeValuePseudos(MachineBasicBlock &MBB, 172 bool expandSpeculationSafeValue(MachineBasicBlock &MBB, 175 bool insertCSDB(MachineBasicBlock &MBB, MachineBasicBlock::iterator MBBI, [all …]
|
/external/swiftshader/third_party/llvm-10.0/llvm/lib/Target/AMDGPU/ |
D | AMDILCFGStructurizer.cpp | 204 int getSCCNum(MachineBasicBlock *MBB) const; 206 bool hasBackEdge(MachineBasicBlock *MBB) const; 207 bool isRetiredBlock(MachineBasicBlock *MBB) const; 208 bool isActiveLoophead(MachineBasicBlock *MBB) const; 213 bool needMigrateBlock(MachineBasicBlock *MBB) const; 217 MachineBasicBlock &MBB); 222 void insertInstrEnd(MachineBasicBlock *MBB, int NewOpcode, 224 MachineInstr *insertInstrBefore(MachineBasicBlock *MBB, int NewOpcode, 229 void insertCondBranchBefore(MachineBasicBlock *MBB, 238 static void setTrueBranch(MachineInstr *MI, MachineBasicBlock *MBB); [all …]
|
D | SILowerI1Copies.cpp | 45 static unsigned insertUndefLaneMask(MachineBasicBlock &MBB); 93 void buildMergeLaneMasks(MachineBasicBlock &MBB, 97 getSaluInsertionAtEnd(MachineBasicBlock &MBB) const; 148 bool isSource(MachineBasicBlock &MBB) const { in isSource() 149 return ReachableMap.find(&MBB)->second; in isSource() 166 for (MachineBasicBlock *MBB : IncomingBlocks) { in analyze() 167 if (MBB == &DefBlock) { in analyze() 172 ReachableMap.try_emplace(MBB, false); in analyze() 173 ReachableOrdered.push_back(MBB); in analyze() 178 for (MachineInstr &MI : MBB->terminators()) { in analyze() [all …]
|
/external/llvm/lib/Target/AMDGPU/ |
D | AMDILCFGStructurizer.cpp | 211 int getSCCNum(MachineBasicBlock *MBB) const; 213 bool hasBackEdge(MachineBasicBlock *MBB) const; 214 bool isRetiredBlock(MachineBasicBlock *MBB) const; 215 bool isActiveLoophead(MachineBasicBlock *MBB) const; 220 bool needMigrateBlock(MachineBasicBlock *MBB) const; 228 void insertInstrEnd(MachineBasicBlock *MBB, int NewOpcode, 230 MachineInstr *insertInstrBefore(MachineBasicBlock *MBB, int NewOpcode, 235 void insertCondBranchBefore(MachineBasicBlock *MBB, 243 static void setTrueBranch(MachineInstr *MI, MachineBasicBlock *MBB); 244 static MachineBasicBlock *getFalseBranch(MachineBasicBlock *MBB, [all …]
|
/external/llvm/lib/CodeGen/ |
D | BranchFolding.cpp | 125 void BranchFolder::RemoveDeadBlock(MachineBasicBlock *MBB) { in RemoveDeadBlock() argument 126 assert(MBB->pred_empty() && "MBB must be dead!"); in RemoveDeadBlock() 127 DEBUG(dbgs() << "\nRemoving MBB: " << *MBB); in RemoveDeadBlock() 129 MachineFunction *MF = MBB->getParent(); in RemoveDeadBlock() 131 while (!MBB->succ_empty()) in RemoveDeadBlock() 132 MBB->removeSuccessor(MBB->succ_end()-1); in RemoveDeadBlock() 135 TriedMerging.erase(MBB); in RemoveDeadBlock() 138 MF->erase(MBB); in RemoveDeadBlock() 139 FuncletMembership.erase(MBB); in RemoveDeadBlock() 141 MLI->removeBlock(MBB); in RemoveDeadBlock() [all …]
|
D | MachineVerifier.cpp | 198 void visitMachineBasicBlockBefore(const MachineBasicBlock *MBB); 204 void visitMachineBasicBlockAfter(const MachineBasicBlock *MBB); 211 void report(const char *msg, const MachineBasicBlock *MBB); 236 void markReachable(const MachineBasicBlock *MBB); 238 void checkPHIOps(const MachineBasicBlock *MBB); 438 void MachineVerifier::report(const char *msg, const MachineBasicBlock *MBB) { in report() argument 439 assert(MBB); in report() 440 report(msg, MBB->getParent()); in report() 441 errs() << "- basic block: BB#" << MBB->getNumber() in report() 442 << ' ' << MBB->getName() in report() [all …]
|
/external/swiftshader/third_party/llvm-10.0/llvm/lib/Target/RISCV/ |
D | RISCVExpandPseudoInsts.cpp | 43 bool expandMBB(MachineBasicBlock &MBB); 44 bool expandMI(MachineBasicBlock &MBB, MachineBasicBlock::iterator MBBI, 46 bool expandAtomicBinOp(MachineBasicBlock &MBB, 50 bool expandAtomicMinMaxOp(MachineBasicBlock &MBB, 54 bool expandAtomicCmpXchg(MachineBasicBlock &MBB, 57 bool expandAuipcInstPair(MachineBasicBlock &MBB, 61 bool expandLoadLocalAddress(MachineBasicBlock &MBB, 64 bool expandLoadAddress(MachineBasicBlock &MBB, 67 bool expandLoadTLSIEAddress(MachineBasicBlock &MBB, 70 bool expandLoadTLSGDAddress(MachineBasicBlock &MBB, [all …]
|
/external/swiftshader/third_party/llvm-10.0/llvm/lib/Target/WebAssembly/ |
D | WebAssemblyLateEHPrepare.cpp | 67 MachineBasicBlock *MBB = WL.pop_back_val(); in getMatchingEHPad() local 68 if (Visited.count(MBB)) in getMatchingEHPad() 70 Visited.insert(MBB); in getMatchingEHPad() 71 if (MBB->isEHPad()) { in getMatchingEHPad() 72 if (EHPad && EHPad != MBB) in getMatchingEHPad() 74 EHPad = MBB; in getMatchingEHPad() 77 if (MBB == &MF->front()) in getMatchingEHPad() 79 WL.append(MBB->pred_begin(), MBB->pred_end()); in getMatchingEHPad() 90 MachineBasicBlock *MBB = WL.pop_back_val(); in eraseDeadBBsAndChildren() local 91 if (!MBB->pred_empty()) in eraseDeadBBsAndChildren() [all …]
|
D | WebAssemblyCFGSort.cpp | 52 virtual bool contains(const MachineBasicBlock *MBB) const = 0; 65 bool contains(const MachineBasicBlock *MBB) const override { in contains() 66 return Region->contains(MBB); in contains() 91 const Region *getRegionFor(const MachineBasicBlock *MBB) { in getRegionFor() argument 92 const auto *ML = MLI.getLoopFor(MBB); in getRegionFor() 93 const auto *WE = WEI.getExceptionFor(MBB); in getRegionFor() 143 static void maybeUpdateTerminator(MachineBasicBlock *MBB) { in maybeUpdateTerminator() argument 148 for (const MachineInstr &Term : MBB->terminators()) { in maybeUpdateTerminator() 157 MBB->updateTerminator(); in maybeUpdateTerminator() 248 for (MachineBasicBlock &MBB : MF) { in sortBlocks() [all …]
|
D | WebAssemblyCFGStackify.cpp | 60 void placeBlockMarker(MachineBasicBlock &MBB); 61 void placeLoopMarker(MachineBasicBlock &MBB); 62 void placeTryMarker(MachineBasicBlock &MBB); 122 MachineBasicBlock *MBB) { in explicitlyBranchesTo() argument 125 if (MO.isMBB() && MO.getMBB() == MBB) in explicitlyBranchesTo() 136 getEarliestInsertPos(MachineBasicBlock *MBB, in getEarliestInsertPos() argument 139 auto InsertPos = MBB->end(); in getEarliestInsertPos() 140 while (InsertPos != MBB->begin()) { in getEarliestInsertPos() 144 for (auto Pos = InsertPos, E = MBB->begin(); Pos != E; --Pos) in getEarliestInsertPos() 160 getLatestInsertPos(MachineBasicBlock *MBB, in getLatestInsertPos() argument [all …]
|
/external/swiftshader/third_party/llvm-10.0/llvm/lib/Target/Mips/ |
D | MipsSEFrameLowering.cpp | 75 bool expandInstr(MachineBasicBlock &MBB, Iter I); 76 void expandLoadCCond(MachineBasicBlock &MBB, Iter I); 77 void expandStoreCCond(MachineBasicBlock &MBB, Iter I); 78 void expandLoadACC(MachineBasicBlock &MBB, Iter I, unsigned RegSize); 79 void expandStoreACC(MachineBasicBlock &MBB, Iter I, unsigned MFHiOpc, 81 bool expandCopy(MachineBasicBlock &MBB, Iter I); 82 bool expandCopyACC(MachineBasicBlock &MBB, Iter I, unsigned MFHiOpc, 84 bool expandBuildPairF64(MachineBasicBlock &MBB, 86 bool expandExtractElementF64(MachineBasicBlock &MBB, 107 for (auto &MBB : MF) { in expand() local [all …]
|
/external/swiftshader/third_party/llvm-10.0/llvm/lib/Target/X86/ |
D | X86CondBrFolding.cpp | 116 void optimizeCondBr(MachineBasicBlock &MBB, 118 void replaceBrDest(MachineBasicBlock *MBB, MachineBasicBlock *OrigDest, 120 void fixupModifiedCond(MachineBasicBlock *MBB); 121 std::unique_ptr<TargetMBBInfo> analyzeMBB(MachineBasicBlock &MBB); 124 bool findPath(MachineBasicBlock *MBB, 126 TargetMBBInfo *getMBBInfo(MachineBasicBlock *MBB) const { in getMBBInfo() 127 return MBBInfos[MBB->getNumber()].get(); in getMBBInfo() 138 MachineBasicBlock *MBB, SmallVectorImpl<MachineBasicBlock *> &BranchPath) { in findPath() argument 139 TargetMBBInfo *MBBInfo = getMBBInfo(MBB); in findPath() 143 MachineBasicBlock *PredMBB = *MBB->pred_begin(); in findPath() [all …]
|
D | X86ExpandPseudo.cpp | 62 void ExpandICallBranchFunnel(MachineBasicBlock *MBB, 65 bool ExpandMI(MachineBasicBlock &MBB, MachineBasicBlock::iterator MBBI); 66 bool ExpandMBB(MachineBasicBlock &MBB); 76 MachineBasicBlock *MBB, MachineBasicBlock::iterator MBBI) { in INITIALIZE_PASS() 77 MachineBasicBlock *JTMBB = MBB; in INITIALIZE_PASS() 79 MachineFunction *MF = MBB->getParent(); in INITIALIZE_PASS() 80 const BasicBlock *BB = MBB->getBasicBlock(); in INITIALIZE_PASS() 81 auto InsPt = MachineFunction::iterator(MBB); in INITIALIZE_PASS() 91 MBB->addLiveIn(Selector.getReg()); in INITIALIZE_PASS() 92 BuildMI(*MBB, MBBI, DL, TII->get(X86::LEA64r), X86::R11) in INITIALIZE_PASS() [all …]
|
D | X86VZeroUpper.cpp | 60 void processBasicBlock(MachineBasicBlock &MBB); 62 MachineBasicBlock &MBB); 63 void addDirtySuccessor(MachineBasicBlock &MBB); 179 MachineBasicBlock &MBB) { in insertVZeroUpper() argument 181 BuildMI(MBB, I, dl, TII->get(X86::VZEROUPPER)); in insertVZeroUpper() 187 void VZeroUpperInserter::addDirtySuccessor(MachineBasicBlock &MBB) { in addDirtySuccessor() argument 188 if (!BlockStates[MBB.getNumber()].AddedToDirtySuccessors) { in addDirtySuccessor() 189 DirtySuccessors.push_back(&MBB); in addDirtySuccessor() 190 BlockStates[MBB.getNumber()].AddedToDirtySuccessors = true; in addDirtySuccessor() 196 void VZeroUpperInserter::processBasicBlock(MachineBasicBlock &MBB) { in processBasicBlock() argument [all …]
|
/external/llvm/lib/Target/Mips/ |
D | MipsSEFrameLowering.cpp | 57 bool expandInstr(MachineBasicBlock &MBB, Iter I); 58 void expandLoadCCond(MachineBasicBlock &MBB, Iter I); 59 void expandStoreCCond(MachineBasicBlock &MBB, Iter I); 60 void expandLoadACC(MachineBasicBlock &MBB, Iter I, unsigned RegSize); 61 void expandStoreACC(MachineBasicBlock &MBB, Iter I, unsigned MFHiOpc, 63 bool expandCopy(MachineBasicBlock &MBB, Iter I); 64 bool expandCopyACC(MachineBasicBlock &MBB, Iter I, unsigned MFHiOpc, 66 bool expandBuildPairF64(MachineBasicBlock &MBB, 68 bool expandExtractElementF64(MachineBasicBlock &MBB, 88 for (auto &MBB : MF) { in expand() local [all …]
|
/external/swiftshader/third_party/llvm-10.0/llvm/lib/Target/AVR/ |
D | AVRExpandPseudoInsts.cpp | 60 bool expandMBB(Block &MBB); 61 bool expandMI(Block &MBB, BlockIt MBBI); 62 template <unsigned OP> bool expand(Block &MBB, BlockIt MBBI); 64 MachineInstrBuilder buildMI(Block &MBB, BlockIt MBBI, unsigned Opcode) { in buildMI() argument 65 return BuildMI(MBB, MBBI, MBBI->getDebugLoc(), TII->get(Opcode)); in buildMI() 68 MachineInstrBuilder buildMI(Block &MBB, BlockIt MBBI, unsigned Opcode, in buildMI() argument 70 return BuildMI(MBB, MBBI, MBBI->getDebugLoc(), TII->get(Opcode), DstReg); in buildMI() 73 MachineRegisterInfo &getRegInfo(Block &MBB) { return MBB.getParent()->getRegInfo(); } in getRegInfo() argument 75 bool expandArith(unsigned OpLo, unsigned OpHi, Block &MBB, BlockIt MBBI); 76 bool expandLogic(unsigned Op, Block &MBB, BlockIt MBBI); [all …]
|
/external/llvm/lib/Target/ARM/ |
D | Thumb1FrameLowering.cpp | 41 static void emitSPUpdate(MachineBasicBlock &MBB, in emitSPUpdate() argument 46 emitThumbRegPlusImmediate(MBB, MBBI, dl, ARM::SP, ARM::SP, NumBytes, TII, in emitSPUpdate() 52 eliminateCallFramePseudoInstr(MachineFunction &MF, MachineBasicBlock &MBB, in eliminateCallFramePseudoInstr() argument 75 emitSPUpdate(MBB, I, TII, dl, *RegInfo, -Amount); in eliminateCallFramePseudoInstr() 78 emitSPUpdate(MBB, I, TII, dl, *RegInfo, Amount); in eliminateCallFramePseudoInstr() 82 return MBB.erase(I); in eliminateCallFramePseudoInstr() 86 MachineBasicBlock &MBB) const { in emitPrologue() 87 MachineBasicBlock::iterator MBBI = MBB.begin(); in emitPrologue() 121 emitSPUpdate(MBB, MBBI, TII, dl, *RegInfo, -ArgRegsSaveSize, in emitPrologue() 126 BuildMI(MBB, MBBI, dl, TII.get(TargetOpcode::CFI_INSTRUCTION)) in emitPrologue() [all …]
|
/external/llvm/lib/Target/X86/ |
D | X86PadShortFunction.cpp | 68 void findReturns(MachineBasicBlock *MBB, 71 bool cyclesUntilReturn(MachineBasicBlock *MBB, 74 void addPadding(MachineBasicBlock *MBB, 121 MachineBasicBlock *MBB; in runOnMachineFunction() local 127 MBB = I->first; in runOnMachineFunction() 133 assert(MBB->size() > 0 && in runOnMachineFunction() 135 MachineBasicBlock::iterator ReturnLoc = --MBB->end(); in runOnMachineFunction() 142 addPadding(MBB, ReturnLoc, Threshold - Cycles); in runOnMachineFunction() 153 void PadShortFunc::findReturns(MachineBasicBlock *MBB, unsigned int Cycles) { in findReturns() argument 155 bool hasReturn = cyclesUntilReturn(MBB, Cycles); in findReturns() [all …]
|
D | X86VZeroUpper.cpp | 49 void processBasicBlock(MachineBasicBlock &MBB); 51 MachineBasicBlock &MBB); 52 void addDirtySuccessor(MachineBasicBlock &MBB); 160 MachineBasicBlock &MBB) { in insertVZeroUpper() argument 162 BuildMI(MBB, I, dl, TII->get(X86::VZEROUPPER)); in insertVZeroUpper() 168 void VZeroUpperInserter::addDirtySuccessor(MachineBasicBlock &MBB) { in addDirtySuccessor() argument 169 if (!BlockStates[MBB.getNumber()].AddedToDirtySuccessors) { in addDirtySuccessor() 170 DirtySuccessors.push_back(&MBB); in addDirtySuccessor() 171 BlockStates[MBB.getNumber()].AddedToDirtySuccessors = true; in addDirtySuccessor() 177 void VZeroUpperInserter::processBasicBlock(MachineBasicBlock &MBB) { in processBasicBlock() argument [all …]
|
/external/swiftshader/third_party/llvm-10.0/llvm/lib/Target/VE/ |
D | VEFrameLowering.cpp | 35 MachineBasicBlock &MBB, in emitPrologueInsns() argument 51 BuildMI(MBB, MBBI, dl, TII.get(VE::STSri)) in emitPrologueInsns() 55 BuildMI(MBB, MBBI, dl, TII.get(VE::STSri)) in emitPrologueInsns() 59 BuildMI(MBB, MBBI, dl, TII.get(VE::STSri)) in emitPrologueInsns() 63 BuildMI(MBB, MBBI, dl, TII.get(VE::STSri)) in emitPrologueInsns() 67 BuildMI(MBB, MBBI, dl, TII.get(VE::ORri), VE::SX9) in emitPrologueInsns() 73 MachineBasicBlock &MBB, in emitEpilogueInsns() argument 89 BuildMI(MBB, MBBI, dl, TII.get(VE::ORri), VE::SX11) in emitEpilogueInsns() 92 BuildMI(MBB, MBBI, dl, TII.get(VE::LDSri), VE::SX16) in emitEpilogueInsns() 95 BuildMI(MBB, MBBI, dl, TII.get(VE::LDSri), VE::SX15) in emitEpilogueInsns() [all …]
|