Lines Matching refs:SwitchInst
264 bool simplifySwitch(SwitchInst *SI, IRBuilder<> &Builder);
283 bool SimplifySwitchOnSelect(SwitchInst *SI, SelectInst *Select);
285 bool TurnSwitchRangeIntoICmp(SwitchInst *SI, IRBuilder<> &Builder);
758 if (SwitchInst *SI = dyn_cast<SwitchInst>(TI)) { in EraseTerminatorAndDCECond()
776 if (SwitchInst *SI = dyn_cast<SwitchInst>(TI)) { in isValueEqualityComparison()
803 if (SwitchInst *SI = dyn_cast<SwitchInst>(TI)) { in GetValueEqualityComparisonCases()
863 static void setBranchWeights(SwitchInst *SI, ArrayRef<uint32_t> Weights) { in setBranchWeights()
949 SwitchInstProfUpdateWrapper SI = *cast<SwitchInst>(TI); in SimplifyEqualityComparisonWithOnlyPredecessor()
959 for (SwitchInst::CaseIt i = SI->case_end(), e = SI->case_begin(); i != e;) { in SimplifyEqualityComparisonWithOnlyPredecessor()
1332 SwitchInst *NewSI = Builder.CreateSwitch(CV, PredDefault, PredCases.size()); in PerformValueComparisonIntoPredecessorFolding()
4628 bool SimplifyCFGOpt::SimplifySwitchOnSelect(SwitchInst *SI, in SimplifySwitchOnSelect()
4715 if (!Pred || !isa<SwitchInst>(Pred->getTerminator())) in tryToSimplifyUncondBranchWithICmpInIt()
4718 SwitchInst *SI = cast<SwitchInst>(Pred->getTerminator()); in tryToSimplifyUncondBranchWithICmpInIt()
4913 SwitchInst *New = Builder.CreateSwitch(CompVal, DefaultBB, Values.size()); in SimplifyBranchOnICmpChain()
5312 } else if (auto *SI = dyn_cast<SwitchInst>(TI)) { in simplifyUnreachable()
5425 static void createUnreachableSwitchDefault(SwitchInst *Switch, in createUnreachableSwitchDefault()
5448 bool SimplifyCFGOpt::TurnSwitchRangeIntoICmp(SwitchInst *SI, in TurnSwitchRangeIntoICmp()
5577 static bool eliminateDeadSwitchCases(SwitchInst *SI, DomTreeUpdater *DTU, in eliminateDeadSwitchCases()
5632 SwitchInst::CaseIt CaseI = SI->findCaseValue(DeadCase); in eliminateDeadSwitchCases()
5687 static bool ForwardSwitchConditionToPHI(SwitchInst *SI) { in ForwardSwitchConditionToPHI()
5813 getCaseResults(SwitchInst *SI, ConstantInt *CaseVal, BasicBlock *CaseDest, in getCaseResults()
5902 static bool initializeUniqueCases(SwitchInst *SI, PHINode *&PHI, in initializeUniqueCases()
6035 static void removeSwitchAfterSelectFold(SwitchInst *SI, PHINode *PHI, in removeSwitchAfterSelectFold()
6072 static bool trySwitchToSelect(SwitchInst *SI, IRBuilder<> &Builder, in trySwitchToSelect()
6409 ShouldBuildLookupTable(SwitchInst *SI, uint64_t TableSize, in ShouldBuildLookupTable()
6547 static bool SwitchToLookupTable(SwitchInst *SI, IRBuilder<> &Builder, in SwitchToLookupTable()
6575 SwitchInst::CaseIt CI = SI->case_begin(); in SwitchToLookupTable()
6588 for (SwitchInst::CaseIt E = SI->case_end(); CI != E; ++CI) { in SwitchToLookupTable()
6848 static bool ReduceSwitchRange(SwitchInst *SI, IRBuilder<> &Builder, in ReduceSwitchRange()
6935 static bool simplifySwitchOfPowersOfTwo(SwitchInst *SI, IRBuilder<> &Builder, in simplifySwitchOfPowersOfTwo()
7001 bool SimplifyCFGOpt::simplifySwitch(SwitchInst *SI, IRBuilder<> &Builder) { in simplifySwitch()
7490 } else if (SwitchInst *SI = dyn_cast<SwitchInst>(T)) { in removeUndefIntroducingPredecessor()
7588 Changed |= simplifySwitch(cast<SwitchInst>(Terminator), Builder); in simplifyOnce()