Home | History | Annotate | Download | only in Scalar

Lines Matching full:condition

133 /// | |  1 = "If" block, calculates the condition
134 /// 4 | 2 = "Then" subregion, runs if the condition is true
136 /// |/ 4 = "Else" optional subregion, runs if the condition is false
142 /// The condition for the optional "Else" region is expressed as a PHI node.
160 /// while the true side continues the general flow. So the loop condition
194 Value *invert(Value *Condition);
367 /// \brief Invert the given condition
368 Value *StructurizeCFG::invert(Value *Condition) {
370 if (Condition == BoolTrue)
373 if (Condition == BoolFalse)
376 if (Condition == BoolUndef)
379 // Second: If the condition is already inverted, return the original value
380 if (match(Condition, m_Not(m_Value(Condition))))
381 return Condition;
383 if (Instruction *Inst = dyn_cast<Instruction>(Condition)) {
386 for (User *U : Condition->users())
388 if (I->getParent() == Parent && match(I, m_Not(m_Specific(Condition))))
392 return BinaryOperator::CreateNot(Condition, "", Parent->getTerminator());
395 if (Argument *Arg = dyn_cast<Argument>(Condition)) {
397 return BinaryOperator::CreateNot(Condition,
402 llvm_unreachable("Unhandled condition to invert");
405 /// \brief Build the condition for one edge