Home
last modified time | relevance | path

Searched refs:Br (Results 1 – 25 of 84) sorted by relevance

1234

/llvm-project-15.0.7/llvm/lib/Target/Mips/
H A DMipsBranchExpansion.cpp130 MachineInstr *Br = nullptr; member
369 if (Br->hasDelaySlot()) { in replaceBranch()
372 assert(Br->isBundledWithSucc()); in replaceBranch()
376 Br->eraseFromParent(); in replaceBranch()
415 MachineBasicBlock *MBB = I.Br->getParent(), *TgtMBB = getTargetMBB(*I.Br); in expandToLongBranch()
416 DebugLoc DL = I.Br->getDebugLoc(); in expandToLongBranch()
723 if (I.Br->isUnconditionalBranch()) { in expandToLongBranch()
726 I.Br->removeOperand(0); in expandToLongBranch()
836 if ((Br != End) && Br->isBranch() && !Br->isIndirectBranch() && in handlePossibleLongBranch()
852 MBBInfos[I].Br = &*Br; in handlePossibleLongBranch()
[all …]
H A DMipsConstantIslandPass.cpp405 bool fixupImmediateBr(ImmBranch &Br);
1478 MachineInstr *MI = Br.MI; in fixupImmediateBr()
1486 if (!Br.isCond) in fixupImmediateBr()
1487 return fixupUnconditionalBr(Br); in fixupImmediateBr()
1488 return fixupConditionalBr(Br); in fixupImmediateBr()
1497 MachineInstr *MI = Br.MI; in fixupUnconditionalBr()
1503 Br.MaxDisp = BimmX16MaxDisp; in fixupUnconditionalBr()
1519 Br.MaxDisp = ((1<<24)-1) * 2; in fixupUnconditionalBr()
1537 MachineInstr *MI = Br.MI; in fixupConditionalBr()
1546 Br.MaxDisp = LongFormMaxOff; in fixupConditionalBr()
[all …]
/llvm-project-15.0.7/llvm/lib/Target/ARM/
H A DARMConstantIslandPass.cpp1692 MachineInstr *MI = Br.MI; in fixupImmediateBr()
1699 if (!Br.isCond) in fixupImmediateBr()
1710 MachineInstr *MI = Br.MI; in fixupUnconditionalBr()
1719 Br.MaxDisp = (1 << 21) * 2; in fixupUnconditionalBr()
1736 MachineInstr *MI = Br.MI; in fixupConditionalBr()
1806 Br.MI = &MBB->back(); in fixupConditionalBr()
1976 MachineInstrBuilder MIB = BuildMI(*MBB, Br.MI, Br.MI->getDebugLoc(), in optimizeThumb2Branches()
1981 Br.MI = MIB; in optimizeThumb2Branches()
2001 if (FindCmpForCBZ(Br, Cmp, ExitBB) && TryConvertToLE(Br, Cmp)) { in optimizeThumb2Branches()
2032 BuildMI(*MBB, Br.MI, Br.MI->getDebugLoc(), TII->get(Cmp.NewOpc)) in optimizeThumb2Branches()
[all …]
H A DARMBlockPlacement.cpp102 MachineInstr *Br = &Preheader->back(); in revertWhileToDoLoop() local
103 assert(Br->getOpcode() == ARM::t2B); in revertWhileToDoLoop()
104 assert(Br->getOperand(1).getImm() == 14); in revertWhileToDoLoop()
116 Br->removeFromParent(); in revertWhileToDoLoop()
117 NewBlock->insert(NewBlock->end(), Br); in revertWhileToDoLoop()
119 Preheader->replaceSuccessor(Br->getOperand(0).getMBB(), NewBlock); in revertWhileToDoLoop()
120 NewBlock->addSuccessor(Br->getOperand(0).getMBB()); in revertWhileToDoLoop()
124 BuildMI(*NewBlock, Br, WLS->getDebugLoc(), in revertWhileToDoLoop()
/llvm-project-15.0.7/llvm/lib/Target/PowerPC/
H A DPPCPreEmitPeephole.cpp520 MachineInstr *Br = &*I; in runOnMachineFunction() local
521 if (Br->getOpcode() != PPC::BC && Br->getOpcode() != PPC::BCn) in runOnMachineFunction()
524 Register CRBit = Br->getOperand(0).getReg(); in runOnMachineFunction()
527 MachineBasicBlock::reverse_iterator It = Br, Er = MBB.rend(); in runOnMachineFunction()
542 if ((Br->getOpcode() == PPC::BCn && CRSetOp == PPC::CRSET) || in runOnMachineFunction()
545 InstrsToErase.push_back(Br); in runOnMachineFunction()
546 MBB.removeSuccessor(Br->getOperand(1).getMBB()); in runOnMachineFunction()
551 MachineBasicBlock::iterator It = Br, Er = MBB.end(); in runOnMachineFunction()
557 if (!MBB.isLayoutSuccessor(Br->getOperand(1).getMBB())) { in runOnMachineFunction()
560 NoCond, Br->getDebugLoc()); in runOnMachineFunction()
[all …]
/llvm-project-15.0.7/llvm/lib/Target/CSKY/
H A DCSKYConstantIslandPass.cpp262 bool fixupImmediateBr(ImmBranch &Br);
263 bool fixupConditionalBr(ImmBranch &Br);
264 bool fixupUnconditionalBr(ImmBranch &Br);
1241 MachineInstr *MI = Br.MI; in fixupImmediateBr()
1248 if (!Br.IsCond) in fixupImmediateBr()
1249 return fixupUnconditionalBr(Br); in fixupImmediateBr()
1250 return fixupConditionalBr(Br); in fixupImmediateBr()
1258 MachineInstr *MI = Br.MI; in fixupUnconditionalBr()
1265 Br.MaxDisp = ((1 << (26 - 1)) - 1) * 2; in fixupUnconditionalBr()
1280 MachineInstr *MI = Br.MI; in fixupConditionalBr()
[all …]
H A DCSKYInstrInfoF1.td301 multiclass BRCond_Bin<CondCode CC, string Instr, Instruction Br, Instruction MV> {
304 (Br (!cast<Instruction>(Instr#_S) sFPR32Op:$rs1, sFPR32Op:$rs2), bb:$imm16)>;
307 (Br (!cast<Instruction>(Instr#_D) sFPR64Op:$rs1, sFPR64Op:$rs2), bb:$imm16)>;
317 multiclass BRCond_Bin_SWAP<CondCode CC, string Instr, Instruction Br, Instruction MV> {
320 (Br (!cast<Instruction>(Instr#_S) sFPR32Op:$rs2, sFPR32Op:$rs1), bb:$imm16)>;
323 (Br (!cast<Instruction>(Instr#_D) sFPR64Op:$rs2, sFPR64Op:$rs1), bb:$imm16)>;
H A DCSKYInstrInfoF2.td287 multiclass BRCond_Bin_F2<CondCode CC, string Instr, Instruction Br, Instruction MV, bit IsSelectSwa…
290 (Br (!cast<Instruction>(Instr#_S) FPR32Op:$rs1, FPR32Op:$rs2), bb:$imm16)>;
293 (Br (!cast<Instruction>(Instr#_D) FPR64Op:$rs1, FPR64Op:$rs2), bb:$imm16)>;
320 multiclass BRCond_Bin_SWAP_F2<CondCode CC, string Instr, Instruction Br, Instruction MV, bit IsSele…
323 (Br (!cast<Instruction>(Instr#_S) FPR32Op:$rs2, FPR32Op:$rs1), bb:$imm16)>;
326 (Br (!cast<Instruction>(Instr#_D) FPR64Op:$rs2, FPR64Op:$rs1), bb:$imm16)>;
/llvm-project-15.0.7/clang/test/SemaCXX/
H A Dfunctional-cast.cpp132 typedef B &Br; in t_529_2() typedef
133 …(void)Br(*((C1*)0)); // expected-warning {{binding dereferenced null pointer to reference has unde… in t_529_2()
164 typedef B &Br; in t_529_5_8() typedef
165 (void)Br(*((A*)0)); in t_529_5_8()
171 (void)Br(*((const A*)0)); // const_cast appended in t_529_5_8()
/llvm-project-15.0.7/llvm/lib/Transforms/Scalar/
H A DConstraintElimination.cpp530 auto *Br = dyn_cast<BranchInst>(BB.getTerminator()); in addInfoFor() local
531 if (!Br || !Br->isConditional()) in addInfoFor()
538 if (match(Br->getCondition(), m_LogicalOr(m_Value(Op0), m_Value(Op1))) && in addInfoFor()
540 BasicBlock *FalseSuccessor = Br->getSuccessor(1); in addInfoFor()
553 if (match(Br->getCondition(), m_LogicalAnd(m_Value(Op0), m_Value(Op1))) && in addInfoFor()
555 BasicBlock *TrueSuccessor = Br->getSuccessor(0); in addInfoFor()
565 auto *CmpI = dyn_cast<ICmpInst>(Br->getCondition()); in addInfoFor()
568 if (canAddSuccessor(BB, Br->getSuccessor(0))) in addInfoFor()
569 WorkList.emplace_back(DT.getNode(Br->getSuccessor(0)), CmpI, false); in addInfoFor()
570 if (canAddSuccessor(BB, Br->getSuccessor(1))) in addInfoFor()
[all …]
H A DStructurizeCFG.cpp979 auto Br = dyn_cast<BranchInst>(E->getEntry()->getTerminator()); in hasOnlyUniformBranches() local
980 if (!Br || !Br->isConditional()) in hasOnlyUniformBranches()
983 if (!DA.isUniform(Br)) in hasOnlyUniformBranches()
989 LLVM_DEBUG(dbgs() << "BB: " << Br->getParent()->getName() in hasOnlyUniformBranches()
1002 auto Br = dyn_cast<BranchInst>(BB->getTerminator()); in hasOnlyUniformBranches() local
1003 if (!Br || !Br->isConditional()) in hasOnlyUniformBranches()
1006 if (!Br->getMetadata(UniformMDKindID)) { in hasOnlyUniformBranches()
H A DLoopFlatten.cpp545 BranchInst *Br = dyn_cast<BranchInst>(&I); in checkOuterLoopInsts() local
546 if (Br && Br->isUnconditional() && in checkOuterLoopInsts()
547 Br->getSuccessor(0) == FI.InnerLoop->getHeader()) in checkOuterLoopInsts()
/llvm-project-15.0.7/clang/lib/CodeGen/
H A DCGCleanup.cpp380 if (llvm::BranchInst *Br = dyn_cast<llvm::BranchInst>(Term)) { in TransitionToCleanupSwitch() local
381 assert(Br->isUnconditional()); in TransitionToCleanupSwitch()
385 llvm::SwitchInst::Create(Load, Br->getSuccessor(0), 4, Block); in TransitionToCleanupSwitch()
386 Br->eraseFromParent(); in TransitionToCleanupSwitch()
541 llvm::BranchInst *Br = dyn_cast<llvm::BranchInst>(Pred->getTerminator()); in SimplifyCleanupEntry() local
542 if (!Br || Br->isConditional()) return Entry; in SimplifyCleanupEntry()
543 assert(Br->getSuccessor(0) == Entry); in SimplifyCleanupEntry()
552 Br->eraseFromParent(); in SimplifyCleanupEntry()
602 if (llvm::BranchInst *Br = dyn_cast<llvm::BranchInst>(Term)) { in ForwardPrebranchedFallthrough() local
603 assert(Br->isUnconditional() && Br->getSuccessor(0) == From); in ForwardPrebranchedFallthrough()
[all …]
/llvm-project-15.0.7/llvm/unittests/Transforms/Utils/
H A DScalarEvolutionExpanderTest.cpp100 BranchInst *Br = BranchInst::Create( in TEST_F() local
103 new AllocaInst(I32Ty, DL.getAllocaAddrSpace(), "alloca", Br); in TEST_F()
106 GetElementPtrInst::Create(I32Ty, Alloca, Ci32, "gep0", Br); in TEST_F()
108 CastInst::CreateBitOrPointerCast(Gep0, I8PtrTy, "bitcast1", Br); in TEST_F()
110 GetElementPtrInst::Create(I8Ty, CastA, Ci32, "gep1", Br); in TEST_F()
112 I8Ty, UndefValue::get(I8PtrTy), Ci32, "gep2", Br); in TEST_F()
114 UndefValue::get(I8PtrTy), CastA, "cmp", Br); in TEST_F()
115 SelectInst *Sel = SelectInst::Create(Cmp, Gep1, Gep2, "select", Br); in TEST_F()
117 CastInst::CreateBitOrPointerCast(Sel, I32PtrTy, "bitcast2", Br); in TEST_F()
/llvm-project-15.0.7/llvm/lib/Transforms/Vectorize/
H A DVPlanHCFGBuilder.cpp218 if (auto *Br = dyn_cast<BranchInst>(Inst)) { in createVPInstructionsForVPBB() local
221 if (Br->isConditional()) { in createVPInstructionsForVPBB()
222 VPValue *Cond = getOrCreateVPOperand(Br->getCondition()); in createVPInstructionsForVPBB()
H A DLoopVectorizationLegality.cpp479 auto *Br = dyn_cast<BranchInst>(BB->getTerminator()); in canVectorizeOuterLoop() local
480 if (!Br) { in canVectorizeOuterLoop()
496 if (Br && Br->isConditional() && in canVectorizeOuterLoop()
497 !TheLoop->isLoopInvariant(Br->getCondition()) && in canVectorizeOuterLoop()
498 !LI->isLoopHeader(Br->getSuccessor(0)) && in canVectorizeOuterLoop()
499 !LI->isLoopHeader(Br->getSuccessor(1))) { in canVectorizeOuterLoop()
/llvm-project-15.0.7/llvm/lib/Target/WebAssembly/
H A DWebAssemblyFastISel.cpp1303 const auto *Br = cast<BranchInst>(I); in selectBr() local
1304 if (Br->isUnconditional()) { in selectBr()
1305 MachineBasicBlock *MSucc = FuncInfo.MBBMap[Br->getSuccessor(0)]; in selectBr()
1306 fastEmitBranch(MSucc, Br->getDebugLoc()); in selectBr()
1310 MachineBasicBlock *TBB = FuncInfo.MBBMap[Br->getSuccessor(0)]; in selectBr()
1311 MachineBasicBlock *FBB = FuncInfo.MBBMap[Br->getSuccessor(1)]; in selectBr()
1314 unsigned CondReg = getRegForI1Value(Br->getCondition(), Br->getParent(), Not); in selectBr()
1326 finishCondBranch(Br->getParent(), TBB, FBB); in selectBr()
1418 case Instruction::Br: in fastSelectInstruction()
/llvm-project-15.0.7/llvm/unittests/Analysis/
H A DScalarEvolutionTest.cpp768 auto *Br = cast<Instruction>(Builder.CreateCondBr(Cond, L, Post)); in TEST_F() local
794 Br->eraseFromParent(); in TEST_F()
868 auto *Br = cast<Instruction>(Builder.CreateCondBr(Cond, L, Post)); in TEST_F() local
882 Br->eraseFromParent(); in TEST_F()
932 auto *Br = BranchInst::Create( in TEST_F() local
935 auto *Shl = BinaryOperator::CreateShl(Phi, Int64_32, "", Br); in TEST_F()
937 auto *Add = BinaryOperator::CreateAdd(AShr, MinInt64, "", Br); in TEST_F()
988 auto *Br = BranchInst::Create( in TEST_F() local
990 auto *Phi = PHINode::Create(Int32Ty, 2, "", Br); in TEST_F()
991 auto *Shl = BinaryOperator::CreateShl(Phi, Int32_16, "", Br); in TEST_F()
[all …]
/llvm-project-15.0.7/llvm/lib/Target/AMDGPU/
H A DAMDGPUTargetTransformInfo.cpp157 if (const BranchInst *Br = dyn_cast<BranchInst>(&I)) { in getUnrollingPreferences() local
158 if (UP.Threshold < MaxBoost && Br->isConditional()) { in getUnrollingPreferences()
159 BasicBlock *Succ0 = Br->getSuccessor(0); in getUnrollingPreferences()
160 BasicBlock *Succ1 = Br->getSuccessor(1); in getUnrollingPreferences()
164 if (dependsOnLocalPhi(L, Br->getCondition())) { in getUnrollingPreferences()
168 << *L << " due to " << *Br << '\n'); in getUnrollingPreferences()
737 case Instruction::Br: { in getCFInstrCost()
H A DR600TargetTransformInfo.cpp102 case Instruction::Br: in getCFInstrCost()
/llvm-project-15.0.7/llvm/lib/Target/MSP430/
H A DMSP430InstrInfo.cpp120 I->getOpcode() != MSP430::Br && in removeBranch()
188 if (I->getOpcode() == MSP430::Br || in analyzeBranch()
/llvm-project-15.0.7/llvm/test/Transforms/LoopVectorize/
H A Dmiddle-block-dbg.ll4 ; vectorized loop are correct. The Cmp and Br instructions should map to the
5 ; same source lines as the Cmp and Br of the scalar loop.
/llvm-project-15.0.7/llvm/unittests/IR/
H A DVectorBuilderTest.cpp261 auto *Val = VBuild.createVectorInstruction(Instruction::Br, VoidTy, {}); in TEST_F()
276 ASSERT_DEATH({ VBuild.createVectorInstruction(Instruction::Br, VoidTy, {}); }, in TEST_F()
/llvm-project-15.0.7/llvm/lib/Target/X86/
H A DX86SpeculativeLoadHardening.cpp227 MachineInstr *Br, MachineInstr *&UncondBr, in splitEdge() argument
241 if (Br) { in splitEdge()
242 assert(Br->getOperand(0).getMBB() == &Succ && in splitEdge()
244 Br->getOperand(0).setMBB(&NewMBB); in splitEdge()
265 TII.insertBranch(NewMBB, &Succ, nullptr, Cond, Br->getDebugLoc()); in splitEdge()
728 MachineInstr *Br, MachineInstr *&UncondBr, in tracePredStateThroughCFG()
735 : splitEdge(MBB, Succ, SuccCount, Br, UncondBr, *TII); in tracePredStateThroughCFG()
/llvm-project-15.0.7/llvm/lib/Transforms/Utils/
H A DInlineFunction.cpp2551 Instruction *Br = OrigBB->getTerminator(); in InlineFunction() local
2552 assert(Br && Br->getOpcode() == Instruction::Br && in InlineFunction()
2554 Br->setOperand(0, &*FirstNewBlock); in InlineFunction()
2646 assert(cast<BranchInst>(Br)->isUnconditional() && "splitBasicBlock broken!"); in InlineFunction()
2647 BasicBlock *CalleeEntry = cast<BranchInst>(Br)->getSuccessor(0); in InlineFunction()
2652 OrigBB->getInstList().splice(Br->getIterator(), CalleeEntry->getInstList()); in InlineFunction()
2655 OrigBB->getInstList().erase(Br); in InlineFunction()

1234