• Home
  • Raw
  • Download

Lines Matching refs:TrueBBI

199     bool ValidSimple(BBInfo &TrueBBI, unsigned &Dups,
201 bool ValidTriangle(BBInfo &TrueBBI, BBInfo &FalseBBI,
204 bool ValidDiamond(BBInfo &TrueBBI, BBInfo &FalseBBI,
478 bool IfConverter::ValidSimple(BBInfo &TrueBBI, unsigned &Dups, in ValidSimple() argument
481 if (TrueBBI.IsBeingAnalyzed || TrueBBI.IsDone) in ValidSimple()
484 if (TrueBBI.IsBrAnalyzable) in ValidSimple()
487 if (TrueBBI.BB->pred_size() > 1) { in ValidSimple()
488 if (TrueBBI.CannotBeCopied || in ValidSimple()
489 !TII->isProfitableToDupForIfCvt(*TrueBBI.BB, TrueBBI.NonPredSize, in ValidSimple()
492 Dups = TrueBBI.NonPredSize; in ValidSimple()
504 bool IfConverter::ValidTriangle(BBInfo &TrueBBI, BBInfo &FalseBBI, in ValidTriangle() argument
508 if (TrueBBI.IsBeingAnalyzed || TrueBBI.IsDone) in ValidTriangle()
511 if (TrueBBI.BB->pred_size() > 1) { in ValidTriangle()
512 if (TrueBBI.CannotBeCopied) in ValidTriangle()
515 unsigned Size = TrueBBI.NonPredSize; in ValidTriangle()
516 if (TrueBBI.IsBrAnalyzable) { in ValidTriangle()
517 if (TrueBBI.TrueBB && TrueBBI.BrCond.empty()) in ValidTriangle()
522 ? TrueBBI.TrueBB : TrueBBI.FalseBB; in ValidTriangle()
528 if (!TII->isProfitableToDupForIfCvt(*TrueBBI.BB, Size, Prediction)) in ValidTriangle()
533 MachineBasicBlock *TExit = FalseBranch ? TrueBBI.FalseBB : TrueBBI.TrueBB; in ValidTriangle()
534 if (!TExit && blockAlwaysFallThrough(TrueBBI)) { in ValidTriangle()
535 MachineFunction::iterator I = TrueBBI.BB->getIterator(); in ValidTriangle()
536 if (++I == TrueBBI.BB->getParent()->end()) in ValidTriangle()
545 bool IfConverter::ValidDiamond(BBInfo &TrueBBI, BBInfo &FalseBBI, in ValidDiamond() argument
548 if (TrueBBI.IsBeingAnalyzed || TrueBBI.IsDone || in ValidDiamond()
552 MachineBasicBlock *TT = TrueBBI.TrueBB; in ValidDiamond()
555 if (!TT && blockAlwaysFallThrough(TrueBBI)) in ValidDiamond()
556 TT = getNextBlock(TrueBBI.BB); in ValidDiamond()
561 if (!TT && (TrueBBI.IsBrAnalyzable || FalseBBI.IsBrAnalyzable)) in ValidDiamond()
563 if (TrueBBI.BB->pred_size() > 1 || FalseBBI.BB->pred_size() > 1) in ValidDiamond()
567 if (TrueBBI.FalseBB || FalseBBI.FalseBB || in ValidDiamond()
568 (TrueBBI.ClobbersPred && FalseBBI.ClobbersPred)) in ValidDiamond()
572 MachineBasicBlock::iterator TIB = TrueBBI.BB->begin(); in ValidDiamond()
574 MachineBasicBlock::iterator TIE = TrueBBI.BB->end(); in ValidDiamond()
607 if (!TrueBBI.BB->succ_empty() || !FalseBBI.BB->succ_empty()) { in ValidDiamond()
862 BBInfo &TrueBBI = BBAnalysis[BBI.TrueBB->getNumber()]; in AnalyzeBlock() local
865 if (TrueBBI.IsDone && FalseBBI.IsDone) { in AnalyzeBlock()
878 bool TNeedSub = !TrueBBI.Predicate.empty(); in AnalyzeBlock()
882 BranchProbability Prediction = MBPI->getEdgeProbability(BB, TrueBBI.BB); in AnalyzeBlock()
884 if (CanRevCond && ValidDiamond(TrueBBI, FalseBBI, Dups, Dups2) && in AnalyzeBlock()
885 MeetIfcvtSizeLimit(*TrueBBI.BB, (TrueBBI.NonPredSize - (Dups + Dups2) + in AnalyzeBlock()
886 TrueBBI.ExtraCost), TrueBBI.ExtraCost2, in AnalyzeBlock()
890 FeasibilityAnalysis(TrueBBI, BBI.BrCond) && in AnalyzeBlock()
905 if (ValidTriangle(TrueBBI, FalseBBI, false, Dups, Prediction) && in AnalyzeBlock()
906 MeetIfcvtSizeLimit(*TrueBBI.BB, TrueBBI.NonPredSize + TrueBBI.ExtraCost, in AnalyzeBlock()
907 TrueBBI.ExtraCost2, Prediction) && in AnalyzeBlock()
908 FeasibilityAnalysis(TrueBBI, BBI.BrCond, true)) { in AnalyzeBlock()
921 if (ValidTriangle(TrueBBI, FalseBBI, true, Dups, Prediction) && in AnalyzeBlock()
922 MeetIfcvtSizeLimit(*TrueBBI.BB, TrueBBI.NonPredSize + TrueBBI.ExtraCost, in AnalyzeBlock()
923 TrueBBI.ExtraCost2, Prediction) && in AnalyzeBlock()
924 FeasibilityAnalysis(TrueBBI, BBI.BrCond, true, true)) { in AnalyzeBlock()
930 if (ValidSimple(TrueBBI, Dups, Prediction) && in AnalyzeBlock()
931 MeetIfcvtSizeLimit(*TrueBBI.BB, TrueBBI.NonPredSize + TrueBBI.ExtraCost, in AnalyzeBlock()
932 TrueBBI.ExtraCost2, Prediction) && in AnalyzeBlock()
933 FeasibilityAnalysis(TrueBBI, BBI.BrCond)) { in AnalyzeBlock()
948 if (ValidTriangle(FalseBBI, TrueBBI, false, Dups, in AnalyzeBlock()
959 if (ValidTriangle(FalseBBI, TrueBBI, true, Dups, in AnalyzeBlock()
1112 BBInfo &TrueBBI = BBAnalysis[BBI.TrueBB->getNumber()]; in IfConvertSimple() local
1114 BBInfo *CvtBBI = &TrueBBI; in IfConvertSimple()
1198 BBInfo &TrueBBI = BBAnalysis[BBI.TrueBB->getNumber()]; in IfConvertTriangle() local
1200 BBInfo *CvtBBI = &TrueBBI; in IfConvertTriangle()
1346 BBInfo &TrueBBI = BBAnalysis[BBI.TrueBB->getNumber()]; in IfConvertDiamond() local
1348 MachineBasicBlock *TailBB = TrueBBI.TrueBB; in IfConvertDiamond()
1351 if (blockAlwaysFallThrough(TrueBBI)) in IfConvertDiamond()
1353 assert((TailBB || !TrueBBI.IsBrAnalyzable) && "Unexpected!"); in IfConvertDiamond()
1356 if (TrueBBI.IsDone || FalseBBI.IsDone || in IfConvertDiamond()
1357 TrueBBI.BB->pred_size() > 1 || in IfConvertDiamond()
1361 TrueBBI.IsAnalyzed = false; in IfConvertDiamond()
1366 if (TrueBBI.BB->hasAddressTaken() || FalseBBI.BB->hasAddressTaken()) in IfConvertDiamond()
1373 BBInfo *BBI1 = &TrueBBI; in IfConvertDiamond()
1383 if (TrueBBI.ClobbersPred && !FalseBBI.ClobbersPred) in IfConvertDiamond()
1385 else if (TrueBBI.ClobbersPred == FalseBBI.ClobbersPred) { in IfConvertDiamond()
1386 if (TrueBBI.NonPredSize > FalseBBI.NonPredSize) in IfConvertDiamond()
1584 BBI.IsDone = TrueBBI.IsDone = FalseBBI.IsDone = true; in IfConvertDiamond()