| /freebsd/contrib/llvm-project/llvm/lib/CodeGen/ |
| H A D | InterferenceCache.cpp | 154 BlockInterference *BI = &Blocks[MBBNum]; in update() local 158 BI->Tag = Tag; in update() 159 BI->First = BI->Last = SlotIndex(); in update() 169 if (!BI->First.isValid() || StartI < BI->First) in update() 170 BI->First = StartI; in update() 182 if (!BI->First.isValid() || StartI < BI->First) in update() 183 BI->First = StartI; in update() 189 SlotIndex Limit = BI->First.isValid() ? BI->First : Stop; in update() 194 BI->First = RegMaskSlots[i]; in update() 199 if (BI->First.isValid()) in update() [all …]
|
| H A D | SplitKit.cpp | 216 BlockInfo BI; in calcLiveBlockInfo() local 217 BI.MBB = &*MFI; in calcLiveBlockInfo() 219 std::tie(Start, Stop) = LIS.getSlotIndexes()->getMBBRange(BI.MBB); in calcLiveBlockInfo() 226 ThroughBlocks.set(BI.MBB->getNumber()); in calcLiveBlockInfo() 232 BI.FirstInstr = *UseI; in calcLiveBlockInfo() 233 assert(BI.FirstInstr >= Start); in calcLiveBlockInfo() 236 BI.LastInstr = UseI[-1]; in calcLiveBlockInfo() 237 assert(BI.LastInstr < Stop); in calcLiveBlockInfo() 240 BI.LiveIn = LVI->start <= Start; in calcLiveBlockInfo() 243 if (!BI.LiveIn) { in calcLiveBlockInfo() [all …]
|
| /freebsd/contrib/llvm-project/llvm/lib/Target/AVR/ |
| H A D | AVRShiftExpand.cpp | 36 void expand(BinaryOperator *BI); 78 void AVRShiftExpand::expand(BinaryOperator *BI) { in expand() argument 79 auto &Ctx = BI->getContext(); in expand() 80 IRBuilder<> Builder(BI); in expand() 81 Type *InputTy = cast<Instruction>(BI)->getType(); in expand() 87 BasicBlock *BB = BI->getParent(); in expand() 89 BasicBlock *EndBB = BB->splitBasicBlock(BI, "shift.done"); in expand() 95 Value *ShiftAmount = Builder.CreateTrunc(BI->getOperand(1), Int8Ty); in expand() 108 ValuePHI->addIncoming(BI->getOperand(0), BB); in expand() 120 switch (BI->getOpcode()) { in expand() [all …]
|
| /freebsd/contrib/llvm-project/llvm/include/llvm/IR/ |
| H A D | InstIterator.h | 39 BI_t BI; // BasicBlock::iterator variable 54 : BBs(II.BBs), BB(II.BB), BI(II.BI) {} in InstIterator() 58 : BBs(II.BBs), BB(II.BB), BI(II.BI) {} in InstIterator() 63 BI = BB->begin(); in InstIterator() 74 inline BIty &getInstructionIterator() { return BI; } in getInstructionIterator() 76 inline reference operator*() const { return *BI; } 80 return BB == y.BB && (BB == BBs->end() || BI == y.BI); 87 ++BI; 96 while (BB == BBs->end() || BI == BB->begin()) { 98 BI = BB->end(); [all …]
|
| /freebsd/contrib/llvm-project/llvm/lib/Transforms/Scalar/ |
| H A D | LowerConstantIntrinsics.cpp | 67 BranchInst *BI = dyn_cast_or_null<BranchInst>(VH); in replaceConditionalBranchesOnConstant() local 68 if (!BI) in replaceConditionalBranchesOnConstant() 70 if (BI->isUnconditional()) in replaceConditionalBranchesOnConstant() 74 if (match(BI->getOperand(0), m_Zero())) { in replaceConditionalBranchesOnConstant() 75 Target = BI->getSuccessor(1); in replaceConditionalBranchesOnConstant() 76 Other = BI->getSuccessor(0); in replaceConditionalBranchesOnConstant() 77 } else if (match(BI->getOperand(0), m_One())) { in replaceConditionalBranchesOnConstant() 78 Target = BI->getSuccessor(0); in replaceConditionalBranchesOnConstant() 79 Other = BI->getSuccessor(1); in replaceConditionalBranchesOnConstant() 85 BasicBlock *Source = BI->getParent(); in replaceConditionalBranchesOnConstant() [all …]
|
| H A D | LowerExpectIntrinsic.cpp | 198 BranchInst *BI = dyn_cast<BranchInst>(BB->getTerminator()); in handlePhiDef() local 199 if (BI && BI->isConditional()) in handlePhiDef() 200 return BI; in handlePhiDef() 204 BI = dyn_cast<BranchInst>(BB->getTerminator()); in handlePhiDef() 205 if (!BI || BI->isUnconditional()) in handlePhiDef() 207 return BI; in handlePhiDef() 229 BranchInst *BI = GetDomConditional(i); in handlePhiDef() local 230 if (!BI) in handlePhiDef() 249 if (OpndIncomingBB == BI->getParent() && Succ == PhiDef->getParent()) in handlePhiDef() 262 if (IsOpndComingFromSuccessor(BI->getSuccessor(1))) in handlePhiDef() [all …]
|
| H A D | LoopBoundSplit.cpp | 31 BranchInst *BI = nullptr; member 160 const BranchInst *BI) { in isProcessableCondBI() argument 164 if (!match(BI, m_Br(m_ICmp(m_Value(LHS), m_Value(RHS)), in isProcessableCondBI() 218 Cond.BI = ExitingBI; in canSplitLoopBound() 222 static bool isProfitableToTransform(const Loop &L, const BranchInst *BI) { in isProfitableToTransform() argument 229 BasicBlock *Succ0 = BI->getSuccessor(0); in isProfitableToTransform() 230 BasicBlock *Succ1 = BI->getSuccessor(1); in isProfitableToTransform() 250 auto *BI = dyn_cast<BranchInst>(BB->getTerminator()); in findSplitCandidate() local 251 if (!BI) in findSplitCandidate() 255 if (!isProcessableCondBI(SE, BI)) in findSplitCandidate() [all …]
|
| H A D | IndVarSimplify.cpp | 463 if (auto *BI = dyn_cast<BranchInst>(TermInst)) { in rewriteFirstIterationLoopExitValues() local 466 Cond = BI->getCondition(); in rewriteFirstIterationLoopExitValues() 698 BranchInst *BI = cast<BranchInst>(ExitingBB->getTerminator()); in isLoopExitTestBasedOn() local 699 ICmpInst *ICmp = dyn_cast<ICmpInst>(BI->getCondition()); in isLoopExitTestBasedOn() 717 BranchInst *BI = cast<BranchInst>(ExitingBB->getTerminator()); in needsLFTR() local 718 if (L->isLoopInvariant(BI->getCondition())) in needsLFTR() 722 ICmpInst *Cond = dyn_cast<ICmpInst>(BI->getCondition()); in needsLFTR() 999 BranchInst *BI = cast<BranchInst>(ExitingBB->getTerminator()); in linearFunctionTestReplace() local 1001 if (L->contains(BI->getSuccessor(0))) in linearFunctionTestReplace() 1006 IRBuilder<> Builder(BI); in linearFunctionTestReplace() [all …]
|
| H A D | LoopPredication.cpp | 758 BranchInst *BI, SCEVExpander &Expander) { in widenWidenableBranchGuardConditions() argument 759 assert(isGuardAsWidenableBranch(BI) && "Must be!"); in widenWidenableBranchGuardConditions() 761 LLVM_DEBUG(BI->dump()); in widenWidenableBranchGuardConditions() 766 parseWidenableGuard(BI, Checks); in widenWidenableBranchGuardConditions() 769 auto WC = extractWidenableCondition(BI); in widenWidenableBranchGuardConditions() 771 widenChecks(Checks, WidenedChecks, Expander, BI); in widenWidenableBranchGuardConditions() 778 IRBuilder<> Builder(findInsertPt(BI, Checks)); in widenWidenableBranchGuardConditions() 780 auto *OldCond = BI->getCondition(); in widenWidenableBranchGuardConditions() 781 BI->setCondition(AllChecks); in widenWidenableBranchGuardConditions() 783 BasicBlock *IfTrueBB = BI->getSuccessor(0); in widenWidenableBranchGuardConditions() [all …]
|
| H A D | SimpleLoopUnswitch.cpp | 515 static bool unswitchTrivialBranch(Loop &L, BranchInst &BI, DominatorTree &DT, in unswitchTrivialBranch() argument 518 assert(BI.isConditional() && "Can only unswitch a conditional branch!"); in unswitchTrivialBranch() 519 LLVM_DEBUG(dbgs() << " Trying to unswitch branch: " << BI << "\n"); in unswitchTrivialBranch() 528 Value *Cond = skipTrivialSelect(BI.getCondition()); in unswitchTrivialBranch() 544 auto *LoopExitBB = BI.getSuccessor(0); in unswitchTrivialBranch() 548 LoopExitBB = BI.getSuccessor(1); in unswitchTrivialBranch() 554 auto *ContinueBB = BI.getSuccessor(1 - LoopExitSuccIdx); in unswitchTrivialBranch() 555 auto *ParentBB = BI.getParent(); in unswitchTrivialBranch() 576 dbgs() << " unswitching trivial invariant conditions for: " << BI in unswitchTrivialBranch() 613 assert(LoopExitBB->getUniquePredecessor() == BI.getParent() && in unswitchTrivialBranch() [all …]
|
| H A D | LoopTermFold.cpp | 70 BranchInst *BI = dyn_cast<BranchInst>(LoopLatch->getTerminator()); in canFoldTermCondOfLoop() local 71 if (!BI || BI->isUnconditional()) in canFoldTermCondOfLoop() 73 auto *TermCond = dyn_cast<ICmpInst>(BI->getCondition()); in canFoldTermCondOfLoop() 221 << " BrandInst: " << *BI << "\n" in canFoldTermCondOfLoop() 279 BranchInst *BI = cast<BranchInst>(LoopLatch->getTerminator()); in RunTermFold() local 280 ICmpInst *OldTermCond = cast<ICmpInst>(BI->getCondition()); in RunTermFold() 286 if (BI->getSuccessor(0) == L->getHeader()) in RunTermFold() 287 BI->swapSuccessors(); in RunTermFold() 294 BI->setCondition(NewTermCond); in RunTermFold()
|
| /freebsd/contrib/llvm-project/llvm/lib/ExecutionEngine/Orc/ |
| H A D | LinkGraphLinkingLayer.cpp | 339 auto &BI = BlockInfos[B]; in registerDependencies() local 345 BI.SymbolDeps.insert(&E.getTarget()); in registerDependencies() 363 BI.SymbolDeps.insert(*TgtBI.Defs.begin()); in registerDependencies() 369 BI.AnonEdges.insert(&E.getTarget().getBlock()); in registerDependencies() 377 for (auto &[B, BI] : BlockInfos) { in registerDependencies() 379 if (!BI.Defs.empty()) in registerDependencies() 384 for (auto *FB : BI.AnonEdges) in registerDependencies() 387 for (auto *BB : BI.AnonBackEdges) in registerDependencies() 390 for (auto *FB : BI.AnonEdges) { in registerDependencies() 392 FBI.AnonBackEdges.insert_range(BI.AnonBackEdges); in registerDependencies() [all …]
|
| /freebsd/contrib/llvm-project/llvm/utils/TableGen/ |
| H A D | CodeEmitterGen.cpp | 58 int getVariableBit(const std::string &VarName, const BitsInit *BI, int Bit); 66 bool addCodeToMergeInOperand(const Record *R, const BitsInit *BI, 84 const BitsInit *BI, int Bit) { in getVariableBit() argument 85 if (const VarBitInit *VBI = dyn_cast<VarBitInit>(BI->getBit(Bit))) { in getVariableBit() 89 } else if (const VarInit *VI = dyn_cast<VarInit>(BI->getBit(Bit))) { in getVariableBit() 99 const BitsInit *BI, in addCodeToMergeInOperand() argument 107 int Bit = BI->getNumBits() - 1; in addCodeToMergeInOperand() 111 if (getVariableBit(VarName, BI, Bit) != -1) in addCodeToMergeInOperand() 180 int VarBit = getVariableBit(VarName, BI, TmpBit); in addCodeToMergeInOperand() 193 VarBit = getVariableBit(VarName, BI, TmpBit); in addCodeToMergeInOperand() [all …]
|
| /freebsd/contrib/llvm-project/llvm/lib/Transforms/Utils/ |
| H A D | FlattenCFG.cpp | 188 for (BasicBlock::iterator BI = Pred->begin(), BE = PBI->getIterator(); in FlattenParallelAndOr() local 189 BI != BE;) { in FlattenParallelAndOr() 190 Instruction *CI = &*BI++; in FlattenParallelAndOr() 252 auto *BI = cast<BranchInst>(CurrBlock->getTerminator()); in FlattenParallelAndOr() local 253 auto *CI = dyn_cast<CmpInst>(BI->getCondition()); in FlattenParallelAndOr() 261 BI->swapSuccessors(); in FlattenParallelAndOr() 357 for (BasicBlock::iterator BI(PBI2), BE(PTI2); BI != BE; ++BI) { in CompareIfRegionBlock() local 358 if (BI->mayReadFromMemory() || BI->mayWriteToMemory()) { in CompareIfRegionBlock() 360 if (!AA || AA->getModRefInfo(&*iter1, &*BI) != ModRefInfo::NoModRef) in CompareIfRegionBlock() 478 for (BasicBlock::iterator BI(PBI2), BE(PTI2); BI != BE; ++BI) { in MergeIfRegion() local [all …]
|
| H A D | SimplifyCFG.cpp | 287 bool simplifyUncondBranch(BranchInst *BI, IRBuilder<> &Builder); 288 bool simplifyCondBranch(BranchInst *BI, IRBuilder<> &Builder); 297 bool speculativelyExecuteBB(BranchInst *BI, BasicBlock *ThenBB); 301 bool simplifyBranchOnICmpChain(BranchInst *BI, IRBuilder<> &Builder, 456 BranchInst *BI = dyn_cast<BranchInst>(PBB->getTerminator()); in dominatesMergePoint() local 457 if (!BI || BI->isConditional() || BI->getSuccessor(0) != BB) in dominatesMergePoint() 786 } else if (BranchInst *BI = dyn_cast<BranchInst>(TI)) { in eraseTerminatorAndDCECond() local 787 if (BI->isConditional()) in eraseTerminatorAndDCECond() 788 Cond = dyn_cast<Instruction>(BI->getCondition()); in eraseTerminatorAndDCECond() 807 } else if (BranchInst *BI = dyn_cast<BranchInst>(TI)) in isValueEqualityComparison() local [all …]
|
| H A D | LoopRotationUtils.cpp | 215 BranchInst *BI = dyn_cast<BranchInst>(Header->getTerminator()); in profitableToRotateLoopExitingLatch() local 216 assert(BI && BI->isConditional() && "need header with conditional exit"); in profitableToRotateLoopExitingLatch() 217 BasicBlock *HeaderExit = BI->getSuccessor(0); in profitableToRotateLoopExitingLatch() 219 HeaderExit = BI->getSuccessor(1); in profitableToRotateLoopExitingLatch() 241 BranchInst *BI = dyn_cast<BranchInst>(Latch->getTerminator()); in canRotateDeoptimizingLatchExit() local 243 if (!BI || !BI->isConditional()) in canRotateDeoptimizingLatchExit() 246 BasicBlock *Exit = BI->getSuccessor(1); in canRotateDeoptimizingLatchExit() 248 Exit = BI->getSuccessor(0); in canRotateDeoptimizingLatchExit() 426 BranchInst *BI = dyn_cast<BranchInst>(OrigHeader->getTerminator()); in rotateLoop() local 427 if (!BI || BI->isUnconditional()) in rotateLoop() [all …]
|
| /freebsd/contrib/llvm-project/llvm/utils/TableGen/Common/ |
| H A D | InfoByHwMode.h | 46 auto BI = B.begin(); in union_modes() local 54 if (BI != B.end() && BI->first == DefaultMode) { in union_modes() 56 ++BI; in union_modes() 61 if (BI == B.end()) { in union_modes() 67 if (BI->first < AI->first) { in union_modes() 68 Modes.push_back(BI->first); in union_modes() 69 ++BI; in union_modes() 72 if (AI->first == BI->first) in union_modes() 73 ++BI; in union_modes() 79 for (; BI != B.end(); ++BI) in union_modes() [all …]
|
| /freebsd/contrib/llvm-project/llvm/lib/Target/SPIRV/ |
| H A D | SPIRVMergeRegionExitTargets.cpp | 47 if (auto *BI = dyn_cast<BranchInst>(T)) { in gatherSuccessors() local 48 output.insert(BI->getSuccessor(0)); in gatherSuccessors() 49 if (BI->isConditional()) in gatherSuccessors() 50 output.insert(BI->getSuccessor(1)); in gatherSuccessors() 77 if (auto *BI = dyn_cast<BranchInst>(T)) { in createExitVariable() local 79 BasicBlock *LHSTarget = BI->getSuccessor(0); in createExitVariable() 81 BI->isConditional() ? BI->getSuccessor(1) : nullptr; in createExitVariable() 88 return Builder.CreateSelect(BI->getCondition(), LHS, RHS); in createExitVariable() 103 if (auto *BI = dyn_cast<BranchInst>(T)) { in replaceBranchTargets() local 104 for (size_t i = 0; i < BI->getNumSuccessors(); i++) { in replaceBranchTargets() [all …]
|
| /freebsd/contrib/llvm-project/llvm/lib/Target/PowerPC/ |
| H A D | PPCCTRLoopsVerify.cpp | 95 MachineBasicBlock::iterator BI = I; in verifyCTRBranch() local 119 if (I != BI && clobbersCTR(*I)) { in verifyCTRBranch() 123 << printMBBReference(*BI->getParent()) << " (" in verifyCTRBranch() 124 << BI->getParent()->getFullName() << ") instruction " in verifyCTRBranch() 125 << *BI << "\n"); in verifyCTRBranch() 140 << printMBBReference(*BI->getParent()) << " (" in verifyCTRBranch() 141 << BI->getParent()->getFullName() << ") instruction " in verifyCTRBranch() 142 << *BI << "\n"); in verifyCTRBranch()
|
| /freebsd/contrib/llvm-project/llvm/lib/Analysis/ |
| H A D | DomConditionCache.cpp | 19 void DomConditionCache::registerBranch(BranchInst *BI) { in registerBranch() argument 20 assert(BI->isConditional() && "Must be conditional branch"); in registerBranch() 22 findAffectedValues(BI->getCondition(), Affected); in registerBranch() 25 if (!is_contained(AV, BI)) in registerBranch() 26 AV.push_back(BI); in registerBranch()
|
| H A D | GuardUtils.cpp | 72 auto *BI = dyn_cast<BranchInst>(U); in parseWidenableBranch() 73 if (!BI || !BI->isConditional()) in parseWidenableBranch() 75 auto *Cond = BI->getCondition(); in parseWidenableBranch() 79 IfTrueBB = BI->getSuccessor(0); in parseWidenableBranch() 80 IfFalseBB = BI->getSuccessor(1); in parseWidenableBranch() 83 WC = &BI->getOperandUse(0); in parseWidenableBranch() 152 auto *BI = dyn_cast<BranchInst>(U); 153 if (!BI || !BI 70 auto *BI = dyn_cast<BranchInst>(U); parseWidenableBranch() local [all...] |
| /freebsd/contrib/llvm-project/clang/include/clang/Basic/ |
| H A D | TargetBuiltins.h | 54 #define BUILTIN(ID, TYPE, ATTRS) BI##ID, 69 #define TARGET_BUILTIN(ID, TYPE, ATTRS, FEATURE) BI##ID, 96 #define BUILTIN(ID, TYPE, ATTRS) BI##ID, 117 #define BUILTIN(ID, TYPE, ATTRS) BI##ID, 138 #define BUILTIN(ID, TYPE, ATTRS) BI##ID, 196 #define BUILTIN(ID, TYPE, ATTRS) BI##ID, 235 #define TARGET_BUILTIN(ID, TYPE, ATTRS, FEATURE) BI##ID, 239 #define TARGET_BUILTIN(ID, TYPE, ATTRS, FEATURE) BI##ID, 243 #define TARGET_BUILTIN(ID, TYPE, ATTRS, FEATURE) BI##ID, 436 #define BUILTIN(ID, TYPE, ATTRS) BI##ID, [all …]
|
| /freebsd/contrib/llvm-project/llvm/lib/Target/AMDGPU/ |
| H A D | R600Packetizer.cpp | 69 MachineBasicBlock::instr_iterator BI = I.getInstrIterator(); in getPreviousVector() local 71 BI++; in getPreviousVector() 75 int BISlot = getSlot(*BI); in getPreviousVector() 79 if (TII->isPredicated(*BI)) in getPreviousVector() 81 int OperandIdx = TII->getOperandIdx(BI->getOpcode(), R600::OpName::write); in getPreviousVector() 82 if (OperandIdx > -1 && BI->getOperand(OperandIdx).getImm() == 0) in getPreviousVector() 84 int DstIdx = TII->getOperandIdx(BI->getOpcode(), R600::OpName::dst); in getPreviousVector() 88 Register Dst = BI->getOperand(DstIdx).getReg(); in getPreviousVector() 89 if (isTrans || TII->isTransOnly(*BI)) { in getPreviousVector() 93 if (BI->getOpcode() == R600::DOT4_r600 || in getPreviousVector() [all …]
|
| /freebsd/contrib/llvm-project/llvm/lib/Target/NVPTX/ |
| H A D | NVPTXImageOptimizer.cpp | 150 if (BranchInst *BI = dyn_cast<BranchInst>(U)) { in replaceWith() local 151 if (BI->isUnconditional()) continue; in replaceWith() 155 Dest = BI->getSuccessor(1); in replaceWith() 158 Dest = BI->getSuccessor(0); in replaceWith() 159 BranchInst::Create(Dest, BI->getIterator()); in replaceWith() 160 InstrToDelete.push_back(BI); in replaceWith()
|
| /freebsd/contrib/llvm-project/llvm/lib/Target/BPF/ |
| H A D | BPFAdjustOpt.cpp | 221 auto *BI = dyn_cast<BranchInst>(TI); in serializeICMPCrossBB() local 222 if (!BI || !BI->isConditional()) in serializeICMPCrossBB() 224 auto *Cond = dyn_cast<ICmpInst>(BI->getCondition()); in serializeICMPCrossBB() 231 BI = dyn_cast<BranchInst>(TI); in serializeICMPCrossBB() 232 if (!BI || !BI->isConditional()) in serializeICMPCrossBB() 234 Cond = dyn_cast<ICmpInst>(BI->getCondition()); in serializeICMPCrossBB() 259 PassThroughInfo Info(Cond, BI, 0); in serializeICMPCrossBB()
|