Lines Matching refs:SwitchInst
265 bool simplifySwitch(SwitchInst *SI, IRBuilder<> &Builder);
284 bool SimplifySwitchOnSelect(SwitchInst *SI, SelectInst *Select);
286 bool TurnSwitchRangeIntoICmp(SwitchInst *SI, IRBuilder<> &Builder);
759 if (SwitchInst *SI = dyn_cast<SwitchInst>(TI)) { in EraseTerminatorAndDCECond()
777 if (SwitchInst *SI = dyn_cast<SwitchInst>(TI)) { in isValueEqualityComparison()
804 if (SwitchInst *SI = dyn_cast<SwitchInst>(TI)) { in GetValueEqualityComparisonCases()
864 static void setBranchWeights(SwitchInst *SI, ArrayRef<uint32_t> Weights, in setBranchWeights()
952 SwitchInstProfUpdateWrapper SI = *cast<SwitchInst>(TI); in SimplifyEqualityComparisonWithOnlyPredecessor()
962 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()
4697 bool SimplifyCFGOpt::SimplifySwitchOnSelect(SwitchInst *SI, in SimplifySwitchOnSelect()
4784 if (!Pred || !isa<SwitchInst>(Pred->getTerminator())) in tryToSimplifyUncondBranchWithICmpInIt()
4787 SwitchInst *SI = cast<SwitchInst>(Pred->getTerminator()); in tryToSimplifyUncondBranchWithICmpInIt()
4982 SwitchInst *New = Builder.CreateSwitch(CompVal, DefaultBB, Values.size()); in SimplifyBranchOnICmpChain()
5380 } else if (auto *SI = dyn_cast<SwitchInst>(TI)) { in simplifyUnreachable()
5493 static void createUnreachableSwitchDefault(SwitchInst *Switch, in createUnreachableSwitchDefault()
5519 bool SimplifyCFGOpt::TurnSwitchRangeIntoICmp(SwitchInst *SI, in TurnSwitchRangeIntoICmp()
5648 static bool eliminateDeadSwitchCases(SwitchInst *SI, DomTreeUpdater *DTU, in eliminateDeadSwitchCases()
5726 SwitchInst::CaseIt CaseI = SI->findCaseValue(DeadCase); in eliminateDeadSwitchCases()
5781 static bool ForwardSwitchConditionToPHI(SwitchInst *SI) { in ForwardSwitchConditionToPHI()
5908 getCaseResults(SwitchInst *SI, ConstantInt *CaseVal, BasicBlock *CaseDest, in getCaseResults()
5997 static bool initializeUniqueCases(SwitchInst *SI, PHINode *&PHI, in initializeUniqueCases()
6130 static void removeSwitchAfterSelectFold(SwitchInst *SI, PHINode *PHI, in removeSwitchAfterSelectFold()
6167 static bool trySwitchToSelect(SwitchInst *SI, IRBuilder<> &Builder, in trySwitchToSelect()
6504 ShouldBuildLookupTable(SwitchInst *SI, uint64_t TableSize, in ShouldBuildLookupTable()
6643 static bool SwitchToLookupTable(SwitchInst *SI, IRBuilder<> &Builder, in SwitchToLookupTable()
6671 SwitchInst::CaseIt CI = SI->case_begin(); in SwitchToLookupTable()
6684 for (SwitchInst::CaseIt E = SI->case_end(); CI != E; ++CI) { in SwitchToLookupTable()
6956 static bool ReduceSwitchRange(SwitchInst *SI, IRBuilder<> &Builder, in ReduceSwitchRange()
7043 static bool simplifySwitchOfPowersOfTwo(SwitchInst *SI, IRBuilder<> &Builder, in simplifySwitchOfPowersOfTwo()
7109 bool SimplifyCFGOpt::simplifySwitch(SwitchInst *SI, IRBuilder<> &Builder) { in simplifySwitch()
7741 } else if (SwitchInst *SI = dyn_cast<SwitchInst>(T)) { in removeUndefIntroducingPredecessor()
7840 Changed |= simplifySwitch(cast<SwitchInst>(Terminator), Builder); in simplifyOnce()