Lines Matching defs:TrueBBI
186 bool ValidSimple(BBInfo &TrueBBI, unsigned &Dups,
188 bool ValidTriangle(BBInfo &TrueBBI, BBInfo &FalseBBI,
191 bool ValidDiamond(BBInfo &TrueBBI, BBInfo &FalseBBI,
471 bool IfConverter::ValidSimple(BBInfo &TrueBBI, unsigned &Dups,
474 if (TrueBBI.IsBeingAnalyzed || TrueBBI.IsDone)
477 if (TrueBBI.IsBrAnalyzable)
480 if (TrueBBI.BB->pred_size() > 1) {
481 if (TrueBBI.CannotBeCopied ||
482 !TII->isProfitableToDupForIfCvt(*TrueBBI.BB, TrueBBI.NonPredSize,
485 Dups = TrueBBI.NonPredSize;
497 bool IfConverter::ValidTriangle(BBInfo &TrueBBI, BBInfo &FalseBBI,
501 if (TrueBBI.IsBeingAnalyzed || TrueBBI.IsDone)
504 if (TrueBBI.BB->pred_size() > 1) {
505 if (TrueBBI.CannotBeCopied)
508 unsigned Size = TrueBBI.NonPredSize;
509 if (TrueBBI.IsBrAnalyzable) {
510 if (TrueBBI.TrueBB && TrueBBI.BrCond.empty())
515 ? TrueBBI.TrueBB : TrueBBI.FalseBB;
521 if (!TII->isProfitableToDupForIfCvt(*TrueBBI.BB, Size, Prediction))
526 MachineBasicBlock *TExit = FalseBranch ? TrueBBI.FalseBB : TrueBBI.TrueBB;
527 if (!TExit && blockAlwaysFallThrough(TrueBBI)) {
528 MachineFunction::iterator I = TrueBBI.BB;
529 if (++I == TrueBBI.BB->getParent()->end())
538 bool IfConverter::ValidDiamond(BBInfo &TrueBBI, BBInfo &FalseBBI,
541 if (TrueBBI.IsBeingAnalyzed || TrueBBI.IsDone ||
545 MachineBasicBlock *TT = TrueBBI.TrueBB;
548 if (!TT && blockAlwaysFallThrough(TrueBBI))
549 TT = getNextBlock(TrueBBI.BB);
554 if (TT == NULL && (TrueBBI.IsBrAnalyzable || FalseBBI.IsBrAnalyzable))
556 if (TrueBBI.BB->pred_size() > 1 || FalseBBI.BB->pred_size() > 1)
560 if (TrueBBI.FalseBB || FalseBBI.FalseBB ||
561 (TrueBBI.ClobbersPred && FalseBBI.ClobbersPred))
565 MachineBasicBlock::iterator TIB = TrueBBI.BB->begin();
567 MachineBasicBlock::iterator TIE = TrueBBI.BB->end();
789 BBInfo &TrueBBI = AnalyzeBlock(BBI.TrueBB, Tokens);
792 if (TrueBBI.IsDone && FalseBBI.IsDone) {
803 bool TNeedSub = !TrueBBI.Predicate.empty();
807 BranchProbability Prediction = MBPI->getEdgeProbability(BB, TrueBBI.BB);
809 if (CanRevCond && ValidDiamond(TrueBBI, FalseBBI, Dups, Dups2) &&
810 MeetIfcvtSizeLimit(*TrueBBI.BB, (TrueBBI.NonPredSize - (Dups + Dups2) +
811 TrueBBI.ExtraCost), TrueBBI.ExtraCost2,
815 FeasibilityAnalysis(TrueBBI, BBI.BrCond) &&
830 if (ValidTriangle(TrueBBI, FalseBBI, false, Dups, Prediction) &&
831 MeetIfcvtSizeLimit(*TrueBBI.BB, TrueBBI.NonPredSize + TrueBBI.ExtraCost,
832 TrueBBI.ExtraCost2, Prediction) &&
833 FeasibilityAnalysis(TrueBBI, BBI.BrCond, true)) {
845 if (ValidTriangle(TrueBBI, FalseBBI, true, Dups, Prediction) &&
846 MeetIfcvtSizeLimit(*TrueBBI.BB, TrueBBI.NonPredSize + TrueBBI.ExtraCost,
847 TrueBBI.ExtraCost2, Prediction) &&
848 FeasibilityAnalysis(TrueBBI, BBI.BrCond, true, true)) {
853 if (ValidSimple(TrueBBI, Dups, Prediction) &&
854 MeetIfcvtSizeLimit(*TrueBBI.BB, TrueBBI.NonPredSize + TrueBBI.ExtraCost,
855 TrueBBI.ExtraCost2, Prediction) &&
856 FeasibilityAnalysis(TrueBBI, BBI.BrCond)) {
870 if (ValidTriangle(FalseBBI, TrueBBI, false, Dups,
880 if (ValidTriangle(FalseBBI, TrueBBI, true, Dups,
1024 BBInfo &TrueBBI = BBAnalysis[BBI.TrueBB->getNumber()];
1026 BBInfo *CvtBBI = &TrueBBI;
1110 BBInfo &TrueBBI = BBAnalysis[BBI.TrueBB->getNumber()];
1112 BBInfo *CvtBBI = &TrueBBI;
1233 BBInfo &TrueBBI = BBAnalysis[BBI.TrueBB->getNumber()];
1235 MachineBasicBlock *TailBB = TrueBBI.TrueBB;
1238 if (blockAlwaysFallThrough(TrueBBI))
1240 assert((TailBB || !TrueBBI.IsBrAnalyzable) && "Unexpected!");
1243 if (TrueBBI.IsDone || FalseBBI.IsDone ||
1244 TrueBBI.BB->pred_size() > 1 ||
1248 TrueBBI.IsAnalyzed = false;
1253 if (TrueBBI.BB->hasAddressTaken() || FalseBBI.BB->hasAddressTaken())
1260 BBInfo *BBI1 = &TrueBBI;
1270 if (TrueBBI.ClobbersPred && !FalseBBI.ClobbersPred)
1272 else if (TrueBBI.ClobbersPred == FalseBBI.ClobbersPred) {
1273 if (TrueBBI.NonPredSize > FalseBBI.NonPredSize)
1451 BBI.IsDone = TrueBBI.IsDone = FalseBBI.IsDone = true;