reference, declarationdefinition
definition → references, declarations, derived classes, virtual overrides
reference to multiple definitions → definitions
unreferenced

References

lib/Transforms/Scalar/SimpleLoopUnswitch.cpp
  352   assert(BI.isConditional() && "Can only unswitch a conditional branch!");
  353   LLVM_DEBUG(dbgs() << "  Trying to unswitch branch: " << BI << "\n");
  362   if (L.isLoopInvariant(BI.getCondition())) {
  363     Invariants.push_back(BI.getCondition());
  366     if (auto *CondInst = dyn_cast<Instruction>(BI.getCondition()))
  376   auto *LoopExitBB = BI.getSuccessor(0);
  380     LoopExitBB = BI.getSuccessor(1);
  384   auto *ContinueBB = BI.getSuccessor(1 - LoopExitSuccIdx);
  385   auto *ParentBB = BI.getParent();
  396       if (cast<Instruction>(BI.getCondition())->getOpcode() != Instruction::Or)
  399       if (cast<Instruction>(BI.getCondition())->getOpcode() != Instruction::And)
  405     dbgs() << "    unswitching trivial invariant conditions for: " << BI
  440     assert(LoopExitBB->getUniquePredecessor() == BI.getParent() &&
  459     OldPH->getInstList().splice(OldPH->end(), BI.getParent()->getInstList(),
  460                                 BI);
  464       ParentBB->getInstList().push_back(BI.clone());
  470     BI.setSuccessor(LoopExitSuccIdx, UnswitchedBB);
  471     BI.setSuccessor(1 - LoopExitSuccIdx, NewPH);
  476       assert(cast<Instruction>(BI.getCondition())->getOpcode() ==
  480       assert(cast<Instruction>(BI.getCondition())->getOpcode() ==
  524                                  ? ConstantInt::getFalse(BI.getContext())
  525                                  : ConstantInt::getTrue(BI.getContext());