Lines Matching refs:BO
504 if (BinaryOperator *BO = isReassociableOp(Op, Opcode)) { in LinearizeExprTree() local
507 Worklist.push_back(std::make_pair(BO, Weight)); in LinearizeExprTree()
545 if (BinaryOperator *BO = isReassociableOp(Op, Opcode)) { in LinearizeExprTree()
547 Worklist.push_back(std::make_pair(BO, It->second)); in LinearizeExprTree()
576 if (BinaryOperator *BO = dyn_cast<BinaryOperator>(Op)) in LinearizeExprTree() local
577 if ((Opcode == Instruction::Mul && match(BO, m_Neg(m_Value()))) || in LinearizeExprTree()
578 (Opcode == Instruction::FMul && match(BO, m_FNeg(m_Value())))) { in LinearizeExprTree()
581 BO = LowerNegateToMultiply(BO); in LinearizeExprTree()
582 LLVM_DEBUG(dbgs() << *BO << '\n'); in LinearizeExprTree()
583 Worklist.push_back(std::make_pair(BO, Weight)); in LinearizeExprTree()
694 BinaryOperator *BO = isReassociableOp(OldLHS, Opcode); in RewriteExprTree() local
695 if (BO && !NotRewritable.count(BO)) in RewriteExprTree()
696 NodesToRewrite.push_back(BO); in RewriteExprTree()
700 BinaryOperator *BO = isReassociableOp(OldRHS, Opcode); in RewriteExprTree() local
701 if (BO && !NotRewritable.count(BO)) in RewriteExprTree()
702 NodesToRewrite.push_back(BO); in RewriteExprTree()
725 BinaryOperator *BO = isReassociableOp(Op->getOperand(1), Opcode); in RewriteExprTree() local
726 if (BO && !NotRewritable.count(BO)) in RewriteExprTree()
727 NodesToRewrite.push_back(BO); in RewriteExprTree()
739 BinaryOperator *BO = isReassociableOp(Op->getOperand(0), Opcode); in RewriteExprTree() local
740 if (BO && !NotRewritable.count(BO)) { in RewriteExprTree()
741 Op = BO; in RewriteExprTree()
1015 BinaryOperator *BO = isReassociableOp(V, Instruction::Mul, Instruction::FMul); in RemoveFactorFromExpression() local
1016 if (!BO) in RemoveFactorFromExpression()
1020 MadeChange |= LinearizeExprTree(BO, Tree); in RemoveFactorFromExpression()
1062 RewriteExprTree(BO, Factors); in RemoveFactorFromExpression()
1066 BasicBlock::iterator InsertPt = ++BO->getIterator(); in RemoveFactorFromExpression()
1071 RedoInsts.insert(BO); in RemoveFactorFromExpression()
1074 RewriteExprTree(BO, Factors); in RemoveFactorFromExpression()
1075 V = BO; in RemoveFactorFromExpression()
1079 V = CreateNeg(V, "neg", &*InsertPt, BO); in RemoveFactorFromExpression()
1090 BinaryOperator *BO = isReassociableOp(V, Instruction::Mul, Instruction::FMul); in FindSingleUseMultiplyFactors() local
1091 if (!BO) { in FindSingleUseMultiplyFactors()
1097 FindSingleUseMultiplyFactors(BO->getOperand(1), Factors); in FindSingleUseMultiplyFactors()
1098 FindSingleUseMultiplyFactors(BO->getOperand(0), Factors); in FindSingleUseMultiplyFactors()
2097 BinaryOperator *BO = cast<BinaryOperator>(I); in OptimizeInst() local
2101 unsigned Opcode = BO->getOpcode(); in OptimizeInst()
2102 if (BO->hasOneUse() && BO->user_back()->getOpcode() == Opcode) { in OptimizeInst()
2106 if (BO->user_back() != BO && in OptimizeInst()
2107 BO->getParent() == BO->user_back()->getParent()) in OptimizeInst()
2108 RedoInsts.insert(BO->user_back()); in OptimizeInst()
2114 if (BO->hasOneUse() && BO->getOpcode() == Instruction::Add && in OptimizeInst()
2115 cast<Instruction>(BO->user_back())->getOpcode() == Instruction::Sub) in OptimizeInst()
2117 if (BO->hasOneUse() && BO->getOpcode() == Instruction::FAdd && in OptimizeInst()
2118 cast<Instruction>(BO->user_back())->getOpcode() == Instruction::FSub) in OptimizeInst()
2121 ReassociateExpression(BO); in OptimizeInst()