Home
last modified time | relevance | path

Searched refs:getCondition (Results 1 – 25 of 148) sorted by relevance

123456

/src/contrib/llvm-project/llvm/lib/Transforms/Utils/
H A DFlattenCFG.cpp175 Value *PC = PBI->getCondition(); in FlattenParallelAndOr()
253 auto *CI = dyn_cast<CmpInst>(BI->getCondition()); in FlattenParallelAndOr()
282 Value *PC = PBI->getCondition(); in FlattenParallelAndOr()
290 Value *CC = PBI->getCondition(); in FlattenParallelAndOr()
418 Instruction *CInst2 = dyn_cast<Instruction>(DomBI2->getCondition()); in MergeIfRegion()
430 Instruction *CInst1 = dyn_cast<Instruction>(DomBI1->getCondition()); in MergeIfRegion()
489 assert(PBI->getCondition() == CInst2); in MergeIfRegion()
496 Value *NC = Builder.CreateBinOp(CombineOp, CInst1, PBI->getCondition()); in MergeIfRegion()
497 PBI->replaceUsesOfWith(PBI->getCondition(), NC); in MergeIfRegion()
H A DGuardUtils.cpp75 CheckBI->setCondition(B.CreateAnd(CheckBI->getCondition(), WC, in makeGuardControlFlowExplicit()
101 Instruction *WCAnd = cast<Instruction>(WidenableBR->getCondition()); in widenWidenableBranch()
120 Instruction *WCAnd = cast<Instruction>(WidenableBR->getCondition()); in setWidenableBranchCond()
H A DSimplifyCFG.cpp760 Cond = dyn_cast<Instruction>(SI->getCondition()); in EraseTerminatorAndDCECond()
763 Cond = dyn_cast<Instruction>(BI->getCondition()); in EraseTerminatorAndDCECond()
781 CV = SI->getCondition(); in isValueEqualityComparison()
783 if (BI->isConditional() && BI->getCondition()->hasOneUse()) in isValueEqualityComparison()
784 if (ICmpInst *ICI = dyn_cast<ICmpInst>(BI->getCondition())) { in isValueEqualityComparison()
813 ICmpInst *ICI = cast<ICmpInst>(BI->getCondition()); in GetValueEqualityComparisonCases()
1079 ICmpInst *ICI = cast<ICmpInst>(BI->getCondition()); in GetBranchWeights()
1876 BI->getCondition(), BB1V, BB2V, in hoistSuccIdenticalTerminatorToSwitchOrIf()
3006 Value *BrCond = BI->getCondition(); in SpeculativelyExecuteBB()
3293 if (BI && BI->isConditional() && BI->getCondition() == V && in getKnownValueOnEdge()
[all …]
H A DMisExpect.cpp85 Ret = dyn_cast<Instruction>(B->getCondition()); in getInstCondition()
97 Ret = dyn_cast<Instruction>(S->getCondition()); in getInstCondition()
H A DCodeMoverUtils.cpp143 << *BI->getCondition() << "\" is true from " in collectControlConditions()
146 ControlCondition(BI->getCondition(), true)); in collectControlConditions()
149 << *BI->getCondition() << "\" is false from " in collectControlConditions()
152 ControlCondition(BI->getCondition(), false)); in collectControlConditions()
H A DLowerSwitch.cpp356 Value *Val = SI->getCondition(); // The value we are switching on... in ProcessSwitchInst()
370 IntegerType *IT = cast<IntegerType>(SI->getCondition()->getType()); in ProcessSwitchInst()
510 Val = SI->getCondition(); in ProcessSwitchInst()
/src/contrib/llvm-project/llvm/lib/CodeGen/
H A DSelectOptimize.cpp163 assert(isa<Instruction>(getCondition()) && in setInverted()
164 cast<Instruction>(getCondition())->getOpcode() == in setInverted()
177 return Sel->getCondition(); in getNonInvertedCondition()
194 Value *getCondition() const { in getCondition() function in __anon09282efa0111::SelectOptimizeImpl::SelectLike
540 if (DefSI->getCondition() == SI.getCondition()) in getTrueOrFalseValue()
670 if (match(&*DIt, m_Not(m_Specific(SI.getCondition())))) in convertProfitableSIGroups()
747 auto *CondFr = IB.CreateFreeze(SI.getCondition(), in convertProfitableSIGroups()
748 SI.getCondition()->getName() + ".frozen"); in convertProfitableSIGroups()
799 if (match(NI, m_Not(m_Specific(SI.getCondition())))) { in collectSelectGroups()
810 if (NSI && SI.getCondition() == NSI.getCondition()) { in collectSelectGroups()
[all …]
H A DHardwareLoops.cpp411 if (BI->isUnconditional() || !isa<ICmpInst>(BI->getCondition())) in CanGenerateTest()
416 auto ICmp = cast<ICmpInst>(BI->getCondition()); in CanGenerateTest()
549 Value *OldCond = ExitBranch->getCondition(); in InsertLoopDec()
595 Value *OldCond = ExitBranch->getCondition(); in UpdateBranch()
/src/contrib/llvm-project/llvm/lib/Analysis/
H A DGuardUtils.cpp75 auto *Cond = BI->getCondition(); in parseWidenableBranch()
142 : cast<BranchInst>(U)->getCondition(); in parseWidenableGuard()
156 auto Condition = BI->getCondition(); in extractWidenableCondition()
H A DDomConditionCache.cpp22 findAffectedValues(BI->getCondition(), Affected); in registerBranch()
/src/contrib/llvm-project/llvm/include/llvm/Analysis/
H A DSparsePropagation.h304 getValueState(KeyInfo::getLatticeKeyFromValue(BI->getCondition())); in getFeasibleSuccessors()
307 KeyInfo::getLatticeKeyFromValue(BI->getCondition())); in getFeasibleSuccessors()
322 std::move(BCValue), BI->getCondition()->getType())); in getFeasibleSuccessors()
343 SCValue = getValueState(KeyInfo::getLatticeKeyFromValue(SI.getCondition())); in getFeasibleSuccessors()
346 KeyInfo::getLatticeKeyFromValue(SI.getCondition())); in getFeasibleSuccessors()
360 std::move(SCValue), SI.getCondition()->getType())); in getFeasibleSuccessors()
/src/contrib/llvm-project/llvm/lib/Transforms/Scalar/
H A DIndVarSimplify.cpp470 Cond = BI->getCondition(); in rewriteFirstIterationLoopExitValues()
472 Cond = SI->getCondition(); in rewriteFirstIterationLoopExitValues()
704 ICmpInst *ICmp = dyn_cast<ICmpInst>(BI->getCondition()); in isLoopExitTestBasedOn()
723 if (L->isLoopInvariant(BI->getCondition())) in needsLFTR()
727 ICmpInst *Cond = dyn_cast<ICmpInst>(BI->getCondition()); in needsLFTR()
841 Value *Cond = cast<BranchInst>(ExitingBB->getTerminator())->getCondition(); in FindLoopCounter()
1019 if (auto *Cond = dyn_cast<Instruction>(BI->getCondition())) in linearFunctionTestReplace()
1071 << " was: " << *BI->getCondition() << "\n"); in linearFunctionTestReplace()
1074 Value *OrigCond = BI->getCondition(); in linearFunctionTestReplace()
1183 auto *OldCond = BI->getCondition(); in replaceExitCond()
[all …]
H A DSimpleLoopUnswitch.cpp522 Value *Cond = skipTrivialSelect(BI.getCondition()); in unswitchTrivialBranch()
644 assert(match(skipTrivialSelect(BI.getCondition()), m_LogicalOr()) && in unswitchTrivialBranch()
648 assert(match(skipTrivialSelect(BI.getCondition()), m_LogicalAnd()) && in unswitchTrivialBranch()
747 Value *LoopCond = SI.getCondition(); in unswitchTrivialSwitch()
1085 if (isa<Constant>(SI->getCondition())) in unswitchAllTrivialConditions()
1116 isa<Constant>(skipTrivialSelect(BI->getCondition()))) in unswitchAllTrivialConditions()
1316 ClonedConditionToErase = BI->getCondition(); in buildClonedLoopBlocks()
1318 ClonedConditionToErase = SI->getCondition(); in buildClonedLoopBlocks()
2196 SI || (skipTrivialSelect(BI->getCondition()) == Invariants[0] && in unswitchNontrivialInvariants()
2202 assert(isa<Instruction>(skipTrivialSelect(BI->getCondition())) && in unswitchNontrivialInvariants()
[all …]
H A DLowerExpectIntrinsic.cpp77 CallInst *CI = dyn_cast<CallInst>(SI.getCondition()); in handleSwitchExpect()
289 ICmpInst *CmpI = dyn_cast<ICmpInst>(BSI.getCondition()); in handleBrSelExpect()
293 CI = dyn_cast<CallInst>(BSI.getCondition()); in handleBrSelExpect()
H A DLoopBoundSplit.cpp215 ICmpInst *ICmp = cast<ICmpInst>(ExitingBI->getCondition()); in canSplitLoopBound()
260 if (L.isLoopInvariant(BI->getCondition())) in findSplitCandidate()
264 ICmpInst *ICmp = cast<ICmpInst>(BI->getCondition()); in findSplitCandidate()
H A DLoopPredication.cpp781 auto *OldCond = BI->getCondition(); in widenWidenableBranchGuardConditions()
827 auto *ICI = dyn_cast<ICmpInst>(BI->getCondition()); in parseLoopLatchICmp()
1098 auto *IP = cast<Instruction>(WidenableBR->getCondition()); in predicateLoopExits()
1130 if (isa<Constant>(BI->getCondition())) in predicateLoopExits()
1170 Value *OldCond = BI->getCondition(); in predicateLoopExits()
H A DGuardWidening.cpp82 static Value *getCondition(Instruction *I) { in getCondition() function
93 return cast<BranchInst>(I)->getCondition(); in getCondition()
312 getCondition(ToWiden), *InsertPt); in widenGuard()
364 assert(isa<ConstantInt>(getCondition(I)) && "Should be!"); in run()
483 if (!canBeHoistedTo(getCondition(ToWiden), WideningPoint)) in computeWideningScore()
H A DCorrelatedValuePropagation.cpp117 if (S->getType()->isVectorTy() || isa<Constant>(S->getCondition())) in processSelect()
125 C = LVI->getConstantOnEdge(S->getCondition(), PN->getIncomingBlock(U), in processSelect()
128 C = getConstantAt(S->getCondition(), I, LVI); in processSelect()
223 Value *Condition = SI->getCondition(); in getValueOnEdge()
351 Value *Cond = I->getCondition(); in processSwitch()
380 Cond = SI->getCondition(); in processSwitch()
H A DJumpThreading.cpp876 computeValueKnownInPredecessorsImpl(SI->getCondition(), BB, Conds, in computeValueKnownInPredecessorsImpl()
980 Condition = BI->getCondition(); in processBlock()
982 Condition = SI->getCondition(); in processBlock()
1151 Value *Cond = BI->getCondition(); in processImpliedCondition()
1178 isImpliedCondition(PBI->getCondition(), Cond, DL, CondIsTrue); in processImpliedCondition()
1182 if (!Implication && FICond && isa<FreezeInst>(PBI->getCondition())) { in processImpliedCondition()
1183 if (cast<FreezeInst>(PBI->getCondition())->getOperand(0) == in processImpliedCondition()
2772 auto *BI = BranchInst::Create(NewBB, BB, SI->getCondition(), Pred); in unfoldSelectInstr()
2817 PHINode *CondPHI = dyn_cast<PHINode>(SI->getCondition()); in tryToUnfoldSelect()
2937 Value *Cond = SI->getCondition(); in tryToUnfoldSelectInCurrBB()
[all …]
/src/contrib/llvm-project/llvm/lib/Transforms/InstCombine/
H A DInstCombineSelect.cpp62 if (!match(Sel.getCondition(), m_Cmp(Pred, m_Value(X), m_Constant(C)))) in foldSelectBinOpIdentity()
284 Value *Cond = SI.getCondition(); in foldSelectOpOp()
558 Value *NewSel = Builder.CreateSelect(SI.getCondition(), Swapped ? C : OOp, in foldSelectIntoOp()
820 Value *Cond = Sel.getCondition(); in foldSetClearBits()
859 auto *CondVal = SI.getCondition(); in foldSelectZeroOrMul()
1983 const PHINode *CondPHI = cast<PHINode>(SI.getCondition()); in canSelectOperandBeMappingIntoPredBlock()
2025 Value *CondVal = SI.getCondition(); in foldAddSubSelect()
2100 Value *CondVal = SI.getCondition(); in foldOverflowingAddSubSelect()
2232 Value *Cond = Sel.getCondition(); in foldSelectExtConst()
2259 Value *CondVal = SI.getCondition(); in canonicalizeSelectToShuffle()
[all …]
/src/contrib/llvm-project/llvm/lib/Transforms/ObjCARC/
H A DProvenanceAnalysis.cpp46 if (A->getCondition() == SB->getCondition()) in relatedSelect()
/src/contrib/llvm-project/llvm/lib/Transforms/Instrumentation/
H A DControlHeightReduction.cpp899 bool IsHoistable = checkHoistValue(SI->getCondition(), InsertPoint, in checkScopeHoistable()
920 bool IsHoistable = checkHoistValue(Branch->getCondition(), InsertPoint, in checkScopeHoistable()
952 assert(checkHoistValue(Branch->getCondition(), InsertPoint, in checkScopeHoistable()
960 assert(checkHoistValue(SI->getCondition(), InsertPoint, DT, in checkScopeHoistable()
1029 ConditionValues.insert(BI->getCondition()); in getCHRConditionValuesForRegion()
1032 ConditionValues.insert(SI->getCondition()); in getCHRConditionValuesForRegion()
1393 bool IsHoistable = checkHoistValue(BI->getCondition(), InsertPoint, DT, in setCHRRegions()
1405 bool IsHoistable = checkHoistValue(SI->getCondition(), InsertPoint, DT, in setCHRRegions()
1491 hoistValue(BI->getCondition(), HoistPoint, R, Scope->HoistStopMap, in hoistScopeConditions()
1499 hoistValue(SI->getCondition(), HoistPoint, R, Scope->HoistStopMap, in hoistScopeConditions()
[all …]
/src/contrib/llvm-project/llvm/lib/Target/AMDGPU/
H A DSIAnnotateControlFlow.cpp210 Value *IfCall = IRB.CreateCall(If, {Term->getCondition()}); in openIf()
283 Value *Cond = Term->getCondition(); in handleLoop()
383 PHINode *Phi = dyn_cast<PHINode>(Term->getCondition()); in runOnFunction()
/src/contrib/llvm-project/llvm/lib/Target/BPF/
H A DBPFAdjustOpt.cpp225 auto *Cond = dyn_cast<ICmpInst>(BI->getCondition()); in serializeICMPCrossBB()
235 Cond = dyn_cast<ICmpInst>(BI->getCondition()); in serializeICMPCrossBB()
/src/contrib/llvm-project/llvm/lib/Transforms/Vectorize/
H A DVPlanHCFGBuilder.cpp298 VPValue *Cond = getOrCreateVPOperand(Br->getCondition()); in createVPInstructionsForVPBB()
419 assert(IRDef2VPValue.contains(BI->getCondition()) && in buildPlainCFG()

123456