Home
last modified time | relevance | path

Searched refs:BI (Results 1 – 25 of 260) sorted by relevance

1234567891011

/freebsd/contrib/llvm-project/llvm/lib/CodeGen/
H A DInterferenceCache.cpp155 BlockInterference *BI = &Blocks[MBBNum]; in update() local
159 BI->Tag = Tag; in update()
160 BI->First = BI->Last = SlotIndex(); in update()
170 if (!BI->First.isValid() || StartI < BI->First) in update()
171 BI->First = StartI; in update()
183 if (!BI->First.isValid() || StartI < BI->First) in update()
184 BI->First = StartI; in update()
190 SlotIndex Limit = BI->First.isValid() ? BI->First : Stop; in update()
195 BI->First = RegMaskSlots[i]; in update()
200 if (BI->First.isValid()) in update()
[all …]
H A DSplitKit.cpp217 BlockInfo BI; in calcLiveBlockInfo() local
218 BI.MBB = &*MFI; in calcLiveBlockInfo()
220 std::tie(Start, Stop) = LIS.getSlotIndexes()->getMBBRange(BI.MBB); in calcLiveBlockInfo()
227 ThroughBlocks.set(BI.MBB->getNumber()); in calcLiveBlockInfo()
233 BI.FirstInstr = *UseI; in calcLiveBlockInfo()
234 assert(BI.FirstInstr >= Start); in calcLiveBlockInfo()
237 BI.LastInstr = UseI[-1]; in calcLiveBlockInfo()
238 assert(BI.LastInstr < Stop); in calcLiveBlockInfo()
241 BI.LiveIn = LVI->start <= Start; in calcLiveBlockInfo()
244 if (!BI.LiveIn) { in calcLiveBlockInfo()
[all …]
H A DInterleavedAccessPass.cpp274 if (auto *BI = dyn_cast<BinaryOperator>(User)) { in lowerInterleavedLoad() local
275 if (!BI->user_empty() && all_of(BI->users(), [](auto *U) { in lowerInterleavedLoad()
279 for (auto *SVI : BI->users()) in lowerInterleavedLoad()
362 BinaryOperator *BI = cast<BinaryOperator>(SVI->getOperand(0)); in replaceBinOpShuffles() local
363 Type *BIOp0Ty = BI->getOperand(0)->getType(); in replaceBinOpShuffles()
371 new ShuffleVectorInst(BI->getOperand(0), PoisonValue::get(BIOp0Ty), in replaceBinOpShuffles()
374 BI->getOperand(1), PoisonValue::get(BI->getOperand(1)->getType()), Mask, in replaceBinOpShuffles()
377 BI->getOpcode(), NewSVI1, NewSVI2, BI, BI->getName(), insertPos); in replaceBinOpShuffles()
379 LLVM_DEBUG(dbgs() << " Replaced: " << *BI << "\n And : " << *SVI in replaceBinOpShuffles()
/freebsd/contrib/llvm-project/clang/include/clang/Basic/
H A DTargetBuiltins.h29 #define BUILTIN(ID, TYPE, ATTRS) BI##ID,
30 #define TARGET_BUILTIN(ID, TYPE, ATTRS, FEATURE) BI##ID,
41 #define BUILTIN(ID, TYPE, ATTRS) BI##ID,
50 #define BUILTIN(ID, TYPE, ATTRS) BI##ID,
51 #define TARGET_BUILTIN(ID, TYPE, ATTRS, FEATURE) BI##ID,
60 #define BUILTIN(ID, TYPE, ATTRS) BI##ID,
61 #define TARGET_BUILTIN(ID, TYPE, ATTRS, FEATURE) BI##ID,
76 #define BUILTIN(ID, TYPE, ATTRS) BI##ID,
86 #define BUILTIN(ID, TYPE, ATTRS) BI##ID,
96 #define BUILTIN(ID, TYPE, ATTRS) BI##ID,
[all …]
/freebsd/contrib/llvm-project/llvm/lib/Target/AVR/
H A DAVRShiftExpand.cpp36 void expand(BinaryOperator *BI);
77 void AVRShiftExpand::expand(BinaryOperator *BI) { in expand() argument
78 auto &Ctx = BI->getContext(); in expand()
79 IRBuilder<> Builder(BI); in expand()
80 Type *InputTy = cast<Instruction>(BI)->getType(); in expand()
86 BasicBlock *BB = BI->getParent(); in expand()
88 BasicBlock *EndBB = BB->splitBasicBlock(BI, "shift.done"); in expand()
94 Value *ShiftAmount = Builder.CreateTrunc(BI->getOperand(1), Int8Ty); in expand()
107 ValuePHI->addIncoming(BI->getOperand(0), BB); in expand()
119 switch (BI->getOpcode()) { in expand()
[all …]
/freebsd/contrib/llvm-project/llvm/include/llvm/IR/
H A DInstIterator.h39 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 DLowerExpectIntrinsic.cpp198 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 DLowerConstantIntrinsics.cpp68 BranchInst *BI = dyn_cast_or_null<BranchInst>(VH); in replaceConditionalBranchesOnConstant() local
69 if (!BI) in replaceConditionalBranchesOnConstant()
71 if (BI->isUnconditional()) in replaceConditionalBranchesOnConstant()
75 if (match(BI->getOperand(0), m_Zero())) { in replaceConditionalBranchesOnConstant()
76 Target = BI->getSuccessor(1); in replaceConditionalBranchesOnConstant()
77 Other = BI->getSuccessor(0); in replaceConditionalBranchesOnConstant()
78 } else if (match(BI->getOperand(0), m_One())) { in replaceConditionalBranchesOnConstant()
79 Target = BI->getSuccessor(0); in replaceConditionalBranchesOnConstant()
80 Other = BI->getSuccessor(1); in replaceConditionalBranchesOnConstant()
86 BasicBlock *Source = BI->getParent(); in replaceConditionalBranchesOnConstant()
[all …]
H A DLoopBoundSplit.cpp31 BranchInst *BI = nullptr; member
160 const BranchInst *BI) { in isProcessableCondBI() argument
165 if (!match(BI, m_Br(m_ICmp(Pred, m_Value(LHS), m_Value(RHS)), in isProcessableCondBI()
219 Cond.BI = ExitingBI; in canSplitLoopBound()
223 static bool isProfitableToTransform(const Loop &L, const BranchInst *BI) { in isProfitableToTransform() argument
230 BasicBlock *Succ0 = BI->getSuccessor(0); in isProfitableToTransform()
231 BasicBlock *Succ1 = BI->getSuccessor(1); in isProfitableToTransform()
251 auto *BI = dyn_cast<BranchInst>(BB->getTerminator()); in findSplitCandidate() local
252 if (!BI) in findSplitCandidate()
256 if (!isProcessableCondBI(SE, BI)) in findSplitCandidate()
[all …]
H A DIndVarSimplify.cpp467 if (auto *BI = dyn_cast<BranchInst>(TermInst)) { in rewriteFirstIterationLoopExitValues() local
470 Cond = BI->getCondition(); in rewriteFirstIterationLoopExitValues()
703 BranchInst *BI = cast<BranchInst>(ExitingBB->getTerminator()); in isLoopExitTestBasedOn() local
704 ICmpInst *ICmp = dyn_cast<ICmpInst>(BI->getCondition()); in isLoopExitTestBasedOn()
722 BranchInst *BI = cast<BranchInst>(ExitingBB->getTerminator()); in needsLFTR() local
723 if (L->isLoopInvariant(BI->getCondition())) in needsLFTR()
727 ICmpInst *Cond = dyn_cast<ICmpInst>(BI->getCondition()); in needsLFTR()
1008 BranchInst *BI = cast<BranchInst>(ExitingBB->getTerminator()); in linearFunctionTestReplace() local
1010 if (L->contains(BI->getSuccessor(0))) in linearFunctionTestReplace()
1015 IRBuilder<> Builder(BI); in linearFunctionTestReplace()
[all …]
H A DSimpleLoopUnswitch.cpp509 static bool unswitchTrivialBranch(Loop &L, BranchInst &BI, DominatorTree &DT, in unswitchTrivialBranch() argument
512 assert(BI.isConditional() && "Can only unswitch a conditional branch!"); in unswitchTrivialBranch()
513 LLVM_DEBUG(dbgs() << " Trying to unswitch branch: " << BI << "\n"); in unswitchTrivialBranch()
522 Value *Cond = skipTrivialSelect(BI.getCondition()); in unswitchTrivialBranch()
538 auto *LoopExitBB = BI.getSuccessor(0); in unswitchTrivialBranch()
542 LoopExitBB = BI.getSuccessor(1); in unswitchTrivialBranch()
548 auto *ContinueBB = BI.getSuccessor(1 - LoopExitSuccIdx); in unswitchTrivialBranch()
549 auto *ParentBB = BI.getParent(); in unswitchTrivialBranch()
570 dbgs() << " unswitching trivial invariant conditions for: " << BI in unswitchTrivialBranch()
607 assert(LoopExitBB->getUniquePredecessor() == BI.getParent() && in unswitchTrivialBranch()
[all …]
H A DLoopPredication.cpp759 BranchInst *BI, SCEVExpander &Expander) { in collectChecks()
760 assert(isGuardAsWidenableBranch(BI) && "Must be!"); in collectChecks()
762 LLVM_DEBUG(BI->dump()); in collectChecks()
767 parseWidenableGuard(BI, Checks); in collectChecks()
770 auto WC = extractWidenableCondition(BI); in collectChecks()
772 widenChecks(Checks, WidenedChecks, Expander, BI); in collectChecks()
779 IRBuilder<> Builder(findInsertPt(BI, Checks)); in collectChecks()
781 auto *OldCond = BI->getCondition(); in collectChecks()
782 BI->setCondition(AllChecks); in collectChecks()
784 BasicBlock *IfTrueBB = BI in collectChecks()
841 widenWidenableBranchGuardConditions(BranchInst * BI,SCEVExpander & Expander) widenWidenableBranchGuardConditions() argument
899 auto *BI = dyn_cast<BranchInst>(LoopLatch->getTerminator()); parseLoopLatchICmp() local
1163 auto *BI = dyn_cast<BranchInst>(ExitingBB->getTerminator()); predicateLoopExits() local
1208 auto *BI = dyn_cast<BranchInst>(ExitingBB->getTerminator()); predicateLoopExits() local
[all...]
H A DJumpThreading.cpp361 auto *BI = dyn_cast<BranchInst>(BB.getTerminator()); in runImpl() local
362 if (BI && BI->isUnconditional()) { in runImpl()
363 BasicBlock *Succ = BI->getSuccessor(0); in runImpl()
977 if (BranchInst *BI = dyn_cast<BranchInst>(Terminator)) { in processBlock() local
979 if (BI->isUnconditional()) return false; in processBlock()
980 Condition = BI->getCondition(); in processBlock()
1147 auto *BI = dyn_cast<BranchInst>(BB->getTerminator()); in processImpliedCondition() local
1148 if (!BI || !BI->isConditional()) in processImpliedCondition()
1151 Value *Cond = BI->getCondition(); in processImpliedCondition()
1189 BasicBlock *KeepSucc = BI->getSuccessor(*Implication ? 0 : 1); in processImpliedCondition()
[all …]
/freebsd/contrib/llvm-project/llvm/utils/TableGen/Common/
H A DInfoByHwMode.h46 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 DSPIRVMergeRegionExitTargets.cpp54 if (auto *BI = dyn_cast<BranchInst>(T)) { in gatherSuccessors() local
55 output.insert(BI->getSuccessor(0)); in gatherSuccessors()
56 if (BI->isConditional()) in gatherSuccessors()
57 output.insert(BI->getSuccessor(1)); in gatherSuccessors()
84 if (auto *BI = dyn_cast<BranchInst>(T)) { in createExitVariable() local
86 BasicBlock *LHSTarget = BI->getSuccessor(0); in createExitVariable()
88 BI->isConditional() ? BI->getSuccessor(1) : nullptr; in createExitVariable()
99 return Builder.CreateSelect(BI->getCondition(), LHS, RHS); in createExitVariable()
114 if (auto *BI = dyn_cast<BranchInst>(T)) { in replaceBranchTargets() local
115 for (size_t i = 0; i < BI->getNumSuccessors(); i++) { in replaceBranchTargets()
[all …]
/freebsd/contrib/llvm-project/llvm/lib/Transforms/Utils/
H A DFlattenCFG.cpp188 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->isNoAlias(&*iter1, &*BI)) in CompareIfRegionBlock()
478 for (BasicBlock::iterator BI(PBI2), BE(PTI2); BI != BE; ++BI) { in MergeIfRegion() local
[all …]
H A DSimplifyCFG.cpp268 bool simplifyUncondBranch(BranchInst *BI, IRBuilder<> &Builder);
269 bool simplifyCondBranch(BranchInst *BI, IRBuilder<> &Builder);
278 bool SpeculativelyExecuteBB(BranchInst *BI, BasicBlock *ThenBB);
282 bool SimplifyBranchOnICmpChain(BranchInst *BI, IRBuilder<> &Builder,
441 BranchInst *BI = dyn_cast<BranchInst>(PBB->getTerminator()); in dominatesMergePoint() local
442 if (!BI || BI->isConditional() || BI->getSuccessor(0) != BB) in dominatesMergePoint()
761 } else if (BranchInst *BI = dyn_cast<BranchInst>(TI)) { in EraseTerminatorAndDCECond() local
762 if (BI->isConditional()) in EraseTerminatorAndDCECond()
763 Cond = dyn_cast<Instruction>(BI->getCondition()); in EraseTerminatorAndDCECond()
782 } else if (BranchInst *BI = dyn_cast<BranchInst>(TI)) in isValueEqualityComparison() local
[all …]
H A DLoopRotationUtils.cpp215 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/
H A DCodeEmitterGen.cpp58 int getVariableBit(const std::string &VarName, BitsInit *BI, int bit);
64 bool addCodeToMergeInOperand(Record *R, BitsInit *BI,
81 int CodeEmitterGen::getVariableBit(const std::string &VarName, BitsInit *BI, in getVariableBit() argument
83 if (VarBitInit *VBI = dyn_cast<VarBitInit>(BI->getBit(bit))) { in getVariableBit()
87 } else if (VarInit *VI = dyn_cast<VarInit>(BI->getBit(bit))) { in getVariableBit()
96 bool CodeEmitterGen::addCodeToMergeInOperand(Record *R, BitsInit *BI, in addCodeToMergeInOperand() argument
104 int bit = BI->getNumBits() - 1; in addCodeToMergeInOperand()
108 if (getVariableBit(VarName, BI, bit) != -1) in addCodeToMergeInOperand()
177 int varBit = getVariableBit(VarName, BI, tmpBit); in addCodeToMergeInOperand()
190 varBit = getVariableBit(VarName, BI, tmpBit); in addCodeToMergeInOperand()
[all …]
/freebsd/contrib/llvm-project/llvm/lib/Target/PowerPC/
H A DPPCCTRLoopsVerify.cpp97 MachineBasicBlock::iterator BI = I; in verifyCTRBranch() local
121 if (I != BI && clobbersCTR(*I)) { in verifyCTRBranch()
125 << printMBBReference(*BI->getParent()) << " (" in verifyCTRBranch()
126 << BI->getParent()->getFullName() << ") instruction " in verifyCTRBranch()
127 << *BI << "\n"); in verifyCTRBranch()
142 << printMBBReference(*BI->getParent()) << " (" in verifyCTRBranch()
143 << BI->getParent()->getFullName() << ") instruction " in verifyCTRBranch()
144 << *BI << "\n"); in verifyCTRBranch()
/freebsd/contrib/llvm-project/llvm/lib/Analysis/
H A DDomConditionCache.cpp19 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 DGuardUtils.cpp72 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/llvm/lib/Target/AMDGPU/
H A DR600Packetizer.cpp69 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 DNVPTXImageOptimizer.cpp151 if (BranchInst *BI = dyn_cast<BranchInst>(U)) { in replaceWith() local
152 if (BI->isUnconditional()) continue; in replaceWith()
156 Dest = BI->getSuccessor(1); in replaceWith()
159 Dest = BI->getSuccessor(0); in replaceWith()
160 BranchInst::Create(Dest, BI->getIterator()); in replaceWith()
161 InstrToDelete.push_back(BI); in replaceWith()
/freebsd/contrib/llvm-project/llvm/lib/Target/BPF/
H A DBPFAdjustOpt.cpp222 auto *BI = dyn_cast<BranchInst>(TI); in serializeICMPCrossBB() local
223 if (!BI || !BI->isConditional()) in serializeICMPCrossBB()
225 auto *Cond = dyn_cast<ICmpInst>(BI->getCondition()); in serializeICMPCrossBB()
232 BI = dyn_cast<BranchInst>(TI); in serializeICMPCrossBB()
233 if (!BI || !BI->isConditional()) in serializeICMPCrossBB()
235 Cond = dyn_cast<ICmpInst>(BI->getCondition()); in serializeICMPCrossBB()
260 PassThroughInfo Info(Cond, BI, 0); in serializeICMPCrossBB()

1234567891011