Lines Matching refs:SwitchInst
257 bool simplifySwitch(SwitchInst *SI, IRBuilder<> &Builder);
275 bool SimplifySwitchOnSelect(SwitchInst *SI, SelectInst *Select);
277 bool TurnSwitchRangeIntoICmp(SwitchInst *SI, IRBuilder<> &Builder);
749 if (SwitchInst *SI = dyn_cast<SwitchInst>(TI)) { in EraseTerminatorAndDCECond()
767 if (SwitchInst *SI = dyn_cast<SwitchInst>(TI)) { in isValueEqualityComparison()
794 if (SwitchInst *SI = dyn_cast<SwitchInst>(TI)) { in GetValueEqualityComparisonCases()
854 static void setBranchWeights(SwitchInst *SI, ArrayRef<uint32_t> Weights) { in setBranchWeights()
940 SwitchInstProfUpdateWrapper SI = *cast<SwitchInst>(TI); in SimplifyEqualityComparisonWithOnlyPredecessor()
950 for (SwitchInst::CaseIt i = SI->case_end(), e = SI->case_begin(); i != e;) { in SimplifyEqualityComparisonWithOnlyPredecessor()
1328 SwitchInst *NewSI = Builder.CreateSwitch(CV, PredDefault, PredCases.size()); in PerformValueComparisonIntoPredecessorFolding()
4336 bool SimplifyCFGOpt::SimplifySwitchOnSelect(SwitchInst *SI, in SimplifySwitchOnSelect()
4423 if (!Pred || !isa<SwitchInst>(Pred->getTerminator())) in tryToSimplifyUncondBranchWithICmpInIt()
4426 SwitchInst *SI = cast<SwitchInst>(Pred->getTerminator()); in tryToSimplifyUncondBranchWithICmpInIt()
4621 SwitchInst *New = Builder.CreateSwitch(CompVal, DefaultBB, Values.size()); in SimplifyBranchOnICmpChain()
5003 } else if (auto *SI = dyn_cast<SwitchInst>(TI)) { in simplifyUnreachable()
5114 static void createUnreachableSwitchDefault(SwitchInst *Switch, in createUnreachableSwitchDefault()
5137 bool SimplifyCFGOpt::TurnSwitchRangeIntoICmp(SwitchInst *SI, in TurnSwitchRangeIntoICmp()
5266 static bool eliminateDeadSwitchCases(SwitchInst *SI, DomTreeUpdater *DTU, in eliminateDeadSwitchCases()
5321 SwitchInst::CaseIt CaseI = SI->findCaseValue(DeadCase); in eliminateDeadSwitchCases()
5376 static bool ForwardSwitchConditionToPHI(SwitchInst *SI) { in ForwardSwitchConditionToPHI()
5502 getCaseResults(SwitchInst *SI, ConstantInt *CaseVal, BasicBlock *CaseDest, in getCaseResults()
5591 static bool initializeUniqueCases(SwitchInst *SI, PHINode *&PHI, in initializeUniqueCases()
5724 static void removeSwitchAfterSelectFold(SwitchInst *SI, PHINode *PHI, in removeSwitchAfterSelectFold()
5761 static bool trySwitchToSelect(SwitchInst *SI, IRBuilder<> &Builder, in trySwitchToSelect()
6081 ShouldBuildLookupTable(SwitchInst *SI, uint64_t TableSize, in ShouldBuildLookupTable()
6219 static bool SwitchToLookupTable(SwitchInst *SI, IRBuilder<> &Builder, in SwitchToLookupTable()
6247 SwitchInst::CaseIt CI = SI->case_begin(); in SwitchToLookupTable()
6260 for (SwitchInst::CaseIt E = SI->case_end(); CI != E; ++CI) { in SwitchToLookupTable()
6487 static bool ReduceSwitchRange(SwitchInst *SI, IRBuilder<> &Builder, in ReduceSwitchRange()
6570 bool SimplifyCFGOpt::simplifySwitch(SwitchInst *SI, IRBuilder<> &Builder) { in simplifySwitch()
7045 } else if (SwitchInst *SI = dyn_cast<SwitchInst>(T)) { in removeUndefIntroducingPredecessor()
7142 Changed |= simplifySwitch(cast<SwitchInst>(Terminator), Builder); in simplifyOnce()