/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 …]
|
/external/llvm-project/llvm/lib/CodeGen/ |
D | BranchRelaxation.cpp | 67 unsigned postOffset(const MachineBasicBlock &MBB) const { in postOffset() 69 const Align Alignment = MBB.getAlignment(); in postOffset() 70 const Align ParentAlign = MBB.getParent()->getAlignment(); in postOffset() 100 uint64_t computeBlockSize(const MachineBasicBlock &MBB) const; 127 for (MachineBasicBlock &MBB : *MF) { in INITIALIZE_PASS() 128 const unsigned Num = MBB.getNumber(); in INITIALIZE_PASS() 129 assert(!Num || BlockInfo[PrevNum].postOffset(MBB) <= BlockInfo[Num].Offset); in INITIALIZE_PASS() 130 assert(BlockInfo[Num].Size == computeBlockSize(MBB)); in INITIALIZE_PASS() 139 for (auto &MBB : *MF) { in dumpBBs() 140 const BasicBlockInfo &BBI = BlockInfo[MBB.getNumber()]; in dumpBBs() [all …]
|
D | BranchFolding.cpp | 154 void BranchFolder::RemoveDeadBlock(MachineBasicBlock *MBB) { in RemoveDeadBlock() argument 155 assert(MBB->pred_empty() && "MBB must be dead!"); in RemoveDeadBlock() 156 LLVM_DEBUG(dbgs() << "\nRemoving MBB: " << *MBB); in RemoveDeadBlock() 158 MachineFunction *MF = MBB->getParent(); in RemoveDeadBlock() 160 while (!MBB->succ_empty()) in RemoveDeadBlock() 161 MBB->removeSuccessor(MBB->succ_end()-1); in RemoveDeadBlock() 164 TriedMerging.erase(MBB); in RemoveDeadBlock() 167 std::for_each(MBB->begin(), MBB->end(), [MF](const MachineInstr &MI) { in RemoveDeadBlock() 172 MF->erase(MBB); in RemoveDeadBlock() 173 EHScopeMembership.erase(MBB); in RemoveDeadBlock() [all …]
|
/external/llvm-project/llvm/lib/Target/RISCV/ |
D | RISCVExpandPseudoInsts.cpp | 43 bool expandMBB(MachineBasicBlock &MBB); 44 bool expandMI(MachineBasicBlock &MBB, MachineBasicBlock::iterator MBBI, 46 bool expandAuipcInstPair(MachineBasicBlock &MBB, 50 bool expandLoadLocalAddress(MachineBasicBlock &MBB, 53 bool expandLoadAddress(MachineBasicBlock &MBB, 56 bool expandLoadTLSIEAddress(MachineBasicBlock &MBB, 59 bool expandLoadTLSGDAddress(MachineBasicBlock &MBB, 62 bool expandVSetVL(MachineBasicBlock &MBB, MachineBasicBlock::iterator MBBI); 70 for (auto &MBB : MF) in runOnMachineFunction() local 71 Modified |= expandMBB(MBB); in runOnMachineFunction() [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/llvm-project/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/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 …]
|
/external/llvm-project/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 …]
|
/external/llvm-project/llvm/lib/Target/WebAssembly/ |
D | WebAssemblyLateEHPrepare.cpp | 73 MachineBasicBlock *MBB = WL.pop_back_val(); in getMatchingEHPad() local 74 if (Visited.count(MBB)) in getMatchingEHPad() 76 Visited.insert(MBB); in getMatchingEHPad() 77 if (MBB->isEHPad()) { in getMatchingEHPad() 78 if (EHPad && EHPad != MBB) in getMatchingEHPad() 80 EHPad = MBB; in getMatchingEHPad() 83 if (MBB == &MF->front()) in getMatchingEHPad() 85 for (auto *Pred : MBB->predecessors()) in getMatchingEHPad() 98 MachineBasicBlock *MBB = WL.pop_back_val(); in eraseDeadBBsAndChildren() local 99 if (!MBB->pred_empty()) in eraseDeadBBsAndChildren() [all …]
|
D | WebAssemblyCFGSort.cpp | 80 static void maybeUpdateTerminator(MachineBasicBlock *MBB) { in maybeUpdateTerminator() argument 85 for (const MachineInstr &Term : MBB->terminators()) { in maybeUpdateTerminator() 95 MachineFunction *MF = MBB->getParent(); in maybeUpdateTerminator() 97 unsigned(MBB->getNumber() + 1) < MF->getNumBlockIDs() in maybeUpdateTerminator() 98 ? MF->getBlockNumbered(MBB->getNumber() + 1) in maybeUpdateTerminator() 102 MBB->updateTerminator(OriginalSuccessor); in maybeUpdateTerminator() 196 for (MachineBasicBlock &MBB : MF) { in sortBlocks() 197 unsigned N = MBB.pred_size(); in sortBlocks() 198 if (MachineLoop *L = MLI.getLoopFor(&MBB)) in sortBlocks() 199 if (L->getHeader() == &MBB) in sortBlocks() [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 …]
|
/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 …]
|
/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 …]
|
/external/llvm-project/llvm/lib/Target/X86/ |
D | X86IndirectBranchTracking.cpp | 61 bool addENDBR(MachineBasicBlock &MBB, MachineBasicBlock::iterator I) const; 73 MachineBasicBlock &MBB, MachineBasicBlock::iterator I) const { in addENDBR() argument 80 if (I == MBB.end() || I->getOpcode() != EndbrOpcode) { in addENDBR() 81 BuildMI(MBB, I, MBB.findDebugLoc(I), TII->get(EndbrOpcode)); in addENDBR() 129 auto MBB = MF.begin(); in runOnMachineFunction() local 130 Changed |= addENDBR(*MBB, MBB->begin()); in runOnMachineFunction() 133 for (auto &MBB : MF) { in runOnMachineFunction() local 136 if (MBB.hasAddressTaken()) in runOnMachineFunction() 137 Changed |= addENDBR(MBB, MBB.begin()); in runOnMachineFunction() 139 for (MachineBasicBlock::iterator I = MBB.begin(); I != MBB.end(); ++I) { in runOnMachineFunction() [all …]
|
/external/llvm-project/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/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/llvm-project/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/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 …]
|