| /netbsd-src/external/apache2/llvm/dist/llvm/lib/Transforms/Scalar/ |
| H A D | GuardWidening.cpp | 81 static Value *getCondition(Instruction *I) { in getCondition() function 92 return cast<BranchInst>(I)->getCondition(); in getCondition() 262 widenCondCommon(getCondition(ToWiden), NewCondition, ToWiden, Result, in widenGuard() 314 assert(isa<ConstantInt>(getCondition(I)) && "Should be!"); in run() 334 if (isa<ConstantInt>(getCondition(Instr))) in eliminateInstrViaWidening() 371 LLVM_DEBUG(dbgs() << "Score between " << *getCondition(Instr) in eliminateInstrViaWidening() 372 << " and " << *getCondition(Candidate) << " is " in eliminateInstrViaWidening() 392 widenGuard(BestSoFar, getCondition(Instr), InvertCondition); in eliminateInstrViaWidening() 420 if (!isAvailableAt(getCondition(DominatedInstr), DominatingGuard)) in computeWideningScore() 431 if (isWideningCondProfitable(getCondition(DominatedInstr), in computeWideningScore() [all …]
|
| H A D | SimpleLoopUnswitch.cpp | 391 if (L.isLoopInvariant(BI.getCondition())) { in unswitchTrivialBranch() 392 Invariants.push_back(BI.getCondition()); in unswitchTrivialBranch() 395 if (auto *CondInst = dyn_cast<Instruction>(BI.getCondition())) in unswitchTrivialBranch() 425 if (!match(BI.getCondition(), m_LogicalOr())) in unswitchTrivialBranch() 428 if (!match(BI.getCondition(), m_LogicalAnd())) in unswitchTrivialBranch() 506 assert(match(BI.getCondition(), m_LogicalOr()) && in unswitchTrivialBranch() 510 assert(match(BI.getCondition(), m_LogicalAnd()) && in unswitchTrivialBranch() 606 Value *LoopCond = SI.getCondition(); in unswitchTrivialSwitch() 934 if (isa<Constant>(SI->getCondition())) in unswitchAllTrivialConditions() 964 if (!BI->isConditional() || isa<Constant>(BI->getCondition())) in unswitchAllTrivialConditions() [all …]
|
| H A D | IndVarSimplify.cpp | 470 Cond = BI->getCondition(); in rewriteFirstIterationLoopExitValues() 472 Cond = SI->getCondition(); in rewriteFirstIterationLoopExitValues() 701 ICmpInst *ICmp = dyn_cast<ICmpInst>(BI->getCondition()); in isLoopExitTestBasedOn() 720 if (L->isLoopInvariant(BI->getCondition())) in needsLFTR() 724 ICmpInst *Cond = dyn_cast<ICmpInst>(BI->getCondition()); in needsLFTR() 894 Value *Cond = cast<BranchInst>(ExitingBB->getTerminator())->getCondition(); in FindLoopCounter() 1132 if (auto *Cond = dyn_cast<Instruction>(BI->getCondition())) in linearFunctionTestReplace() 1185 << " was: " << *BI->getCondition() << "\n"); in linearFunctionTestReplace() 1188 Value *OrigCond = BI->getCondition(); in linearFunctionTestReplace() 1296 auto *OldCond = BI->getCondition(); in replaceExitCond() [all …]
|
| H A D | LoopUnswitch.cpp | 586 Value *Cond = BInst->getCondition(); in isUnreachableDueToPreviousUnswitching() 758 Value *LoopCond = findLIVLoopCondition(BI->getCondition(), CurrentLoop, in processCurrentLoop() 768 Value *SC = SI->getCondition(); in processCurrentLoop() 832 Value *LoopCond = findLIVLoopCondition(SI->getCondition(), CurrentLoop, in processCurrentLoop() 1191 } else if (BI->getCondition() == ConstantInt::getTrue(Context)) { in tryTrivialLoopUnswitch() 1193 } else if (BI->getCondition() == ConstantInt::getFalse(Context)) { in tryTrivialLoopUnswitch() 1202 ConstantInt *Cond = dyn_cast<ConstantInt>(SI->getCondition()); in tryTrivialLoopUnswitch() 1225 Value *LoopCond = findLIVLoopCondition(BI->getCondition(), CurrentLoop, in tryTrivialLoopUnswitch() 1231 if (!LoopCond || LoopCond != BI->getCondition()) in tryTrivialLoopUnswitch() 1260 Value *LoopCond = findLIVLoopCondition(SI->getCondition(), CurrentLoop, in tryTrivialLoopUnswitch() [all …]
|
| H A D | LowerExpectIntrinsic.cpp | 79 CallInst *CI = dyn_cast<CallInst>(SI.getCondition()); in handleSwitchExpect() 274 ICmpInst *CmpI = dyn_cast<ICmpInst>(BSI.getCondition()); in handleBrSelExpect() 278 CI = dyn_cast<CallInst>(BSI.getCondition()); in handleBrSelExpect()
|
| H A D | LoopPredication.cpp | 826 unsigned NumWidened = collectChecks(Checks, BI->getCondition(), in widenWidenableBranchGuardConditions() 836 auto *OldCond = BI->getCondition(); in widenWidenableBranchGuardConditions() 865 auto *ICI = dyn_cast<ICmpInst>(BI->getCondition()); in parseLoopLatchICmp() 1113 auto *IP = cast<Instruction>(WidenableBR->getCondition()); in predicateLoopExits() 1133 if (isa<Constant>(BI->getCondition())) in predicateLoopExits() 1173 Value *OldCond = BI->getCondition(); in predicateLoopExits()
|
| H A D | ConstraintElimination.cpp | 288 if (match(Br->getCondition(), m_LogicalOr(m_Value(Op0), m_Value(Op1))) && in eliminateConstraints() 303 if (match(Br->getCondition(), m_LogicalAnd(m_Value(Op0), m_Value(Op1))) && in eliminateConstraints() 315 auto *CmpI = dyn_cast<CmpInst>(Br->getCondition()); in eliminateConstraints()
|
| H A D | CorrelatedValuePropagation.cpp | 131 if (isa<Constant>(S->getCondition())) return false; in processSelect() 133 Constant *C = LVI->getConstant(S->getCondition(), S); in processSelect() 230 Value *Condition = SI->getCondition(); in processPHI() 331 Value *Cond = I->getCondition(); in processSwitch() 359 Cond = SI->getCondition(); in processSwitch()
|
| /netbsd-src/external/apache2/llvm/dist/llvm/lib/Transforms/Utils/ |
| H A D | GuardUtils.cpp | 75 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 D | FlattenCFG.cpp | 177 Value *PC = PBI->getCondition(); in FlattenParallelAndOr() 255 auto *CI = dyn_cast<CmpInst>(BI->getCondition()); in FlattenParallelAndOr() 284 Value *PC = PBI->getCondition(); in FlattenParallelAndOr() 293 Value *CC = PBI->getCondition(); in FlattenParallelAndOr() 482 assert(PBI->getCondition() == IfCond2); in MergeIfRegion()
|
| H A D | SimplifyCFG.cpp | 716 Cond = dyn_cast<Instruction>(SI->getCondition()); in EraseTerminatorAndDCECond() 719 Cond = dyn_cast<Instruction>(BI->getCondition()); in EraseTerminatorAndDCECond() 737 CV = SI->getCondition(); in isValueEqualityComparison() 739 if (BI->isConditional() && BI->getCondition()->hasOneUse()) in isValueEqualityComparison() 740 if (ICmpInst *ICI = dyn_cast<ICmpInst>(BI->getCondition())) { in isValueEqualityComparison() 769 ICmpInst *ICI = cast<ICmpInst>(BI->getCondition()); in GetValueEqualityComparisonCases() 1045 ICmpInst *ICI = cast<ICmpInst>(BI->getCondition()); in GetBranchWeights() 1608 Builder.CreateSelect(BI->getCondition(), BB1V, BB2V, in HoistThenElseCodeToIf() 2357 Value *BrCond = BI->getCondition(); in SpeculativelyExecuteBB() 2582 PHINode *PN = dyn_cast<PHINode>(BI->getCondition()); in FoldCondBranchOnPHI() [all …]
|
| H A D | CodeMoverUtils.cpp | 141 << *BI->getCondition() << "\" is true from " in collectControlConditions() 144 ControlCondition(BI->getCondition(), true)); in collectControlConditions() 147 << *BI->getCondition() << "\" is false from " in collectControlConditions() 150 ControlCondition(BI->getCondition(), false)); in collectControlConditions()
|
| H A D | SCCPSolver.cpp | 565 ValueLatticeElement BCValue = getValueState(BI->getCondition()); in getFeasibleSuccessors() 591 const ValueLatticeElement &SCValue = getValueState(SI->getCondition()); in getFeasibleSuccessors() 878 ValueLatticeElement CondValue = getValueState(I.getCondition()); in visitSelectInst() 1485 if (!getValueState(BI->getCondition()).isUnknownOrUndef()) in resolvedUndefsIn() 1490 if (isa<UndefValue>(BI->getCondition())) { in resolvedUndefsIn() 1540 !getValueState(SI->getCondition()).isUnknownOrUndef()) in resolvedUndefsIn() 1545 if (isa<UndefValue>(SI->getCondition())) { in resolvedUndefsIn()
|
| /netbsd-src/external/apache2/llvm/dist/llvm/lib/Transforms/InstCombine/ |
| H A D | InstCombineSelect.cpp | 67 if (!match(Sel.getCondition(), m_Cmp(Pred, m_Value(X), m_Constant(C)))) in foldSelectBinOpIdentity() 277 Value *Cond = SI.getCondition(); in foldSelectOpOp() 455 Value *NewSel = Builder.CreateSelect(SI.getCondition(), OOp, C); in foldSelectIntoOp() 487 Value *NewSel = Builder.CreateSelect(SI.getCondition(), C, OOp); in foldSelectIntoOp() 690 Value *Cond = Sel.getCondition(); in foldSetClearBits() 1572 const PHINode *CondPHI = cast<PHINode>(SI.getCondition()); in canSelectOperandBeMappingIntoPredBlock() 1663 Builder.CreateSelect(SI->getCondition(), SI->getFalseValue(), in foldSPFofSPF() 1722 Value *CondVal = SI.getCondition(); in foldAddSubSelect() 1797 Value *CondVal = SI.getCondition(); in foldOverflowingAddSubSelect() 1931 Value *Cond = Sel.getCondition(); in foldSelectExtConst() [all …]
|
| /netbsd-src/external/apache2/llvm/dist/llvm/include/llvm/Analysis/ |
| H A D | SparsePropagation.h | 302 getValueState(KeyInfo::getLatticeKeyFromValue(BI->getCondition())); in getFeasibleSuccessors() 305 KeyInfo::getLatticeKeyFromValue(BI->getCondition())); in getFeasibleSuccessors() 320 std::move(BCValue), BI->getCondition()->getType())); in getFeasibleSuccessors() 341 SCValue = getValueState(KeyInfo::getLatticeKeyFromValue(SI.getCondition())); in getFeasibleSuccessors() 344 KeyInfo::getLatticeKeyFromValue(SI.getCondition())); in getFeasibleSuccessors() 358 std::move(SCValue), SI.getCondition()->getType())); in getFeasibleSuccessors()
|
| /netbsd-src/external/apache2/llvm/dist/llvm/lib/Transforms/Instrumentation/ |
| H A D | ControlHeightReduction.cpp | 913 bool IsHoistable = checkHoistValue(SI->getCondition(), InsertPoint, in checkScopeHoistable() 934 bool IsHoistable = checkHoistValue(Branch->getCondition(), InsertPoint, in checkScopeHoistable() 966 assert(checkHoistValue(Branch->getCondition(), InsertPoint, in checkScopeHoistable() 974 assert(checkHoistValue(SI->getCondition(), InsertPoint, DT, in checkScopeHoistable() 1043 ConditionValues.insert(BI->getCondition()); in getCHRConditionValuesForRegion() 1046 ConditionValues.insert(SI->getCondition()); in getCHRConditionValuesForRegion() 1407 bool IsHoistable = checkHoistValue(BI->getCondition(), InsertPoint, DT, in setCHRRegions() 1419 bool IsHoistable = checkHoistValue(SI->getCondition(), InsertPoint, DT, in setCHRRegions() 1505 hoistValue(BI->getCondition(), HoistPoint, R, Scope->HoistStopMap, in hoistScopeConditions() 1513 hoistValue(SI->getCondition(), HoistPoint, R, Scope->HoistStopMap, in hoistScopeConditions() [all …]
|
| /netbsd-src/external/apache2/llvm/dist/llvm/lib/Transforms/ObjCARC/ |
| H A D | ProvenanceAnalysis.cpp | 46 if (A->getCondition() == SB->getCondition()) in relatedSelect()
|
| /netbsd-src/external/apache2/llvm/dist/llvm/lib/CodeGen/ |
| H A D | HardwareLoops.cpp | 352 if (BI->isUnconditional() || !isa<ICmpInst>(BI->getCondition())) in CanGenerateTest() 357 auto ICmp = cast<ICmpInst>(BI->getCondition()); in CanGenerateTest() 473 Value *OldCond = ExitBranch->getCondition(); in InsertLoopDec() 516 Value *OldCond = ExitBranch->getCondition(); in UpdateBranch()
|
| /netbsd-src/external/apache2/llvm/dist/llvm/lib/Target/AMDGPU/ |
| H A D | SIAnnotateControlFlow.cpp | 207 Value *Ret = CallInst::Create(If, Term->getCondition(), "", Term); in openIf() 263 Value *Cond = Term->getCondition(); in handleLoop() 352 PHINode *Phi = dyn_cast<PHINode>(Term->getCondition()); in runOnFunction()
|
| /netbsd-src/external/apache2/llvm/dist/llvm/lib/Target/BPF/ |
| H A D | BPFAdjustOpt.cpp | 182 auto *Cond = dyn_cast<ICmpInst>(BI->getCondition()); in serializeICMPCrossBB() 192 Cond = dyn_cast<ICmpInst>(BI->getCondition()); in serializeICMPCrossBB()
|
| /netbsd-src/external/apache2/llvm/dist/llvm/lib/Transforms/Vectorize/ |
| H A D | VPlanHCFGBuilder.cpp | 209 getOrCreateVPOperand(Br->getCondition()); in createVPInstructionsForVPBB() 299 Value *BrCond = Br->getCondition(); in buildPlainCFG()
|
| /netbsd-src/external/apache2/llvm/dist/llvm/tools/llvm-diff/ |
| H A D | DifferenceEngine.cpp | 296 if (!equivalentAsOperands(LI->getCondition(), RI->getCondition())) { in diff() 328 if (!equivalentAsOperands(LI->getCondition(), RI->getCondition())) { in diff()
|
| /netbsd-src/external/apache2/llvm/dist/llvm/examples/IRTransforms/ |
| H A D | SimplifyCFG.cpp | 150 ConstantInt *CI = dyn_cast<ConstantInt>(BI->getCondition()); in eliminateCondBranches_v1() 186 ConstantInt *CI = dyn_cast<ConstantInt>(BI->getCondition()); in eliminateCondBranches_v2()
|
| /netbsd-src/external/apache2/llvm/dist/llvm/lib/Analysis/ |
| H A D | LoopNestAnalysis.cpp | 87 const CmpInst *OuterLoopLatchCmp = dyn_cast<CmpInst>(BI->getCondition()); in arePerfectlyNested() 97 (InnerGuard) ? dyn_cast<CmpInst>(InnerGuard->getCondition()) : nullptr; in arePerfectlyNested()
|
| H A D | GuardUtils.cpp | 66 auto *Cond = BI->getCondition(); in parseWidenableBranch()
|