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

Declarations

include/llvm/Analysis/AliasAnalysis.h
   60 class BasicBlock;
include/llvm/Analysis/AliasSetTracker.h
   37 class BasicBlock;
include/llvm/Analysis/BasicAliasAnalysis.h
   36 class BasicBlock;
include/llvm/Analysis/BlockFrequencyInfo.h
   25 class BasicBlock;
include/llvm/Analysis/CFG.h
   22 class BasicBlock;
include/llvm/Analysis/CodeMetrics.h
   22 class BasicBlock;
include/llvm/Analysis/EHPersonalities.h
   18 class BasicBlock;
include/llvm/Analysis/GuardUtils.h
   17 class BasicBlock;
include/llvm/Analysis/IVDescriptors.h
   38 class BasicBlock;
include/llvm/Analysis/Interval.h
   27 class BasicBlock;
include/llvm/Analysis/IntervalIterator.h
   50 class BasicBlock;
include/llvm/Analysis/IntervalPartition.h
   31 class BasicBlock;
include/llvm/Analysis/IteratedDominanceFrontier.h
   17 class BasicBlock;
include/llvm/Analysis/OrderedBasicBlock.h
   31 class BasicBlock;
include/llvm/Analysis/ProfileSummaryInfo.h
   29 class BasicBlock;
include/llvm/Analysis/RegionIterator.h
   25 class BasicBlock;
include/llvm/Analysis/ScalarEvolution.h
   56 class BasicBlock;
include/llvm/Analysis/SyncDependenceAnalysis.h
   27 class BasicBlock;
include/llvm/Analysis/Trace.h
   25 class BasicBlock;
include/llvm/CodeGen/AsmPrinter.h
   36 class BasicBlock;
include/llvm/CodeGen/FastISel.h
   37 class BasicBlock;
include/llvm/CodeGen/FunctionLoweringInfo.h
   37 class BasicBlock;
include/llvm/CodeGen/GlobalISel/IRTranslator.h
   36 class BasicBlock;
include/llvm/CodeGen/MachineBasicBlock.h
   37 class BasicBlock;
include/llvm/CodeGen/MachineFunction.h
   48 class BasicBlock;
include/llvm/CodeGen/MachineModuleInfo.h
   46 class BasicBlock;
include/llvm/CodeGen/StackProtector.h
   28 class BasicBlock;
include/llvm/CodeGen/WinEHFuncInfo.h
   26 class BasicBlock;
include/llvm/FuzzMutate/IRMutator.h
   23 class BasicBlock;
include/llvm/IR/AssemblyAnnotationWriter.h
   22 class BasicBlock;
include/llvm/IR/DIBuilder.h
   33   class BasicBlock;
include/llvm/IR/Instruction.h
   33 class BasicBlock;
include/llvm/IR/SymbolTableListTraits.h
   34 class BasicBlock;
include/llvm/IR/Value.h
   31 class BasicBlock;
include/llvm/IR/ValueSymbolTable.h
   24 class BasicBlock;
include/llvm/Pass.h
   38 class BasicBlock;
include/llvm/Transforms/IPO.h
   29 class BasicBlock;
include/llvm/Transforms/Scalar/ConstantHoisting.h
   51 class BasicBlock;
include/llvm/Transforms/Scalar/GVN.h
   39 class BasicBlock;
include/llvm/Transforms/Scalar/GVNExpression.h
   37 class BasicBlock;
include/llvm/Transforms/Scalar/JumpThreading.h
   32 class BasicBlock;
include/llvm/Transforms/Scalar/Reassociate.h
   36 class BasicBlock;
include/llvm/Transforms/Utils/BypassSlowDivision.h
   27 class BasicBlock;
include/llvm/Transforms/Utils/Cloning.h
   35 class BasicBlock;
include/llvm/Transforms/Utils/CodeExtractor.h
   26 class BasicBlock;
include/llvm/Transforms/Utils/FunctionComparator.h
   32 class BasicBlock;
include/llvm/Transforms/Utils/Local.h
   42 class BasicBlock;
include/llvm/Transforms/Utils/LoopUtils.h
   39 class BasicBlock;
include/llvm/Transforms/Utils/SSAUpdater.h
   22 class BasicBlock;
include/llvm/Transforms/Utils/SSAUpdaterBulk.h
   23 class BasicBlock;
include/llvm/Transforms/Utils/SimplifyLibCalls.h
   28 class BasicBlock;
include/llvm/Transforms/Utils/SizeOpts.h
   30 class BasicBlock;
include/llvm/Transforms/Utils/UnrollLoop.h
   26 class BasicBlock;
include/llvm/Transforms/Vectorize.h
   18 class BasicBlock;
include/llvm/Transforms/Vectorize/SLPVectorizer.h
   31 class BasicBlock;
lib/AsmParser/LLParser.h
   33   class BasicBlock;
lib/Bitcode/Writer/ValueEnumerator.h
   30 class BasicBlock;
lib/CodeGen/BranchFolding.h
   23 class BasicBlock;
lib/CodeGen/SafeStackColoring.h
   23 class BasicBlock;
lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h
   48 class BasicBlock;
lib/Transforms/ObjCARC/DependencyAnalysis.h
   29   class BasicBlock;
lib/Transforms/ObjCARC/PtrState.h
   25 class BasicBlock;
lib/Transforms/Vectorize/VPlan.h
   52 class BasicBlock;
tools/bugpoint/BugDriver.h
   33 class BasicBlock;
tools/clang/lib/CodeGen/CGCleanup.h
   23 class BasicBlock;
tools/clang/lib/CodeGen/CGLoopInfo.h
   24 class BasicBlock;
tools/clang/lib/CodeGen/CodeGenFunction.h
   44 class BasicBlock;
tools/lldb/source/Plugins/ExpressionParser/Clang/IRDynamicChecks.h
   17 class BasicBlock;
tools/lldb/source/Plugins/ExpressionParser/Clang/IRForTarget.h
   27 class BasicBlock;
tools/polly/include/polly/CodeGen/Utils.h
   20 class BasicBlock;
tools/polly/include/polly/ScopDetectionDiagnostic.h
   33 class BasicBlock;
unittests/IR/CFGBuilder.h
   33 class BasicBlock;

References

examples/BrainF/BrainF.cpp
   88   builder = new IRBuilder<>(BasicBlock::Create(C, label, brainf_func));
   92   BasicBlock* BB = builder->GetInsertBlock();
  130   endbb = BasicBlock::Create(C, label, brainf_func);
  160     aberrorbb = BasicBlock::Create(C, label, brainf_func);
  190 void BrainF::readloop(PHINode *phi, BasicBlock *oldbb, BasicBlock *testbb,
  190 void BrainF::readloop(PHINode *phi, BasicBlock *oldbb, BasicBlock *testbb,
  267             BasicBlock *nextbb = BasicBlock::Create(C, label, brainf_func);
  267             BasicBlock *nextbb = BasicBlock::Create(C, label, brainf_func);
  293           BasicBlock *testbb = BasicBlock::Create(C, label, brainf_func);
  293           BasicBlock *testbb = BasicBlock::Create(C, label, brainf_func);
  297           BasicBlock *bb_0 = builder->GetInsertBlock();
  298           BasicBlock *bb_1 = BasicBlock::Create(C, label, brainf_func);
  298           BasicBlock *bb_1 = BasicBlock::Create(C, label, brainf_func);
  450       BasicBlock *bb_0 = BasicBlock::Create(C, label, brainf_func);
  450       BasicBlock *bb_0 = BasicBlock::Create(C, label, brainf_func);
examples/BrainF/BrainF.h
   73     void readloop(PHINode *phi, BasicBlock *oldbb,
   74                   BasicBlock *testbb, LLVMContext &Context);
   86     BasicBlock *endbb;
   87     BasicBlock *aberrorbb;
examples/BrainF/BrainFDriver.cpp
   92   BasicBlock *bb = BasicBlock::Create(mod->getContext(), "main.0", main_func);
   92   BasicBlock *bb = BasicBlock::Create(mod->getContext(), "main.0", main_func);
examples/Fibonacci/fibonacci.cpp
   60   BasicBlock *BB = BasicBlock::Create(Context, "EntryBlock", FibF);
   60   BasicBlock *BB = BasicBlock::Create(Context, "EntryBlock", FibF);
   71   BasicBlock *RetBB = BasicBlock::Create(Context, "return", FibF);
   71   BasicBlock *RetBB = BasicBlock::Create(Context, "return", FibF);
   73   BasicBlock* RecurseBB = BasicBlock::Create(Context, "recurse", FibF);
   73   BasicBlock* RecurseBB = BasicBlock::Create(Context, "recurse", FibF);
examples/HowToUseJIT/HowToUseJIT.cpp
   78   BasicBlock *BB = BasicBlock::Create(Context, "EntryBlock", Add1F);
   78   BasicBlock *BB = BasicBlock::Create(Context, "EntryBlock", Add1F);
  107   BB = BasicBlock::Create(Context, "EntryBlock", FooF);
examples/HowToUseLLJIT/HowToUseLLJIT.cpp
   35   BasicBlock *BB = BasicBlock::Create(*Context, "EntryBlock", Add1F);
   35   BasicBlock *BB = BasicBlock::Create(*Context, "EntryBlock", Add1F);
examples/Kaleidoscope/BuildingAJIT/Chapter1/toy.cpp
  848   BasicBlock *ThenBB = BasicBlock::Create(*TheContext, "then", TheFunction);
  848   BasicBlock *ThenBB = BasicBlock::Create(*TheContext, "then", TheFunction);
  849   BasicBlock *ElseBB = BasicBlock::Create(*TheContext, "else");
  849   BasicBlock *ElseBB = BasicBlock::Create(*TheContext, "else");
  850   BasicBlock *MergeBB = BasicBlock::Create(*TheContext, "ifcont");
  850   BasicBlock *MergeBB = BasicBlock::Create(*TheContext, "ifcont");
  922   BasicBlock *LoopBB = BasicBlock::Create(*TheContext, "loop", TheFunction);
  922   BasicBlock *LoopBB = BasicBlock::Create(*TheContext, "loop", TheFunction);
  968   BasicBlock *AfterBB =
  969       BasicBlock::Create(*TheContext, "afterloop", TheFunction);
 1066   BasicBlock *BB = BasicBlock::Create(*TheContext, "entry", TheFunction);
 1066   BasicBlock *BB = BasicBlock::Create(*TheContext, "entry", TheFunction);
examples/Kaleidoscope/BuildingAJIT/Chapter2/toy.cpp
  848   BasicBlock *ThenBB = BasicBlock::Create(*TheContext, "then", TheFunction);
  848   BasicBlock *ThenBB = BasicBlock::Create(*TheContext, "then", TheFunction);
  849   BasicBlock *ElseBB = BasicBlock::Create(*TheContext, "else");
  849   BasicBlock *ElseBB = BasicBlock::Create(*TheContext, "else");
  850   BasicBlock *MergeBB = BasicBlock::Create(*TheContext, "ifcont");
  850   BasicBlock *MergeBB = BasicBlock::Create(*TheContext, "ifcont");
  922   BasicBlock *LoopBB = BasicBlock::Create(*TheContext, "loop", TheFunction);
  922   BasicBlock *LoopBB = BasicBlock::Create(*TheContext, "loop", TheFunction);
  968   BasicBlock *AfterBB =
  969       BasicBlock::Create(*TheContext, "afterloop", TheFunction);
 1066   BasicBlock *BB = BasicBlock::Create(*TheContext, "entry", TheFunction);
 1066   BasicBlock *BB = BasicBlock::Create(*TheContext, "entry", TheFunction);
examples/Kaleidoscope/BuildingAJIT/Chapter3/toy.cpp
  847   BasicBlock *ThenBB = BasicBlock::Create(TheContext, "then", TheFunction);
  847   BasicBlock *ThenBB = BasicBlock::Create(TheContext, "then", TheFunction);
  848   BasicBlock *ElseBB = BasicBlock::Create(TheContext, "else");
  848   BasicBlock *ElseBB = BasicBlock::Create(TheContext, "else");
  849   BasicBlock *MergeBB = BasicBlock::Create(TheContext, "ifcont");
  849   BasicBlock *MergeBB = BasicBlock::Create(TheContext, "ifcont");
  921   BasicBlock *LoopBB = BasicBlock::Create(TheContext, "loop", TheFunction);
  921   BasicBlock *LoopBB = BasicBlock::Create(TheContext, "loop", TheFunction);
  967   BasicBlock *AfterBB =
  968       BasicBlock::Create(TheContext, "afterloop", TheFunction);
 1065   BasicBlock *BB = BasicBlock::Create(TheContext, "entry", TheFunction);
 1065   BasicBlock *BB = BasicBlock::Create(TheContext, "entry", TheFunction);
examples/Kaleidoscope/BuildingAJIT/Chapter4/toy.cpp
  833   BasicBlock *ThenBB = BasicBlock::Create(TheContext, "then", TheFunction);
  833   BasicBlock *ThenBB = BasicBlock::Create(TheContext, "then", TheFunction);
  834   BasicBlock *ElseBB = BasicBlock::Create(TheContext, "else");
  834   BasicBlock *ElseBB = BasicBlock::Create(TheContext, "else");
  835   BasicBlock *MergeBB = BasicBlock::Create(TheContext, "ifcont");
  835   BasicBlock *MergeBB = BasicBlock::Create(TheContext, "ifcont");
  907   BasicBlock *LoopBB = BasicBlock::Create(TheContext, "loop", TheFunction);
  907   BasicBlock *LoopBB = BasicBlock::Create(TheContext, "loop", TheFunction);
  953   BasicBlock *AfterBB =
  954       BasicBlock::Create(TheContext, "afterloop", TheFunction);
 1058   BasicBlock *BB = BasicBlock::Create(TheContext, "entry", TheFunction);
 1058   BasicBlock *BB = BasicBlock::Create(TheContext, "entry", TheFunction);
examples/Kaleidoscope/BuildingAJIT/Chapter5/toy.cpp
  857   BasicBlock *ThenBB = BasicBlock::Create(TheContext, "then", TheFunction);
  857   BasicBlock *ThenBB = BasicBlock::Create(TheContext, "then", TheFunction);
  858   BasicBlock *ElseBB = BasicBlock::Create(TheContext, "else");
  858   BasicBlock *ElseBB = BasicBlock::Create(TheContext, "else");
  859   BasicBlock *MergeBB = BasicBlock::Create(TheContext, "ifcont");
  859   BasicBlock *MergeBB = BasicBlock::Create(TheContext, "ifcont");
  931   BasicBlock *LoopBB = BasicBlock::Create(TheContext, "loop", TheFunction);
  931   BasicBlock *LoopBB = BasicBlock::Create(TheContext, "loop", TheFunction);
  977   BasicBlock *AfterBB =
  978       BasicBlock::Create(TheContext, "afterloop", TheFunction);
 1082   BasicBlock *BB = BasicBlock::Create(TheContext, "entry", TheFunction);
 1082   BasicBlock *BB = BasicBlock::Create(TheContext, "entry", TheFunction);
examples/Kaleidoscope/Chapter3/toy.cpp
  494   BasicBlock *BB = BasicBlock::Create(TheContext, "entry", TheFunction);
  494   BasicBlock *BB = BasicBlock::Create(TheContext, "entry", TheFunction);
examples/Kaleidoscope/Chapter4/toy.cpp
  521   BasicBlock *BB = BasicBlock::Create(TheContext, "entry", TheFunction);
  521   BasicBlock *BB = BasicBlock::Create(TheContext, "entry", TheFunction);
examples/Kaleidoscope/Chapter5/toy.cpp
  634   BasicBlock *ThenBB = BasicBlock::Create(TheContext, "then", TheFunction);
  634   BasicBlock *ThenBB = BasicBlock::Create(TheContext, "then", TheFunction);
  635   BasicBlock *ElseBB = BasicBlock::Create(TheContext, "else");
  635   BasicBlock *ElseBB = BasicBlock::Create(TheContext, "else");
  636   BasicBlock *MergeBB = BasicBlock::Create(TheContext, "ifcont");
  636   BasicBlock *MergeBB = BasicBlock::Create(TheContext, "ifcont");
  697   BasicBlock *PreheaderBB = Builder.GetInsertBlock();
  698   BasicBlock *LoopBB = BasicBlock::Create(TheContext, "loop", TheFunction);
  698   BasicBlock *LoopBB = BasicBlock::Create(TheContext, "loop", TheFunction);
  745   BasicBlock *LoopEndBB = Builder.GetInsertBlock();
  746   BasicBlock *AfterBB =
  747       BasicBlock::Create(TheContext, "afterloop", TheFunction);
  795   BasicBlock *BB = BasicBlock::Create(TheContext, "entry", TheFunction);
  795   BasicBlock *BB = BasicBlock::Create(TheContext, "entry", TheFunction);
examples/Kaleidoscope/Chapter6/toy.cpp
  746   BasicBlock *ThenBB = BasicBlock::Create(TheContext, "then", TheFunction);
  746   BasicBlock *ThenBB = BasicBlock::Create(TheContext, "then", TheFunction);
  747   BasicBlock *ElseBB = BasicBlock::Create(TheContext, "else");
  747   BasicBlock *ElseBB = BasicBlock::Create(TheContext, "else");
  748   BasicBlock *MergeBB = BasicBlock::Create(TheContext, "ifcont");
  748   BasicBlock *MergeBB = BasicBlock::Create(TheContext, "ifcont");
  809   BasicBlock *PreheaderBB = Builder.GetInsertBlock();
  810   BasicBlock *LoopBB = BasicBlock::Create(TheContext, "loop", TheFunction);
  810   BasicBlock *LoopBB = BasicBlock::Create(TheContext, "loop", TheFunction);
  857   BasicBlock *LoopEndBB = Builder.GetInsertBlock();
  858   BasicBlock *AfterBB =
  859       BasicBlock::Create(TheContext, "afterloop", TheFunction);
  911   BasicBlock *BB = BasicBlock::Create(TheContext, "entry", TheFunction);
  911   BasicBlock *BB = BasicBlock::Create(TheContext, "entry", TheFunction);
examples/Kaleidoscope/Chapter7/toy.cpp
  853   BasicBlock *ThenBB = BasicBlock::Create(TheContext, "then", TheFunction);
  853   BasicBlock *ThenBB = BasicBlock::Create(TheContext, "then", TheFunction);
  854   BasicBlock *ElseBB = BasicBlock::Create(TheContext, "else");
  854   BasicBlock *ElseBB = BasicBlock::Create(TheContext, "else");
  855   BasicBlock *MergeBB = BasicBlock::Create(TheContext, "ifcont");
  855   BasicBlock *MergeBB = BasicBlock::Create(TheContext, "ifcont");
  927   BasicBlock *LoopBB = BasicBlock::Create(TheContext, "loop", TheFunction);
  927   BasicBlock *LoopBB = BasicBlock::Create(TheContext, "loop", TheFunction);
  973   BasicBlock *AfterBB =
  974       BasicBlock::Create(TheContext, "afterloop", TheFunction);
 1071   BasicBlock *BB = BasicBlock::Create(TheContext, "entry", TheFunction);
 1071   BasicBlock *BB = BasicBlock::Create(TheContext, "entry", TheFunction);
examples/Kaleidoscope/Chapter8/toy.cpp
  852   BasicBlock *ThenBB = BasicBlock::Create(TheContext, "then", TheFunction);
  852   BasicBlock *ThenBB = BasicBlock::Create(TheContext, "then", TheFunction);
  853   BasicBlock *ElseBB = BasicBlock::Create(TheContext, "else");
  853   BasicBlock *ElseBB = BasicBlock::Create(TheContext, "else");
  854   BasicBlock *MergeBB = BasicBlock::Create(TheContext, "ifcont");
  854   BasicBlock *MergeBB = BasicBlock::Create(TheContext, "ifcont");
  926   BasicBlock *LoopBB = BasicBlock::Create(TheContext, "loop", TheFunction);
  926   BasicBlock *LoopBB = BasicBlock::Create(TheContext, "loop", TheFunction);
  972   BasicBlock *AfterBB =
  973       BasicBlock::Create(TheContext, "afterloop", TheFunction);
 1070   BasicBlock *BB = BasicBlock::Create(TheContext, "entry", TheFunction);
 1070   BasicBlock *BB = BasicBlock::Create(TheContext, "entry", TheFunction);
examples/Kaleidoscope/Chapter9/toy.cpp
 1015   BasicBlock *ThenBB = BasicBlock::Create(TheContext, "then", TheFunction);
 1015   BasicBlock *ThenBB = BasicBlock::Create(TheContext, "then", TheFunction);
 1016   BasicBlock *ElseBB = BasicBlock::Create(TheContext, "else");
 1016   BasicBlock *ElseBB = BasicBlock::Create(TheContext, "else");
 1017   BasicBlock *MergeBB = BasicBlock::Create(TheContext, "ifcont");
 1017   BasicBlock *MergeBB = BasicBlock::Create(TheContext, "ifcont");
 1091   BasicBlock *LoopBB = BasicBlock::Create(TheContext, "loop", TheFunction);
 1091   BasicBlock *LoopBB = BasicBlock::Create(TheContext, "loop", TheFunction);
 1137   BasicBlock *AfterBB =
 1138       BasicBlock::Create(TheContext, "afterloop", TheFunction);
 1237   BasicBlock *BB = BasicBlock::Create(TheContext, "entry", TheFunction);
 1237   BasicBlock *BB = BasicBlock::Create(TheContext, "entry", TheFunction);
examples/ModuleMaker/ModuleMaker.cpp
   47   BasicBlock *BB = BasicBlock::Create(Context, "EntryBlock", F);
   47   BasicBlock *BB = BasicBlock::Create(Context, "EntryBlock", F);
examples/ParallelJIT/ParallelJIT.cpp
   60   BasicBlock *BB = BasicBlock::Create(Context, "EntryBlock", Add1F);
   60   BasicBlock *BB = BasicBlock::Create(Context, "EntryBlock", Add1F);
   90   BasicBlock *BB = BasicBlock::Create(Context, "EntryBlock", FibF);
   90   BasicBlock *BB = BasicBlock::Create(Context, "EntryBlock", FibF);
  101   BasicBlock *RetBB = BasicBlock::Create(Context, "return", FibF);
  101   BasicBlock *RetBB = BasicBlock::Create(Context, "return", FibF);
  103   BasicBlock *RecurseBB = BasicBlock::Create(Context, "recurse", FibF);
  103   BasicBlock *RecurseBB = BasicBlock::Create(Context, "recurse", FibF);
include/llvm/ADT/ArrayRef.h
  108         const ArrayRef<U *> &A,
  110            std::is_convertible<U *const *, T const *>::value>::type * = nullptr)
  118       const SmallVectorTemplateCommon<U *, DummyT> &Vec,
  120           std::is_convertible<U *const *, T const *>::value>::type * = nullptr)
  127     ArrayRef(const std::vector<U *, A> &Vec,
  129                  std::is_convertible<U *const *, T const *>::value>::type* = 0)
include/llvm/ADT/DenseMapInfo.h
   39   static inline T* getEmptyKey() {
   41     Val <<= PointerLikeTypeTraits<T*>::NumLowBitsAvailable;
   45   static inline T* getTombstoneKey() {
   47     Val <<= PointerLikeTypeTraits<T*>::NumLowBitsAvailable;
   51   static unsigned getHashValue(const T *PtrVal) {
   56   static bool isEqual(const T *LHS, const T *RHS) { return LHS == RHS; }
   56   static bool isEqual(const T *LHS, const T *RHS) { return LHS == RHS; }
include/llvm/ADT/STLExtras.h
  154 auto adl_begin(ContainerTy &&container)
  162 auto adl_end(ContainerTy &&container)
  178 auto adl_begin(ContainerTy &&container)
  184 auto adl_end(ContainerTy &&container)
  244   static yes& test(Inner *I, decltype(I->rbegin()) * = nullptr);
  250   static const bool value = sizeof(test<Ty>(nullptr)) == sizeof(yes);
 1172 bool any_of(R &&Range, UnaryPredicate P) {
include/llvm/ADT/SmallSet.h
  249 class SmallSet<PointeeType*, N> : public SmallPtrSet<PointeeType*, N> {};
include/llvm/ADT/ilist.h
   41   static void deleteNode(NodeTy *V) { delete V; }
   65   void addNodeToList(NodeTy *) {}
   66   void removeNodeFromList(NodeTy *) {}
   82 struct ilist_node_traits : ilist_alloc_traits<NodeTy>,
   83                            ilist_callback_traits<NodeTy> {};
   89 struct ilist_traits : public ilist_node_traits<NodeTy> {};
   96 template <class T> T &make();
  106   static Yes &test(U *I, decltype(I->getNext(&make<NodeT>())) * = 0);
  136   static Yes &test(U *I, decltype(I->createNode(make<NodeT>())) * = 0);
  144   static const bool value = HasGetNext<TraitsT, NodeT>::value ||
  146                             HasCreateNode<TraitsT, NodeT>::value;
  389     : public iplist_impl<simple_ilist<T, Options...>, ilist_traits<T>> {
  389     : public iplist_impl<simple_ilist<T, Options...>, ilist_traits<T>> {
include/llvm/ADT/ilist_node.h
  150           typename ilist_detail::compute_node_options<T, Options...>::type> {
  256 class ilist_node_with_parent : public ilist_node<NodeTy, Options...> {
  266   const ParentTy *getNodeParent() const {
  274   NodeTy *getPrevNode() {
  278         getNodeParent()->*(ParentTy::getSublistAccess((NodeTy *)nullptr));
  283   const NodeTy *getPrevNode() const {
  288   NodeTy *getNextNode() {
  292         getNodeParent()->*(ParentTy::getSublistAccess((NodeTy *)nullptr));
  297   const NodeTy *getNextNode() const {
include/llvm/ADT/ilist_node_options.h
  108   typedef T value_type;
  109   typedef T *pointer;
  110   typedef T &reference;
  111   typedef const T *const_pointer;
  112   typedef const T &const_reference;
  122   typedef node_options<T, extract_sentinel_tracking<Options...>::value,
include/llvm/ADT/iterator.h
   68     : public std::iterator<IteratorCategoryT, T, DifferenceTypeT, PointerT,
include/llvm/ADT/simple_ilist.h
   79     : ilist_detail::compute_node_options<T, Options...>::type::list_base_type,
   81           typename ilist_detail::compute_node_options<T, Options...>::type> {
   85       typename ilist_detail::compute_node_options<T, Options...>::type;
include/llvm/Analysis/AliasAnalysis.h
  668   bool canBasicBlockModify(const BasicBlock &BB, const MemoryLocation &Loc);
  671   bool canBasicBlockModify(const BasicBlock &BB, const Value *P,
include/llvm/Analysis/AliasSetTracker.h
  384   void add(BasicBlock &BB);       // Add all instructions in basic block
include/llvm/Analysis/BasicAliasAnalysis.h
  161   SmallPtrSet<const BasicBlock *, 8> VisitedPhiBBs;
include/llvm/Analysis/BlockFrequencyInfo.h
   38   using ImplType = BlockFrequencyInfoImpl<BasicBlock>;
   65   BlockFrequency getBlockFreq(const BasicBlock *BB) const;
   70   Optional<uint64_t> getBlockProfileCount(const BasicBlock *BB,
   80   bool isIrrLoopHeader(const BasicBlock *BB);
   83   void setBlockFreq(const BasicBlock *BB, uint64_t Freq);
   88   void setBlockFreqAndScale(const BasicBlock *ReferenceBB, uint64_t Freq,
   89                             SmallPtrSetImpl<BasicBlock *> &BlocksToScale);
  101   raw_ostream &printBlockFreq(raw_ostream &OS, const BasicBlock *BB) const;
include/llvm/Analysis/BlockFrequencyInfoImpl.h
  546   using BlockT = BasicBlock;
  575 template <> inline std::string getBlockName(const BasicBlock *BB) {
  844   using BlockT = typename bfi_detail::TypeMap<BT>::BlockT;
  845   using FunctionT = typename bfi_detail::TypeMap<BT>::FunctionT;
  847       typename bfi_detail::TypeMap<BT>::BranchProbabilityInfoT;
  848   using LoopT = typename bfi_detail::TypeMap<BT>::LoopT;
  849   using LoopInfoT = typename bfi_detail::TypeMap<BT>::LoopInfoT;
 1260   using BlockT = BT;
 1264   const BlockFrequencyInfoImpl<BT> &BFI;
 1266   explicit BlockEdgesAdder(const BlockFrequencyInfoImpl<BT> &BFI)
 1291   BlockEdgesAdder<BT> addBlockEdges(*this);
include/llvm/Analysis/BranchProbabilityInfo.h
   87   BranchProbability getEdgeProbability(const BasicBlock *Src,
   93   BranchProbability getEdgeProbability(const BasicBlock *Src,
   94                                        const BasicBlock *Dst) const;
   96   BranchProbability getEdgeProbability(const BasicBlock *Src,
  103   bool isEdgeHot(const BasicBlock *Src, const BasicBlock *Dst) const;
  103   bool isEdgeHot(const BasicBlock *Src, const BasicBlock *Dst) const;
  109   const BasicBlock *getHotSucc(const BasicBlock *BB) const;
  109   const BasicBlock *getHotSucc(const BasicBlock *BB) const;
  116   raw_ostream &printEdgeProbability(raw_ostream &OS, const BasicBlock *Src,
  117                                     const BasicBlock *Dst) const;
  125   void setEdgeProbability(const BasicBlock *Src, unsigned IndexInSuccessors,
  137   void eraseBlock(const BasicBlock *BB);
  140   using SccMap = DenseMap<const BasicBlock *, int>;
  141   using SccHeaderMap = DenseMap<const BasicBlock *, bool>;
  156       BPI->eraseBlock(cast<BasicBlock>(getValPtr()));
  169   using Edge = std::pair<const BasicBlock *, unsigned>;
  185   SmallPtrSet<const BasicBlock *, 16> PostDominatedByUnreachable;
  188   SmallPtrSet<const BasicBlock *, 16> PostDominatedByColdCall;
  190   void updatePostDominatedByUnreachable(const BasicBlock *BB);
  191   void updatePostDominatedByColdCall(const BasicBlock *BB);
  192   bool calcUnreachableHeuristics(const BasicBlock *BB);
  193   bool calcMetadataWeights(const BasicBlock *BB);
  194   bool calcColdCallHeuristics(const BasicBlock *BB);
  195   bool calcPointerHeuristics(const BasicBlock *BB);
  196   bool calcLoopBranchHeuristics(const BasicBlock *BB, const LoopInfo &LI,
  198   bool calcZeroHeuristics(const BasicBlock *BB, const TargetLibraryInfo *TLI);
  199   bool calcFloatingPointHeuristics(const BasicBlock *BB);
  200   bool calcInvokeHeuristics(const BasicBlock *BB);
include/llvm/Analysis/CFG.h
   35     SmallVectorImpl<std::pair<const BasicBlock *, const BasicBlock *> > &
   35     SmallVectorImpl<std::pair<const BasicBlock *, const BasicBlock *> > &
   41 unsigned GetSuccessorNumber(const BasicBlock *BB, const BasicBlock *Succ);
   41 unsigned GetSuccessorNumber(const BasicBlock *BB, const BasicBlock *Succ);
   49 bool isCriticalEdge(const Instruction *TI, const BasicBlock *Succ,
   69     const SmallPtrSetImpl<BasicBlock *> *ExclusionSet = nullptr,
   78 bool isPotentiallyReachable(const BasicBlock *From, const BasicBlock *To,
   78 bool isPotentiallyReachable(const BasicBlock *From, const BasicBlock *To,
   89 bool isPotentiallyReachableFromMany(SmallVectorImpl<BasicBlock *> &Worklist,
   90                                     BasicBlock *StopBB,
  104     SmallVectorImpl<BasicBlock *> &Worklist, BasicBlock *StopBB,
  104     SmallVectorImpl<BasicBlock *> &Worklist, BasicBlock *StopBB,
  105     const SmallPtrSetImpl<BasicBlock *> *ExclusionSet,
include/llvm/Analysis/CFGPrinter.h
   62   static std::string getSimpleNodeLabel(const BasicBlock *Node,
   74   static std::string getCompleteNodeLabel(const BasicBlock *Node,
  119   std::string getNodeLabel(const BasicBlock *Node,
  127   static std::string getEdgeSourceLabel(const BasicBlock *Node,
  150   std::string getEdgeAttributes(const BasicBlock *Node, succ_const_iterator I,
include/llvm/Analysis/CodeMetrics.h
   59   DenseMap<const BasicBlock *, unsigned> NumBBInsts;
   79   void analyzeBasicBlock(const BasicBlock *BB, const TargetTransformInfo &TTI,
include/llvm/Analysis/DependenceGraphBuilder.h
   30   using BasicBlockListType = SmallVectorImpl<BasicBlock *>;
   37   using ClassesType = EquivalenceClasses<BasicBlock *>;
include/llvm/Analysis/DivergenceAnalysis.h
   55   bool inRegion(const BasicBlock &BB) const;
  102   void taintLoopLiveOuts(const BasicBlock &LoopHeader);
  108   void pushPHINodes(const BasicBlock &Block);
  114   void markBlockJoinDivergent(const BasicBlock &Block) {
  119   bool isTemporalDivergent(const BasicBlock &ObservingBlock,
  125   bool isJoinDivergent(const BasicBlock &Block) const {
  135   bool propagateJoinDivergence(const BasicBlock &JoinBlock,
  169   DenseSet<const BasicBlock *> DivergentJoinBlocks;
include/llvm/Analysis/DomTreeUpdater.h
   68   bool isBBPendingDeletion(BasicBlock *DelBB) const;
  201   void deleteBB(BasicBlock *DelBB);
  211   void callbackDeleteBB(BasicBlock *DelBB,
  212                         std::function<void(BasicBlock *)> Callback);
  246     CallBackOnDeletion(BasicBlock *V,
  247                        std::function<void(BasicBlock *)> Callback)
  251     BasicBlock *DelBB = nullptr;
  252     std::function<void(BasicBlock *)> Callback_;
  266   SmallPtrSet<BasicBlock *, 8> DeletedBBs;
  276   void validateDeleteBB(BasicBlock *DelBB);
  297   void eraseDelBBNode(BasicBlock *DelBB);
include/llvm/Analysis/DominanceFrontier.h
   43   using DomSetType = std::set<BlockT *>;                // Dom set for a bb
   44   using DomSetMapType = std::map<BlockT *, DomSetType>; // Dom set map
   47   using BlockTraits = GraphTraits<BlockT *>;
   51   SmallVector<BlockT *, IsPostDom ? 4 : 1> Roots;
   60   const SmallVectorImpl<BlockT *> &getRoots() const { return Roots; }
   62   BlockT *getRoot() const {
   84   iterator find(BlockT *B) { return Frontiers.find(B); }
   85   const_iterator find(BlockT *B) const { return Frontiers.find(B); }
   87   iterator addBasicBlock(BlockT *BB, const DomSetType &frontier) {
   93   void removeBlock(BlockT *BB);
   95   void addToFrontier(iterator I, BlockT *Node);
   97   void removeFromFrontier(iterator I, BlockT *Node);
  123     : public DominanceFrontierBase<BlockT, false> {
  125   using BlockTraits = GraphTraits<BlockT *>;
  128   using DomTreeT = DomTreeBase<BlockT>;
  129   using DomTreeNodeT = DomTreeNodeBase<BlockT>;
  130   using DomSetType = typename DominanceFrontierBase<BlockT, false>::DomSetType;
  142 class DominanceFrontier : public ForwardDominanceFrontierBase<BasicBlock> {
  144   using DomTreeT = DomTreeBase<BasicBlock>;
  145   using DomTreeNodeT = DomTreeNodeBase<BasicBlock>;
  146   using DomSetType = DominanceFrontierBase<BasicBlock, false>::DomSetType;
  147   using iterator = DominanceFrontierBase<BasicBlock, false>::iterator;
  149       DominanceFrontierBase<BasicBlock, false>::const_iterator;
include/llvm/Analysis/DominanceFrontierImpl.h
   37   using DomTreeNodeT = DomTreeNodeBase<BlockT>;
   39   DFCalculateWorkObject(BlockT *B, BlockT *P, const DomTreeNodeT *N,
   39   DFCalculateWorkObject(BlockT *B, BlockT *P, const DomTreeNodeT *N,
   43   BlockT *currentBB;
   44   BlockT *parentBB;
   76   std::set<BlockT *> tmpSet;
   77   for (BlockT *BB : DS2)
   82     BlockT *Node = *I++;
  110     BlockT *Node = I->first;
  138     const std::set<BlockT *> &BBs = I->second;
  140     for (const BlockT *BB : BBs) {
  162   BlockT *BB = Node->getBlock();
  165   std::vector<DFCalculateWorkObject<BlockT>> workList;
  166   SmallPtrSet<BlockT *, 32> visited;
  170     DFCalculateWorkObject<BlockT> *currentW = &workList.back();
  173     BlockT *currentBB = currentW->currentBB;
  174     BlockT *parentBB = currentW->parentBB;
  184       for (const auto Succ : children<BlockT *>(currentBB)) {
  199       BlockT *childBB = IDominee->getBlock();
include/llvm/Analysis/EHPersonalities.h
  108 typedef TinyPtrVector<BasicBlock *> ColorVector;
  114 DenseMap<BasicBlock *, ColorVector> colorEHFunclets(Function &F);
include/llvm/Analysis/GuardUtils.h
   39                           Value *&WidenableCondition, BasicBlock *&IfTrueBB,
   40                           BasicBlock *&IfFalseBB);
include/llvm/Analysis/InstructionPrecedenceTracking.h
   32   DenseMap<const BasicBlock *, const Instruction *> FirstSpecialInsts;
   37   void fill(const BasicBlock *BB);
   43   void validate(const BasicBlock *BB) const;
   57   const Instruction *getFirstSpecialInstruction(const BasicBlock *BB);
   61   bool hasSpecialInstructions(const BasicBlock *BB);
   80   void insertInstructionTo(const Instruction *Inst, const BasicBlock *BB);
  104   const Instruction *getFirstICFI(const BasicBlock *BB) {
  110   bool hasICF(const BasicBlock *BB) {
  128   const Instruction *getFirstMemoryWrite(const BasicBlock *BB) {
  134   bool mayWriteToMemory(const BasicBlock *BB) {
include/llvm/Analysis/Interval.h
   40   BasicBlock *HeaderNode;
   43   using succ_iterator = std::vector<BasicBlock*>::iterator;
   44   using pred_iterator = std::vector<BasicBlock*>::iterator;
   45   using node_iterator = std::vector<BasicBlock*>::iterator;
   47   inline Interval(BasicBlock *Header) : HeaderNode(Header) {
   51   inline BasicBlock *getHeaderNode() const { return HeaderNode; }
   54   std::vector<BasicBlock*> Nodes;
   59   std::vector<BasicBlock*> Successors;
   63   std::vector<BasicBlock*> Predecessors;
   66   inline bool contains(BasicBlock *BB) const {
   67     for (BasicBlock *Node : Nodes)
   76   inline bool isSuccessor(BasicBlock *BB) const {
   77     for (BasicBlock *Successor : Successors)
include/llvm/Analysis/IntervalIterator.h
   55 inline BasicBlock *getNodeHeader(BasicBlock *BB) { return BB; }
   55 inline BasicBlock *getNodeHeader(BasicBlock *BB) { return BB; }
   56 inline BasicBlock *getNodeHeader(Interval *I) { return I->getHeaderNode(); }
   61 inline BasicBlock *getSourceGraphNode(Function *, BasicBlock *BB) {
   61 inline BasicBlock *getSourceGraphNode(Function *, BasicBlock *BB) {
   64 inline Interval *getSourceGraphNode(IntervalPartition *IP, BasicBlock *BB) {
   72 inline void addNodeToInterval(Interval *Int, BasicBlock *BB) {
   91   std::set<BasicBlock *> Visited;
  176   bool ProcessInterval(NodeTy *Node) {
  177     BasicBlock *Header = getNodeHeader(Node);
  200   void ProcessNode(Interval *Int, NodeTy *Node) {
  204     BasicBlock *NodeHeader = getNodeHeader(Node);
  244 using function_interval_iterator = IntervalIterator<BasicBlock, Function>;
include/llvm/Analysis/IntervalPartition.h
   43   using IntervalMapTy = std::map<BasicBlock *, Interval *>;
   79   inline Interval *getBlockInterval(BasicBlock *BB) {
include/llvm/Analysis/IteratedDominanceFrontier.h
   22 template <bool IsPostDom> struct ChildrenGetterTy<BasicBlock, IsPostDom> {
   23   using NodeRef = BasicBlock *;
   24   using ChildrenTy = SmallVector<BasicBlock *, 8>;
   27   ChildrenGetterTy(const GraphDiff<BasicBlock *, IsPostDom> *GD) : GD(GD) {
   33   const GraphDiff<BasicBlock *, IsPostDom> *GD = nullptr;
   39 class IDFCalculator final : public IDFCalculatorBase<BasicBlock, IsPostDom> {
   42       typename llvm::IDFCalculatorBase<BasicBlock, IsPostDom>;
   45   IDFCalculator(DominatorTreeBase<BasicBlock, IsPostDom> &DT)
   48   IDFCalculator(DominatorTreeBase<BasicBlock, IsPostDom> &DT,
   49                 const GraphDiff<BasicBlock *, IsPostDom> *GD)
   65 typename ChildrenGetterTy<BasicBlock, IsPostDom>::ChildrenTy
   69       typename IDFCalculatorBase<BasicBlock, IsPostDom>::OrderedNodeTy;
   77       std::pair<const GraphDiff<BasicBlock *, IsPostDom> *, OrderedNodeTy>;
include/llvm/Analysis/LazyValueInfo.h
   72                               BasicBlock *FromBB, BasicBlock *ToBB,
   72                               BasicBlock *FromBB, BasicBlock *ToBB,
   83   Constant *getConstant(Value *V, BasicBlock *BB, Instruction *CxtI = nullptr);
   88   ConstantRange getConstantRange(Value *V, BasicBlock *BB, Instruction *CxtI = nullptr);
   92   Constant *getConstantOnEdge(Value *V, BasicBlock *FromBB, BasicBlock *ToBB,
   92   Constant *getConstantOnEdge(Value *V, BasicBlock *FromBB, BasicBlock *ToBB,
   98   ConstantRange getConstantRangeOnEdge(Value *V, BasicBlock *FromBB,
   99                                        BasicBlock *ToBB,
  104   void threadEdge(BasicBlock *PredBB, BasicBlock *OldSucc, BasicBlock *NewSucc);
  104   void threadEdge(BasicBlock *PredBB, BasicBlock *OldSucc, BasicBlock *NewSucc);
  104   void threadEdge(BasicBlock *PredBB, BasicBlock *OldSucc, BasicBlock *NewSucc);
  107   void eraseBlock(BasicBlock *BB);
include/llvm/Analysis/Loads.h
  120                                 BasicBlock *ScanBB,
  121                                 BasicBlock::iterator &ScanFrom,
  151                                  BasicBlock *ScanBB,
  152                                  BasicBlock::iterator &ScanFrom,
include/llvm/Analysis/LoopAccessAnalysis.h
  542   static bool blockNeedsPredication(BasicBlock *BB, Loop *TheLoop,
include/llvm/Analysis/LoopInfo.h
   80   std::vector<BlockT *> Blocks;
   82   SmallPtrSet<const BlockT *, 8> DenseBlockSet;
   89   LoopBase(const LoopBase<BlockT, LoopT> &) = delete;
   90   const LoopBase<BlockT, LoopT> &
   91   operator=(const LoopBase<BlockT, LoopT> &) = delete;
  105   BlockT *getHeader() const { return getBlocks().front(); }
  125   bool contains(const BlockT *BB) const {
  131   template <class InstT> bool contains(const InstT *Inst) const {
  154   ArrayRef<BlockT *> getBlocks() const {
  158   typedef typename ArrayRef<BlockT *>::const_iterator block_iterator;
  175   std::vector<BlockT *> &getBlocksVector() {
  181   SmallPtrSetImpl<const BlockT *> &getBlocksSet() {
  187   const SmallPtrSetImpl<const BlockT *> &getBlocksSet() const {
  208   bool isLoopExiting(const BlockT *BB) const {
  211     for (const auto &Succ : children<const BlockT *>(BB)) {
  222   bool isLoopLatch(const BlockT *BB) const {
  226     BlockT *Header = getHeader();
  227     auto PredBegin = GraphTraits<Inverse<BlockT *>>::child_begin(Header);
  228     auto PredEnd = GraphTraits<Inverse<BlockT *>>::child_end(Header);
  236     BlockT *H = getHeader();
  238     for (const auto Pred : children<Inverse<BlockT *>>(H))
  256   void getExitingBlocks(SmallVectorImpl<BlockT *> &ExitingBlocks) const;
  260   BlockT *getExitingBlock() const;
  264   void getExitBlocks(SmallVectorImpl<BlockT *> &ExitBlocks) const;
  268   BlockT *getExitBlock() const;
  276   void getUniqueExitBlocks(SmallVectorImpl<BlockT *> &ExitBlocks) const;
  282   void getUniqueNonLatchExitBlocks(SmallVectorImpl<BlockT *> &ExitBlocks) const;
  286   BlockT *getUniqueExitBlock() const;
  289   typedef std::pair<BlockT *, BlockT *> Edge;
  289   typedef std::pair<BlockT *, BlockT *> Edge;
  300   BlockT *getLoopPreheader() const;
  306   BlockT *getLoopPredecessor() const;
  310   BlockT *getLoopLatch() const;
  314   void getLoopLatches(SmallVectorImpl<BlockT *> &LoopLatches) const {
  316     BlockT *H = getHeader();
  317     for (const auto Pred : children<Inverse<BlockT *>>(H))
  365   void addBasicBlockToLoop(BlockT *NewBB, LoopInfoBase<BlockT, LoopT> &LI);
  365   void addBasicBlockToLoop(BlockT *NewBB, LoopInfoBase<BlockT, LoopT> &LI);
  403   void addBlockEntry(BlockT *BB) {
  423   void moveToHeader(BlockT *BB) {
  440   void removeBlockFromLoop(BlockT *BB) {
  470   explicit LoopBase(BlockT *BB) : ParentLoop(nullptr) {
  499 raw_ostream &operator<<(raw_ostream &OS, const LoopBase<BlockT, LoopT> &Loop) {
  509 class Loop : public LoopBase<BasicBlock, Loop> {
  573   bool getIncomingAndBackEdge(BasicBlock *&Incoming,
  574                               BasicBlock *&Backedge) const;
  828     if (BasicBlock *Header = getHeader())
  839   explicit Loop(BasicBlock *BB) : LoopBase<BasicBlock, Loop>(BB) {}
  850   DenseMap<const BlockT *, LoopT *> BBMap;
  928   LoopT *getLoopFor(const BlockT *BB) const { return BBMap.lookup(BB); }
  931   const LoopT *operator[](const BlockT *BB) const { return getLoopFor(BB); }
  935   unsigned getLoopDepth(const BlockT *BB) const {
  941   bool isLoopHeader(const BlockT *BB) const {
  960   void changeLoopFor(BlockT *BB, LoopT *L) {
  987   void removeBlock(BlockT *BB) {
 1009   void analyze(const DominatorTreeBase<BlockT, false> &DomTree);
 1014   void verify(const DominatorTreeBase<BlockT, false> &DomTree) const;
 1038 class LoopInfo : public LoopInfoBase<BasicBlock, Loop> {
 1039   typedef LoopInfoBase<BasicBlock, Loop> BaseT;
 1048   explicit LoopInfo(const DominatorTreeBase<BasicBlock, false> &DomTree);
 1100     auto *OldBB = Inst->getParent();
 1101     auto *NewBB = NewLoc->getParent();
 1130         auto *UBB = isa<PHINode>(UI) ? cast<PHINode>(UI)->getIncomingBlock(U)
 1153         auto *DefBlock = DefI->getParent();
include/llvm/Analysis/LoopInfoImpl.h
   38     for (const auto &Succ : children<BlockT *>(BB))
   51   SmallVector<BlockT *, 8> ExitingBlocks;
   66     for (const auto &Succ : children<BlockT *>(BB))
   77   SmallVector<BlockT *, 8> ExitBlocks;
   88   SmallVector<BlockT *, 4> UniqueExitBlocks;
   90   for (BlockT *EB : UniqueExitBlocks)
   91     for (BlockT *Predecessor : children<Inverse<BlockT *>>(EB))
   91     for (BlockT *Predecessor : children<Inverse<BlockT *>>(EB))
  102                                SmallVectorImpl<BlockT *> &ExitBlocks,
  105   SmallPtrSet<BlockT *, 32> Visited;
  107   for (BlockT *BB : Filtered)
  108     for (BlockT *Successor : children<BlockT *>(BB))
  108     for (BlockT *Successor : children<BlockT *>(BB))
  124   const BlockT *Latch = getLoopLatch();
  132   SmallVector<BlockT *, 8> UniqueExitBlocks;
  145     for (const auto &Succ : children<BlockT *>(BB))
  163   BlockT *Out = getLoopPredecessor();
  172   typedef GraphTraits<BlockT *> BlockTraits;
  191   BlockT *Out = nullptr;
  194   BlockT *Header = getHeader();
  195   for (const auto Pred : children<Inverse<BlockT *>>(Header)) {
  211   BlockT *Header = getHeader();
  212   BlockT *Latch = nullptr;
  213   for (const auto Pred : children<Inverse<BlockT *>>(Header)) {
  285   SmallVector<BlockT *, 8> ExitBBs;
  287   df_iterator_default_set<BlockT *> VisitSet;
  289   df_ext_iterator<BlockT *, df_iterator_default_set<BlockT *>>
  289   df_ext_iterator<BlockT *, df_iterator_default_set<BlockT *>>
  294   SmallPtrSet<BlockT *, 8> VisitedBBs;
  298     BlockT *BB = *BI;
  310     SmallVector<BlockT *, 2> OutsideLoopPreds;
  311     std::for_each(GraphTraits<Inverse<BlockT *>>::child_begin(BB),
  312                   GraphTraits<Inverse<BlockT *>>::child_end(BB),
  324       BlockT *EntryBB = &BB->getParent()->front();
  325       for (BlockT *CB : depth_first(EntryBB))
  384   BlockT *H = getHeader();
  386     BlockT *BB = getBlocks()[i];
  418 static void discoverAndMapSubloop(LoopT *L, ArrayRef<BlockT *> Backedges,
  419                                   LoopInfoBase<BlockT, LoopT> *LI,
  420                                   const DomTreeBase<BlockT> &DomTree) {
  421   typedef GraphTraits<Inverse<BlockT *>> InvBlockTraits;
  427   std::vector<BlockT *> ReverseCFGWorklist(Backedges.begin(), Backedges.end());
  429     BlockT *PredBB = ReverseCFGWorklist.back();
  464       for (const auto Pred : children<Inverse<BlockT *>>(PredBB)) {
  476   typedef GraphTraits<BlockT *> BlockTraits;
  479   LoopInfoBase<BlockT, LoopT> *LI;
  482   PopulateLoopsDFS(LoopInfoBase<BlockT, LoopT> *li) : LI(li) {}
  484   void traverse(BlockT *EntryBlock);
  487   void insertIntoLoop(BlockT *Block);
  493   for (BlockT *BB : post_order(EntryBlock))
  540   const DomTreeNodeBase<BlockT> *DomRoot = DomTree.getRootNode();
  543     BlockT *Header = DomNode->getBlock();
  544     SmallVector<BlockT *, 4> Backedges;
  547     for (const auto Backedge : children<Inverse<BlockT *>>(Header)) {
  562   PopulateLoopsDFS<BlockT, LoopT> DFS(this);
  629 void addInnerLoopsToHeadersMap(DenseMap<BlockT *, const LoopT *> &LoopHeaders,
  630                                const LoopInfoBase<BlockT, LoopT> &LI,
  640                          DenseMap<BlockT *, const LoopT *> &OtherLoopHeaders) {
  641   BlockT *H = L->getHeader();
  642   BlockT *OtherH = OtherL->getHeader();
  657     BlockT *SubH = SubL->getHeader();
  664   std::vector<BlockT *> BBs = L->getBlocks();
  665   std::vector<BlockT *> OtherBBs = OtherL->getBlocks();
  669   const SmallPtrSetImpl<const BlockT *> &BlocksSet = L->getBlocksSet();
  670   const SmallPtrSetImpl<const BlockT *> &OtherBlocksSet = L->getBlocksSet();
  692     const BlockT *BB = Entry.first;
  702   LoopInfoBase<BlockT, LoopT> OtherLI;
  708   DenseMap<BlockT *, const LoopT *> OtherLoopHeaders;
  716     BlockT *Header = L->getHeader();
include/llvm/Analysis/LoopIterator.h
   41   using NodeRef = std::pair<const Loop *, BasicBlock *>;
  100   typedef std::vector<BasicBlock*>::const_iterator POIterator;
  101   typedef std::vector<BasicBlock*>::const_reverse_iterator RPOIterator;
  111   DenseMap<BasicBlock*, unsigned> PostNumbers;
  112   std::vector<BasicBlock*> PostBlocks;
  143   bool hasPreorder(BasicBlock *BB) const { return PostNumbers.count(BB); }
  146   bool hasPostorder(BasicBlock *BB) const {
  147     DenseMap<BasicBlock*, unsigned>::const_iterator I = PostNumbers.find(BB);
  152   unsigned getPostorder(BasicBlock *BB) const {
  153     DenseMap<BasicBlock*, unsigned>::const_iterator I = PostNumbers.find(BB);
  160   unsigned getRPO(BasicBlock *BB) const {
  195   bool insertEdge(Optional<BasicBlock *> From, BasicBlock *To);
  195   bool insertEdge(Optional<BasicBlock *> From, BasicBlock *To);
  196   void finishPostorder(BasicBlock *BB);
  203   typedef po_iterator<BasicBlock*, LoopBlocksTraversal, true> POTIterator;
  231   bool visitPreorder(BasicBlock *BB) {
  240   void finishPostorder(BasicBlock *BB) {
  248     Optional<BasicBlock *> From, BasicBlock *To) {
  248     Optional<BasicBlock *> From, BasicBlock *To) {
  253 finishPostorder(BasicBlock *BB) {
include/llvm/Analysis/LoopPass.h
   79   virtual void cloneBasicBlockAnalysis(BasicBlock *F, BasicBlock *T, Loop *L) {}
   79   virtual void cloneBasicBlockAnalysis(BasicBlock *F, BasicBlock *T, Loop *L) {}
  143   void cloneBasicBlockSimpleAnalysis(BasicBlock *From, BasicBlock *To, Loop *L);
  143   void cloneBasicBlockSimpleAnalysis(BasicBlock *From, BasicBlock *To, Loop *L);
include/llvm/Analysis/MemoryDependenceAnalysis.h
  211   BasicBlock *BB;
  215   NonLocalDepEntry(BasicBlock *bb, MemDepResult result)
  219   NonLocalDepEntry(BasicBlock *bb) : BB(bb) {}
  222   BasicBlock *getBB() const { return BB; }
  240   NonLocalDepResult(BasicBlock *bb, MemDepResult result, Value *address)
  244   BasicBlock *getBB() const { return Entry.getBB(); }
  294   using BBSkipFirstBlockPair = PointerIntPair<BasicBlock *, 1, bool>;
  451                                         BasicBlock::iterator ScanIt,
  452                                         BasicBlock *BB,
  459                                  BasicBlock::iterator ScanIt, BasicBlock *BB,
  459                                  BasicBlock::iterator ScanIt, BasicBlock *BB,
  469   MemDepResult getInvariantGroupPointerDependency(LoadInst *LI, BasicBlock *BB);
  488                                      BasicBlock::iterator ScanIt,
  489                                      BasicBlock *BB);
  493                                    BasicBlock *BB,
  495                                    DenseMap<BasicBlock *, Value *> &Visited,
  499                                        BasicBlock *BB, NonLocalDepInfo *Cache,
include/llvm/Analysis/MemorySSA.h
  159   BasicBlock *getBlock() const { return Block; }
  212   void setBlock(BasicBlock *BB) { Block = BB; }
  219                BasicBlock *BB, unsigned NumOperands)
  227   BasicBlock *Block;
  285                  DeleteValueTy DeleteValue, Instruction *MI, BasicBlock *BB,
  323   MemoryUse(LLVMContext &C, MemoryAccess *DMA, Instruction *MI, BasicBlock *BB)
  381   MemoryDef(LLVMContext &C, MemoryAccess *DMA, Instruction *MI, BasicBlock *BB,
  489   MemoryPhi(LLVMContext &C, BasicBlock *BB, unsigned Ver, unsigned NumPreds = 0)
  497   using block_iterator = BasicBlock **;
  498   using const_block_iterator = BasicBlock *const *;
  543   BasicBlock *getIncomingBlock(unsigned I) const { return block_begin()[I]; }
  547   BasicBlock *getIncomingBlock(const Use &U) const {
  554   BasicBlock *getIncomingBlock(MemoryAccess::const_user_iterator I) const {
  558   void setIncomingBlock(unsigned I, BasicBlock *BB) {
  564   void addIncoming(MemoryAccess *V, BasicBlock *BB) {
  575   int getBasicBlockIndex(const BasicBlock *BB) const {
  582   MemoryAccess *getIncomingValueForBlock(const BasicBlock *BB) const {
  617   void unorderedDeleteIncomingBlock(const BasicBlock *BB) {
  724   MemoryPhi *getMemoryAccess(const BasicBlock *BB) const {
  758   const AccessList *getBlockAccesses(const BasicBlock *BB) const {
  766   const DefsList *getBlockDefs(const BasicBlock *BB) const {
  803   AccessList *getWritableBlockAccesses(const BasicBlock *BB) const {
  809   DefsList *getWritableBlockDefs(const BasicBlock *BB) const {
  818   void moveTo(MemoryUseOrDef *What, BasicBlock *BB, AccessList::iterator Where);
  819   void moveTo(MemoryAccess *What, BasicBlock *BB, InsertionPlace Point);
  822   void renamePass(BasicBlock *BB, MemoryAccess *IncomingVal,
  823                   SmallPtrSetImpl<BasicBlock *> &Visited) {
  829   void insertIntoListsForBlock(MemoryAccess *, const BasicBlock *,
  831   void insertIntoListsBefore(MemoryAccess *, const BasicBlock *,
  847   void prepareForMoveTo(MemoryAccess *, BasicBlock *);
  850   using AccessMap = DenseMap<const BasicBlock *, std::unique_ptr<AccessList>>;
  851   using DefsMap = DenseMap<const BasicBlock *, std::unique_ptr<DefsList>>;
  854   determineInsertionPoint(const SmallPtrSetImpl<BasicBlock *> &DefiningBlocks);
  855   void markUnreachableAsLiveOnEntry(BasicBlock *BB);
  857   MemoryPhi *createMemoryPhi(BasicBlock *BB);
  861   MemoryAccess *findDominatingDef(BasicBlock *, enum InsertionPlace);
  862   void placePHINodes(const SmallPtrSetImpl<BasicBlock *> &);
  863   MemoryAccess *renameBlock(BasicBlock *, MemoryAccess *, bool);
  864   void renameSuccessorPhis(BasicBlock *, MemoryAccess *, bool);
  866                   SmallPtrSetImpl<BasicBlock *> &Visited,
  868   AccessList *getOrCreateAccessList(const BasicBlock *);
  869   DefsList *getOrCreateDefsList(const BasicBlock *);
  870   void renumberBlock(const BasicBlock *) const;
  891   mutable SmallPtrSet<const BasicBlock *, 16> BlockNumberingValid;
 1101   BasicBlock *getPhiArgBlock() const {
 1217   BasicBlock *getPhiArgBlock() const { return DefIterator.getPhiArgBlock(); }
include/llvm/Analysis/MemorySSAUpdater.h
   66 using CFGUpdate = cfg::Update<BasicBlock *>;
   68     std::pair<const GraphDiff<BasicBlock *> *, Inverse<BasicBlock *>>;
   78   SmallPtrSet<BasicBlock *, 8> VisitedBlocks;
  105   void removeEdge(BasicBlock *From, BasicBlock *To);
  105   void removeEdge(BasicBlock *From, BasicBlock *To);
  109   void removeDuplicatePhiEdgesBetween(const BasicBlock *From,
  110                                       const BasicBlock *To);
  112   void updatePhisWhenInsertingUniqueBackedgeBlock(BasicBlock *LoopHeader,
  113                                                   BasicBlock *LoopPreheader,
  114                                                   BasicBlock *BackedgeBlock);
  120                            ArrayRef<BasicBlock *> ExitBlocks,
  125   void updateForClonedBlockIntoPred(BasicBlock *BB, BasicBlock *P1,
  125   void updateForClonedBlockIntoPred(BasicBlock *BB, BasicBlock *P1,
  129   void updateExitBlocksForClonedLoop(ArrayRef<BasicBlock *> ExitBlocks,
  133       ArrayRef<BasicBlock *> ExitBlocks,
  143   void moveToPlace(MemoryUseOrDef *What, BasicBlock *BB,
  158   void moveAllAfterSpliceBlocks(BasicBlock *From, BasicBlock *To,
  158   void moveAllAfterSpliceBlocks(BasicBlock *From, BasicBlock *To,
  174   void moveAllAfterMergeBlocks(BasicBlock *From, BasicBlock *To,
  174   void moveAllAfterMergeBlocks(BasicBlock *From, BasicBlock *To,
  182       BasicBlock *Old, BasicBlock *New, ArrayRef<BasicBlock *> Preds,
  182       BasicBlock *Old, BasicBlock *New, ArrayRef<BasicBlock *> Preds,
  182       BasicBlock *Old, BasicBlock *New, ArrayRef<BasicBlock *> Preds,
  204                                        const BasicBlock *BB,
  247   void removeBlocks(const SmallSetVector<BasicBlock *, 8> &DeadBlocks);
  257                                          const BasicBlock *To);
  265   void moveTo(MemoryUseOrDef *What, BasicBlock *BB, WhereType Where);
  268   void moveAllAccesses(BasicBlock *From, BasicBlock *To, Instruction *Start);
  268   void moveAllAccesses(BasicBlock *From, BasicBlock *To, Instruction *Start);
  272   getPreviousDefFromEnd(BasicBlock *,
  273                         DenseMap<BasicBlock *, TrackingVH<MemoryAccess>> &);
  275   getPreviousDefRecursive(BasicBlock *,
  276                           DenseMap<BasicBlock *, TrackingVH<MemoryAccess>> &);
  297   void cloneUsesAndDefs(BasicBlock *BB, BasicBlock *NewBB,
  297   void cloneUsesAndDefs(BasicBlock *BB, BasicBlock *NewBB,
  301   void privateUpdateExitBlocksForClonedLoop(ArrayRef<BasicBlock *> ExitBlocks,
  305                           const GraphDiff<BasicBlock *> *GD);
include/llvm/Analysis/MustExecute.h
   56   DenseMap<BasicBlock *, ColorVector> BlockColors;
   64   const DenseMap<BasicBlock *, ColorVector> &getBlockColors() const;
   67   void copyColors(BasicBlock *New, BasicBlock *Old);
   67   void copyColors(BasicBlock *New, BasicBlock *Old);
   71   virtual bool blockMayThrow(const BasicBlock *BB) const = 0;
   79   bool allLoopPathsLeadToBlock(const Loop *CurLoop, const BasicBlock *BB,
  110   virtual bool blockMayThrow(const BasicBlock *BB) const;
  139   virtual bool blockMayThrow(const BasicBlock *BB) const;
  151   bool doesNotWriteMemoryBefore(const BasicBlock *BB, const Loop *CurLoop)
  162   void insertInstructionTo(const Instruction *Inst, const BasicBlock *BB);
include/llvm/Analysis/OrderedBasicBlock.h
   41   BasicBlock::const_iterator LastInstFound;
   47   const BasicBlock *BB;
   54   OrderedBasicBlock(const BasicBlock *BasicB);
include/llvm/Analysis/OrderedInstructions.h
   31   mutable DenseMap<const BasicBlock *, std::unique_ptr<OrderedBasicBlock>>
   59   void invalidateBlock(const BasicBlock *BB) { OBBMap.erase(BB); }
include/llvm/Analysis/PHITransAddr.h
   63   bool NeedsPHITranslationFromBlock(BasicBlock *BB) const {
   81   bool PHITranslateValue(BasicBlock *CurBB, BasicBlock *PredBB,
   81   bool PHITranslateValue(BasicBlock *CurBB, BasicBlock *PredBB,
   91   Value *PHITranslateWithInsertion(BasicBlock *CurBB, BasicBlock *PredBB,
   91   Value *PHITranslateWithInsertion(BasicBlock *CurBB, BasicBlock *PredBB,
  103   Value *PHITranslateSubExpr(Value *V, BasicBlock *CurBB, BasicBlock *PredBB,
  103   Value *PHITranslateSubExpr(Value *V, BasicBlock *CurBB, BasicBlock *PredBB,
  111   Value *InsertPHITranslatedSubExpr(Value *InVal, BasicBlock *CurBB,
  112                                     BasicBlock *PredBB, const DominatorTree &DT,
include/llvm/Analysis/PostDominators.h
   28 class PostDominatorTree : public PostDomTreeBase<BasicBlock> {
   30   using Base = PostDomTreeBase<BasicBlock>;
include/llvm/Analysis/ProfileSummaryInfo.h
  131   bool isHotBlock(const BasicBlock *BB, BlockFrequencyInfo *BFI);
  133   bool isColdBlock(const BasicBlock *BB, BlockFrequencyInfo *BFI);
  137                                const BasicBlock *BB, BlockFrequencyInfo *BFI);
include/llvm/Analysis/RegionInfo.h
   88   using BlockT = BasicBlock;
  100   static unsigned getNumSuccessors(BasicBlock *BB) {
  885   inline RegionNode(Region *Parent, BasicBlock *Entry, bool isSubRegion = false)
  895   Region(BasicBlock *Entry, BasicBlock *Exit, RegionInfo *RI, DominatorTree *DT,
  895   Region(BasicBlock *Entry, BasicBlock *Exit, RegionInfo *RI, DominatorTree *DT,
  999 inline BasicBlock *
 1000 RegionNodeBase<RegionTraits<Function>>::getNodeAs<BasicBlock>() const {
include/llvm/Analysis/RegionInfoImpl.h
  504       for (const auto *BB : blocks())
include/llvm/Analysis/RegionIterator.h
   42   using BlockTraits = GraphTraits<BlockT *>;
   82   NodeRef getISucc(BlockT *BB) const {
   90   inline BlockT* getRegionSucc() const {
   96   inline bool isExit(BlockT* BB) const {
  101   using Self = RNSuccIterator<NodeRef, BlockT, RegionT>;
  133     BlockT *BB = isRegionMode() ? getRegionSucc() : *BItor;
  169   using BlockTraits = GraphTraits<BlockT *>;
  176   using Self = RNSuccIterator<FlatIt<NodeRef>, BlockT, RegionT>;
  212     BlockT *BB = *Itor;
include/llvm/Analysis/ScalarEvolution.h
  698   unsigned getSmallConstantTripCount(const Loop *L, BasicBlock *ExitingBlock);
  720                                         BasicBlock *ExitingBlock);
  740   const SCEV *getExitCount(const Loop *L, BasicBlock *ExitingBlock,
  962   BlockDisposition getBlockDisposition(const SCEV *S, const BasicBlock *BB);
  966   bool dominates(const SCEV *S, const BasicBlock *BB);
  970   bool properlyDominates(const SCEV *S, const BasicBlock *BB);
 1248     PoisoningVH<BasicBlock> ExitingBlock;
 1253     explicit ExitNotTakenInfo(PoisoningVH<BasicBlock> ExitingBlock,
 1296     using EdgeExitInfo = std::pair<BasicBlock *, ExitLimit>;
 1336     const SCEV *getExact(BasicBlock *ExitingBlock, ScalarEvolution *SE) const;
 1342     const SCEV *getMax(BasicBlock *ExitingBlock, ScalarEvolution *SE) const;
 1414       SmallVector<PointerIntPair<const BasicBlock *, 2, BlockDisposition>, 2>>
 1418   BlockDisposition computeBlockDisposition(const SCEV *S, const BasicBlock *BB);
 1512   ExitLimit computeExitLimit(const Loop *L, BasicBlock *ExitingBlock,
 1582                                                  BasicBlock *ExitingBB,
 1644   std::pair<BasicBlock *, BasicBlock *>
 1644   std::pair<BasicBlock *, BasicBlock *>
 1645   getPredecessorWithUniqueSuccessorForBB(BasicBlock *BB);
 1697   bool isImpliedViaGuard(BasicBlock *BB, ICmpInst::Predicate Pred,
include/llvm/Analysis/ScalarEvolutionExpander.h
  104       AssertingVH<BasicBlock> Block;
  105       BasicBlock::iterator Point;
  129       BasicBlock::iterator GetInsertPoint() const { return Point; }
  130       void SetInsertPoint(BasicBlock::iterator I) { Point = I; }
  340                              BasicBlock::iterator IP);
include/llvm/Analysis/SparsePropagation.h
  121   SmallPtrSet<BasicBlock *, 16> BBExecutable;
  127   SmallVector<BasicBlock *, 64> BBWorkList;
  129   using Edge = std::pair<BasicBlock *, BasicBlock *>;
  129   using Edge = std::pair<BasicBlock *, BasicBlock *>;
  165   bool isEdgeFeasible(BasicBlock *From, BasicBlock *To,
  165   bool isEdgeFeasible(BasicBlock *From, BasicBlock *To,
  171   bool isBlockExecutable(BasicBlock *BB) const {
  177   void MarkBlockExecutable(BasicBlock *BB);
  187   void markEdgeExecutable(BasicBlock *Source, BasicBlock *Dest);
  187   void markEdgeExecutable(BasicBlock *Source, BasicBlock *Dest);
  259     BasicBlock *BB) {
  268     BasicBlock *Source, BasicBlock *Dest) {
  268     BasicBlock *Source, BasicBlock *Dest) {
  279     for (BasicBlock::iterator I = Dest->begin(); isa<PHINode>(I); ++I)
  370     BasicBlock *From, BasicBlock *To, bool AggressiveUndef) {
  370     BasicBlock *From, BasicBlock *To, bool AggressiveUndef) {
  388   BasicBlock *BB = TI.getParent();
  488       BasicBlock *BB = BBWorkList.back();
include/llvm/Analysis/SyncDependenceAnalysis.h
   32 using ConstBlockSet = SmallPtrSet<const BasicBlock *, 4>;
   40   void visitSuccessor(const BasicBlock &succBlock, const Loop *termLoop,
   41                       const BasicBlock *defBlock);
   44   bool inRegion(const BasicBlock &BB) const;
include/llvm/Analysis/TargetTransformInfo.h
   87   BasicBlock *ExitBlock = nullptr;
include/llvm/Analysis/Trace.h
   31   using BasicBlockListType = std::vector<BasicBlock *>;
   39   Trace(const std::vector<BasicBlock *> &vBB) : BasicBlocks (vBB) {}
   43   BasicBlock *getEntryBasicBlock () const { return BasicBlocks[0]; }
   46   BasicBlock *operator[](unsigned i) const { return BasicBlocks[i]; }
   47   BasicBlock *getBlock(unsigned i)   const { return BasicBlocks[i]; }
   58   int getBlockIndex(const BasicBlock *X) const {
   67   bool contains(const BasicBlock *X) const {
   73   bool dominates(const BasicBlock *B1, const BasicBlock *B2) const {
   73   bool dominates(const BasicBlock *B1, const BasicBlock *B2) const {
include/llvm/Analysis/ValueTracking.h
  525   bool isGuaranteedToTransferExecutionToSuccessor(const BasicBlock *BB);
include/llvm/Analysis/VectorUtils.h
  232 computeMinimumValueSizes(ArrayRef<BasicBlock*> Blocks,
  667   bool isPredicated(BasicBlock *BB) const {
include/llvm/CodeGen/AsmPrinter.h
  468   MCSymbol *GetBlockAddressSymbol(const BasicBlock *BB) const;
include/llvm/CodeGen/BasicTTIImpl.h
  360       SmallPtrSet<const BasicBlock *, 4> Dests;
  476       BasicBlock *BB = *I;
  478       for (BasicBlock::iterator J = BB->begin(), JE = BB->end(); J != JE; ++J)
include/llvm/CodeGen/CommandFlags.inc
  397       for (auto &B : F)
include/llvm/CodeGen/FastISel.h
  459   void finishCondBranch(const BasicBlock *BranchBB, MachineBasicBlock *TrueMBB,
  551   bool handlePHINodesInSuccessorBlocks(const BasicBlock *LLVMBB);
include/llvm/CodeGen/FunctionLoweringInfo.h
   73   DenseMap<const BasicBlock*, MachineBasicBlock *> MBBMap;
  172   SmallPtrSet<const BasicBlock*, 4> VisitedBBs;
include/llvm/CodeGen/GlobalISel/IRTranslator.h
  150   DenseMap<const BasicBlock *, MachineBasicBlock *> BBToMBB;
  157   using CFGEdge = std::pair<const BasicBlock *, const BasicBlock *>;
  157   using CFGEdge = std::pair<const BasicBlock *, const BasicBlock *>;
  587   MachineBasicBlock &getMBB(const BasicBlock &BB);
include/llvm/CodeGen/MachineBasicBlock.h
   84   const BasicBlock *BB;
  139   explicit MachineBasicBlock(MachineFunction &MF, const BasicBlock *BB);
  150   const BasicBlock *getBasicBlock() const { return BB; }
include/llvm/CodeGen/MachineFunction.h
  746   MachineBasicBlock *CreateMachineBasicBlock(const BasicBlock *bb = nullptr);
include/llvm/CodeGen/MachineModuleInfo.h
  227   MCSymbol *getAddrLabelSymbol(const BasicBlock *BB) {
  234   ArrayRef<MCSymbol *> getAddrLabelSymbolToEmit(const BasicBlock *BB);
include/llvm/CodeGen/SelectionDAGISel.h
  335   void SelectBasicBlock(BasicBlock::const_iterator Begin,
  336                         BasicBlock::const_iterator End,
include/llvm/CodeGen/StackProtector.h
   86   BasicBlock *CreateFailBB();
  114   bool shouldEmitSDCheck(const BasicBlock &BB) const;
include/llvm/CodeGen/SwiftErrorValueTracking.h
  104   void preassignVRegs(MachineBasicBlock *MBB, BasicBlock::const_iterator Begin,
  105                       BasicBlock::const_iterator End);
include/llvm/CodeGen/WasmEHFuncInfo.h
   25 using BBOrMBB = PointerUnion<const BasicBlock *, MachineBasicBlock *>;
   33   const BasicBlock *getEHPadUnwindDest(const BasicBlock *BB) const {
   33   const BasicBlock *getEHPadUnwindDest(const BasicBlock *BB) const {
   34     return EHPadUnwindMap.lookup(BB).get<const BasicBlock *>();
   36   void setEHPadUnwindDest(const BasicBlock *BB, const BasicBlock *Dest) {
   36   void setEHPadUnwindDest(const BasicBlock *BB, const BasicBlock *Dest) {
   39   bool hasEHPadUnwindDest(const BasicBlock *BB) const {
include/llvm/CodeGen/WinEHFuncInfo.h
   38 using MBBOrBasicBlock = PointerUnion<const BasicBlock *, MachineBasicBlock *>;
include/llvm/ExecutionEngine/Orc/SpeculateAnalyses.h
   29   void findCalles(const BasicBlock *, DenseSet<StringRef> &);
   57   using VisitedBlocksInfoTy = DenseMap<const BasicBlock *, WalkDirection>;
   58   using BlockListTy = SmallVector<const BasicBlock *, 8>;
   60       SmallVector<std::pair<const BasicBlock *, const BasicBlock *>, 8>;
   60       SmallVector<std::pair<const BasicBlock *, const BasicBlock *>, 8>;
   62       SmallVector<std::pair<const BasicBlock *, uint64_t>, 8>;
   68   void traverseToEntryBlock(const BasicBlock *, const BlockListTy &,
   72   void traverseToExitBlock(const BasicBlock *, const BlockListTy &,
include/llvm/FuzzMutate/IRMutator.h
   50   virtual void mutate(BasicBlock &BB, RandomIRBuilder &IB);
   92   void mutate(BasicBlock &BB, RandomIRBuilder &IB) override;
include/llvm/FuzzMutate/RandomIRBuilder.h
   37   Value *findOrCreateSource(BasicBlock &BB, ArrayRef<Instruction *> Insts);
   43   Value *findOrCreateSource(BasicBlock &BB, ArrayRef<Instruction *> Insts,
   46   Value *newSource(BasicBlock &BB, ArrayRef<Instruction *> Insts,
   50   void connectToSink(BasicBlock &BB, ArrayRef<Instruction *> Insts, Value *V);
   52   void newSink(BasicBlock &BB, ArrayRef<Instruction *> Insts, Value *V);
   53   Value *findPointer(BasicBlock &BB, ArrayRef<Instruction *> Insts,
include/llvm/IR/AssemblyAnnotationWriter.h
   39   virtual void emitBasicBlockStartAnnot(const BasicBlock *,
   45   virtual void emitBasicBlockEndAnnot(const BasicBlock *,
include/llvm/IR/BasicBlock.h
   58                          public ilist_node_with_parent<BasicBlock, Function> {
   78                       BasicBlock *InsertBefore = nullptr);
   81   BasicBlock(const BasicBlock &) = delete;
   82   BasicBlock &operator=(const BasicBlock &) = delete;
   82   BasicBlock &operator=(const BasicBlock &) = delete;
   99   static BasicBlock *Create(LLVMContext &Context, const Twine &Name = "",
  101                             BasicBlock *InsertBefore = nullptr) {
  102     return new BasicBlock(Context, Name, Parent, InsertBefore);
  185   iterator_range<filter_iterator<BasicBlock::const_iterator,
  191   iterator_range<filter_iterator<BasicBlock::iterator,
  196   filter_iterator<BasicBlock::const_iterator,
  206   SymbolTableList<BasicBlock>::iterator eraseFromParent();
  210   void moveBefore(BasicBlock *MovePos);
  214   void moveAfter(BasicBlock *MovePos);
  222   void insertInto(Function *Parent, BasicBlock *InsertBefore = nullptr);
  226   const BasicBlock *getSinglePredecessor() const;
  227   BasicBlock *getSinglePredecessor() {
  238   const BasicBlock *getUniquePredecessor() const;
  239   BasicBlock *getUniquePredecessor() {
  254   const BasicBlock *getSingleSuccessor() const;
  255   BasicBlock *getSingleSuccessor() {
  264   const BasicBlock *getUniqueSuccessor() const;
  265   BasicBlock *getUniqueSuccessor() {
  324       phi_iterator_impl<const PHINode, BasicBlock::const_iterator>;
  343     return &BasicBlock::InstList;
  370   void removePredecessor(BasicBlock *Pred, bool KeepOneInputPHIs = false);
  389   BasicBlock *splitBasicBlock(iterator I, const Twine &BBName = "");
  390   BasicBlock *splitBasicBlock(Instruction *I, const Twine &BBName = "") {
  400   void replacePhiUsesWith(BasicBlock *Old, BasicBlock *New);
  400   void replacePhiUsesWith(BasicBlock *Old, BasicBlock *New);
  404   void replaceSuccessorsPhiUsesWith(BasicBlock *Old, BasicBlock *New);
  404   void replaceSuccessorsPhiUsesWith(BasicBlock *Old, BasicBlock *New);
  408   void replaceSuccessorsPhiUsesWith(BasicBlock *New);
  455 BasicBlock::iterator skipDebugIntrinsics(BasicBlock::iterator It);
  455 BasicBlock::iterator skipDebugIntrinsics(BasicBlock::iterator It);
include/llvm/IR/CFG.h
   43                                           Ptr, ptrdiff_t, Ptr*, Ptr*> {
   43                                           Ptr, ptrdiff_t, Ptr*, Ptr*> {
   43                                           Ptr, ptrdiff_t, Ptr*, Ptr*> {
   45       std::iterator<std::forward_iterator_tag, Ptr, ptrdiff_t, Ptr*, Ptr*>;
   45       std::iterator<std::forward_iterator_tag, Ptr, ptrdiff_t, Ptr*, Ptr*>;
   45       std::iterator<std::forward_iterator_tag, Ptr, ptrdiff_t, Ptr*, Ptr*>;
   46   using Self = PredIterator<Ptr, USE_iterator>;
   65   explicit inline PredIterator(Ptr *bb) : It(bb->user_begin()) {
   68   inline PredIterator(Ptr *bb, bool) : It(bb->user_end()) {}
  102 using pred_iterator = PredIterator<BasicBlock, Value::user_iterator>;
  104     PredIterator<const BasicBlock, Value::const_user_iterator>;
  108 inline pred_iterator pred_begin(BasicBlock *BB) { return pred_iterator(BB); }
  109 inline const_pred_iterator pred_begin(const BasicBlock *BB) {
  112 inline pred_iterator pred_end(BasicBlock *BB) { return pred_iterator(BB, true);}
  113 inline const_pred_iterator pred_end(const BasicBlock *BB) {
  116 inline bool pred_empty(const BasicBlock *BB) {
  121 inline unsigned pred_size(const BasicBlock *BB) {
  124 inline pred_range predecessors(BasicBlock *BB) {
  127 inline pred_const_range predecessors(const BasicBlock *BB) {
  137     : public iterator_facade_base<SuccIterator<InstructionT, BlockT>,
  138                                   std::random_access_iterator_tag, BlockT, int,
  139                                   BlockT *, BlockT *> {
  139                                   BlockT *, BlockT *> {
  142   using pointer = BlockT *;
  143   using reference = BlockT *;
  148   using Self = SuccIterator<InstructionT, BlockT>;
  201   inline BlockT *operator*() const { return Inst->getSuccessor(Idx); }
  204   inline BlockT *operator->() const { return operator*(); }
  234   inline BlockT *getSource() {
  240 using succ_iterator = SuccIterator<Instruction, BasicBlock>;
  241 using succ_const_iterator = SuccIterator<const Instruction, const BasicBlock>;
  266 inline succ_iterator succ_begin(BasicBlock *BB) {
  269 inline succ_const_iterator succ_begin(const BasicBlock *BB) {
  272 inline succ_iterator succ_end(BasicBlock *BB) {
  275 inline succ_const_iterator succ_end(const BasicBlock *BB) {
  278 inline bool succ_empty(const BasicBlock *BB) {
  281 inline unsigned succ_size(const BasicBlock *BB) {
  284 inline succ_range successors(BasicBlock *BB) {
  287 inline succ_const_range successors(const BasicBlock *BB) {
  299   using NodeRef = BasicBlock *;
  302   static NodeRef getEntryNode(BasicBlock *BB) { return BB; }
  308   using NodeRef = const BasicBlock *;
  311   static NodeRef getEntryNode(const BasicBlock *BB) { return BB; }
  323   using NodeRef = BasicBlock *;
  326   static NodeRef getEntryNode(Inverse<BasicBlock *> G) { return G.Graph; }
  332   using NodeRef = const BasicBlock *;
  335   static NodeRef getEntryNode(Inverse<const BasicBlock *> G) { return G.Graph; }
  348 template <> struct GraphTraits<Function*> : public GraphTraits<BasicBlock*> {
  365   public GraphTraits<const BasicBlock*> {
  388   public GraphTraits<Inverse<BasicBlock*>> {
  394   public GraphTraits<Inverse<const BasicBlock*>> {
include/llvm/IR/CFGDiff.h
  159   using DataRef = const GraphDiff<BasicBlock *, InverseGraph> *;
  160   using NodeRef = std::pair<DataRef, BasicBlock *>;
  165     BasicBlock *BB;
  166     DeletedEdgesFilter(BasicBlock *BB) : BB(BB){};
  174   using vec_iterator = SmallVectorImpl<BasicBlock *>::const_iterator;
  213   using DataRef = const GraphDiff<BasicBlock *, InverseGraph> *;
  214   using NodeRef = std::pair<DataRef, BasicBlock *>;
  219     BasicBlock *BB;
  220     DeletedEdgesFilter(BasicBlock *BB) : BB(BB){};
  228   using vec_iterator = SmallVectorImpl<BasicBlock *>::const_iterator;
include/llvm/IR/CallSite.h
  101   BBTy* getParent() const { return getInstruction()->getParent(); }
  672 class CallSite : public CallSiteBase<Function, BasicBlock, Value, User, Use,
include/llvm/IR/Constants.h
  842   BlockAddress(Function *F, BasicBlock *BB);
  851   static BlockAddress *get(Function *F, BasicBlock *BB);
  855   static BlockAddress *get(BasicBlock *BB);
  860   static BlockAddress *lookup(const BasicBlock *BB);
  866   BasicBlock *getBasicBlock() const { return (BasicBlock*)Op<1>().get(); }
include/llvm/IR/DIBuilder.h
   83                                BasicBlock *InsertBB, Instruction *InsertBefore);
   87                              BasicBlock *InsertBB, Instruction *InsertBefore);
   93                             BasicBlock *InsertBB, Instruction *InsertBefore);
  802                                BasicBlock *InsertAtEnd);
  826                              BasicBlock *InsertAtEnd);
  838                                          BasicBlock *InsertAtEnd);
include/llvm/IR/Dominators.h
   42 using BBDomTree = DomTreeBase<BasicBlock>;
   43 using BBPostDomTree = PostDomTreeBase<BasicBlock>;
   45 using BBUpdates = ArrayRef<llvm::cfg::Update<BasicBlock *>>;
   74 using DomTreeNode = DomTreeNodeBase<BasicBlock>;
   77   const BasicBlock *Start;
   78   const BasicBlock *End;
   81   BasicBlockEdge(const BasicBlock *Start_, const BasicBlock *End_) :
   81   BasicBlockEdge(const BasicBlock *Start_, const BasicBlock *End_) :
   84   BasicBlockEdge(const std::pair<BasicBlock *, BasicBlock *> &Pair)
   84   BasicBlockEdge(const std::pair<BasicBlock *, BasicBlock *> &Pair)
   87   BasicBlockEdge(const std::pair<const BasicBlock *, const BasicBlock *> &Pair)
   87   BasicBlockEdge(const std::pair<const BasicBlock *, const BasicBlock *> &Pair)
   90   const BasicBlock *getStart() const {
   94   const BasicBlock *getEnd() const {
  103   using BBInfo = DenseMapInfo<const BasicBlock *>;
  144 class DominatorTree : public DominatorTreeBase<BasicBlock, false> {
  146   using Base = DominatorTreeBase<BasicBlock, false>;
  167   bool dominates(const Instruction *Def, const BasicBlock *BB) const;
  174   bool dominates(const BasicBlockEdge &BBE, const BasicBlock *BB) const;
include/llvm/IR/Function.h
   61   using BasicBlockListType = SymbolTableList<BasicBlock>;
  669   const BasicBlock       &getEntryBlock() const   { return front(); }
  670         BasicBlock       &getEntryBlock()         { return front(); }
  692   const BasicBlock       &front() const { return BasicBlocks.front(); }
  693         BasicBlock       &front()       { return BasicBlocks.front(); }
  694   const BasicBlock        &back() const { return BasicBlocks.back();  }
  695         BasicBlock        &back()       { return BasicBlocks.back();  }
include/llvm/IR/IRBuilder.h
   64                     BasicBlock *BB, BasicBlock::iterator InsertPt) const {
   64                     BasicBlock *BB, BasicBlock::iterator InsertPt) const {
   81                     BasicBlock *BB, BasicBlock::iterator InsertPt) const {
   81                     BasicBlock *BB, BasicBlock::iterator InsertPt) const {
   92   BasicBlock *BB;
   93   BasicBlock::iterator InsertPt;
  126   BasicBlock *GetInsertBlock() const { return BB; }
  127   BasicBlock::iterator GetInsertPoint() const { return InsertPt; }
  132   void SetInsertPoint(BasicBlock *TheBB) {
  148   void SetInsertPoint(BasicBlock *TheBB, BasicBlock::iterator IP) {
  148   void SetInsertPoint(BasicBlock *TheBB, BasicBlock::iterator IP) {
  174     BasicBlock *Block = nullptr;
  175     BasicBlock::iterator Point;
  182     InsertPoint(BasicBlock *InsertBlock, BasicBlock::iterator InsertPoint)
  182     InsertPoint(BasicBlock *InsertBlock, BasicBlock::iterator InsertPoint)
  188     BasicBlock *getBlock() const { return Block; }
  189     BasicBlock::iterator getPoint() const { return Point; }
  281     AssertingVH<BasicBlock> Block;
  282     BasicBlock::iterator Point;
  691                            Value *ActualInvokee, BasicBlock *NormalDest,
  692                            BasicBlock *UnwindDest, ArrayRef<Value *> InvokeArgs,
  700       BasicBlock *NormalDest, BasicBlock *UnwindDest, uint32_t Flags,
  700       BasicBlock *NormalDest, BasicBlock *UnwindDest, uint32_t Flags,
  710                            Value *ActualInvokee, BasicBlock *NormalDest,
  711                            BasicBlock *UnwindDest, ArrayRef<Use> InvokeArgs,
  808   explicit IRBuilder(BasicBlock *TheBB, const T &F, MDNode *FPMathTag = nullptr,
  814   explicit IRBuilder(BasicBlock *TheBB, MDNode *FPMathTag = nullptr,
  826   IRBuilder(BasicBlock *TheBB, BasicBlock::iterator IP, const T &F,
  826   IRBuilder(BasicBlock *TheBB, BasicBlock::iterator IP, const T &F,
  833   IRBuilder(BasicBlock *TheBB, BasicBlock::iterator IP,
  833   IRBuilder(BasicBlock *TheBB, BasicBlock::iterator IP,
  899   BranchInst *CreateBr(BasicBlock *Dest) {
  905   BranchInst *CreateCondBr(Value *Cond, BasicBlock *True, BasicBlock *False,
  905   BranchInst *CreateCondBr(Value *Cond, BasicBlock *True, BasicBlock *False,
  914   BranchInst *CreateCondBr(Value *Cond, BasicBlock *True, BasicBlock *False,
  914   BranchInst *CreateCondBr(Value *Cond, BasicBlock *True, BasicBlock *False,
  928   SwitchInst *CreateSwitch(Value *V, BasicBlock *Dest, unsigned NumCases = 10,
  944                            BasicBlock *NormalDest, BasicBlock *UnwindDest,
  944                            BasicBlock *NormalDest, BasicBlock *UnwindDest,
  953                            BasicBlock *NormalDest, BasicBlock *UnwindDest,
  953                            BasicBlock *NormalDest, BasicBlock *UnwindDest,
  960   InvokeInst *CreateInvoke(FunctionCallee Callee, BasicBlock *NormalDest,
  961                            BasicBlock *UnwindDest, ArrayRef<Value *> Args,
  968   InvokeInst *CreateInvoke(FunctionCallee Callee, BasicBlock *NormalDest,
  969                            BasicBlock *UnwindDest,
  977   InvokeInst *CreateInvoke(Value *Callee, BasicBlock *NormalDest,
  978                            BasicBlock *UnwindDest, ArrayRef<Value *> Args,
  988   InvokeInst *CreateInvoke(Value *Callee, BasicBlock *NormalDest,
  989                            BasicBlock *UnwindDest,
 1000                            BasicBlock *DefaultDest,
 1001                            ArrayRef<BasicBlock *> IndirectDests,
 1008                            BasicBlock *DefaultDest,
 1009                            ArrayRef<BasicBlock *> IndirectDests,
 1018   CallBrInst *CreateCallBr(FunctionCallee Callee, BasicBlock *DefaultDest,
 1019                            ArrayRef<BasicBlock *> IndirectDests,
 1025   CallBrInst *CreateCallBr(FunctionCallee Callee, BasicBlock *DefaultDest,
 1026                            ArrayRef<BasicBlock *> IndirectDests,
 1039                                       BasicBlock *UnwindBB = nullptr) {
 1043   CatchSwitchInst *CreateCatchSwitch(Value *ParentPad, BasicBlock *UnwindBB,
 1061   CatchReturnInst *CreateCatchRet(CatchPadInst *CatchPad, BasicBlock *BB) {
include/llvm/IR/InstIterator.h
  122     InstIterator<SymbolTableList<BasicBlock>, Function::iterator,
  123                  BasicBlock::iterator, Instruction>;
  125     InstIterator<const SymbolTableList<BasicBlock>,
  126                  Function::const_iterator, BasicBlock::const_iterator,
include/llvm/IR/InstVisitor.h
  104   void visit(BasicBlock &BB) {
  112   void visit(BasicBlock   *BB) { visit(*BB); }
  145   void visitBasicBlock(BasicBlock &BB) {}
include/llvm/IR/InstrTypes.h
   64   UnaryInstruction(Type *Ty, unsigned iType, Value *V, BasicBlock *IAE)
  110                 const Twine &Name, BasicBlock *InsertAtEnd);
  134                                BasicBlock *InsertAtEnd);
  195                  const Twine &Name, BasicBlock *InsertAtEnd);
  225                                 const Twine &Name, BasicBlock *InsertAtEnd);
  296                                    const Twine &Name, BasicBlock *BB) {
  315                                    const Twine &Name, BasicBlock *BB) {
  334                                      const Twine &Name, BasicBlock *BB) {
  384                                    BasicBlock *InsertAtEnd);
  388                                       BasicBlock *InsertAtEnd);
  392                                       BasicBlock *InsertAtEnd);
  396                                     BasicBlock *InsertAtEnd);
  400                                    BasicBlock *InsertAtEnd);
  449            const Twine &NameStr, BasicBlock *InsertAtEnd)
  479     BasicBlock *InsertAtEnd  ///< The block to insert the instruction into
  495     BasicBlock *InsertAtEnd  ///< The block to insert the instruction into
  511     BasicBlock *InsertAtEnd  ///< The block to insert the instruction into
  519     BasicBlock *InsertAtEnd  ///< The block to insert the instruction into
  535     BasicBlock *InsertAtEnd  ///< The block to insert the instruction into
  574     BasicBlock *InsertAtEnd  ///< The block to insert the instruction into
  590     BasicBlock *InsertAtEnd  ///< The block to insert the instruction into
  606     BasicBlock *InsertAtEnd  ///< The block to insert the instruction into
  776           BasicBlock *InsertAtEnd);
  799                          Value *S2, const Twine &Name, BasicBlock *InsertAtEnd);
 1117   using Instruction::Instruction;
 2143                           const Twine &NameStr, BasicBlock *InsertAtEnd);
include/llvm/IR/Instruction.h
   44                     public ilist_node_with_parent<Instruction, BasicBlock> {
   45   BasicBlock *Parent;
   66   inline const BasicBlock *getParent() const { return Parent; }
   67   inline       BasicBlock *getParent()       { return Parent; }
  114   void moveBefore(BasicBlock &BB, SymbolTableList<Instruction>::iterator I);
  665   bool isUsedOutsideOfBlock(const BasicBlock *BB) const;
  672   BasicBlock *getSuccessor(unsigned Idx) const;
  676   void setSuccessor(unsigned Idx, BasicBlock *BB);
  680   void replaceSuccessorWith(BasicBlock *OldBB, BasicBlock *NewBB);
  680   void replaceSuccessorWith(BasicBlock *OldBB, BasicBlock *NewBB);
  757   void setParent(BasicBlock *P);
  776               BasicBlock *InsertAtEnd);
include/llvm/IR/Instructions.h
   74              const Twine &Name, BasicBlock *InsertAtEnd);
   79              const Twine &Name, BasicBlock *InsertAtEnd);
   84              const Twine &Name, BasicBlock *InsertAtEnd);
  181   LoadInst(Type *Ty, Value *Ptr, const Twine &NameStr, BasicBlock *InsertAtEnd);
  185            BasicBlock *InsertAtEnd);
  189            MaybeAlign Align, BasicBlock *InsertAtEnd);
  196            BasicBlock *InsertAtEnd);
  203   LoadInst(Value *Ptr, const Twine &NameStr, BasicBlock *InsertAtEnd)
  211            BasicBlock *InsertAtEnd)
  219            BasicBlock *InsertAtEnd)
  228            AtomicOrdering Order, SyncScope::ID SSID, BasicBlock *InsertAtEnd)
  336   StoreInst(Value *Val, Value *Ptr, BasicBlock *InsertAtEnd);
  339   StoreInst(Value *Val, Value *Ptr, bool isVolatile, BasicBlock *InsertAtEnd);
  343             BasicBlock *InsertAtEnd);
  348             AtomicOrdering Order, SyncScope::ID SSID, BasicBlock *InsertAtEnd);
  476             BasicBlock *InsertAtEnd);
  555                     SyncScope::ID SSID, BasicBlock *InsertAtEnd);
  751                 BasicBlock *InsertAtEnd);
  896                            const Twine &NameStr, BasicBlock *InsertAtEnd);
  926                                    BasicBlock *InsertAtEnd) {
  961                                            BasicBlock *InsertAtEnd) {
  968                                            BasicBlock *InsertAtEnd) {
 1131                                      BasicBlock *InsertAtEnd)
 1189     BasicBlock &InsertAtEnd, ///< Block to insert into.
 1327     BasicBlock &InsertAtEnd, ///< Block to insert into.
 1417                   BasicBlock *InsertAtEnd);
 1423            BasicBlock *InsertAtEnd);
 1468                           BasicBlock *InsertAtEnd) {
 1473                           const Twine &NameStr, BasicBlock *InsertAtEnd) {
 1480                           const Twine &NameStr, BasicBlock *InsertAtEnd) {
 1511                           BasicBlock *InsertAtEnd) {
 1517                           const Twine &NameStr, BasicBlock *InsertAtEnd) {
 1524                           const Twine &NameStr, BasicBlock *InsertAtEnd) {
 1558                           BasicBlock *InsertAtEnd) {
 1566                           const Twine &NameStr, BasicBlock *InsertAtEnd) {
 1575                           const Twine &NameStr, BasicBlock *InsertAtEnd) {
 1601   static Instruction *CreateMalloc(BasicBlock *InsertAtEnd, Type *IntPtrTy,
 1612   static Instruction *CreateMalloc(BasicBlock *InsertAtEnd, Type *IntPtrTy,
 1620   static Instruction *CreateFree(Value *Source, BasicBlock *InsertAtEnd);
 1626                                  BasicBlock *InsertAtEnd);
 1689                    BasicBlock *InsertAtEnd)
 1725              BasicBlock *InsertAtEnd)
 1758                             BasicBlock *InsertAtEnd) {
 1825             BasicBlock *InsertAtEnd)
 1854                      BasicBlock *InsertAtEnd);
 1871                                    BasicBlock *InsertAtEnd) {
 1919                     BasicBlock *InsertAtEnd);
 1936                                    BasicBlock *InsertAtEnd) {
 1989                     const Twine &NameStr, BasicBlock *InsertAtEnd);
 2307                           const Twine &NameStr, BasicBlock *InsertAtEnd);
 2329                                   BasicBlock *InsertAtEnd) {
 2390                                    BasicBlock *InsertAtEnd)
 2418                          const Twine &NameStr, BasicBlock *InsertAtEnd);
 2426                   BasicBlock *InsertAtEnd);
 2453                                  BasicBlock *InsertAtEnd) {
 2529                                  BasicBlock *InsertAtEnd)
 2563           BasicBlock *InsertAtEnd)
 2593                          const Twine &NameStr, BasicBlock *InsertAtEnd) {
 2603   using block_iterator = BasicBlock **;
 2604   using const_block_iterator = BasicBlock * const *;
 2664   BasicBlock *getIncomingBlock(unsigned i) const {
 2671   BasicBlock *getIncomingBlock(const Use &U) const {
 2679   BasicBlock *getIncomingBlock(Value::const_user_iterator I) const {
 2683   void setIncomingBlock(unsigned i, BasicBlock *BB) {
 2689   void replaceIncomingBlockWith(const BasicBlock *Old, BasicBlock *New) {
 2689   void replaceIncomingBlockWith(const BasicBlock *Old, BasicBlock *New) {
 2698   void addIncoming(Value *V, BasicBlock *BB) {
 2717   Value *removeIncomingValue(const BasicBlock *BB, bool DeletePHIIfEmpty=true) {
 2726   int getBasicBlockIndex(const BasicBlock *BB) const {
 2733   Value *getIncomingValueForBlock(const BasicBlock *BB) const {
 2740   void setIncomingValueForBlock(const BasicBlock *BB, Value *V) {
 2805                           const Twine &NameStr, BasicBlock *InsertAtEnd);
 2828                                 const Twine &NameStr, BasicBlock *InsertAtEnd);
 2910   ReturnInst(LLVMContext &C, Value *retVal, BasicBlock *InsertAtEnd);
 2911   explicit ReturnInst(LLVMContext &C, BasicBlock *InsertAtEnd);
 2926                             BasicBlock *InsertAtEnd) {
 2930   static ReturnInst* Create(LLVMContext &C, BasicBlock *InsertAtEnd) {
 2953   BasicBlock *getSuccessor(unsigned idx) const {
 2957   void setSuccessor(unsigned idx, BasicBlock *B) {
 2988   explicit BranchInst(BasicBlock *IfTrue, Instruction *InsertBefore = nullptr);
 2989   BranchInst(BasicBlock *IfTrue, BasicBlock *IfFalse, Value *Cond,
 2989   BranchInst(BasicBlock *IfTrue, BasicBlock *IfFalse, Value *Cond,
 2991   BranchInst(BasicBlock *IfTrue, BasicBlock *InsertAtEnd);
 2991   BranchInst(BasicBlock *IfTrue, BasicBlock *InsertAtEnd);
 2992   BranchInst(BasicBlock *IfTrue, BasicBlock *IfFalse, Value *Cond,
 2992   BranchInst(BasicBlock *IfTrue, BasicBlock *IfFalse, Value *Cond,
 2993              BasicBlock *InsertAtEnd);
 3010                               std::random_access_iterator_tag, BasicBlock *,
 3011                               ptrdiff_t, BasicBlock *, BasicBlock *> {
 3011                               ptrdiff_t, BasicBlock *, BasicBlock *> {
 3014     BasicBlock *operator*() const { return cast<BasicBlock>(*I); }
 3014     BasicBlock *operator*() const { return cast<BasicBlock>(*I); }
 3015     BasicBlock *operator->() const { return operator*(); }
 3022                               const BasicBlock *, ptrdiff_t, const BasicBlock *,
 3022                               const BasicBlock *, ptrdiff_t, const BasicBlock *,
 3023                               const BasicBlock *> {
 3027     const BasicBlock *operator*() const { return cast<BasicBlock>(*I); }
 3027     const BasicBlock *operator*() const { return cast<BasicBlock>(*I); }
 3028     const BasicBlock *operator->() const { return operator*(); }
 3031   static BranchInst *Create(BasicBlock *IfTrue,
 3036   static BranchInst *Create(BasicBlock *IfTrue, BasicBlock *IfFalse,
 3036   static BranchInst *Create(BasicBlock *IfTrue, BasicBlock *IfFalse,
 3041   static BranchInst *Create(BasicBlock *IfTrue, BasicBlock *InsertAtEnd) {
 3041   static BranchInst *Create(BasicBlock *IfTrue, BasicBlock *InsertAtEnd) {
 3045   static BranchInst *Create(BasicBlock *IfTrue, BasicBlock *IfFalse,
 3045   static BranchInst *Create(BasicBlock *IfTrue, BasicBlock *IfFalse,
 3046                             Value *Cond, BasicBlock *InsertAtEnd) {
 3068   BasicBlock *getSuccessor(unsigned i) const {
 3070     return cast_or_null<BasicBlock>((&Op<-1>() - i)->get());
 3073   void setSuccessor(unsigned idx, BasicBlock *NewSucc) {
 3132   SwitchInst(Value *Value, BasicBlock *Default, unsigned NumCases,
 3139   SwitchInst(Value *Value, BasicBlock *Default, unsigned NumCases,
 3140              BasicBlock *InsertAtEnd);
 3147   void init(Value *Value, BasicBlock *Default, unsigned NumReserved);
 3192     BasicBlockT *getCaseSuccessor() const {
 3217       CaseHandleImpl<const SwitchInst, const ConstantInt, const BasicBlock>;
 3220       : public CaseHandleImpl<SwitchInst, ConstantInt, BasicBlock> {
 3234     void setSuccessor(BasicBlock *S) {
 3309   static SwitchInst *Create(Value *Value, BasicBlock *Default,
 3315   static SwitchInst *Create(Value *Value, BasicBlock *Default,
 3316                             unsigned NumCases, BasicBlock *InsertAtEnd) {
 3327   BasicBlock *getDefaultDest() const {
 3328     return cast<BasicBlock>(getOperand(1));
 3331   void setDefaultDest(BasicBlock *DefaultCase) {
 3411   ConstantInt *findCaseDest(BasicBlock *BB) {
 3433   void addCase(ConstantInt *OnVal, BasicBlock *Dest);
 3445   BasicBlock *getSuccessor(unsigned idx) const {
 3447     return cast<BasicBlock>(getOperand(idx*2+1));
 3449   void setSuccessor(unsigned idx, BasicBlock *NewSucc) {
 3496   void addCase(ConstantInt *OnVal, BasicBlock *Dest, CaseWeightOpt W);
 3538   IndirectBrInst(Value *Address, unsigned NumDests, BasicBlock *InsertAtEnd);
 3561                               std::random_access_iterator_tag, BasicBlock *,
 3562                               ptrdiff_t, BasicBlock *, BasicBlock *> {
 3562                               ptrdiff_t, BasicBlock *, BasicBlock *> {
 3565     BasicBlock *operator*() const { return cast<BasicBlock>(*I); }
 3565     BasicBlock *operator*() const { return cast<BasicBlock>(*I); }
 3566     BasicBlock *operator->() const { return operator*(); }
 3573                               const BasicBlock *, ptrdiff_t, const BasicBlock *,
 3573                               const BasicBlock *, ptrdiff_t, const BasicBlock *,
 3574                               const BasicBlock *> {
 3578     const BasicBlock *operator*() const { return cast<BasicBlock>(*I); }
 3578     const BasicBlock *operator*() const { return cast<BasicBlock>(*I); }
 3579     const BasicBlock *operator->() const { return operator*(); }
 3588                                 BasicBlock *InsertAtEnd) {
 3605   BasicBlock *getDestination(unsigned i) { return getSuccessor(i); }
 3606   const BasicBlock *getDestination(unsigned i) const { return getSuccessor(i); }
 3610   void addDestination(BasicBlock *Dest);
 3617   BasicBlock *getSuccessor(unsigned i) const {
 3618     return cast<BasicBlock>(getOperand(i+1));
 3620   void setSuccessor(unsigned i, BasicBlock *NewSucc) {
 3672   inline InvokeInst(FunctionType *Ty, Value *Func, BasicBlock *IfNormal,
 3673                     BasicBlock *IfException, ArrayRef<Value *> Args,
 3677   inline InvokeInst(FunctionType *Ty, Value *Func, BasicBlock *IfNormal,
 3678                     BasicBlock *IfException, ArrayRef<Value *> Args,
 3680                     const Twine &NameStr, BasicBlock *InsertAtEnd);
 3682   void init(FunctionType *Ty, Value *Func, BasicBlock *IfNormal,
 3683             BasicBlock *IfException, ArrayRef<Value *> Args,
 3700   static InvokeInst *Create(FunctionType *Ty, Value *Func, BasicBlock *IfNormal,
 3701                             BasicBlock *IfException, ArrayRef<Value *> Args,
 3710   static InvokeInst *Create(FunctionType *Ty, Value *Func, BasicBlock *IfNormal,
 3711                             BasicBlock *IfException, ArrayRef<Value *> Args,
 3724   static InvokeInst *Create(FunctionType *Ty, Value *Func, BasicBlock *IfNormal,
 3725                             BasicBlock *IfException, ArrayRef<Value *> Args,
 3726                             const Twine &NameStr, BasicBlock *InsertAtEnd) {
 3733   static InvokeInst *Create(FunctionType *Ty, Value *Func, BasicBlock *IfNormal,
 3734                             BasicBlock *IfException, ArrayRef<Value *> Args,
 3736                             const Twine &NameStr, BasicBlock *InsertAtEnd) {
 3746   static InvokeInst *Create(FunctionCallee Func, BasicBlock *IfNormal,
 3747                             BasicBlock *IfException, ArrayRef<Value *> Args,
 3754   static InvokeInst *Create(FunctionCallee Func, BasicBlock *IfNormal,
 3755                             BasicBlock *IfException, ArrayRef<Value *> Args,
 3763   static InvokeInst *Create(FunctionCallee Func, BasicBlock *IfNormal,
 3764                             BasicBlock *IfException, ArrayRef<Value *> Args,
 3765                             const Twine &NameStr, BasicBlock *InsertAtEnd) {
 3770   static InvokeInst *Create(FunctionCallee Func, BasicBlock *IfNormal,
 3771                             BasicBlock *IfException, ArrayRef<Value *> Args,
 3773                             const Twine &NameStr, BasicBlock *InsertAtEnd) {
 3779   static InvokeInst *Create(Value *Func, BasicBlock *IfNormal,
 3780                             BasicBlock *IfException, ArrayRef<Value *> Args,
 3790   static InvokeInst *Create(Value *Func, BasicBlock *IfNormal,
 3791                             BasicBlock *IfException, ArrayRef<Value *> Args,
 3802   static InvokeInst *Create(Value *Func, BasicBlock *IfNormal,
 3803                             BasicBlock *IfException, ArrayRef<Value *> Args,
 3804                             const Twine &NameStr, BasicBlock *InsertAtEnd) {
 3811   static InvokeInst *Create(Value *Func, BasicBlock *IfNormal,
 3812                             BasicBlock *IfException, ArrayRef<Value *> Args,
 3814                             const Twine &NameStr, BasicBlock *InsertAtEnd) {
 3840   BasicBlock *getNormalDest() const {
 3841     return cast<BasicBlock>(Op<NormalDestOpEndIdx>());
 3843   BasicBlock *getUnwindDest() const {
 3844     return cast<BasicBlock>(Op<UnwindDestOpEndIdx>());
 3846   void setNormalDest(BasicBlock *B) {
 3849   void setUnwindDest(BasicBlock *B) {
 3857   BasicBlock *getSuccessor(unsigned i) const {
 3862   void setSuccessor(unsigned i, BasicBlock *NewSucc) {
 3889 InvokeInst::InvokeInst(FunctionType *Ty, Value *Func, BasicBlock *IfNormal,
 3890                        BasicBlock *IfException, ArrayRef<Value *> Args,
 3899 InvokeInst::InvokeInst(FunctionType *Ty, Value *Func, BasicBlock *IfNormal,
 3900                        BasicBlock *IfException, ArrayRef<Value *> Args,
 3902                        const Twine &NameStr, BasicBlock *InsertAtEnd)
 3926   inline CallBrInst(FunctionType *Ty, Value *Func, BasicBlock *DefaultDest,
 3927                     ArrayRef<BasicBlock *> IndirectDests,
 3932   inline CallBrInst(FunctionType *Ty, Value *Func, BasicBlock *DefaultDest,
 3933                     ArrayRef<BasicBlock *> IndirectDests,
 3936                     const Twine &NameStr, BasicBlock *InsertAtEnd);
 3938   void init(FunctionType *FTy, Value *Func, BasicBlock *DefaultDest,
 3939             ArrayRef<BasicBlock *> IndirectDests, ArrayRef<Value *> Args,
 3943   void updateArgBlockAddresses(unsigned i, BasicBlock *B);
 3961                             BasicBlock *DefaultDest,
 3962                             ArrayRef<BasicBlock *> IndirectDests,
 3972                             BasicBlock *DefaultDest,
 3973                             ArrayRef<BasicBlock *> IndirectDests,
 3988                             BasicBlock *DefaultDest,
 3989                             ArrayRef<BasicBlock *> IndirectDests,
 3991                             BasicBlock *InsertAtEnd) {
 3999                             BasicBlock *DefaultDest,
 4000                             ArrayRef<BasicBlock *> IndirectDests,
 4003                             const Twine &NameStr, BasicBlock *InsertAtEnd) {
 4013   static CallBrInst *Create(FunctionCallee Func, BasicBlock *DefaultDest,
 4014                             ArrayRef<BasicBlock *> IndirectDests,
 4021   static CallBrInst *Create(FunctionCallee Func, BasicBlock *DefaultDest,
 4022                             ArrayRef<BasicBlock *> IndirectDests,
 4031   static CallBrInst *Create(FunctionCallee Func, BasicBlock *DefaultDest,
 4032                             ArrayRef<BasicBlock *> IndirectDests,
 4034                             BasicBlock *InsertAtEnd) {
 4040                             BasicBlock *DefaultDest,
 4041                             ArrayRef<BasicBlock *> IndirectDests,
 4044                             const Twine &NameStr, BasicBlock *InsertAtEnd) {
 4078   BasicBlock *getDefaultDest() const {
 4079     return cast<BasicBlock>(*(&Op<-1>() - getNumIndirectDests() - 1));
 4081   BasicBlock *getIndirectDest(unsigned i) const {
 4082     return cast_or_null<BasicBlock>(*(&Op<-1>() - getNumIndirectDests() + i));
 4084   SmallVector<BasicBlock *, 16> getIndirectDests() const {
 4085     SmallVector<BasicBlock *, 16> IndirectDests;
 4090   void setDefaultDest(BasicBlock *B) {
 4093   void setIndirectDest(unsigned i, BasicBlock *B) {
 4098   BasicBlock *getSuccessor(unsigned i) const {
 4104   void setSuccessor(unsigned i, BasicBlock *NewSucc) {
 4129 CallBrInst::CallBrInst(FunctionType *Ty, Value *Func, BasicBlock *DefaultDest,
 4130                        ArrayRef<BasicBlock *> IndirectDests,
 4140 CallBrInst::CallBrInst(FunctionType *Ty, Value *Func, BasicBlock *DefaultDest,
 4141                        ArrayRef<BasicBlock *> IndirectDests,
 4144                        const Twine &NameStr, BasicBlock *InsertAtEnd)
 4166   ResumeInst(Value *Exn, BasicBlock *InsertAtEnd);
 4179   static ResumeInst *Create(Value *Exn, BasicBlock *InsertAtEnd) {
 4200   BasicBlock *getSuccessor(unsigned idx) const {
 4204   void setSuccessor(unsigned idx, BasicBlock *NewSucc) {
 4233   CatchSwitchInst(Value *ParentPad, BasicBlock *UnwindDest,
 4241   CatchSwitchInst(Value *ParentPad, BasicBlock *UnwindDest,
 4243                   BasicBlock *InsertAtEnd);
 4248   void init(Value *ParentPad, BasicBlock *UnwindDest, unsigned NumReserved);
 4258   static CatchSwitchInst *Create(Value *ParentPad, BasicBlock *UnwindDest,
 4266   static CatchSwitchInst *Create(Value *ParentPad, BasicBlock *UnwindDest,
 4268                                  BasicBlock *InsertAtEnd) {
 4283   BasicBlock *getUnwindDest() const {
 4285       return cast<BasicBlock>(getOperand(1));
 4288   void setUnwindDest(BasicBlock *UnwindDest) {
 4303   static BasicBlock *handler_helper(Value *V) { return cast<BasicBlock>(V); }
 4303   static BasicBlock *handler_helper(Value *V) { return cast<BasicBlock>(V); }
 4304   static const BasicBlock *handler_helper(const Value *V) {
 4305     return cast<BasicBlock>(V);
 4309   using DerefFnTy = BasicBlock *(*)(Value *);
 4312   using ConstDerefFnTy = const BasicBlock *(*)(const Value *);
 4360   void addHandler(BasicBlock *Dest);
 4365   BasicBlock *getSuccessor(unsigned Idx) const {
 4368     return cast<BasicBlock>(getOperand(Idx + 1));
 4370   void setSuccessor(unsigned Idx, BasicBlock *NewSucc) {
 4402                           BasicBlock *InsertAtEnd)
 4416                                 const Twine &NameStr, BasicBlock *InsertAtEnd) {
 4443                         BasicBlock *InsertAtEnd)
 4457                               const Twine &NameStr, BasicBlock *InsertAtEnd) {
 4487   CatchReturnInst(Value *CatchPad, BasicBlock *BB, Instruction *InsertBefore);
 4488   CatchReturnInst(Value *CatchPad, BasicBlock *BB, BasicBlock *InsertAtEnd);
 4488   CatchReturnInst(Value *CatchPad, BasicBlock *BB, BasicBlock *InsertAtEnd);
 4490   void init(Value *CatchPad, BasicBlock *BB);
 4499   static CatchReturnInst *Create(Value *CatchPad, BasicBlock *BB,
 4506   static CatchReturnInst *Create(Value *CatchPad, BasicBlock *BB,
 4507                                  BasicBlock *InsertAtEnd) {
 4523   BasicBlock *getSuccessor() const { return cast<BasicBlock>(Op<1>()); }
 4523   BasicBlock *getSuccessor() const { return cast<BasicBlock>(Op<1>()); }
 4524   void setSuccessor(BasicBlock *NewSucc) {
 4545   BasicBlock *getSuccessor(unsigned Idx) const {
 4550   void setSuccessor(unsigned Idx, BasicBlock *B) {
 4569   CleanupReturnInst(Value *CleanupPad, BasicBlock *UnwindBB, unsigned Values,
 4571   CleanupReturnInst(Value *CleanupPad, BasicBlock *UnwindBB, unsigned Values,
 4572                     BasicBlock *InsertAtEnd);
 4574   void init(Value *CleanupPad, BasicBlock *UnwindBB);
 4584                                    BasicBlock *UnwindBB = nullptr,
 4594   static CleanupReturnInst *Create(Value *CleanupPad, BasicBlock *UnwindBB,
 4595                                    BasicBlock *InsertAtEnd) {
 4621   BasicBlock *getUnwindDest() const {
 4622     return hasUnwindDest() ? cast<BasicBlock>(Op<1>()) : nullptr;
 4624   void setUnwindDest(BasicBlock *NewDest) {
 4639   BasicBlock *getSuccessor(unsigned Idx) const {
 4644   void setSuccessor(unsigned Idx, BasicBlock *B) {
 4680   explicit UnreachableInst(LLVMContext &C, BasicBlock *InsertAtEnd);
 4698   BasicBlock *getSuccessor(unsigned idx) const {
 4702   void setSuccessor(unsigned idx, BasicBlock *B) {
 4734     BasicBlock *InsertAtEnd       ///< The block to insert the instruction into
 4773     BasicBlock *InsertAtEnd       ///< The block to insert the instruction into
 4812     BasicBlock *InsertAtEnd       ///< The block to insert the instruction into
 4851     BasicBlock *InsertAtEnd       ///< The block to insert the instruction into
 4890     BasicBlock *InsertAtEnd       ///< The block to insert the instruction into
 4929     BasicBlock *InsertAtEnd       ///< The block to insert the instruction into
 4968     BasicBlock *InsertAtEnd       ///< The block to insert the instruction into
 5007     BasicBlock *InsertAtEnd       ///< Where to insert the new instruction
 5046     BasicBlock *InsertAtEnd       ///< The block to insert the instruction into
 5081     BasicBlock *InsertAtEnd       ///< The block to insert the instruction into
 5128     BasicBlock *InsertAtEnd       ///< The block to insert the instruction into
 5179     BasicBlock *InsertAtEnd       ///< The block to insert the instruction into
 5219     BasicBlock *InsertAtEnd       ///< The block to insert the instruction into
include/llvm/IR/PatternMatch.h
   66   template <typename ITy> bool match(ITy *V) { return isa<Class>(V); }
   66   template <typename ITy> bool match(ITy *V) { return isa<Class>(V); }
   92 inline class_match<BasicBlock> m_BasicBlock() {
  540   Class *&VR;
  542   bind_ty(Class *&V) : VR(V) {}
  544   template <typename ITy> bool match(ITy *V) {
  545     if (auto *CV = dyn_cast<Class>(V)) {
  545     if (auto *CV = dyn_cast<Class>(V)) {
  572 inline bind_ty<BasicBlock> m_BasicBlock(BasicBlock *&V) { return V; }
  572 inline bind_ty<BasicBlock> m_BasicBlock(BasicBlock *&V) { return V; }
  573 inline bind_ty<const BasicBlock> m_BasicBlock(const BasicBlock *&V) {
  573 inline bind_ty<const BasicBlock> m_BasicBlock(const BasicBlock *&V) {
  592   Class *const &Val;
  594   deferredval_ty(Class *const &V) : Val(V) {}
  596   template <typename ITy> bool match(ITy *const V) { return V == Val; }
  678   BasicBlock *Val;
  680   specific_bbval(BasicBlock *Val) : Val(Val) {}
  682   template <typename ITy> bool match(ITy *V) {
  683     const auto *BB = dyn_cast<BasicBlock>(V);
  683     const auto *BB = dyn_cast<BasicBlock>(V);
  689 inline specific_bbval m_SpecificBB(BasicBlock *BB) {
  694 inline deferredval_ty<BasicBlock> m_Deferred(BasicBlock *const &BB) {
  694 inline deferredval_ty<BasicBlock> m_Deferred(BasicBlock *const &BB) {
  697 inline deferredval_ty<const BasicBlock>
  698 m_Deferred(const BasicBlock *const &BB) {
 1379   BasicBlock *&Succ;
 1381   br_match(BasicBlock *&Succ) : Succ(Succ) {}
 1393 inline br_match m_UnconditionalBr(BasicBlock *&Succ) { return br_match(Succ); }
 1413 inline brc_match<Cond_t, bind_ty<BasicBlock>, bind_ty<BasicBlock>>
 1413 inline brc_match<Cond_t, bind_ty<BasicBlock>, bind_ty<BasicBlock>>
 1414 m_Br(const Cond_t &C, BasicBlock *&T, BasicBlock *&F) {
 1414 m_Br(const Cond_t &C, BasicBlock *&T, BasicBlock *&F) {
 1415   return brc_match<Cond_t, bind_ty<BasicBlock>, bind_ty<BasicBlock>>(
 1415   return brc_match<Cond_t, bind_ty<BasicBlock>, bind_ty<BasicBlock>>(
include/llvm/IR/PredIteratorCache.h
   29   mutable DenseMap<BasicBlock *, BasicBlock **> BlockToPredsMap;
   29   mutable DenseMap<BasicBlock *, BasicBlock **> BlockToPredsMap;
   30   mutable DenseMap<BasicBlock *, unsigned> BlockToPredCountMap;
   42   BasicBlock **GetPreds(BasicBlock *BB) {
   42   BasicBlock **GetPreds(BasicBlock *BB) {
   43     BasicBlock **&Entry = BlockToPredsMap[BB];
   47     SmallVector<BasicBlock *, 32> PredCache(pred_begin(BB), pred_end(BB));
   52     Entry = Memory.Allocate<BasicBlock *>(PredCache.size());
   57   unsigned GetNumPreds(BasicBlock *BB) const {
   65   size_t size(BasicBlock *BB) const { return GetNumPreds(BB); }
   66   ArrayRef<BasicBlock *> get(BasicBlock *BB) {
   66   ArrayRef<BasicBlock *> get(BasicBlock *BB) {
include/llvm/IR/Statepoint.h
  347     const BasicBlock *InvokeBB =
include/llvm/IR/SymbolTableListTraits.h
   66 class SymbolTableListTraits : public ilist_alloc_traits<ValueSubClass> {
   67   using ListTy = SymbolTableList<ValueSubClass>;
   68   using iterator = typename simple_ilist<ValueSubClass>::iterator;
   70       typename SymbolTableListParentType<ValueSubClass>::type;
   95   void addNodeToList(ValueSubClass *V);
   96   void removeNodeFromList(ValueSubClass *V);
  113     : public iplist_impl<simple_ilist<T>, SymbolTableListTraits<T>> {};
  113     : public iplist_impl<simple_ilist<T>, SymbolTableListTraits<T>> {};
include/llvm/IR/Value.h
  321   void replaceUsesOutsideBlock(Value *V, BasicBlock *BB);
  448   bool isUsedInBasicBlock(const BasicBlock *BB) const;
  643   const Value *DoPHITranslation(const BasicBlock *CurBB,
  644                                 const BasicBlock *PredBB) const;
  645   Value *DoPHITranslation(const BasicBlock *CurBB, const BasicBlock *PredBB) {
  645   Value *DoPHITranslation(const BasicBlock *CurBB, const BasicBlock *PredBB) {
include/llvm/IR/ValueHandle.h
  256   ValueTy *getValPtr() const { return static_cast<ValueTy *>(getRawValPtr()); }
  257   void setValPtr(ValueTy *P) { setRawValPtr(GetAsValue(P)); }
  262   AssertingVH(ValueTy *P) : ValueHandleBase(Assert, GetAsValue(P)) {}
  269   operator ValueTy*() const {
  273   ValueTy *operator=(ValueTy *RHS) {
  273   ValueTy *operator=(ValueTy *RHS) {
  277   ValueTy *operator=(const AssertingVH<ValueTy> &RHS) {
  277   ValueTy *operator=(const AssertingVH<ValueTy> &RHS) {
  282   ValueTy *operator->() const { return getValPtr(); }
  283   ValueTy &operator*() const { return *getValPtr(); }
  289   static inline AssertingVH<T> getEmptyKey() {
  290     AssertingVH<T> Res;
  295   static inline AssertingVH<T> getTombstoneKey() {
  296     AssertingVH<T> Res;
  301   static unsigned getHashValue(const AssertingVH<T> &Val) {
  305   static bool isEqual(const AssertingVH<T> &LHS, const AssertingVH<T> &RHS) {
  305   static bool isEqual(const AssertingVH<T> &LHS, const AssertingVH<T> &RHS) {
  483   ValueTy *getValPtr() const {
  487   void setValPtr(ValueTy *P) { setRawValPtr(GetAsValue(P)); }
  492   PoisoningVH(ValueTy *P) : CallbackVH(GetAsValue(P)) {}
  512   operator ValueTy *() const { return getValPtr(); }
  514   ValueTy *operator->() const { return getValPtr(); }
  515   ValueTy &operator*() const { return *getValPtr(); }
  520   static inline PoisoningVH<T> getEmptyKey() {
  521     PoisoningVH<T> Res;
  526   static inline PoisoningVH<T> getTombstoneKey() {
  527     PoisoningVH<T> Res;
  532   static unsigned getHashValue(const PoisoningVH<T> &Val) {
  536   static bool isEqual(const PoisoningVH<T> &LHS, const PoisoningVH<T> &RHS) {
  536   static bool isEqual(const PoisoningVH<T> &LHS, const PoisoningVH<T> &RHS) {
include/llvm/Pass.h
  338   virtual bool runOnBasicBlock(BasicBlock &BB) = 0;
  355   bool skipBasicBlock(const BasicBlock &BB) const;
include/llvm/Support/Casting.h
   66   static inline bool doit(const From &) { return true; }
   92     return isa_impl<To, From>::doit(*Val);
  104   static inline bool doit(const From *Val) {
  106     return isa_impl<To, From>::doit(*Val);
  106     return isa_impl<To, From>::doit(*Val);
  122     return isa_impl_wrap<To, SimpleFrom,
  132     return isa_impl_cl<To,FromTy>::doit(Val);
  142   return isa_impl_wrap<X, const Y,
  172   using ret_type = To *;       // Pointer arg case, return Ty*
  176   using ret_type = const To *; // Constant pointer arg case, return const Ty*
  198   using ret_type = typename cast_retty<To, SimpleFrom>::ret_type;
  204   using ret_type = typename cast_retty_impl<To,FromTy>::ret_type;
  210       To, From, typename simplify_type<From>::SimpleType>::ret_type;
  218   static typename cast_retty<To, From>::ret_type doit(From &Val) {
  219     return cast_convert_val<To, SimpleFrom,
  227   static typename cast_retty<To, FromTy>::ret_type doit(const FromTy &Val) {
  228     typename cast_retty<To, FromTy>::ret_type Res2
  248                                typename cast_retty<X, const Y>::ret_type>::type
  252       X, const Y, typename simplify_type<const Y>::SimpleType>::doit(Val);
  256 inline typename cast_retty<X, Y>::ret_type cast(Y &Val) {
  258   return cast_convert_val<X, Y,
  263 inline typename cast_retty<X, Y *>::ret_type cast(Y *Val) {
  263 inline typename cast_retty<X, Y *>::ret_type cast(Y *Val) {
  263 inline typename cast_retty<X, Y *>::ret_type cast(Y *Val) {
  265   return cast_convert_val<X, Y*,
  265   return cast_convert_val<X, Y*,
  266                           typename simplify_type<Y*>::SimpleType>::doit(Val);
  285                             typename cast_retty<X, const Y>::ret_type>::type
  290   return cast<X>(Val);
  296                             typename cast_retty<X, Y>::ret_type>::type
  301   return cast<X>(Val);
  305 LLVM_NODISCARD inline typename cast_retty<X, Y *>::ret_type
  309   return cast<X>(Val);
  337 LLVM_NODISCARD inline typename cast_retty<X, Y>::ret_type dyn_cast(Y &Val) {
  342 LLVM_NODISCARD inline typename cast_retty<X, Y *>::ret_type dyn_cast(Y *Val) {
  342 LLVM_NODISCARD inline typename cast_retty<X, Y *>::ret_type dyn_cast(Y *Val) {
  342 LLVM_NODISCARD inline typename cast_retty<X, Y *>::ret_type dyn_cast(Y *Val) {
  343   return isa<X>(Val) ? cast<X>(Val) : nullptr;
  343   return isa<X>(Val) ? cast<X>(Val) : nullptr;
  366 LLVM_NODISCARD inline typename cast_retty<X, Y *>::ret_type
  368   return (Val && isa<X>(Val)) ? cast<X>(Val) : nullptr;
  368   return (Val && isa<X>(Val)) ? cast<X>(Val) : nullptr;
include/llvm/Support/GenericDomTree.h
   61   NodeT *TheBB;
   69   DomTreeNodeBase(NodeT *BB, DomTreeNodeBase *iDom)
   81   NodeT *getBlock() const { return TheBB; }
  103     SmallPtrSet<const NodeT *, 4> OtherChildren;
  105       const NodeT *Nd = I->getBlock();
  110       const NodeT *N = I->getBlock();
  167 raw_ostream &operator<<(raw_ostream &O, const DomTreeNodeBase<NodeT> *Node) {
  180 void PrintDomTree(const DomTreeNodeBase<NodeT> *N, raw_ostream &O,
  183   for (typename DomTreeNodeBase<NodeT>::const_iterator I = N->begin(),
  186     PrintDomTree<NodeT>(*I, O, Lev + 1);
  221   static_assert(std::is_pointer<typename GraphTraits<NodeT *>::NodeRef>::value,
  223   using NodeType = NodeT;
  224   using NodePtr = NodeT *;
  225   using ParentPtr = decltype(std::declval<NodeT *>()->getParent());
  240   SmallVector<NodeT *, IsPostDom ? 4 : 1> Roots;
  243      DenseMap<NodeT *, std::unique_ptr<DomTreeNodeBase<NodeT>>>;
  243      DenseMap<NodeT *, std::unique_ptr<DomTreeNodeBase<NodeT>>>;
  245   DomTreeNodeBase<NodeT> *RootNode = nullptr;
  284   const SmallVectorImpl<NodeT *> &getRoots() const { return Roots; }
  306       NodeT *BB = DomTreeNode.first;
  312       DomTreeNodeBase<NodeT> &MyNd = *DomTreeNode.second;
  313       DomTreeNodeBase<NodeT> &OtherNd = *OI->second;
  328   DomTreeNodeBase<NodeT> *getNode(const NodeT *BB) const {
  328   DomTreeNodeBase<NodeT> *getNode(const NodeT *BB) const {
  336   DomTreeNodeBase<NodeT> *operator[](const NodeT *BB) const {
  336   DomTreeNodeBase<NodeT> *operator[](const NodeT *BB) const {
  347   DomTreeNodeBase<NodeT> *getRootNode() { return RootNode; }
  348   const DomTreeNodeBase<NodeT> *getRootNode() const { return RootNode; }
  351   void getDescendants(NodeT *R, SmallVectorImpl<NodeT *> &Result) const {
  351   void getDescendants(NodeT *R, SmallVectorImpl<NodeT *> &Result) const {
  353     const DomTreeNodeBase<NodeT> *RN = getNode(R);
  356     SmallVector<const DomTreeNodeBase<NodeT> *, 8> WL;
  360       const DomTreeNodeBase<NodeT> *N = WL.pop_back_val();
  369   bool properlyDominates(const DomTreeNodeBase<NodeT> *A,
  370                          const DomTreeNodeBase<NodeT> *B) const {
  378   bool properlyDominates(const NodeT *A, const NodeT *B) const;
  378   bool properlyDominates(const NodeT *A, const NodeT *B) const;
  382   bool isReachableFromEntry(const NodeT *A) const {
  388   bool isReachableFromEntry(const DomTreeNodeBase<NodeT> *A) const { return A; }
  393   bool dominates(const DomTreeNodeBase<NodeT> *A,
  394                  const DomTreeNodeBase<NodeT> *B) const {
  436   bool dominates(const NodeT *A, const NodeT *B) const;
  436   bool dominates(const NodeT *A, const NodeT *B) const;
  438   NodeT *getRoot() const {
  445   NodeT *findNearestCommonDominator(NodeT *A, NodeT *B) const {
  445   NodeT *findNearestCommonDominator(NodeT *A, NodeT *B) const {
  445   NodeT *findNearestCommonDominator(NodeT *A, NodeT *B) const {
  453       NodeT &Entry = A->getParent()->front();
  458     DomTreeNodeBase<NodeT> *NodeA = getNode(A);
  459     DomTreeNodeBase<NodeT> *NodeB = getNode(B);
  474   const NodeT *findNearestCommonDominator(const NodeT *A,
  474   const NodeT *findNearestCommonDominator(const NodeT *A,
  475                                           const NodeT *B) const {
  482   bool isVirtualRoot(const DomTreeNodeBase<NodeT> *A) const {
  533   void insertEdge(NodeT *From, NodeT *To) {
  533   void insertEdge(NodeT *From, NodeT *To) {
  551   void deleteEdge(NodeT *From, NodeT *To) {
  551   void deleteEdge(NodeT *From, NodeT *To) {
  568   DomTreeNodeBase<NodeT> *addNewBlock(NodeT *BB, NodeT *DomBB) {
  568   DomTreeNodeBase<NodeT> *addNewBlock(NodeT *BB, NodeT *DomBB) {
  568   DomTreeNodeBase<NodeT> *addNewBlock(NodeT *BB, NodeT *DomBB) {
  570     DomTreeNodeBase<NodeT> *IDomNode = getNode(DomBB);
  574                 std::make_unique<DomTreeNodeBase<NodeT>>(BB, IDomNode))).get();
  582   DomTreeNodeBase<NodeT> *setNewRoot(NodeT *BB) {
  582   DomTreeNodeBase<NodeT> *setNewRoot(NodeT *BB) {
  587     DomTreeNodeBase<NodeT> *NewNode = (DomTreeNodes[BB] =
  588       std::make_unique<DomTreeNodeBase<NodeT>>(BB, nullptr)).get();
  593       NodeT *OldRoot = Roots.front();
  606   void changeImmediateDominator(DomTreeNodeBase<NodeT> *N,
  607                                 DomTreeNodeBase<NodeT> *NewIDom) {
  613   void changeImmediateDominator(NodeT *BB, NodeT *NewBB) {
  613   void changeImmediateDominator(NodeT *BB, NodeT *NewBB) {
  620   void eraseNode(NodeT *BB) {
  621     DomTreeNodeBase<NodeT> *Node = getNode(BB);
  628     DomTreeNodeBase<NodeT> *IDom = Node->getIDom();
  651   void splitBlock(NodeT *NewBB) {
  653       Split<Inverse<NodeT *>>(NewBB);
  655       Split<NodeT *>(NewBB);
  671     if (getRootNode()) PrintDomTree<NodeT>(getRootNode(), O, 1);
  689     SmallVector<std::pair<const DomTreeNodeBase<NodeT> *,
  690                           typename DomTreeNodeBase<NodeT>::const_iterator>,
  693     const DomTreeNodeBase<NodeT> *ThisRoot = getRootNode();
  706       const DomTreeNodeBase<NodeT> *Node = WorkStack.back().first;
  716         const DomTreeNodeBase<NodeT> *Child = *ChildIt;
  758   void addRoot(NodeT *BB) { this->Roots.push_back(BB); }
  797     NodeT *NewBBIDom = nullptr;
  816     DomTreeNodeBase<NodeT> *NewBBNode = addNewBlock(NewBB, NewBBIDom);
  821       DomTreeNodeBase<NodeT> *NewBBSuccNode = getNode(NewBBSucc);
  827   bool dominatedBySlowTreeWalk(const DomTreeNodeBase<NodeT> *A,
  828                                const DomTreeNodeBase<NodeT> *B) const {
  834     const DomTreeNodeBase<NodeT> *IDom;
include/llvm/Support/GenericIteratedDominanceFrontier.h
   60       typename std::conditional<IsPostDom, Inverse<NodeTy *>, NodeTy *>::type;
   60       typename std::conditional<IsPostDom, Inverse<NodeTy *>, NodeTy *>::type;
   62       IDFCalculatorDetail::ChildrenGetterTy<NodeTy, IsPostDom>;
   64   IDFCalculatorBase(DominatorTreeBase<NodeTy, IsPostDom> &DT) : DT(DT) {}
   66   IDFCalculatorBase(DominatorTreeBase<NodeTy, IsPostDom> &DT,
   75   void setDefiningBlocks(const SmallPtrSetImpl<NodeTy *> &Blocks) {
   84   void setLiveInBlocks(const SmallPtrSetImpl<NodeTy *> &Blocks) {
  102   void calculate(SmallVectorImpl<NodeTy *> &IDFBlocks);
  105   DominatorTreeBase<NodeTy, IsPostDom> &DT;
  108   const SmallPtrSetImpl<NodeTy *> *LiveInBlocks;
  109   const SmallPtrSetImpl<NodeTy *> *DefBlocks;
  138       std::pair<DomTreeNodeBase<NodeTy> *, std::pair<unsigned, unsigned>>;
  147   for (NodeTy *BB : *DefBlocks) {
  148     if (DomTreeNodeBase<NodeTy> *Node = DT.getNode(BB))
  152   SmallVector<DomTreeNodeBase<NodeTy> *, 32> Worklist;
  153   SmallPtrSet<DomTreeNodeBase<NodeTy> *, 32> VisitedPQ;
  154   SmallPtrSet<DomTreeNodeBase<NodeTy> *, 32> VisitedWorklist;
  159     DomTreeNodeBase<NodeTy> *Root = RootPair.first;
  172       DomTreeNodeBase<NodeTy> *Node = Worklist.pop_back_val();
  173       NodeTy *BB = Node->getBlock();
  177         DomTreeNodeBase<NodeTy> *SuccNode = DT.getNode(Succ);
  186         NodeTy *SuccBB = SuccNode->getBlock();
include/llvm/Support/PointerLikeTypeTraits.h
   56   static inline void *getAsVoidPointer(T *P) { return P; }
   57   static inline T *getFromVoidPointer(void *P) { return static_cast<T *>(P); }
   59   enum { NumLowBitsAvailable = detail::ConstantLog2<alignof(T)>::value };
   91   typedef PointerLikeTypeTraits<T *> NonConst;
   93   static inline const void *getAsVoidPointer(const T *P) {
   96   static inline const T *getFromVoidPointer(const void *P) {
include/llvm/Transforms/IPO.h
  183 createBlockExtractorPass(const SmallVectorImpl<BasicBlock *> &BlocksToExtract,
  186 createBlockExtractorPass(const SmallVectorImpl<SmallVector<BasicBlock *, 16>>
include/llvm/Transforms/IPO/Attributor.h
  833   void deleteAfterManifest(BasicBlock &BB) { ToBeDeletedBlocks.insert(&BB); }
 1013   SmallPtrSet<BasicBlock *, 8> ToBeDeletedBlocks;
 1726   virtual bool isAssumedDead(const BasicBlock *BB) const = 0;
 1729   virtual bool isKnownDead(const BasicBlock *BB) const = 0;
include/llvm/Transforms/IPO/HotColdSplitting.h
   31 using BlockSequence = SmallVector<BasicBlock *, 0>;
include/llvm/Transforms/Instrumentation.h
   37 BasicBlock::iterator PrepareToSplitEntryBlock(BasicBlock &BB,
   37 BasicBlock::iterator PrepareToSplitEntryBlock(BasicBlock &BB,
   38                                               BasicBlock::iterator IP);
include/llvm/Transforms/Scalar/ConstantHoisting.h
  130                BlockFrequencyInfo *BFI, BasicBlock &Entry,
  154   BasicBlock *Entry;
include/llvm/Transforms/Scalar/GVN.h
  107         DenseMap<std::pair<uint32_t, const BasicBlock *>, uint32_t>;
  121     uint32_t phiTranslateImpl(const BasicBlock *BB, const BasicBlock *PhiBlock,
  121     uint32_t phiTranslateImpl(const BasicBlock *BB, const BasicBlock *PhiBlock,
  123     bool areCallValsEqual(uint32_t Num, uint32_t NewNum, const BasicBlock *Pred,
  124                           const BasicBlock *PhiBlock, GVN &Gvn);
  126     bool areAllValsInBB(uint32_t num, const BasicBlock *BB, GVN &Gvn);
  138     uint32_t phiTranslate(const BasicBlock *BB, const BasicBlock *PhiBlock,
  138     uint32_t phiTranslate(const BasicBlock *BB, const BasicBlock *PhiBlock,
  140     void eraseTranslateCacheEntry(uint32_t Num, const BasicBlock &CurrBlock);
  161   SetVector<BasicBlock *> DeadBlocks;
  172     const BasicBlock *BB;
  186   DenseMap<AssertingVH<BasicBlock>, uint32_t> BlockRPONumber;
  195   using UnavailBlkVect = SmallVector<BasicBlock *, 64>;
  203   void addToLeaderTable(uint32_t N, Value *V, const BasicBlock *BB) {
  220   void removeFromLeaderTable(uint32_t N, Instruction *I, BasicBlock *BB) {
  273   bool processBlock(BasicBlock *BB);
  278   bool performScalarPREInsertion(Instruction *Instr, BasicBlock *Pred,
  279                                  BasicBlock *Curr, unsigned int ValNo);
  280   Value *findLeader(const BasicBlock *BB, uint32_t num);
  282   void fillImplicitControlFlowInfo(BasicBlock *BB);
  285   BasicBlock *splitCriticalEdges(BasicBlock *Pred, BasicBlock *Succ);
  285   BasicBlock *splitCriticalEdges(BasicBlock *Pred, BasicBlock *Succ);
  285   BasicBlock *splitCriticalEdges(BasicBlock *Pred, BasicBlock *Succ);
  290   void addDeadBlock(BasicBlock *BB);
include/llvm/Transforms/Scalar/GVNExpression.h
  504   BasicBlock *BB;
  507   PHIExpression(unsigned NumOperands, BasicBlock *B)
include/llvm/Transforms/Scalar/JumpThreading.h
   53 using PredValueInfo = SmallVectorImpl<std::pair<Constant *, BasicBlock *>>;
   54 using PredValueInfoTy = SmallVector<std::pair<Constant *, BasicBlock *>, 8>;
   89   SmallSet<AssertingVH<const BasicBlock>, 16> LoopHeaders;
  111   bool ProcessBlock(BasicBlock *BB);
  112   bool ThreadEdge(BasicBlock *BB, const SmallVectorImpl<BasicBlock *> &PredBBs,
  112   bool ThreadEdge(BasicBlock *BB, const SmallVectorImpl<BasicBlock *> &PredBBs,
  113                   BasicBlock *SuccBB);
  115       BasicBlock *BB, const SmallVectorImpl<BasicBlock *> &PredBBs);
  115       BasicBlock *BB, const SmallVectorImpl<BasicBlock *> &PredBBs);
  118       Value *V, BasicBlock *BB, jumpthreading::PredValueInfo &Result,
  120       DenseSet<std::pair<Value *, BasicBlock *>> &RecursionSet,
  123   ComputeValueKnownInPredecessors(Value *V, BasicBlock *BB,
  127     DenseSet<std::pair<Value *, BasicBlock *>> RecursionSet;
  132   bool ProcessThreadableEdges(Value *Cond, BasicBlock *BB,
  138   bool ProcessImpliedCondition(BasicBlock *BB);
  141   void UnfoldSelectInstr(BasicBlock *Pred, BasicBlock *BB, SelectInst *SI,
  141   void UnfoldSelectInstr(BasicBlock *Pred, BasicBlock *BB, SelectInst *SI,
  144   bool TryToUnfoldSelect(CmpInst *CondCmp, BasicBlock *BB);
  145   bool TryToUnfoldSelect(SwitchInst *SI, BasicBlock *BB);
  146   bool TryToUnfoldSelectInCurrBB(BasicBlock *BB);
  148   bool ProcessGuards(BasicBlock *BB);
  149   bool ThreadGuard(BasicBlock *BB, IntrinsicInst *Guard, BranchInst *BI);
  152   BasicBlock *SplitBlockPreds(BasicBlock *BB, ArrayRef<BasicBlock *> Preds,
  152   BasicBlock *SplitBlockPreds(BasicBlock *BB, ArrayRef<BasicBlock *> Preds,
  152   BasicBlock *SplitBlockPreds(BasicBlock *BB, ArrayRef<BasicBlock *> Preds,
  154   void UpdateBlockFreqAndEdgeWeight(BasicBlock *PredBB, BasicBlock *BB,
  154   void UpdateBlockFreqAndEdgeWeight(BasicBlock *PredBB, BasicBlock *BB,
  155                                     BasicBlock *NewBB, BasicBlock *SuccBB);
  155                                     BasicBlock *NewBB, BasicBlock *SuccBB);
  157   bool doesBlockHaveProfileData(BasicBlock *BB);
include/llvm/Transforms/Scalar/MemCpyOptimizer.h
   60   bool processStore(StoreInst *SI, BasicBlock::iterator &BBI);
   61   bool processMemSet(MemSetInst *SI, BasicBlock::iterator &BBI);
include/llvm/Transforms/Scalar/Reassociate.h
   77   DenseMap<BasicBlock *, unsigned> RankMap;
include/llvm/Transforms/Scalar/SpeculativeExecution.h
   80   bool runOnBasicBlock(BasicBlock &B);
   81   bool considerHoistingFromTo(BasicBlock &FromBlock, BasicBlock &ToBlock);
   81   bool considerHoistingFromTo(BasicBlock &FromBlock, BasicBlock &ToBlock);
include/llvm/Transforms/Utils/BasicBlockUtils.h
   47 void DetatchDeadBlocks(ArrayRef <BasicBlock *> BBs,
   52 void DeleteDeadBlock(BasicBlock *BB, DomTreeUpdater *DTU = nullptr,
   61 void DeleteDeadBlocks(ArrayRef <BasicBlock *> BBs,
   75 void FoldSingleEntryPHINodes(BasicBlock *BB,
   82 bool DeleteDeadPHIs(BasicBlock *BB, const TargetLibraryInfo *TLI = nullptr);
   91 bool MergeBlockIntoPredecessor(BasicBlock *BB, DomTreeUpdater *DTU = nullptr,
   99 void ReplaceInstWithValue(BasicBlock::InstListType &BIL,
  100                           BasicBlock::iterator &BI, Value *V);
  106 void ReplaceInstWithInst(BasicBlock::InstListType &BIL,
  107                          BasicBlock::iterator &BI, Instruction *I);
  170 BasicBlock *SplitCriticalEdge(Instruction *TI, unsigned SuccNum,
  174 inline BasicBlock *
  175 SplitCriticalEdge(BasicBlock *BB, succ_iterator SI,
  186 inline bool SplitCriticalEdge(BasicBlock *Succ, pred_iterator PI,
  200 inline BasicBlock *
  201 SplitCriticalEdge(BasicBlock *Src, BasicBlock *Dst,
  201 SplitCriticalEdge(BasicBlock *Src, BasicBlock *Dst,
  221 BasicBlock *SplitEdge(BasicBlock *From, BasicBlock *To,
  221 BasicBlock *SplitEdge(BasicBlock *From, BasicBlock *To,
  221 BasicBlock *SplitEdge(BasicBlock *From, BasicBlock *To,
  229 BasicBlock *SplitBlock(BasicBlock *Old, Instruction *SplitPt,
  229 BasicBlock *SplitBlock(BasicBlock *Old, Instruction *SplitPt,
  248 BasicBlock *SplitBlockPredecessors(BasicBlock *BB, ArrayRef<BasicBlock *> Preds,
  248 BasicBlock *SplitBlockPredecessors(BasicBlock *BB, ArrayRef<BasicBlock *> Preds,
  248 BasicBlock *SplitBlockPredecessors(BasicBlock *BB, ArrayRef<BasicBlock *> Preds,
  267     BasicBlock *OrigBB, ArrayRef<BasicBlock *> Preds, const char *Suffix,
  267     BasicBlock *OrigBB, ArrayRef<BasicBlock *> Preds, const char *Suffix,
  268     const char *Suffix2, SmallVectorImpl<BasicBlock *> &NewBBs,
  276 ReturnInst *FoldReturnIntoUncondBranch(ReturnInst *RI, BasicBlock *BB,
  277                                        BasicBlock *Pred,
  306                                        BasicBlock *ThenBlock = nullptr);
  335 Value *GetIfCondition(BasicBlock *BB, BasicBlock *&IfTrue,
  335 Value *GetIfCondition(BasicBlock *BB, BasicBlock *&IfTrue,
  336                       BasicBlock *&IfFalse);
include/llvm/Transforms/Utils/BypassSlowDivision.h
   70     BasicBlock *BB, const DenseMap<unsigned int, unsigned int> &BypassWidth);
include/llvm/Transforms/Utils/Cloning.h
  109 BasicBlock *CloneBasicBlock(const BasicBlock *BB, ValueToValueMapTy &VMap,
  109 BasicBlock *CloneBasicBlock(const BasicBlock *BB, ValueToValueMapTy &VMap,
  246 Loop *cloneLoopWithPreheader(BasicBlock *Before, BasicBlock *LoopDomBB,
  246 Loop *cloneLoopWithPreheader(BasicBlock *Before, BasicBlock *LoopDomBB,
  250                              SmallVectorImpl<BasicBlock *> &Blocks);
  253 void remapInstructionsInBlocks(const SmallVectorImpl<BasicBlock *> &Blocks,
  262 BasicBlock *DuplicateInstructionsInSplitBetween(BasicBlock *BB,
  262 BasicBlock *DuplicateInstructionsInSplitBetween(BasicBlock *BB,
  263                                                 BasicBlock *PredBB,
include/llvm/Transforms/Utils/CodeExtractor.h
   51   DenseMap<BasicBlock *, DenseSet<Value *>> BaseMemAddrs;
   55   DenseSet<BasicBlock *> SideEffectingBlocks;
   57   void findSideEffectInfoForBlock(BasicBlock &BB);
   69   bool doesBlockContainClobberOfAddr(BasicBlock &BB, AllocaInst *Addr) const;
   99     SetVector<BasicBlock *> Blocks;
  119     CodeExtractor(ArrayRef<BasicBlock *> BBs, DominatorTree *DT = nullptr,
  185                      BasicBlock *&ExitBlock) const;
  195     BasicBlock *findOrCreateBlockForHoisting(BasicBlock *CommonExitBlock);
  195     BasicBlock *findOrCreateBlockForHoisting(BasicBlock *CommonExitBlock);
  207                        Instruction *Addr, BasicBlock *ExitBlock) const;
  209     void severSplitPHINodesOfEntry(BasicBlock *&Header);
  210     void severSplitPHINodesOfExits(const SmallPtrSetImpl<BasicBlock *> &Exits);
  215                                 BasicBlock *header,
  216                                 BasicBlock *newRootNode, BasicBlock *newHeader,
  216                                 BasicBlock *newRootNode, BasicBlock *newHeader,
  222         BasicBlock *CodeReplacer,
  223         DenseMap<BasicBlock *, BlockFrequency> &ExitWeights,
  227                                          BasicBlock *newHeader,
include/llvm/Transforms/Utils/Evaluator.h
   63   bool EvaluateBlock(BasicBlock::iterator CurInst, BasicBlock *&NextBB);
   63   bool EvaluateBlock(BasicBlock::iterator CurInst, BasicBlock *&NextBB);
include/llvm/Transforms/Utils/FunctionComparator.h
  118   int cmpBasicBlocks(const BasicBlock *BBL, const BasicBlock *BBR) const;
  118   int cmpBasicBlocks(const BasicBlock *BBL, const BasicBlock *BBR) const;
include/llvm/Transforms/Utils/Local.h
  121 bool ConstantFoldTerminator(BasicBlock *BB, bool DeleteDeadConditions = false,
  172 bool SimplifyInstructionsInBlock(BasicBlock *BB,
  196 void RemovePredecessorAndSimplify(BasicBlock *BB, BasicBlock *Pred,
  196 void RemovePredecessorAndSimplify(BasicBlock *BB, BasicBlock *Pred,
  202 void MergeBasicBlockIntoOnlyPred(BasicBlock *BB, DomTreeUpdater *DTU = nullptr);
  208 bool TryToSimplifyUncondBranchFromEmptyBlock(BasicBlock *BB,
  214 bool EliminateDuplicatePHINodes(BasicBlock *BB);
  222 bool simplifyCFG(BasicBlock *BB, const TargetTransformInfo &TTI,
  224                  SmallPtrSetImpl<BasicBlock *> *LoopHeaders = nullptr);
  229 bool FlattenCFG(BasicBlock *BB, AliasAnalysis *AA = nullptr);
  307 void insertDebugValuesForPHIs(BasicBlock *BB,
  388 unsigned removeAllNonTerminatorAndEHPadInstructions(BasicBlock *BB);
  401 BasicBlock *changeToInvokeAndSplitBasicBlock(CallInst *CI,
  402                                              BasicBlock *UnwindEdge);
  410 void removeUnwindEdge(BasicBlock *BB, DomTreeUpdater *DTU = nullptr);
  455                                   const BasicBlock *BB);
  488 void hoistAllInstructionsInto(BasicBlock *DomBlock, Instruction *InsertPt,
  489                               BasicBlock *BB);
include/llvm/Transforms/Utils/LoopUtils.h
   53 BasicBlock *InsertPreheaderForLoop(Loop *L, DominatorTree *DT, LoopInfo *LI,
  161     const SmallSetVector<Value *, 8> &, SmallVectorImpl<BasicBlock *> &,
include/llvm/Transforms/Utils/PredicateInfo.h
  148   BasicBlock *From;
  149   BasicBlock *To;
  156   PredicateWithEdge(PredicateType PType, Value *Op, BasicBlock *From,
  157                     BasicBlock *To, Value *Cond)
  166   PredicateBranch(Value *Op, BasicBlock *BranchBB, BasicBlock *SplitBB,
  166   PredicateBranch(Value *Op, BasicBlock *BranchBB, BasicBlock *SplitBB,
  181   PredicateSwitch(Value *Op, BasicBlock *SwitchBB, BasicBlock *TargetBB,
  181   PredicateSwitch(Value *Op, BasicBlock *SwitchBB, BasicBlock *TargetBB,
  232   void processAssume(IntrinsicInst *, BasicBlock *, SmallVectorImpl<Value *> &);
  233   void processBranch(BranchInst *, BasicBlock *, SmallVectorImpl<Value *> &);
  234   void processSwitch(SwitchInst *, BasicBlock *, SmallVectorImpl<Value *> &);
  264   DenseSet<std::pair<BasicBlock *, BasicBlock *>> EdgeUsesOnly;
  264   DenseSet<std::pair<BasicBlock *, BasicBlock *>> EdgeUsesOnly;
include/llvm/Transforms/Utils/SSAUpdater.h
   72   void AddAvailableValue(BasicBlock *BB, Value *V);
   76   bool HasValueForBlock(BasicBlock *BB) const;
   80   Value *FindValueForBlock(BasicBlock *BB) const;
   84   Value *GetValueAtEndOfBlock(BasicBlock *BB);
  106   Value *GetValueInMiddleOfBlock(BasicBlock *BB);
  125   Value *GetValueAtEndOfBlockInternal(BasicBlock *BB);
include/llvm/Transforms/Utils/SSAUpdaterBulk.h
   42     DenseMap<BasicBlock *, Value *> Defines;
   53   Value *computeValueAt(BasicBlock *BB, RewriteInfo &R, DominatorTree *DT);
   68   void AddAvailableValue(unsigned Var, BasicBlock *BB, Value *V);
   76   bool HasValueForBlock(unsigned Var, BasicBlock *BB);
include/llvm/Transforms/Utils/SizeOpts.h
   55 bool shouldOptimizeForSizeImpl(const BlockT *BB, ProfileSummaryInfo *PSI,
   80 bool shouldOptimizeForSize(const BasicBlock *BB, ProfileSummaryInfo *PSI,
include/llvm/Transforms/Utils/UnifyFunctionExitNodes.h
   26   BasicBlock *ReturnBlock = nullptr;
   27   BasicBlock *UnwindBlock = nullptr;
   28   BasicBlock *UnreachableBlock;
   42   BasicBlock *getReturnBlock() const { return ReturnBlock; }
   43   BasicBlock *getUnwindBlock() const { return UnwindBlock; }
   44   BasicBlock *getUnreachableBlock() const { return UnreachableBlock; }
include/llvm/Transforms/Utils/UnrollLoop.h
   48 const Loop* addClonedBlockToLoopInfo(BasicBlock *OriginalBB,
   49                                      BasicBlock *ClonedBB, LoopInfo *LI,
include/llvm/Transforms/Vectorize.h
  132 bool vectorizeBasicBlock(Pass *P, BasicBlock &BB,
include/llvm/Transforms/Vectorize/LoopVectorizationLegality.h
  273   bool blockNeedsPredication(BasicBlock *BB);
  366   bool blockCanBePredicated(BasicBlock *BB, SmallPtrSetImpl<Value *> &SafePtrs,
include/llvm/Transforms/Vectorize/SLPVectorizer.h
   92   void collectSeedInstructions(BasicBlock *BB);
  112   bool vectorizeGEPIndices(BasicBlock *BB, slpvectorizer::BoUpSLP &R);
  116   bool vectorizeRootInstruction(PHINode *P, Value *V, BasicBlock *BB,
  121   bool vectorizeInsertValueInst(InsertValueInst *IVI, BasicBlock *BB,
  125   bool vectorizeInsertElementInst(InsertElementInst *IEI, BasicBlock *BB,
  129   bool vectorizeCmpInst(CmpInst *CI, BasicBlock *BB, slpvectorizer::BoUpSLP &R);
  134                                    BasicBlock *BB, slpvectorizer::BoUpSLP &R);
  138   bool vectorizeChainsInBlock(BasicBlock *BB, slpvectorizer::BoUpSLP &R);
lib/Analysis/AliasAnalysis.cpp
  700 bool AAResults::canBasicBlockModify(const BasicBlock &BB,
  716   BasicBlock::const_iterator I = I1.getIterator();
  717   BasicBlock::const_iterator E = I2.getIterator();
lib/Analysis/AliasSetTracker.cpp
  515 void AliasSetTracker::add(BasicBlock &BB) {
  546   for (const BasicBlock *BB : L->blocks())
lib/Analysis/AssumptionCache.cpp
  176   for (BasicBlock &B : F)
  285     for (const BasicBlock &B : cast<Function>(*I.first))
lib/Analysis/BlockFrequencyInfo.cpp
   99   using NodeRef = const BasicBlock *;
  130   std::string getNodeLabel(const BasicBlock *Node,
  136   std::string getNodeAttributes(const BasicBlock *Node,
  142   std::string getEdgeAttributes(const BasicBlock *Node, EdgeIter EI,
  201 BlockFrequency BlockFrequencyInfo::getBlockFreq(const BasicBlock *BB) const {
  206 BlockFrequencyInfo::getBlockProfileCount(const BasicBlock *BB,
  221 bool BlockFrequencyInfo::isIrrLoopHeader(const BasicBlock *BB) {
  226 void BlockFrequencyInfo::setBlockFreq(const BasicBlock *BB, uint64_t Freq) {
  232     const BasicBlock *ReferenceBB, uint64_t Freq,
  233     SmallPtrSetImpl<BasicBlock *> &BlocksToScale) {
  239   for (auto *BB : BlocksToScale) {
  274                                    const BasicBlock *BB) const {
lib/Analysis/BranchProbabilityInfo.cpp
  143 BranchProbabilityInfo::updatePostDominatedByUnreachable(const BasicBlock *BB) {
  174 BranchProbabilityInfo::updatePostDominatedByColdCall(const BasicBlock *BB) {
  210 bool BranchProbabilityInfo::calcUnreachableHeuristics(const BasicBlock *BB) {
  254 bool BranchProbabilityInfo::calcMetadataWeights(const BasicBlock *BB) {
  356 bool BranchProbabilityInfo::calcColdCallHeuristics(const BasicBlock *BB) {
  400 bool BranchProbabilityInfo::calcPointerHeuristics(const BasicBlock *BB) {
  433 static int getSCCNum(const BasicBlock *BB,
  442 static bool isSCCHeader(const BasicBlock *BB, int SccNum,
  469 computeUnlikelySuccessors(const BasicBlock *BB, Loop *L,
  470                           SmallPtrSetImpl<const BasicBlock*> &UnlikelyBlocks) {
  531     for (BasicBlock *B : P->blocks()) {
  574 bool BranchProbabilityInfo::calcLoopBranchHeuristics(const BasicBlock *BB,
  585   SmallPtrSet<const BasicBlock*, 8> UnlikelyBlocks;
  659 bool BranchProbabilityInfo::calcZeroHeuristics(const BasicBlock *BB,
  778 bool BranchProbabilityInfo::calcFloatingPointHeuristics(const BasicBlock *BB) {
  820 bool BranchProbabilityInfo::calcInvokeHeuristics(const BasicBlock *BB) {
  841   for (const auto &BI : *LastF) {
  850 isEdgeHot(const BasicBlock *Src, const BasicBlock *Dst) const {
  850 isEdgeHot(const BasicBlock *Src, const BasicBlock *Dst) const {
  856 const BasicBlock *
  857 BranchProbabilityInfo::getHotSucc(const BasicBlock *BB) const {
  859   const BasicBlock *MaxSucc = nullptr;
  862     const BasicBlock *Succ = *I;
  882 BranchProbabilityInfo::getEdgeProbability(const BasicBlock *Src,
  893 BranchProbabilityInfo::getEdgeProbability(const BasicBlock *Src,
  901 BranchProbabilityInfo::getEdgeProbability(const BasicBlock *Src,
  902                                           const BasicBlock *Dst) const {
  919 void BranchProbabilityInfo::setEdgeProbability(const BasicBlock *Src,
  931                                             const BasicBlock *Src,
  932                                             const BasicBlock *Dst) const {
  941 void BranchProbabilityInfo::eraseBlock(const BasicBlock *BB) {
  966     const std::vector<const BasicBlock *> &Scc = *It;
lib/Analysis/CFG.cpp
   28      SmallVectorImpl<std::pair<const BasicBlock*,const BasicBlock*> > &Result) {
   28      SmallVectorImpl<std::pair<const BasicBlock*,const BasicBlock*> > &Result) {
   29   const BasicBlock *BB = &F.getEntryBlock();
   33   SmallPtrSet<const BasicBlock*, 8> Visited;
   34   SmallVector<std::pair<const BasicBlock*, succ_const_iterator>, 8> VisitStack;
   35   SmallPtrSet<const BasicBlock*, 8> InStack;
   41     std::pair<const BasicBlock*, succ_const_iterator> &Top = VisitStack.back();
   42     const BasicBlock *ParentBB = Top.first;
   72 unsigned llvm::GetSuccessorNumber(const BasicBlock *BB,
   73     const BasicBlock *Succ) {
   94 bool llvm::isCriticalEdge(const Instruction *TI, const BasicBlock *Dest,
  106   const BasicBlock *FirstPred = *I;
  121 static const Loop *getOutermostLoop(const LoopInfo *LI, const BasicBlock *BB) {
  131     SmallVectorImpl<BasicBlock *> &Worklist, BasicBlock *StopBB,
  131     SmallVectorImpl<BasicBlock *> &Worklist, BasicBlock *StopBB,
  132     const SmallPtrSetImpl<BasicBlock *> *ExclusionSet, const DominatorTree *DT,
  160   SmallPtrSet<const BasicBlock*, 32> Visited;
  162     BasicBlock *BB = Worklist.pop_back_val();
  206 bool llvm::isPotentiallyReachable(const BasicBlock *A, const BasicBlock *B,
  206 bool llvm::isPotentiallyReachable(const BasicBlock *A, const BasicBlock *B,
  211   SmallVector<BasicBlock*, 32> Worklist;
  220     const SmallPtrSetImpl<BasicBlock *> *ExclusionSet, const DominatorTree *DT,
  225   SmallVector<BasicBlock*, 32> Worklist;
  233     BasicBlock *BB = const_cast<BasicBlock *>(A->getParent());
  241     for (BasicBlock::const_iterator I = A->getIterator(), E = BB->end(); I != E;
lib/Analysis/CFLGraph.h
  637     for (auto &Bb : Fn.getBasicBlockList())
lib/Analysis/CallGraph.cpp
   73   for (BasicBlock &BB : *F)
lib/Analysis/CallGraphSCCPass.cpp
  286     for (BasicBlock &BB : *F)
lib/Analysis/CaptureTracking.cpp
   86       BasicBlock *BB = I->getParent();
  118         SmallVector<BasicBlock*, 32> Worklist;
lib/Analysis/CodeMetrics.cpp
  116 void CodeMetrics::analyzeBasicBlock(const BasicBlock *BB,
lib/Analysis/CostModel.cpp
  100   for (BasicBlock &B : *F) {
lib/Analysis/DDG.cpp
  133 using BasicBlockListType = SmallVector<BasicBlock *, 8>;
  138   for (auto &BB : F.getBasicBlockList())
  149   for (BasicBlock *BB : L.blocks())
lib/Analysis/Delinearization.cpp
   81     const BasicBlock *BB = Inst->getParent();
lib/Analysis/DependenceAnalysis.cpp
  738   const BasicBlock *SrcBlock = Src->getParent();
  739   const BasicBlock *DstBlock = Dst->getParent();
lib/Analysis/DependenceGraphBuilder.cpp
   41   for (BasicBlock *BB : BBList)
lib/Analysis/DivergenceAnalysis.cpp
  136 bool DivergenceAnalysis::isTemporalDivergent(const BasicBlock &ObservingBlock,
  183 bool DivergenceAnalysis::inRegion(const BasicBlock &BB) const {
  189 void DivergenceAnalysis::taintLoopLiveOuts(const BasicBlock &LoopHeader) {
  193   SmallVector<BasicBlock *, 8> TaintStack;
  198   DenseSet<const BasicBlock *> Visited;
  199   for (auto *Block : TaintStack) {
  205     auto *UserBlock = TaintStack.back();
  244     for (auto *SuccBlock : successors(UserBlock)) {
  253 void DivergenceAnalysis::pushPHINodes(const BasicBlock &Block) {
  277 bool DivergenceAnalysis::propagateJoinDivergence(const BasicBlock &JoinBlock,
  311   for (const auto *JoinBlock : SDA.join_blocks(Term)) {
  349   for (const auto *JoinBlock : SDA.join_blocks(ExitingLoop)) {
lib/Analysis/DomPrinter.cpp
   35     BasicBlock *BB = Node->getBlock();
lib/Analysis/DomTreeUpdater.cpp
   27   const auto *From = Update.getFrom();
   28   const auto *To = Update.getTo();
  104   for (auto *BB : DeletedBBs) {
  167 bool DomTreeUpdater::isBBPendingDeletion(llvm::BasicBlock *DelBB) const {
  178 void DomTreeUpdater::deleteBB(BasicBlock *DelBB) {
  191     BasicBlock *DelBB, std::function<void(BasicBlock *)> Callback) {
  191     BasicBlock *DelBB, std::function<void(BasicBlock *)> Callback) {
  205 void DomTreeUpdater::eraseDelBBNode(BasicBlock *DelBB) {
  215 void DomTreeUpdater::validateDeleteBB(BasicBlock *DelBB) {
  254   SmallSet<std::pair<BasicBlock *, BasicBlock *>, 8> Seen;
  254   SmallSet<std::pair<BasicBlock *, BasicBlock *>, 8> Seen;
  317 void DomTreeUpdater::insertEdge(BasicBlock *From, BasicBlock *To) {
  317 void DomTreeUpdater::insertEdge(BasicBlock *From, BasicBlock *To) {
  342 void DomTreeUpdater::insertEdgeRelaxed(BasicBlock *From, BasicBlock *To) {
  342 void DomTreeUpdater::insertEdgeRelaxed(BasicBlock *From, BasicBlock *To) {
  363 void DomTreeUpdater::deleteEdge(BasicBlock *From, BasicBlock *To) {
  363 void DomTreeUpdater::deleteEdge(BasicBlock *From, BasicBlock *To) {
  388 void DomTreeUpdater::deleteEdgeRelaxed(BasicBlock *From, BasicBlock *To) {
  388 void DomTreeUpdater::deleteEdgeRelaxed(BasicBlock *From, BasicBlock *To) {
  467           BasicBlock *From = U.getFrom();
  476           BasicBlock *To = U.getTo();
lib/Analysis/EHPersonalities.cpp
   77 DenseMap<BasicBlock *, ColorVector> llvm::colorEHFunclets(Function &F) {
   78   SmallVector<std::pair<BasicBlock *, BasicBlock *>, 16> Worklist;
   78   SmallVector<std::pair<BasicBlock *, BasicBlock *>, 16> Worklist;
   79   BasicBlock *EntryBlock = &F.getEntryBlock();
   80   DenseMap<BasicBlock *, ColorVector> BlockColors;
   98     BasicBlock *Visiting;
   99     BasicBlock *Color;
  121     BasicBlock *SuccColor = Color;
  131     for (BasicBlock *Succ : successors(Visiting))
lib/Analysis/GuardUtils.cpp
   24   BasicBlock *GuardedBB, *DeoptBB;
   40                                 BasicBlock *&IfTrueBB, BasicBlock *&IfFalseBB) {
   40                                 BasicBlock *&IfTrueBB, BasicBlock *&IfFalseBB) {
lib/Analysis/IVDescriptors.cpp
  343       BasicBlock *Parent = UI->getParent();
  616   BasicBlock *Header = TheLoop->getHeader();
  682   auto *Preheader = TheLoop->getLoopPreheader();
  683   auto *Latch = TheLoop->getLoopLatch();
  946   BasicBlock *Latch = L->getLoopLatch();
 1058   BasicBlock *Latch = AR->getLoop()->getLoopLatch();
lib/Analysis/IVUsers.cpp
   94 static bool isSimplifiedLoopNest(BasicBlock *BB, const DominatorTree *DT,
  100     BasicBlock *DomBB = Rung->getBlock();
  134   BasicBlock *LatchBlock = L->getLoopLatch();
  217     BasicBlock *UseBB = User->getParent();
  314   for (BasicBlock::iterator I = L->getHeader()->begin(); isa<PHINode>(I); ++I)
lib/Analysis/InlineCost.cpp
  184   SetVector<BasicBlock *> DeadBlocks;
  188   DenseMap<BasicBlock *, BasicBlock *> KnownSuccessors;
  188   DenseMap<BasicBlock *, BasicBlock *> KnownSuccessors;
  203   void findDeadBlocks(BasicBlock *CurrBB, BasicBlock *NextBB);
  203   void findDeadBlocks(BasicBlock *CurrBB, BasicBlock *NextBB);
  243   InlineResult analyzeBlock(BasicBlock *BB,
  258   void visit(BasicBlock *);
  259   void visit(BasicBlock &);
  484     BasicBlock *Pred = I.getIncomingBlock(i);
  490     BasicBlock *KnownSuccessor = KnownSuccessors[Pred];
 1561 CallAnalyzer::analyzeBlock(BasicBlock *BB,
 1563   for (BasicBlock::iterator I = BB->begin(), E = BB->end(); I != E; ++I) {
 1690 void CallAnalyzer::findDeadBlocks(BasicBlock *CurrBB, BasicBlock *NextBB) {
 1690 void CallAnalyzer::findDeadBlocks(BasicBlock *CurrBB, BasicBlock *NextBB) {
 1705   for (BasicBlock *Succ : successors(CurrBB)) {
 1708     SmallVector<BasicBlock *, 4> NewDead;
 1711       BasicBlock *Dead = NewDead.pop_back_val();
 1714         for (BasicBlock *S : successors(Dead))
 1822   typedef SetVector<BasicBlock *, SmallVector<BasicBlock *, 16>,
 1822   typedef SetVector<BasicBlock *, SmallVector<BasicBlock *, 16>,
 1835     BasicBlock *BB = BBWorklist[Idx];
 1867           BasicBlock *NextBB = BI->getSuccessor(SimpleCond->isZero() ? 1 : 0);
 1878         BasicBlock *NextBB = SI->findCaseValue(SimpleCond)->getCaseSuccessor();
lib/Analysis/InstCount.cpp
   39     void visitBasicBlock(BasicBlock &BB) { ++TotalBlocks; }
lib/Analysis/InstructionPrecedenceTracking.cpp
   35     const BasicBlock *BB) {
   53     const BasicBlock *BB) {
   64 void InstructionPrecedenceTracking::fill(const BasicBlock *BB) {
   77 void InstructionPrecedenceTracking::validate(const BasicBlock *BB) const {
  103                                                         const BasicBlock *BB) {
lib/Analysis/Interval.cpp
   41   for (const BasicBlock *Node : Nodes)
   45   for (const BasicBlock *Predecessor : Predecessors)
   49   for (const BasicBlock *Successor : Successors)
lib/Analysis/IntervalPartition.cpp
   63   BasicBlock *Header = Int->getHeaderNode();
   64   for (BasicBlock *Successor : Int->Successors)
lib/Analysis/LazyCallGraph.cpp
  100   for (BasicBlock &BB : *F)
lib/Analysis/LazyValueInfo.cpp
  162       SmallDenseMap<PoisoningVH<BasicBlock>, ValueLatticeElement, 4> BlockVals;
  167     typedef DenseMap<PoisoningVH<BasicBlock>, SmallPtrSet<Value *, 4>>
  171     DenseSet<PoisoningVH<BasicBlock> > SeenBlocks;
  180     void insertResult(Value *Val, BasicBlock *BB,
  199     bool isOverdefined(Value *V, BasicBlock *BB) const {
  208     bool hasCachedValueInfo(Value *V, BasicBlock *BB) const {
  219     ValueLatticeElement getCachedValueInfo(Value *V, BasicBlock *BB) const {
  244     void eraseBlock(BasicBlock *BB);
  249     void threadEdgeImpl(BasicBlock *OldSucc,BasicBlock *NewSucc);
  249     void threadEdgeImpl(BasicBlock *OldSucc,BasicBlock *NewSucc);
  275 void LazyValueInfoCache::eraseBlock(BasicBlock *BB) {
  277   DenseSet<PoisoningVH<BasicBlock> >::iterator I = SeenBlocks.find(BB);
  290 void LazyValueInfoCache::threadEdgeImpl(BasicBlock *OldSucc,
  291                                         BasicBlock *NewSucc) {
  302   std::vector<BasicBlock*> worklist;
  315     BasicBlock *ToUpdate = worklist.back();
  365   virtual void emitBasicBlockStartAnnot(const BasicBlock *BB,
  384     SmallVector<std::pair<BasicBlock*, Value*>, 8> BlockValueStack;
  387     DenseSet<std::pair<BasicBlock*, Value*> > BlockValueSet;
  391     bool pushBlockValue(const std::pair<BasicBlock *, Value *> &BV) {
  406   ValueLatticeElement getBlockValue(Value *Val, BasicBlock *BB);
  407   bool getEdgeValue(Value *V, BasicBlock *F, BasicBlock *T,
  407   bool getEdgeValue(Value *V, BasicBlock *F, BasicBlock *T,
  409   bool hasBlockValue(Value *Val, BasicBlock *BB);
  414   bool solveBlockValue(Value *Val, BasicBlock *BB);
  416                            BasicBlock *BB);
  418                                BasicBlock *BB);
  420                               BasicBlock *BB);
  422                              BasicBlock *BB);
  424                                              BasicBlock *BB);
  426       ValueLatticeElement &BBLV, Instruction *I, BasicBlock *BB,
  430                                BasicBlock *BB);
  432                            BasicBlock *BB);
  434       ValueLatticeElement &BBLV, WithOverflowInst *WO, BasicBlock *BB);
  436                                           SaturatingInst *SI, BasicBlock *BB);
  438                                 BasicBlock *BB);
  440                                    ExtractValueInst *EVI, BasicBlock *BB);
  450     ValueLatticeElement getValueInBlock(Value *V, BasicBlock *BB,
  460     ValueLatticeElement getValueOnEdge(Value *V, BasicBlock *FromBB,
  461                                        BasicBlock *ToBB,
  477     void eraseBlock(BasicBlock *BB) {
  500     void threadEdge(BasicBlock *PredBB,BasicBlock *OldSucc,BasicBlock *NewSucc);
  500     void threadEdge(BasicBlock *PredBB,BasicBlock *OldSucc,BasicBlock *NewSucc);
  500     void threadEdge(BasicBlock *PredBB,BasicBlock *OldSucc,BasicBlock *NewSucc);
  510   SmallVector<std::pair<BasicBlock *, Value *>, 8> StartingStack(
  529         std::pair<BasicBlock *, Value *> &e = StartingStack.back();
  538     std::pair<BasicBlock *, Value *> e = BlockValueStack.back();
  560 bool LazyValueInfoImpl::hasBlockValue(Value *Val, BasicBlock *BB) {
  569                                                      BasicBlock *BB) {
  594 bool LazyValueInfoImpl::solveBlockValue(Value *Val, BasicBlock *BB) {
  621                                             Value *Val, BasicBlock *BB) {
  702 static bool isObjectDereferencedInBlock(Value *Val, BasicBlock *BB) {
  717                                                  Value *Val, BasicBlock *BB) {
  781                                                PHINode *PN, BasicBlock *BB) {
  788     BasicBlock *PhiBB = PN->getIncomingBlock(i);
  855                                               SelectInst *SI, BasicBlock *BB) {
  998                                                               BasicBlock *BB) {
 1017                                             BasicBlock *BB) {
 1062     ValueLatticeElement &BBLV, Instruction *I, BasicBlock *BB,
 1083                                                 BasicBlock *BB) {
 1116     ValueLatticeElement &BBLV, WithOverflowInst *WO, BasicBlock *BB) {
 1124     ValueLatticeElement &BBLV, SaturatingInst *SI, BasicBlock *BB) {
 1153                                                  BasicBlock *BB) {
 1164     ValueLatticeElement &BBLV, ExtractValueInst *EVI, BasicBlock *BB) {
 1379 static bool getEdgeValueLocal(Value *Val, BasicBlock *BBFrom,
 1380                               BasicBlock *BBTo, ValueLatticeElement &Result) {
 1503 bool LazyValueInfoImpl::getEdgeValue(Value *Val, BasicBlock *BBFrom,
 1504                                      BasicBlock *BBTo,
 1551 ValueLatticeElement LazyValueInfoImpl::getValueInBlock(Value *V, BasicBlock *BB,
 1585 getValueOnEdge(Value *V, BasicBlock *FromBB, BasicBlock *ToBB,
 1585 getValueOnEdge(Value *V, BasicBlock *FromBB, BasicBlock *ToBB,
 1603 void LazyValueInfoImpl::threadEdge(BasicBlock *PredBB, BasicBlock *OldSucc,
 1603 void LazyValueInfoImpl::threadEdge(BasicBlock *PredBB, BasicBlock *OldSucc,
 1604                                    BasicBlock *NewSucc) {
 1694 Constant *LazyValueInfo::getConstant(Value *V, BasicBlock *BB,
 1714 ConstantRange LazyValueInfo::getConstantRange(Value *V, BasicBlock *BB,
 1734 Constant *LazyValueInfo::getConstantOnEdge(Value *V, BasicBlock *FromBB,
 1735                                            BasicBlock *ToBB,
 1752                                                     BasicBlock *FromBB,
 1753                                                     BasicBlock *ToBB,
 1840                                   BasicBlock *FromBB, BasicBlock *ToBB,
 1840                                   BasicBlock *FromBB, BasicBlock *ToBB,
 1892     BasicBlock *BB = CxtI->getParent();
 1909           BasicBlock *PredBB = PHI->getIncomingBlock(i);
 1950 void LazyValueInfo::threadEdge(BasicBlock *PredBB, BasicBlock *OldSucc,
 1950 void LazyValueInfo::threadEdge(BasicBlock *PredBB, BasicBlock *OldSucc,
 1951                                BasicBlock *NewSucc) {
 1958 void LazyValueInfo::eraseBlock(BasicBlock *BB) {
 1984     const BasicBlock *BB, formatted_raw_ostream &OS) {
 2004   SmallPtrSet<const BasicBlock*, 16> BlocksContainingLVI;
lib/Analysis/LegacyDivergenceAnalysis.cpp
  109   void computeInfluenceRegion(BasicBlock *Start, BasicBlock *End,
  109   void computeInfluenceRegion(BasicBlock *Start, BasicBlock *End,
  110                               DenseSet<BasicBlock *> &InfluenceRegion);
  114       Instruction &I, const DenseSet<BasicBlock *> &InfluenceRegion);
  154   BasicBlock *ThisBB = TI->getParent();
  166   BasicBlock *IPostDom = ThisNode->getIDom()->getBlock();
  196   DenseSet<BasicBlock *> InfluenceRegion;
  202   BasicBlock *InfluencedBB = ThisBB;
  216     Instruction &I, const DenseSet<BasicBlock *> &InfluenceRegion) {
  230 addSuccessorsToInfluenceRegion(BasicBlock *ThisBB, BasicBlock *End,
  230 addSuccessorsToInfluenceRegion(BasicBlock *ThisBB, BasicBlock *End,
  231                                DenseSet<BasicBlock *> &InfluenceRegion,
  232                                std::vector<BasicBlock *> &InfluenceStack) {
  233   for (BasicBlock *Succ : successors(ThisBB)) {
  240     BasicBlock *Start, BasicBlock *End,
  240     BasicBlock *Start, BasicBlock *End,
  241     DenseSet<BasicBlock *> &InfluenceRegion) {
  248   std::vector<BasicBlock *> InfluenceStack;
  251     BasicBlock *BB = InfluenceStack.back();
  313   return !containsIrreducibleCFG<const BasicBlock *, const RPOTraversal,
lib/Analysis/Lint.cpp
  675     BasicBlock::iterator BBI = L->getIterator();
  676     BasicBlock *BB = L->getParent();
  677     SmallPtrSet<BasicBlock *, 4> VisitedBlocks;
lib/Analysis/Loads.cpp
  287   BasicBlock::iterator BBI = ScanFrom->getIterator(),
  362                                       BasicBlock *ScanBB,
  363                                       BasicBlock::iterator &ScanFrom,
  377                                        bool AtLeastAtomic, BasicBlock *ScanBB,
  378                                        BasicBlock::iterator &ScanFrom,
lib/Analysis/LoopAccessAnalysis.cpp
 1813   for (BasicBlock *BB : TheLoop->blocks()) {
 2078 bool LoopAccessInfo::blockNeedsPredication(BasicBlock *BB, Loop *TheLoop,
 2083   BasicBlock* Latch = TheLoop->getLoopLatch();
lib/Analysis/LoopCacheAnalysis.cpp
  314   const BasicBlock *BB = StoreOrLoadInst.getParent();
  518   for (BasicBlock *BB : InnerMostLoop->getBlocks()) {
lib/Analysis/LoopInfo.cpp
   93     BasicBlock *Preheader = getLoopPreheader();
  120 bool Loop::getIncomingAndBackEdge(BasicBlock *&Incoming,
  121                                   BasicBlock *&Backedge) const {
  122   BasicBlock *H = getHeader();
  147   BasicBlock *H = getHeader();
  149   BasicBlock *Incoming = nullptr, *Backedge = nullptr;
  154   for (BasicBlock::iterator I = H->begin(); isa<PHINode>(I); ++I) {
  171   if (BasicBlock *Latch = L.getLoopLatch())
  229   BasicBlock *Latch = L.getLoopLatch();
  294   BasicBlock *Header = getHeader();
  339   BasicBlock *Header = getHeader();
  366   BasicBlock *Preheader = getLoopPreheader();
  367   BasicBlock *Latch = getLoopLatch();
  377   BasicBlock *ExitFromLatch = getUniqueExitBlock();
  381   BasicBlock *ExitFromLatchSucc = ExitFromLatch->getUniqueSuccessor();
  385   BasicBlock *GuardBB = Preheader->getUniquePredecessor();
  395   BasicBlock *GuardOtherSucc = (GuardBI->getSuccessor(0) == Preheader)
  421 static bool isBlockInLCSSAForm(const Loop &L, const BasicBlock &BB,
  432       const BasicBlock *UserBB = UI->getParent();
  476   for (BasicBlock *BB : this->blocks()) {
  493   SmallVector<BasicBlock *, 4> LatchesBlocks;
  495   for (BasicBlock *BB : LatchesBlocks) {
  519   SmallVector<BasicBlock *, 4> LoopLatches;
  521   for (BasicBlock *BB : LoopLatches)
  560   for (BasicBlock *BB : this->blocks()) {
  634   if (BasicBlock *PHeadBB = getLoopPreheader())
  640   if (BasicBlock *HeadBB = getHeader())
  688   Loop *getNearestLoop(BasicBlock *BB, Loop *BBLoop);
  699     for (BasicBlock *POI : Traversal) {
  782 Loop *UnloopUpdater::getNearestLoop(BasicBlock *BB, Loop *BBLoop) {
  846 LoopInfo::LoopInfo(const DomTreeBase<BasicBlock> &DomTree) { analyze(DomTree); }
  951   auto *PreHeader = L.getLoopPreheader();
  958   for (auto *Block : L.blocks())
  964   SmallVector<BasicBlock *, 8> ExitBlocks;
  968     for (auto *Block : ExitBlocks)
lib/Analysis/LoopPass.cpp
   97 void LPPassManager::cloneBasicBlockSimpleAnalysis(BasicBlock *From,
   98                                                   BasicBlock *To, Loop *L) {
  107   if (BasicBlock *BB = dyn_cast<BasicBlock>(V)) {
  107   if (BasicBlock *BB = dyn_cast<BasicBlock>(V)) {
lib/Analysis/MemDepPrinter.cpp
  146       const BasicBlock *DepBB = I.second;
lib/Analysis/MemoryDependenceAnalysis.cpp
  184     CallBase *Call, bool isReadOnlyCall, BasicBlock::iterator ScanIt,
  185     BasicBlock *BB) {
  328     const MemoryLocation &MemLoc, bool isLoad, BasicBlock::iterator ScanIt,
  329     BasicBlock *BB, Instruction *QueryInst, unsigned *Limit,
  357                                                             BasicBlock *BB) {
  441     const MemoryLocation &MemLoc, bool isLoad, BasicBlock::iterator ScanIt,
  442     BasicBlock *BB, Instruction *QueryInst, unsigned *Limit,
  734   BasicBlock *QueryParent = QueryInst->getParent();
  795   SmallVector<BasicBlock *, 32> DirtyBlocks;
  819     BasicBlock *QueryBB = QueryCall->getParent();
  820     for (BasicBlock *Pred : PredCache.get(QueryBB))
  828   SmallPtrSet<BasicBlock *, 32> Visited;
  835     BasicBlock *DirtyBB = DirtyBlocks.back();
  865     BasicBlock::iterator ScanPos = DirtyBB->end();
  906       for (BasicBlock *Pred : PredCache.get(DirtyBB))
  918   BasicBlock *FromBB = QueryInst->getParent();
  963   DenseMap<BasicBlock *, Value *> Visited;
  979     BasicBlock *BB, NonLocalDepInfo *Cache, unsigned NumSortedEntries) {
 1002   BasicBlock::iterator ScanPos = BB->end();
 1094     const MemoryLocation &Loc, bool isLoad, BasicBlock *StartBB,
 1096     DenseMap<BasicBlock *, Value *> &Visited, bool SkipFirstBlock) {
 1180         DenseMap<BasicBlock *, Value *>::iterator VI =
 1217   SmallVector<BasicBlock *, 32> Worklist;
 1221   SmallVector<std::pair<BasicBlock *, PHITransAddr>, 16> PredList;
 1234     BasicBlock *BB = Worklist.pop_back_val();
 1281       SmallVector<BasicBlock *, 16> NewBlocks;
 1282       for (BasicBlock *Pred : PredCache.get(BB)) {
 1284         std::pair<DenseMap<BasicBlock *, Value *>::iterator, bool> InsertRes =
 1333     for (BasicBlock *Pred : PredCache.get(BB)) {
 1347       std::pair<DenseMap<BasicBlock *, Value *>::iterator, bool> InsertRes =
 1378       BasicBlock *Pred = PredList[i].first;
lib/Analysis/MemorySSA.cpp
  106   void emitBasicBlockStartAnnot(const BasicBlock *BB,
  528     BasicBlock *BB = From->getBlock();
  880         const BasicBlock *ChainBB = DefChainEnd->getBlock();
 1086 void MemorySSA::renameSuccessorPhis(BasicBlock *BB, MemoryAccess *IncomingVal,
 1089   for (const BasicBlock *S : successors(BB)) {
 1113 MemoryAccess *MemorySSA::renameBlock(BasicBlock *BB, MemoryAccess *IncomingVal,
 1138                            SmallPtrSetImpl<BasicBlock *> &Visited,
 1164       BasicBlock *BB = Child->getBlock();
 1187 void MemorySSA::markUnreachableAsLiveOnEntry(BasicBlock *BB) {
 1195   for (const BasicBlock *S : successors(BB)) {
 1248 MemorySSA::AccessList *MemorySSA::getOrCreateAccessList(const BasicBlock *BB) {
 1256 MemorySSA::DefsList *MemorySSA::getOrCreateDefsList(const BasicBlock *BB) {
 1293     const BasicBlock *LowerBoundBlock;
 1300   void optimizeUsesInBlock(const BasicBlock *, unsigned long &, unsigned long &,
 1325     const BasicBlock *BB, unsigned long &StackEpoch, unsigned long &PopEpoch,
 1340     BasicBlock *BackBlock = VersionStack.back()->getBlock();
 1492     const SmallPtrSetImpl<BasicBlock *> &DefiningBlocks) {
 1496   SmallVector<BasicBlock *, 32> IDFBlocks;
 1511   BasicBlock &StartingPoint = F.getEntryBlock();
 1518   SmallPtrSet<BasicBlock *, 32> DefiningBlocks;
 1521   for (BasicBlock &B : F) {
 1547   SmallPtrSet<BasicBlock *, 16> Visited;
 1556   for (auto &BB : F)
 1594                                         const BasicBlock *BB,
 1625 void MemorySSA::insertIntoListsBefore(MemoryAccess *What, const BasicBlock *BB,
 1653 void MemorySSA::prepareForMoveTo(MemoryAccess *What, BasicBlock *BB) {
 1669 void MemorySSA::moveTo(MemoryUseOrDef *What, BasicBlock *BB,
 1675 void MemorySSA::moveTo(MemoryAccess *What, BasicBlock *BB,
 1691 MemoryPhi *MemorySSA::createMemoryPhi(BasicBlock *BB) {
 1835   BasicBlock *BB = MA->getBlock();
 1929   SmallPtrSet<const BasicBlock *, 16> ValidBlocks = BlockNumberingValid;
 1930   for (const BasicBlock &BB : F) {
 1969   for (BasicBlock &B : F) {
 2029   for (BasicBlock &B : F) {
 2095 void MemorySSA::renumberBlock(const BasicBlock *B) const {
 2110   const BasicBlock *DominatorBlock = Dominator->getBlock();
 2155     BasicBlock *UseBB = MP->getIncomingBlock(Dominatee);
 2204     BasicBlock *BB = getIncomingBlock(Op);
lib/Analysis/MemorySSAUpdater.cpp
   42     BasicBlock *BB,
   43     DenseMap<BasicBlock *, TrackingVH<MemoryAccess>> &CachedPreviousDef) {
   54   if (BasicBlock *Pred = BB->getUniquePredecessor()) {
   80     for (auto *Pred : predecessors(BB)) {
  123         for (auto *Pred : predecessors(BB))
  145   DenseMap<BasicBlock *, TrackingVH<MemoryAccess>> CachedPreviousDef;
  178     BasicBlock *BB,
  179     DenseMap<BasicBlock *, TrackingVH<MemoryAccess>> &CachedPreviousDef) {
  268     SmallPtrSet<BasicBlock *, 16> Visited;
  269     BasicBlock *StartBlock = MU->getBlock();
  289 static void setMemoryPhiValueForBlock(MemoryPhi *MP, const BasicBlock *BB,
  361     SmallPtrSet<BasicBlock *, 2> DefiningBlocks;
  375     SmallVector<BasicBlock *, 32> IDFBlocks;
  379     for (auto *BBIDF : IDFBlocks) {
  394       auto *BBIDF = MPhi->getBlock();
  395       for (auto *Pred : predecessors(BBIDF)) {
  396         DenseMap<BasicBlock *, TrackingVH<MemoryAccess>> CachedPreviousDef;
  431     SmallPtrSet<BasicBlock *, 16> Visited;
  432     BasicBlock *StartBlock = MD->getBlock();
  453   SmallPtrSet<const BasicBlock *, 8> Seen;
  454   SmallVector<const BasicBlock *, 16> Worklist;
  476     for (const auto *S : successors(NewDef->getBlock())) {
  484       const BasicBlock *FixupBlock = Worklist.back();
  505       for (const auto *S : successors(FixupBlock)) {
  522 void MemorySSAUpdater::removeEdge(BasicBlock *From, BasicBlock *To) {
  522 void MemorySSAUpdater::removeEdge(BasicBlock *From, BasicBlock *To) {
  529 void MemorySSAUpdater::removeDuplicatePhiEdgesBetween(const BasicBlock *From,
  530                                                       const BasicBlock *To) {
  582 void MemorySSAUpdater::cloneUsesAndDefs(BasicBlock *BB, BasicBlock *NewBB,
  582 void MemorySSAUpdater::cloneUsesAndDefs(BasicBlock *BB, BasicBlock *NewBB,
  615     BasicBlock *Header, BasicBlock *Preheader, BasicBlock *BEBlock) {
  615     BasicBlock *Header, BasicBlock *Preheader, BasicBlock *BEBlock) {
  615     BasicBlock *Header, BasicBlock *Preheader, BasicBlock *BEBlock) {
  626     BasicBlock *IBB = MPhi->getIncomingBlock(I);
  654                                            ArrayRef<BasicBlock *> ExitBlocks,
  661     BasicBlock *NewPhiBB = NewPhi->getBlock();
  662     SmallPtrSet<BasicBlock *, 4> NewPhiBBPreds(pred_begin(NewPhiBB),
  666       BasicBlock *IncBB = Phi->getIncomingBlock(It);
  668       if (BasicBlock *NewIncBB = cast_or_null<BasicBlock>(VMap.lookup(IncBB)))
  668       if (BasicBlock *NewIncBB = cast_or_null<BasicBlock>(VMap.lookup(IncBB)))
  704     BasicBlock *NewBlock = cast_or_null<BasicBlock>(VMap.lookup(BB));
  704     BasicBlock *NewBlock = cast_or_null<BasicBlock>(VMap.lookup(BB));
  720   for (auto BB : llvm::concat<BasicBlock *const>(LoopBlocks, ExitBlocks))
  723   for (auto BB : llvm::concat<BasicBlock *const>(LoopBlocks, ExitBlocks))
  730     BasicBlock *BB, BasicBlock *P1, const ValueToValueMapTy &VM) {
  730     BasicBlock *BB, BasicBlock *P1, const ValueToValueMapTy &VM) {
  747     ArrayRef<BasicBlock *> ExitBlocks, Iter ValuesBegin, Iter ValuesEnd,
  751   for (auto *Exit : ExitBlocks)
  753       if (BasicBlock *NewExit = cast_or_null<BasicBlock>(VMap->lookup(Exit))) {
  753       if (BasicBlock *NewExit = cast_or_null<BasicBlock>(VMap->lookup(Exit))) {
  754         BasicBlock *ExitSucc = NewExit->getTerminator()->getSuccessor(0);
  761     ArrayRef<BasicBlock *> ExitBlocks, const ValueToValueMapTy &VMap,
  769     ArrayRef<BasicBlock *> ExitBlocks,
  801     GraphDiff<BasicBlock *> GD(RevDeleteUpdates);
  804     GraphDiff<BasicBlock *> GD;
  815   GraphDiff<BasicBlock *> GD;
  821                                           const GraphDiff<BasicBlock *> *GD) {
  832       BasicBlock *Pred = nullptr;
  870     BasicBlock *PrevIDom = *BBSet.begin();
  871     for (auto *BB : BBSet)
  884         BasicBlock *NextIDom = PrevIDom;
  885         while (BasicBlock *UpIDom =
  909     SmallSetVector<BasicBlock *, 2> Added;
  910     SmallSetVector<BasicBlock *, 2> Prev;
  912   SmallDenseMap<BasicBlock *, PredInfo> PredMap;
  915     BasicBlock *BB = Edge.getTo();
  921   SmallDenseMap<std::pair<BasicBlock *, BasicBlock *>, int> EdgeCountMap;
  921   SmallDenseMap<std::pair<BasicBlock *, BasicBlock *>, int> EdgeCountMap;
  922   SmallPtrSet<BasicBlock *, 2> NewBlocks;
  924     auto *BB = BBPredPair.first;
  928       BasicBlock *Pi = Pair.second;
  952   for (auto *BB : NewBlocks)
  955   SmallVector<BasicBlock *, 16> BlocksWithDefsToReplace;
  961     BasicBlock *BB = Edge.getTo();
  968     auto *BB = BBPredPair.first;
  980     SmallDenseMap<BasicBlock *, MemoryAccess *> LastDefAddedPred;
  981     for (auto *AddedPred : AddedBlockSet) {
  991       for (auto *Pred : AddedBlockSet) {
  999       auto *P1 = *PrevBlockSet.begin();
 1022       for (auto *Pred : AddedBlockSet) {
 1027       for (auto *Pred : PrevBlockSet)
 1035     BasicBlock *PrevIDom = FindNearestCommonDominator(PrevBlockSet);
 1037     BasicBlock *NewIDom = DT.getNode(BB)->getIDom()->getBlock();
 1047   SmallVector<BasicBlock *, 8> BlocksToProcess;
 1053   SmallVector<BasicBlock *, 32> IDFBlocks;
 1056     SmallPtrSet<BasicBlock *, 16> DefiningBlocks(BlocksToProcess.begin(),
 1063     for (auto *BBIDF : IDFBlocks)
 1070     for (auto *BBIDF : IDFBlocks) {
 1080           BasicBlock *Pi = Pair.second;
 1090   for (auto *BlockWithDefsToReplace : BlocksWithDefsToReplace) {
 1093         BasicBlock *DominatingBlock = DefToReplaceUses.getBlock();
 1101             BasicBlock *DominatedBlock = UsrPhi->getIncomingBlock(U);
 1105             BasicBlock *DominatedBlock = Usr->getBlock();
 1126 void MemorySSAUpdater::moveTo(MemoryUseOrDef *What, BasicBlock *BB,
 1160 void MemorySSAUpdater::moveToPlace(MemoryUseOrDef *What, BasicBlock *BB,
 1166 void MemorySSAUpdater::moveAllAccesses(BasicBlock *From, BasicBlock *To,
 1166 void MemorySSAUpdater::moveAllAccesses(BasicBlock *From, BasicBlock *To,
 1201 void MemorySSAUpdater::moveAllAfterSpliceBlocks(BasicBlock *From,
 1202                                                 BasicBlock *To,
 1207   for (BasicBlock *Succ : successors(To))
 1212 void MemorySSAUpdater::moveAllAfterMergeBlocks(BasicBlock *From, BasicBlock *To,
 1212 void MemorySSAUpdater::moveAllAfterMergeBlocks(BasicBlock *From, BasicBlock *To,
 1217   for (BasicBlock *Succ : successors(From))
 1237     BasicBlock *Old, BasicBlock *New, ArrayRef<BasicBlock *> Preds,
 1237     BasicBlock *Old, BasicBlock *New, ArrayRef<BasicBlock *> Preds,
 1237     BasicBlock *Old, BasicBlock *New, ArrayRef<BasicBlock *> Preds,
 1252     SmallPtrSet<BasicBlock *, 16> PredsSet(Preds.begin(), Preds.end());
 1340     const SmallSetVector<BasicBlock *, 8> &DeadBlocks) {
 1342   for (BasicBlock *BB : DeadBlocks) {
 1345     for (BasicBlock *Succ : successors(TI))
 1358   for (BasicBlock *BB : DeadBlocks) {
 1378   const BasicBlock *BB = I->getParent();
 1387   for (const BasicBlock *Successor : successors(BB)) {
 1399                                                          const BasicBlock *To) {
 1400   const BasicBlock *BB = BI->getParent();
 1402   for (const BasicBlock *Succ : successors(BB)) {
 1415     Instruction *I, MemoryAccess *Definition, const BasicBlock *BB,
lib/Analysis/ModuleSummaryAnalysis.cpp
  271   for (const BasicBlock &BB : F)
lib/Analysis/MustExecute.cpp
   29 const DenseMap<BasicBlock *, ColorVector> &
   34 void LoopSafetyInfo::copyColors(BasicBlock *New, BasicBlock *Old) {
   34 void LoopSafetyInfo::copyColors(BasicBlock *New, BasicBlock *Old) {
   40 bool SimpleLoopSafetyInfo::blockMayThrow(const BasicBlock *BB) const {
   51   BasicBlock *Header = CurLoop->getHeader();
   68 bool ICFLoopSafetyInfo::blockMayThrow(const BasicBlock *BB) const {
   91                                             const BasicBlock *BB) {
  114 static bool CanProveNotTakenFirstIteration(const BasicBlock *ExitBlock,
  158     const Loop *CurLoop, const BasicBlock *BB,
  159     SmallPtrSetImpl<const BasicBlock *> &Predecessors) {
  164   SmallVector<const BasicBlock *, 4> WorkList;
  188                                              const BasicBlock *BB,
  198   SmallPtrSet<const BasicBlock *, 4> Predecessors;
  207   SmallPtrSet<const BasicBlock *, 4> CheckedSuccessors;
  272 bool ICFLoopSafetyInfo::doesNotWriteMemoryBefore(const BasicBlock *BB,
  282   SmallPtrSet<const BasicBlock *, 4> Predecessors;
lib/Analysis/OptimizationRemarkEmitter.cpp
   62   return BFI->getBlockProfileCount(cast<BasicBlock>(V));
lib/Analysis/OrderedBasicBlock.cpp
   27 OrderedBasicBlock::OrderedBasicBlock(const BasicBlock *BasicB)
lib/Analysis/OrderedInstructions.cpp
   21   const BasicBlock *IBB = InstA->getParent();
lib/Analysis/PHITransAddr.cpp
  143 Value *PHITransAddr::PHITranslateSubExpr(Value *V, BasicBlock *CurBB,
  144                                          BasicBlock *PredBB,
  312 bool PHITransAddr::PHITranslateValue(BasicBlock *CurBB, BasicBlock *PredBB,
  312 bool PHITransAddr::PHITranslateValue(BasicBlock *CurBB, BasicBlock *PredBB,
  341 PHITranslateWithInsertion(BasicBlock *CurBB, BasicBlock *PredBB,
  341 PHITranslateWithInsertion(BasicBlock *CurBB, BasicBlock *PredBB,
  365 InsertPHITranslatedSubExpr(Value *InVal, BasicBlock *CurBB,
  366                            BasicBlock *PredBB, const DominatorTree &DT,
  398     BasicBlock *CurBB = GEP->getParent();
lib/Analysis/PhiValues.cpp
  152   for (const BasicBlock &BB : F) {
  185   for (const BasicBlock &BB : F)
lib/Analysis/ProfileSummaryInfo.cpp
  153     for (const auto &BB : *F)
  161   for (const auto &BB : *F)
  182     for (const auto &BB : *F)
  190   for (const auto &BB : *F)
  207     for (const auto &BB : *F)
  215   for (const auto &BB : *F)
  317 bool ProfileSummaryInfo::isHotBlock(const BasicBlock *BB, BlockFrequencyInfo *BFI) {
  322 bool ProfileSummaryInfo::isColdBlock(const BasicBlock *BB,
  329                                                  const BasicBlock *BB,
lib/Analysis/RegionInfo.cpp
   63 Region::Region(BasicBlock *Entry, BasicBlock *Exit,
   63 Region::Region(BasicBlock *Entry, BasicBlock *Exit,
lib/Analysis/RegionPass.cpp
  197     for (const auto *BB : R->blocks()) {
lib/Analysis/RegionPrinter.cpp
   46       BasicBlock *BB = Node->getNodeAs<BasicBlock>();
   46       BasicBlock *BB = Node->getNodeAs<BasicBlock>();
   82     BasicBlock *srcBB = srcNode->getNodeAs<BasicBlock>();
   82     BasicBlock *srcBB = srcNode->getNodeAs<BasicBlock>();
   83     BasicBlock *destBB = destNode->getNodeAs<BasicBlock>();
   83     BasicBlock *destBB = destNode->getNodeAs<BasicBlock>();
  124     for (auto *BB : R.blocks())
lib/Analysis/ScalarEvolution.cpp
  620     const BasicBlock *LParent = LInst->getParent(),
  704       const BasicBlock *LHead = LLoop->getHeader(), *RHead = RLoop->getHeader();
 4328     if (BasicBlock *Latch = L->getLoopLatch()) {
 5163                                BasicBlock *BB) {
 5169     BasicBlock *BB = nullptr;
 5172     CheckAvailable(const Loop *L, BasicBlock *BB, DominatorTree &DT)
 5291     BasicBlock *IDom = DT[PN->getParent()]->getIDom()->getBlock();
 6065   auto *ExitingBB = L->getExitingBlock();
 6066   auto *LatchBB = L->getLoopLatch();
 6116     for (auto *BB : L->getBlocks())
 6527   if (BasicBlock *ExitingBB = L->getExitingBlock())
 6535                                                     BasicBlock *ExitingBlock) {
 6551   if (BasicBlock *ExitingBB = L->getExitingBlock())
 6572                                               BasicBlock *ExitingBlock) {
 6603                                           BasicBlock *ExitingBlock,
 6638   BasicBlock *Header = L->getHeader();
 6899   const BasicBlock *Latch = L->getLoopLatch();
 6928 ScalarEvolution::BackedgeTakenInfo::getExact(BasicBlock *ExitingBlock,
 6938 ScalarEvolution::BackedgeTakenInfo::getMax(BasicBlock *ExitingBlock,
 7035         BasicBlock *ExitBB = EEI.first;
 7061   SmallVector<BasicBlock *, 8> ExitingBlocks;
 7068   BasicBlock *Latch = L->getLoopLatch(); // may be NULL.
 7077     BasicBlock *ExitBB = ExitingBlocks[i];
 7130 ScalarEvolution::computeExitLimit(const Loop *L, BasicBlock *ExitingBlock,
 7135   const BasicBlock *Latch = L->getLoopLatch();
 7154     BasicBlock *Exit = nullptr;
 7155     for (auto *SBB : successors(ExitingBlock))
 7457                                                       BasicBlock *ExitingBlock,
 7572   const BasicBlock *Latch = L->getLoopLatch();
 7576   const BasicBlock *Predecessor = L->getLoopPredecessor();
 7849 static Constant *getOtherIncomingValue(PHINode *PN, BasicBlock *BB) {
 7888   BasicBlock *Header = L->getHeader();
 7891   BasicBlock *Latch = L->getLoopLatch();
 7968   BasicBlock *Header = L->getHeader();
 7971   BasicBlock *Latch = L->getLoopLatch();
 8849 std::pair<BasicBlock *, BasicBlock *>
 8849 std::pair<BasicBlock *, BasicBlock *>
 8850 ScalarEvolution::getPredecessorWithUniqueSuccessorForBB(BasicBlock *BB) {
 8854   if (BasicBlock *Pred = BB->getSinglePredecessor())
 9431 bool ScalarEvolution::isImpliedViaGuard(BasicBlock *BB,
 9467   BasicBlock *Latch = L->getLoopLatch();
 9527     BasicBlock *BB = DTN->getBlock();
 9531     BasicBlock *PBB = BB->getSinglePredecessor();
 9638   for (std::pair<BasicBlock *, BasicBlock *>
 9638   for (std::pair<BasicBlock *, BasicBlock *>
10058   const BasicBlock *LBB = LPhi->getParent();
10072     for (const BasicBlock *IncBB : predecessors(LBB)) {
10087     auto *Predecessor = RLoop->getLoopPredecessor();
10092     auto *Latch = RLoop->getLoopLatch();
10102     for (const BasicBlock *IncBB : predecessors(LBB)) {
11491   SmallVector<BasicBlock *, 8> ExitingBlocks;
11502     for (BasicBlock *ExitingBlock : ExitingBlocks) {
11751 ScalarEvolution::getBlockDisposition(const SCEV *S, const BasicBlock *BB) {
11770 ScalarEvolution::computeBlockDisposition(const SCEV *S, const BasicBlock *BB) {
11835 bool ScalarEvolution::dominates(const SCEV *S, const BasicBlock *BB) {
11839 bool ScalarEvolution::properlyDominates(const SCEV *S, const BasicBlock *BB) {
12488   for (auto *BB : L.getBlocks())
lib/Analysis/ScalarEvolutionExpander.cpp
   39                                        BasicBlock::iterator IP) {
   49   BasicBlock::iterator BIP = Builder.GetInsertPoint();
   86 static BasicBlock::iterator findInsertPointAfter(Instruction *I,
   87                                                  BasicBlock *MustDominate) {
   88   BasicBlock::iterator IP = ++I->getIterator();
  151     BasicBlock::iterator IP = A->getParent()->getEntryBlock().begin();
  162   BasicBlock::iterator IP = findInsertPointAfter(I, Builder.GetInsertBlock());
  179   BasicBlock::iterator BlockBegin = Builder.GetInsertBlock()->begin();
  181   BasicBlock::iterator IP = Builder.GetInsertPoint();
  219       BasicBlock *Preheader = L->getLoopPreheader();
  525     BasicBlock::iterator BlockBegin = Builder.GetInsertBlock()->begin();
  527     BasicBlock::iterator IP = Builder.GetInsertPoint();
  548       BasicBlock *Preheader = L->getLoopPreheader();
  575       BasicBlock *Preheader = L->getLoopPreheader();
  989   BasicBlock::iterator It(*I);
  990   BasicBlock::iterator NewInsertPt = std::next(It);
 1168   BasicBlock *LatchBlock = L->getLoopLatch();
 1293   BasicBlock *Header = L->getHeader();
 1302     BasicBlock *Pred = *HPI;
 1403     BasicBlock *LatchBlock = L->getLoopLatch();
 1518     BasicBlock::iterator NewInsertPt =
 1563     BasicBlock *Header = L->getHeader();
 1569     SmallSet<BasicBlock *, 4> PredSeen;
 1572       BasicBlock *HP = *HPI;
 1840         if (BasicBlock *Preheader = L->getLoopPreheader())
 2017     if (BasicBlock *LatchBlock = L->getLoopLatch()) {
 2098   SmallVector<BasicBlock *, 4> ExitingBlocks;
 2102   for (BasicBlock *BB : ExitingBlocks) {
 2179     BasicBlock *ExitingBB = L->getExitingBlock();
lib/Analysis/SyncDependenceAnalysis.cpp
  140   SmallPtrSet<const BasicBlock *, 4> ReachedLoopExits;
  146   using DefiningBlockMap = std::map<const BasicBlock *, const BasicBlock *>;
  146   using DefiningBlockMap = std::map<const BasicBlock *, const BasicBlock *>;
  150   std::unordered_set<const BasicBlock *> PendingUpdates;
  158   void addPending(const BasicBlock &Block, const BasicBlock &DefBlock) {
  158   void addPending(const BasicBlock &Block, const BasicBlock &DefBlock) {
  166     for (const auto *Block : FuncRPOT) {
  172         const auto *DefBlock = It->second;
  181   void visitSuccessor(const BasicBlock &SuccBlock, const Loop *ParentLoop,
  182                       const BasicBlock &DefBlock) {
  227     for (const auto *SuccBlock : NodeSuccessors) {
  258       const auto *Block = *ItBlockRPO;
  269       const auto *DefBlock = ItDef->second;
  277         SmallVector<BasicBlock *, 4> BlockLoopExits;
  279         for (const auto *BlockLoopExit : BlockLoopExits) {
  285         for (const auto *SuccBlock : successors(Block)) {
  309       const BasicBlock *ParentLoopHeader =
  314       const auto *HeaderDefBlock = (ItHeaderDef == DefMap.end()) ? nullptr : ItHeaderDef->second;
  319       for (const auto *ExitBlock : ReachedLoopExits) {
  334   using LoopExitVec = SmallVector<BasicBlock *, 4>;
  371   const auto &TermBlock = *Term.getParent();
lib/Analysis/TargetTransformInfo.cpp
   51   if (containsIrreducibleCFG<const BasicBlock *>(RPOT, LI))
   60   SmallVector<BasicBlock *, 4> ExitingBlocks;
   63   for (BasicBlock *BB : ExitingBlocks) {
   97     for (BasicBlock *Pred : predecessors(L->getHeader())) {
lib/Analysis/ValueTracking.cpp
  569   for (BasicBlock::const_iterator I =
 1960           BasicBlock *NonNullSuccessor =
 4295 bool llvm::isGuaranteedToTransferExecutionToSuccessor(const BasicBlock *BB) {
 4397   const BasicBlock *BB = PoisonI->getParent();
 4402   SmallSet<const BasicBlock *, 4> Visited;
 4406   BasicBlock::const_iterator Begin = PoisonI->getIterator(), End = BB->end();
 5395   const BasicBlock *ContextBB = ContextI->getParent();
 5396   const BasicBlock *PredBB = ContextBB->getSinglePredecessor();
 5402   BasicBlock *TrueBB, *FalseBB;
lib/Analysis/VectorUtils.cpp
  368 llvm::computeMinimumValueSizes(ArrayRef<BasicBlock *> Blocks, DemandedBits &DB,
  384   for (auto *BB : Blocks)
  816   for (BasicBlock *BB : make_range(DFS.beginRPO(), DFS.endRPO()))
 1025       BasicBlock *BlockA = A->getParent();  
 1026       BasicBlock *BlockB = B->getParent();  
lib/AsmParser/LLParser.cpp
 2843     if (isa<BasicBlock>(P.second.first))
 2851     if (isa<BasicBlock>(P.second.first))
 2900     FwdVal = BasicBlock::Create(F.getContext(), Name, &F);
 2934     FwdVal = BasicBlock::Create(F.getContext(), "", &F);
 3006 BasicBlock *LLParser::PerFunctionState::GetBB(const std::string &Name,
 3008   return dyn_cast_or_null<BasicBlock>(
 3012 BasicBlock *LLParser::PerFunctionState::GetBB(unsigned ID, LocTy Loc) {
 3013   return dyn_cast_or_null<BasicBlock>(
 3020 BasicBlock *LLParser::PerFunctionState::DefineBB(const std::string &Name,
 3022   BasicBlock *BB;
 3283     BasicBlock *BB;
 3295       BB = dyn_cast_or_null<BasicBlock>(
 5288 bool LLParser::ParseTypeAndBasicBlock(BasicBlock *&BB, LocTy &Loc,
 5293   if (!isa<BasicBlock>(V))
 5295   BB = cast<BasicBlock>(V);
 5559     BasicBlock *BB;
 5627   BasicBlock *BB = PFS.DefineBB(Name, NameID, NameLoc);
 5689 int LLParser::ParseInstruction(Instruction *&Inst, BasicBlock *BB,
 5893 bool LLParser::ParseRet(Instruction *&Inst, BasicBlock *BB,
 5927   BasicBlock *Op1, *Op2;
 5930   if (BasicBlock *BB = dyn_cast<BasicBlock>(Op0)) {
 5930   if (BasicBlock *BB = dyn_cast<BasicBlock>(Op0)) {
 5956   BasicBlock *DefaultBB;
 5968   SmallVector<std::pair<ConstantInt*, BasicBlock*>, 32> Table;
 5971     BasicBlock *DestBB;
 6010   SmallVector<BasicBlock*, 16> DestList;
 6013     BasicBlock *DestBB;
 6051   BasicBlock *NormalBB, *UnwindBB;
 6190   BasicBlock *UnwindBB = nullptr;
 6216   BasicBlock *BB;
 6243   SmallVector<BasicBlock *, 32> Table;
 6245     BasicBlock *DestBB;
 6258   BasicBlock *UnwindBB = nullptr;
 6269   for (BasicBlock *DestBB : Table)
 6361   BasicBlock *DefaultDest;
 6374   SmallVector<BasicBlock *, 16> IndirectDests;
 6377     BasicBlock *DestBB;
 6670   SmallVector<std::pair<Value*, BasicBlock*>, 16> PHIVals;
 6673     PHIVals.push_back(std::make_pair(Op0, cast<BasicBlock>(Op1)));
 7445   if (!isa<BasicBlock>(V))
lib/AsmParser/LLParser.h
  445       BasicBlock *GetBB(const std::string &Name, LocTy Loc);
  446       BasicBlock *GetBB(unsigned ID, LocTy Loc);
  451       BasicBlock *DefineBB(const std::string &Name, int NameID, LocTy Loc);
  482     bool ParseTypeAndBasicBlock(BasicBlock *&BB, LocTy &Loc,
  484     bool ParseTypeAndBasicBlock(BasicBlock *&BB, PerFunctionState &PFS) {
  561     int ParseInstruction(Instruction *&Inst, BasicBlock *BB,
  565     bool ParseRet(Instruction *&Inst, BasicBlock *BB, PerFunctionState &PFS);
lib/Bitcode/Reader/BitcodeReader.cpp
  518   std::vector<BasicBlock*> FunctionBBs;
  548   DenseMap<Function *, std::vector<BasicBlock *>> BasicBlockFwdRefs;
  638   BasicBlock *getBasicBlock(unsigned ID) const {
 2205       BasicBlock *BB = getBasicBlock(Record[0]);
 2792       BasicBlock *BB;
 2814           FwdBBs[BBID] = BasicBlock::Create(Context);
 3715   BasicBlock *CurBB = nullptr;
 3802           FunctionBBs[i] = BasicBlock::Create(Context, "", F);
 3816             FunctionBBs[I] = BasicBlock::Create(Context, "", F);
 4234       BasicBlock *TrueDest = getBasicBlock(Record[0]);
 4243         BasicBlock *FalseDest = getBasicBlock(Record[1]);
 4261       BasicBlock *UnwindDest = nullptr;
 4280       BasicBlock *BB = getBasicBlock(Record[Idx++]);
 4300       SmallVector<BasicBlock *, 2> Handlers;
 4302         BasicBlock *BB = getBasicBlock(Record[Idx++]);
 4308       BasicBlock *UnwindDest = nullptr;
 4320       for (BasicBlock *Handler : Handlers)
 4369         BasicBlock *Default = getBasicBlock(Record[3]);
 4410           BasicBlock *DestBB = getBasicBlock(Record[CurIdx++]);
 4425       BasicBlock *Default = getBasicBlock(Record[2]);
 4434         BasicBlock *DestBB = getBasicBlock(Record[1+3+i*2]);
 4455         if (BasicBlock *DestBB = getBasicBlock(Record[2+i])) {
 4473       BasicBlock *NormalBB = getBasicBlock(Record[OpNum++]);
 4474       BasicBlock *UnwindBB = getBasicBlock(Record[OpNum++]);
 4557       BasicBlock *DefaultDest = getBasicBlock(Record[OpNum++]);
 4559       SmallVector<BasicBlock *, 16> IndirectDests;
 4659         BasicBlock *BB = getBasicBlock(Record[i * 2 + 2]);
lib/Bitcode/Reader/MetadataLoader.cpp
  533     for (auto &BB : F)
lib/Bitcode/Writer/BitcodeWriter.cpp
 2169   for (const BasicBlock &BB : F)
 2824     for (const BasicBlock *CatchPadBB : CatchSwitch.handlers())
 3110     if (isa<BasicBlock>(Name.getValue())) {
 3136   if (isa<BasicBlock>(Order.V))
 3200     for (BasicBlock::const_iterator I = BB->begin(), E = BB->end();
lib/Bitcode/Writer/ValueEnumerator.cpp
   94         if (!isa<BasicBlock>(Op) && !isa<GlobalValue>(Op))
  153     for (const BasicBlock &BB : F)
  157     for (const BasicBlock &BB : F)
  163     for (const BasicBlock &BB : F)
  277     for (const BasicBlock &BB : F)
  281     for (const BasicBlock &BB : F)
  286     for (const BasicBlock &BB : F)
  401     for (const BasicBlock &BB : F)
  837         if (!isa<BasicBlock>(*I)) // Don't enumerate BB operand to BlockAddress.
  911     if (isa<BasicBlock>(Op))
  960   for (const BasicBlock &BB : F) {
  981   for (const BasicBlock &BB : F) {
 1021                                  DenseMap<const BasicBlock*, unsigned> &IDMap) {
 1023   for (const BasicBlock &BB : *F)
 1030 unsigned ValueEnumerator::getGlobalBasicBlockID(const BasicBlock *BB) const {
lib/Bitcode/Writer/ValueEnumerator.h
  119   mutable DenseMap<const BasicBlock*, unsigned> GlobalBasicBlockIDs;
  127   std::vector<const BasicBlock*> BasicBlocks;
  215   const std::vector<const BasicBlock*> &getBasicBlocks() const {
  231   unsigned getGlobalBasicBlockID(const BasicBlock *BB) const;
lib/CodeGen/Analysis.cpp
  514   const BasicBlock *ExitBB = I->getParent();
  535     for (BasicBlock::const_iterator BBI = std::prev(ExitBB->end(), 2);; --BBI) {
lib/CodeGen/AsmPrinter/AsmPrinter.cpp
 1166   for (const auto &BB : F) {
 2784 MCSymbol *AsmPrinter::GetBlockAddressSymbol(const BasicBlock *BB) const {
 2942     const BasicBlock *BB = MBB.getBasicBlock();
 2955     if (const BasicBlock *BB = MBB.getBasicBlock()) {
lib/CodeGen/AtomicExpandPass.cpp
  643   BasicBlock *BB = I->getParent();
  849   BasicBlock *BB = CI->getParent();
  856   BasicBlock *EndBB =
  859       BasicBlock::Create(Ctx, "partword.cmpxchg.failure", F, EndBB);
  860   auto LoopBB = BasicBlock::Create(Ctx, "partword.cmpxchg.loop", F, FailureBB);
 1007   BasicBlock *BB = Builder.GetInsertBlock();
 1022   BasicBlock *ExitBB =
 1024   BasicBlock *LoopBB =  BasicBlock::Create(Ctx, "atomicrmw.start", F, ExitBB);
 1024   BasicBlock *LoopBB =  BasicBlock::Create(Ctx, "atomicrmw.start", F, ExitBB);
 1095   BasicBlock *BB = CI->getParent();
 1167   BasicBlock *ExitBB = BB->splitBasicBlock(CI->getIterator(), "cmpxchg.end");
 1168   auto FailureBB = BasicBlock::Create(Ctx, "cmpxchg.failure", F, ExitBB);
 1169   auto NoStoreBB = BasicBlock::Create(Ctx, "cmpxchg.nostore", F, FailureBB);
 1170   auto SuccessBB = BasicBlock::Create(Ctx, "cmpxchg.success", F, NoStoreBB);
 1172       BasicBlock::Create(Ctx, "cmpxchg.releasedload", F, SuccessBB);
 1174       BasicBlock::Create(Ctx, "cmpxchg.trystore", F, ReleasedLoadBB);
 1176       BasicBlock::Create(Ctx, "cmpxchg.fencedstore", F, TryStoreBB);
 1177   auto StartBB = BasicBlock::Create(Ctx, "cmpxchg.start", F, ReleasingStoreBB);
 1211   BasicBlock *RetryBB = HasReleasedLoadBB ? ReleasedLoadBB : StartBB;
 1350   BasicBlock *BB = Builder.GetInsertBlock();
 1368   BasicBlock *ExitBB =
 1370   BasicBlock *LoopBB = BasicBlock::Create(Ctx, "atomicrmw.start", F, ExitBB);
 1370   BasicBlock *LoopBB = BasicBlock::Create(Ctx, "atomicrmw.start", F, ExitBB);
lib/CodeGen/BranchFolding.cpp
  821   const BasicBlock *BB = (SuccBB && MBB->succ_size() == 1) ?
lib/CodeGen/CodeGenPrepare.cpp
  257     BasicBlock::iterator CurInstIterator;
  327     void resetIteratorIfInvalidatedWhileCalling(BasicBlock *BB, F f) {
  353     BasicBlock *findDestBlockOfMergeableEmptyBlock(BasicBlock *BB);
  353     BasicBlock *findDestBlockOfMergeableEmptyBlock(BasicBlock *BB);
  354     bool canMergeBlocks(const BasicBlock *BB, const BasicBlock *DestBB) const;
  354     bool canMergeBlocks(const BasicBlock *BB, const BasicBlock *DestBB) const;
  355     void eliminateMostlyEmptyBlock(BasicBlock *BB);
  356     bool isMergingEmptyBlockProfitable(BasicBlock *BB, BasicBlock *DestBB,
  356     bool isMergingEmptyBlockProfitable(BasicBlock *BB, BasicBlock *DestBB,
  358     bool optimizeBlock(BasicBlock &BB, bool &ModifiedDT);
  372     bool dupRetToEnableTailCallOpts(BasicBlock *BB, bool &ModifiedDT);
  449     BasicBlock* BB = &*F.begin();
  453       BasicBlock* Next = BB->getNextNode();
  476       BasicBlock *BB = &*I++;
  508     SmallSetVector<BasicBlock*, 8> WorkList;
  509     for (BasicBlock &BB : F) {
  510       SmallVector<BasicBlock *, 2> Successors(succ_begin(&BB), succ_end(&BB));
  514       for (SmallVectorImpl<BasicBlock*>::iterator
  523       BasicBlock *BB = WorkList.pop_back_val();
  524       SmallVector<BasicBlock*, 2> Successors(succ_begin(BB), succ_end(BB));
  528       for (SmallVectorImpl<BasicBlock*>::iterator
  544     for (BasicBlock &BB : F)
  568   for (auto &Block : llvm::make_range(std::next(F.begin()), F.end()))
  572     auto *BB = cast_or_null<BasicBlock>(Block);
  572     auto *BB = cast_or_null<BasicBlock>(Block);
  577     BasicBlock *SinglePred = BB->getSinglePredecessor();
  595 BasicBlock *CodeGenPrepare::findDestBlockOfMergeableEmptyBlock(BasicBlock *BB) {
  595 BasicBlock *CodeGenPrepare::findDestBlockOfMergeableEmptyBlock(BasicBlock *BB) {
  603   BasicBlock::iterator BBI = BI->getIterator();
  616   BasicBlock *DestBB = BI->getSuccessor(0);
  631   SmallPtrSet<BasicBlock *, 16> Preheaders;
  636     if (BasicBlock *Preheader = L->getLoopPreheader())
  645   for (auto &Block : llvm::make_range(std::next(F.begin()), F.end()))
  649     BasicBlock *BB = cast_or_null<BasicBlock>(Block);
  649     BasicBlock *BB = cast_or_null<BasicBlock>(Block);
  652     BasicBlock *DestBB = findDestBlockOfMergeableEmptyBlock(BB);
  663 bool CodeGenPrepare::isMergingEmptyBlockProfitable(BasicBlock *BB,
  664                                                    BasicBlock *DestBB,
  693   BasicBlock *Pred = BB->getUniquePredecessor();
  716   SmallPtrSet<BasicBlock *, 16> SameIncomingValueBBs;
  722     BasicBlock *DestBBPred = *PI;
  754 bool CodeGenPrepare::canMergeBlocks(const BasicBlock *BB,
  755                                     const BasicBlock *DestBB) const {
  786   SmallPtrSet<const BasicBlock*, 16> BBPreds;
  797     BasicBlock *Pred = DestBBPN->getIncomingBlock(i);
  819 void CodeGenPrepare::eliminateMostlyEmptyBlock(BasicBlock *BB) {
  821   BasicBlock *DestBB = BI->getSuccessor(0);
  828   if (BasicBlock *SinglePred = DestBB->getSinglePredecessor()) {
 1073   BasicBlock *DefBB = CI->getParent();
 1076   DenseMap<BasicBlock*, CastInst*> InsertedCasts;
 1086     BasicBlock *UserBB = User->getParent();
 1112       BasicBlock::iterator InsertPt = UserBB->getFirstInsertionPt();
 1360   DenseMap<BasicBlock*, CmpInst*> InsertedCmps;
 1376     BasicBlock *UserBB = User->getParent();
 1377     BasicBlock *DefBB = Cmp->getParent();
 1386       BasicBlock::iterator InsertPt = UserBB->getFirstInsertionPt();
 1523                      DenseMap<BasicBlock *, BinaryOperator *> &InsertedShifts,
 1525   BasicBlock *UserBB = User->getParent();
 1526   DenseMap<BasicBlock *, CastInst *> InsertedTruncs;
 1557     BasicBlock *TruncUserBB = TruncUser->getParent();
 1566       BasicBlock::iterator InsertPt = TruncUserBB->getFirstInsertionPt();
 1578       BasicBlock::iterator TruncInsertPt = TruncUserBB->getFirstInsertionPt();
 1614   BasicBlock *DefBB = ShiftI->getParent();
 1617   DenseMap<BasicBlock *, BinaryOperator *> InsertedShifts;
 1636     BasicBlock *UserBB = User->getParent();
 1667       BasicBlock::iterator InsertPt = UserBB->getFirstInsertionPt();
 1736   BasicBlock *StartBlock = CountZeros->getParent();
 1737   BasicBlock *CallBlock = StartBlock->splitBasicBlock(CountZeros, "cond.false");
 1742   BasicBlock::iterator SplitPt = ++(BasicBlock::iterator(CountZeros));
 1743   BasicBlock *EndBlock = CallBlock->splitBasicBlock(SplitPt, "cond.end");
 1775   BasicBlock *BB = CI->getParent();
 1972 bool CodeGenPrepare::dupRetToEnableTailCallOpts(BasicBlock *BB, bool &ModifiedDT) {
 1999     BasicBlock::iterator BI = BB->begin();
 2005     BasicBlock::iterator BI = BB->begin();
 2014   SmallVector<BasicBlock*, 4> TailCallBBs;
 2020       BasicBlock *PredBB = PN->getIncomingBlock(I);
 2028     SmallPtrSet<BasicBlock*, 4> VisitedBBs;
 2033       BasicBlock::InstListType &InstList = (*PI)->getInstList();
 2034       BasicBlock::InstListType::reverse_iterator RI = InstList.rbegin();
 2035       BasicBlock::InstListType::reverse_iterator RE = InstList.rend();
 2293       BasicBlock *BB;
 2302       BasicBlock::iterator It = Inst->getIterator();
 4188           BasicBlock *Parent =
 4633 static bool IsNonLocalValue(Value *V, BasicBlock *BB) {
 5014     BasicBlock *BB = CurInstIterator->getParent();
 5339         BasicBlock::iterator NewBaseInsertPt;
 5340         BasicBlock *NewBaseInsertBB;
 5579   BasicBlock *DefBB = I->getParent();
 5601     BasicBlock *UserBB = UI->getParent();
 5612     BasicBlock *UserBB = UI->getParent();
 5621   DenseMap<BasicBlock*, Instruction*> InsertedTruncs;
 5628     BasicBlock *UserBB = User->getParent();
 5635       BasicBlock::iterator InsertPt = UserBB->getFirstInsertionPt();
 5941   for (BasicBlock::iterator It = ++BasicBlock::iterator(SI);
 6004   BasicBlock *StartBlock = SI->getParent();
 6005   BasicBlock::iterator SplitPt = ++(BasicBlock::iterator(LastSI));
 6006   BasicBlock *EndBlock = StartBlock->splitBasicBlock(SplitPt, "select.end");
 6013   BasicBlock *TrueBlock = nullptr;
 6014   BasicBlock *FalseBlock = nullptr;
 6023         TrueBlock = BasicBlock::Create(SI->getContext(), "select.true.sink",
 6033         FalseBlock = BasicBlock::Create(SI->getContext(), "select.false.sink",
 6049     FalseBlock = BasicBlock::Create(SI->getContext(), "select.false",
 6060   BasicBlock *TT, *FT;
 6117   BasicBlock *DefBB = SVI->getParent();
 6129   DenseMap<BasicBlock*, Instruction*> InsertedShuffles;
 6136     BasicBlock *UserBB = UI->getParent();
 6147       BasicBlock::iterator InsertPt = UserBB->getFirstInsertionPt();
 6179   BasicBlock *TargetBB = I->getParent();
 6604   BasicBlock *Parent = Inst->getParent();
 6825   BasicBlock *SrcBlock = GEPI->getParent();
 7087 bool CodeGenPrepare::optimizeBlock(BasicBlock &BB, bool &ModifiedDT) {
 7118   for (BasicBlock &BB : F) {
 7120     for (BasicBlock::iterator BI = BB.begin(), BE = BB.end(); BI != BE;) {
 7189   for (auto &BB : F) {
 7196     BasicBlock *TBB, *FBB;
 7223         BasicBlock::Create(BB.getContext(), BB.getName() + ".cond.split",
lib/CodeGen/DwarfEHPrepare.cpp
  171       BasicBlock *BB = RI->getParent();
  186   for (BasicBlock &BB : Fn) {
  221     BasicBlock *UnwindBB = RI->getParent();
  233   BasicBlock *UnwindBB = BasicBlock::Create(Ctx, "unwind_resume", &Fn);
  233   BasicBlock *UnwindBB = BasicBlock::Create(Ctx, "unwind_resume", &Fn);
  240     BasicBlock *Parent = RI->getParent();
lib/CodeGen/ExpandMemCmp.cpp
   54     BasicBlock *BB = nullptr;
   67   std::vector<BasicBlock *> LoadCmpBlocks;
   68   BasicBlock *EndBlock;
  249     BasicBlock *BB = BasicBlock::Create(CI->getContext(), "loadbb",
  249     BasicBlock *BB = BasicBlock::Create(CI->getContext(), "loadbb",
  256   ResBlock.BB = BasicBlock::Create(CI->getContext(), "res_block",
  408   BasicBlock *NextBB = (BlockIndex == (LoadCmpBlocks.size() - 1))
  479   BasicBlock *NextBB = (BlockIndex == (LoadCmpBlocks.size() - 1))
  503     BasicBlock::iterator InsertPt = ResBlock.BB->getFirstInsertionPt();
  511   BasicBlock::iterator InsertPt = ResBlock.BB->getFirstInsertionPt();
  613     BasicBlock *StartBlock = CI->getParent();
  816   bool runOnBlock(BasicBlock &BB, const TargetLibraryInfo *TLI,
  822     BasicBlock &BB, const TargetLibraryInfo *TLI,
lib/CodeGen/GCRootLowering.cpp
  145   BasicBlock::iterator IP = F.getEntryBlock().begin();
  196   for (BasicBlock &BB : F) 
  197     for (BasicBlock::iterator II = BB.begin(), E = BB.end(); II != E;) {
lib/CodeGen/GlobalISel/IRTranslator.cpp
  276 MachineBasicBlock &IRTranslator::getMBB(const BasicBlock &BB) {
  390     const BasicBlock &TrueTgt = *cast<BasicBlock>(BrInst.getSuccessor(Succ++));
  390     const BasicBlock &TrueTgt = *cast<BasicBlock>(BrInst.getSuccessor(Succ++));
  395   const BasicBlock &BrTgt = *cast<BasicBlock>(BrInst.getSuccessor(Succ));
  395   const BasicBlock &BrTgt = *cast<BasicBlock>(BrInst.getSuccessor(Succ));
  404   for (const BasicBlock *Succ : successors(&BrInst))
  424   const BasicBlock *SrcBB = Src->getBasicBlock();
  425   const BasicBlock *DstBB = Dst->getBasicBlock();
  845   for (const BasicBlock *Succ : successors(&BrInst))
 1674   const BasicBlock *ReturnBB = I.getSuccessor(0);
 1675   const BasicBlock *EHPadBB = I.getSuccessor(1);
 2201 static bool checkForMustTailInVarArgFn(bool IsVarArg, const BasicBlock &BB) {
 2278   for (const BasicBlock &BB: F) {
 2329     for (const BasicBlock *BB : RPOT) {
lib/CodeGen/GlobalMerge.cpp
  582     for (BasicBlock &BB : F) {
lib/CodeGen/HardwareLoops.cpp
  168     BasicBlock *BeginBB     = nullptr;
  244   BasicBlock *Preheader = L->getLoopPreheader();
  282   BasicBlock *Preheader = L->getLoopPreheader();
  286   BasicBlock *Pred = Preheader->getSinglePredecessor();
  340   BasicBlock *BB = L->getLoopPreheader();
  430   BasicBlock *Preheader = L->getLoopPreheader();
  431   BasicBlock *Header = L->getHeader();
  432   BasicBlock *Latch = ExitBranch->getParent();
lib/CodeGen/IndirectBrExpandPass.cpp
   90   SmallPtrSet<BasicBlock *, 4> IndirectBrSuccs;
   93   for (BasicBlock &BB : F)
  104       for (BasicBlock *SuccBB : IBr->successors())
  115   SmallVector<BasicBlock *, 4> BBs;
  117   for (BasicBlock &BB : F) {
  167   BasicBlock *SwitchBB;
  195     SwitchBB = BasicBlock::Create(F.getContext(), "switch_bb", &F);
lib/CodeGen/InterleavedLoadCombinePass.cpp
  657   BasicBlock *BB;
 1105   BasicBlock *BB = (*LIs.begin())->getParent();
 1106   BasicBlock::iterator FLI =
 1264     for (BasicBlock &BB : F) {
lib/CodeGen/MIRParser/MIParser.cpp
  372   DenseMap<unsigned, const BasicBlock *> Slots2BasicBlocks;
  450   bool parseIRBlock(BasicBlock *&BB, const Function &F);
  508   const BasicBlock *getIRBlock(unsigned Slot);
  509   const BasicBlock *getIRBlock(unsigned Slot, const Function &F);
  596   BasicBlock *BB = nullptr;
  630     BB = dyn_cast_or_null<BasicBlock>(
 2148 bool MIParser::parseIRBlock(BasicBlock *&BB, const Function &F) {
 2151     BB = dyn_cast_or_null<BasicBlock>(
 2190   BasicBlock *BB = nullptr;
 2961     DenseMap<unsigned, const BasicBlock *> &Slots2BasicBlocks) {
 2974 static const BasicBlock *getIRBlockFromSlot(
 2976     const DenseMap<unsigned, const BasicBlock *> &Slots2BasicBlocks) {
 2983 const BasicBlock *MIParser::getIRBlock(unsigned Slot) {
 2989 const BasicBlock *MIParser::getIRBlock(unsigned Slot, const Function &F) {
 2992   DenseMap<unsigned, const BasicBlock *> CustomSlots2BasicBlocks;
 3012   for (const auto &BB : F) {
lib/CodeGen/MIRParser/MIRParser.cpp
  265   BasicBlock *BB = BasicBlock::Create(Context, "entry", F);
  265   BasicBlock *BB = BasicBlock::Create(Context, "entry", F);
lib/CodeGen/MIRPrinter.cpp
  609   if (const auto *BB = MBB.getBasicBlock()) {
lib/CodeGen/MachineBasicBlock.cpp
   48 MachineBasicBlock::MachineBasicBlock(MachineFunction &MF, const BasicBlock *B)
  257   if (const BasicBlock *LBB = getBasicBlock())
  305   if (const auto *BB = getBasicBlock()) {
lib/CodeGen/MachineFunction.cpp
  387 MachineFunction::CreateMachineBasicBlock(const BasicBlock *bb) {
  541           if (const BasicBlock *BB = Node->getBasicBlock())
lib/CodeGen/MachineLoopInfo.cpp
   97     if (const BasicBlock *PHeadBB = PHeadMBB->getBasicBlock())
  104     if (const BasicBlock *HeadBB = HeadMBB->getBasicBlock())
lib/CodeGen/MachineModuleInfo.cpp
   51   void setPtr(BasicBlock *BB) {
   71   DenseMap<AssertingVH<BasicBlock>, AddrLabelSymEntry> AddrLabelSymbols;
   91   ArrayRef<MCSymbol *> getAddrLabelSymbolToEmit(BasicBlock *BB);
   96   void UpdateForDeletedBlock(BasicBlock *BB);
   97   void UpdateForRAUWBlock(BasicBlock *Old, BasicBlock *New);
   97   void UpdateForRAUWBlock(BasicBlock *Old, BasicBlock *New);
  102 ArrayRef<MCSymbol *> MMIAddrLabelMap::getAddrLabelSymbolToEmit(BasicBlock *BB) {
  137 void MMIAddrLabelMap::UpdateForDeletedBlock(BasicBlock *BB) {
  161 void MMIAddrLabelMap::UpdateForRAUWBlock(BasicBlock *Old, BasicBlock *New) {
  161 void MMIAddrLabelMap::UpdateForRAUWBlock(BasicBlock *Old, BasicBlock *New) {
  184   Map->UpdateForDeletedBlock(cast<BasicBlock>(getValPtr()));
  188   Map->UpdateForRAUWBlock(cast<BasicBlock>(getValPtr()), cast<BasicBlock>(V2));
  188   Map->UpdateForRAUWBlock(cast<BasicBlock>(getValPtr()), cast<BasicBlock>(V2));
  236 MachineModuleInfo::getAddrLabelSymbolToEmit(const BasicBlock *BB) {
lib/CodeGen/MachineOperand.cpp
  438 static void printIRBlockReference(raw_ostream &OS, const BasicBlock &BB,
lib/CodeGen/MachineOutliner.cpp
 1125   BasicBlock *EntryBB = BasicBlock::Create(C, "entry", F);
 1125   BasicBlock *EntryBB = BasicBlock::Create(C, "entry", F);
lib/CodeGen/MachinePipeliner.cpp
  267   const BasicBlock *BBLK = LBLK->getBasicBlock();
lib/CodeGen/MachineVerifier.cpp
  662   const BasicBlock *BB = MBB->getBasicBlock();
lib/CodeGen/SafeStackColoring.cpp
   68   DenseMap<BasicBlock *, SmallDenseMap<Instruction *, Marker>> BBMarkerSet;
  105   for (BasicBlock *BB : depth_first(&F)) {
  166     for (BasicBlock *BB : depth_first(&F)) {
  171       for (auto *PredBB : predecessors(BB)) {
  207     BasicBlock *BB = IT.getFirst();
  264     BasicBlock *BB = IT.getFirst();
lib/CodeGen/SafeStackColoring.h
   75   using LivenessMap = DenseMap<BasicBlock *, BlockLifetimeInfo>;
   86   DenseMap<const BasicBlock *, std::pair<unsigned, unsigned>> BlockInstRange;
  106   DenseMap<BasicBlock *, SmallVector<std::pair<unsigned, Marker>, 4>> BBMarkers;
lib/CodeGen/ScalarizeMaskedMemIntrin.cpp
   64   bool optimizeBlock(BasicBlock &BB, bool &ModifiedDT);
  139   BasicBlock *IfBlock = CI->getParent();
  207     BasicBlock *CondBlock = IfBlock->splitBasicBlock(InsertPt->getIterator(),
  216     BasicBlock *NewIfBlock =
  222     BasicBlock *PrevIfBlock = IfBlock;
  277   BasicBlock *IfBlock = CI->getParent();
  338     BasicBlock *CondBlock =
  347     BasicBlock *NewIfBlock =
  400   BasicBlock *IfBlock = CI->getParent();
  457     BasicBlock *CondBlock = IfBlock->splitBasicBlock(InsertPt, "cond.load");
  467     BasicBlock *NewIfBlock = CondBlock->splitBasicBlock(InsertPt, "else");
  472     BasicBlock *PrevIfBlock = IfBlock;
  527   BasicBlock *IfBlock = CI->getParent();
  578     BasicBlock *CondBlock = IfBlock->splitBasicBlock(InsertPt, "cond.store");
  586     BasicBlock *NewIfBlock = CondBlock->splitBasicBlock(InsertPt, "else");
  609   BasicBlock *IfBlock = CI->getParent();
  668     BasicBlock *CondBlock = IfBlock->splitBasicBlock(InsertPt->getIterator(),
  681     BasicBlock *NewIfBlock =
  687     BasicBlock *PrevIfBlock = IfBlock;
  720   BasicBlock *IfBlock = CI->getParent();
  774     BasicBlock *CondBlock =
  787     BasicBlock *NewIfBlock =
  793     BasicBlock *PrevIfBlock = IfBlock;
  818       BasicBlock *BB = &*I++;
  833 bool ScalarizeMaskedMemIntrin::optimizeBlock(BasicBlock &BB, bool &ModifiedDT) {
  836   BasicBlock::iterator CurInstIterator = BB.begin();
lib/CodeGen/SelectionDAG/FastISel.cpp
 1689 void FastISel::finishCondBranch(const BasicBlock *BranchBB,
 1845       const BasicBlock *LLVMSucc = BI->getSuccessor(0);
 2251 bool FastISel::handlePHINodesInSuccessorBlocks(const BasicBlock *LLVMBB) {
 2260     const BasicBlock *SuccBB = TI->getSuccessor(succ);
lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp
   51   const BasicBlock *BB = I->getParent();
  133   for (const BasicBlock &BB : *Fn) {
  230   for (const BasicBlock &BB : *Fn) {
  300           H.Handler = MBBMap[H.Handler.get<const BasicBlock *>()];
  305         UME.Cleanup = MBBMap[UME.Cleanup.get<const BasicBlock *>()];
  307       const auto *BB = UME.Handler.get<const BasicBlock *>();
  307       const auto *BB = UME.Handler.get<const BasicBlock *>();
  311       const auto *BB = CME.Handler.get<const BasicBlock *>();
  311       const auto *BB = CME.Handler.get<const BasicBlock *>();
  321       const auto *Src = KV.first.get<const BasicBlock *>();
  321       const auto *Src = KV.first.get<const BasicBlock *>();
  322       const auto *Dst = KV.second.get<const BasicBlock *>();
  322       const auto *Dst = KV.second.get<const BasicBlock *>();
lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
 1618   const BasicBlock *SuccessorColor;
 1650     FunctionLoweringInfo &FuncInfo, const BasicBlock *EHPadBB,
 1664       for (const BasicBlock *CatchPadBB : CatchSwitch->handlers()) {
 1684     FunctionLoweringInfo &FuncInfo, const BasicBlock *EHPadBB,
 1704     BasicBlock *NewEHPadBB = nullptr;
 1718       for (const BasicBlock *CatchPadBB : CatchSwitch->handlers()) {
 1958                                                      const BasicBlock *FromBB) {
 1989   const BasicBlock *SrcBB = Src->getBasicBlock();
 1990   const BasicBlock *DstBB = Dst->getBasicBlock();
 2012 static bool InBlock(const Value *V, const BasicBlock *BB) {
 2030   const BasicBlock *BB = CurBB->getBasicBlock();
 2745   const BasicBlock *EHPadBB = I.getSuccessor(1);
 2924   SmallSet<BasicBlock*, 32> Done;
 2926     BasicBlock *BB = I.getSuccessor(i);
 2947     const BasicBlock &BB = *I.getParent();
 2949       BasicBlock::const_iterator PredI =
 7025                                     const BasicBlock *EHPadBB) {
 7098                                       const BasicBlock *EHPadBB) {
 7758     if (isa<BasicBlock>(CallOperandVal))
 8076       } else if (const auto *BB = dyn_cast<BasicBlock>(OpInfo.CallOperandVal)) {
 8076       } else if (const auto *BB = dyn_cast<BasicBlock>(OpInfo.CallOperandVal)) {
 8750                                           const BasicBlock *EHPadBB) {
 9403   const BasicBlock &Entry = A->getParent()->front();
 9927 SelectionDAGBuilder::HandlePHINodesInSuccessorBlocks(const BasicBlock *LLVMBB) {
 9935     const BasicBlock *SuccBB = TI->getSuccessor(succ);
10005 AddSuccessorMBB(const BasicBlock *BB,
lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h
  299     void initialize(const BasicBlock *BB, MachineBasicBlock *MBB,
  364     MachineBasicBlock *AddSuccessorMBB(const BasicBlock *BB,
  537   bool isExportableFromCurrentBlock(const Value *V, const BasicBlock *FromBB);
  541                    const BasicBlock *EHPadBB = nullptr);
  555                  const BasicBlock *EHPadBB = nullptr);
  600     const BasicBlock *EHPadBB = nullptr;
  611                        const BasicBlock *EHPadBB = nullptr);
  614                                     const BasicBlock *EHPadBB);
  620                                         const BasicBlock *EHPadBB,
  757                        const BasicBlock *EHPadBB = nullptr);
  775   void HandlePHINodesInSuccessorBlocks(const BasicBlock *LLVMBB);
lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
  357   for (BasicBlock &BB : Fn) {
  366     for (BasicBlock::iterator I = BB.begin(); (PN = dyn_cast<PHINode>(I)); ++I)
  374         BasicBlock *Pred = PN->getIncomingBlock(i);
  482     for (const BasicBlock &BB : Fn) {
  714 void SelectionDAGISel::SelectBasicBlock(BasicBlock::const_iterator Begin,
  715                                         BasicBlock::const_iterator End,
  722   for (BasicBlock::const_iterator I = Begin; I != End && !SDB->HasTailCall; ++I) {
 1229   const BasicBlock *LLVMBB = MBB->getBasicBlock();
 1296   for (const BasicBlock &BB : *FuncInfo->Fn) {
 1400   for (const BasicBlock *LLVMBB : RPOT) {
 1422     BasicBlock::const_iterator const Begin =
 1424     BasicBlock::const_iterator const End = LLVMBB->end();
 1425     BasicBlock::const_iterator BI = End;
lib/CodeGen/SelectionDAG/StatepointLowering.cpp
  833                                      const BasicBlock *EHPadBB /*= nullptr*/) {
  926     const CallBase *Call, SDValue Callee, const BasicBlock *EHPadBB,
  959     const CallBase *Call, SDValue Callee, const BasicBlock *EHPadBB) {
lib/CodeGen/SelectionDAG/TargetLowering.cpp
 4543     if (isa<BasicBlock>(v) || isa<ConstantInt>(v) || isa<Function>(v)) {
lib/CodeGen/ShadowStackGCLowering.cpp
  237     for (BasicBlock::iterator II = BB->begin(), E = BB->end(); II != E;)
  304   BasicBlock::iterator IP = F.getEntryBlock().begin();
lib/CodeGen/SjLjEHPrepare.cpp
  121 static void MarkBlocksLiveIn(BasicBlock *BB,
  122                              SmallPtrSetImpl<BasicBlock *> &LiveBBs) {
  126   df_iterator_default_set<BasicBlock*> Visited;
  128   for (BasicBlock *B : inverse_depth_first_ext(BB, Visited))
  172   BasicBlock *EntryBB = &F.front();
  229   BasicBlock::iterator AfterAllocaInsPt = F.begin()->begin();
  262   for (BasicBlock &BB : F) {
  289       SmallPtrSet<BasicBlock *, 32> LiveBBs;
  309         BasicBlock *UnwindBlock = Invoke->getUnwindDest();
  331     BasicBlock *UnwindBlock = Invoke->getUnwindDest();
  336     for (BasicBlock::iterator PN = UnwindBlock->begin(); isa<PHINode>(PN); ++PN)
  359   for (BasicBlock &BB : F)
  385   BasicBlock *EntryBB = &F.front();
  432   for (BasicBlock &BB : F) {
  447   for (BasicBlock &BB : F) {
lib/CodeGen/StackProtector.cpp
  224   for (const BasicBlock &BB : F)
  275   for (const BasicBlock &BB : *F) {
  412     BasicBlock *BB = &*I++;
  482       BasicBlock *FailBB = CreateFailBB();
  485       BasicBlock *NewBB = BB->splitBasicBlock(RI->getIterator(), "SP_return");
  523 BasicBlock *StackProtector::CreateFailBB() {
  525   BasicBlock *FailBB = BasicBlock::Create(Context, "CallStackCheckFailBlk", F);
  525   BasicBlock *FailBB = BasicBlock::Create(Context, "CallStackCheckFailBlk", F);
  544 bool StackProtector::shouldEmitSDCheck(const BasicBlock &BB) const {
lib/CodeGen/SwiftErrorValueTracking.cpp
  107   for (const auto &LLVMBB : *Fn)
  260     MachineBasicBlock *MBB, BasicBlock::const_iterator Begin,
  261     BasicBlock::const_iterator End) {
lib/CodeGen/WasmEHPrepare.cpp
  119   void prepareEHPad(BasicBlock *BB, bool NeedLSDA, unsigned Index = 0);
  120   void prepareTerminateCleanupPad(BasicBlock *BB);
  155   SmallVector<BasicBlock *, 8> WL(BBs.begin(), BBs.end());
  157     auto *BB = WL.pop_back_val();
  189     auto *BB = ThrowI->getParent();
  190     SmallVector<BasicBlock *, 4> Succs(succ_begin(BB), succ_end(BB));
  205   SmallVector<BasicBlock *, 16> CatchPads;
  206   SmallVector<BasicBlock *, 16> CleanupPads;
  207   for (BasicBlock &BB : F) {
  255   for (auto *BB : CatchPads) {
  266   for (auto *BB : CleanupPads)
  274 void WasmEHPrepare::prepareEHPad(BasicBlock *BB, bool NeedLSDA,
  355   for (const auto &BB : *F) {
  361       const auto *UnwindBB = CatchPad->getCatchSwitch()->getUnwindDest();
lib/CodeGen/WinEHPrepare.cpp
   76   insertPHIStore(BasicBlock *PredBlock, Value *PredVal, AllocaInst *SpillSlot,
   77                  SmallVectorImpl<std::pair<BasicBlock *, Value *>> &Worklist);
   80                           DenseMap<BasicBlock *, Value *> &Loads, Function &F);
   96   DenseMap<BasicBlock *, ColorVector> BlockColors;
   97   MapVector<BasicBlock *, std::vector<BasicBlock *>> FuncletBlocks;
   97   MapVector<BasicBlock *, std::vector<BasicBlock *>> FuncletBlocks;
  130                              const BasicBlock *BB) {
  165 static BasicBlock *getCleanupRetUnwindDest(const CleanupPadInst *CleanupPad) {
  175   DenseMap<BasicBlock *, ColorVector> BlockColors = colorEHFunclets(*F);
  176   for (BasicBlock &BB : *F) {
  183     BasicBlock *FuncletEntryBB = BBColors.front();
  185     BasicBlock *FuncletUnwindDest;
  198     BasicBlock *InvokeUnwindDest = II->getUnwindDest();
  218 static const BasicBlock *getEHPadFromPredecessor(const BasicBlock *BB,
  218 static const BasicBlock *getEHPadFromPredecessor(const BasicBlock *BB,
  238   const BasicBlock *BB = FirstNonPHI->getParent();
  246     for (const BasicBlock *CatchPadBB : CatchSwitch->handlers()) {
  252     for (const BasicBlock *PredBlock : predecessors(BB))
  266           BasicBlock *UnwindDest = InnerCatchSwitch->getUnwindDest();
  271           BasicBlock *UnwindDest = getCleanupRetUnwindDest(InnerCleanupPad);
  299     for (const BasicBlock *PredBlock : predecessors(BB)) {
  316                         const Function *Filter, const BasicBlock *Handler) {
  327                          const BasicBlock *Handler) {
  340   const BasicBlock *BB = FirstNonPHI->getParent();
  353     const BasicBlock *CatchPadBB = CatchPad->getParent();
  365     for (const BasicBlock *PredBlock : predecessors(BB))
  376         BasicBlock *UnwindDest = InnerCatchSwitch->getUnwindDest();
  381         BasicBlock *UnwindDest = getCleanupRetUnwindDest(InnerCleanupPad);
  401     for (const BasicBlock *PredBlock : predecessors(BB))
  433   for (const BasicBlock &BB : *Fn) {
  451   for (const BasicBlock &BB : *Fn) {
  465                            uint32_t TypeToken, const BasicBlock *Handler) {
  507   for (const BasicBlock &BB : *Fn) {
  551       SmallVector<const BasicBlock *, 4> CatchBlocks(CatchSwitch->handlers());
  554         const BasicBlock *CatchBlock = *CBI;
  584         Entry->Handler.get<const BasicBlock *>()->getFirstNonPHI();
  587     const BasicBlock *UnwindDest;
  610         const BasicBlock *UserUnwindDest = nullptr;
  621                                  .Handler.get<const BasicBlock *>();
  682   for (BasicBlock &BB : F) {
  684     for (BasicBlock *Color : Colors)
  694     BasicBlock *BB = &*FI++;
  700     for (BasicBlock::iterator BI = BB->begin(), BE = BB->end(); BI != BE;) {
  727     BasicBlock *FuncletPadBB = Funclets.first;
  728     std::vector<BasicBlock *> &BlocksInFunclet = Funclets.second;
  735     std::vector<std::pair<BasicBlock *, BasicBlock *>> Orig2Clone;
  735     std::vector<std::pair<BasicBlock *, BasicBlock *>> Orig2Clone;
  737     for (BasicBlock *BB : BlocksInFunclet) {
  750       BasicBlock *CBB =
  770       BasicBlock *OldBlock = BBMapping.first;
  771       BasicBlock *NewBlock = BBMapping.second;
  799     for (BasicBlock *BB : BlocksInFunclet)
  809       BasicBlock *OldBlock = BBMapping.first;
  810       BasicBlock *NewBlock = BBMapping.second;
  813       for (BasicBlock *Pred : predecessors(OldBlock))
  826         BasicBlock *IncomingBlock = PN->getIncomingBlock(PredIdx);
  852       BasicBlock *OldBlock = BBMapping.first;
  853       BasicBlock *NewBlock = BBMapping.second;
  865       BasicBlock *OldBlock = BBMapping.first;
  866       BasicBlock *NewBlock = BBMapping.second;
  867       for (BasicBlock *SuccBB : successors(NewBlock)) {
  904         BasicBlock *UserBB = UserI->getParent();
  934     BasicBlock *FuncletPadBB = Funclet.first;
  935     std::vector<BasicBlock *> &BlocksInFunclet = Funclet.second;
  941     for (BasicBlock *BB : BlocksInFunclet) {
  966           BasicBlock::iterator CallI =
 1009     BasicBlock *BB = &*FI++;
 1022   for (BasicBlock &BB : F) {
 1072   BasicBlock *PHIBlock = PN->getParent();
 1091   DenseMap<BasicBlock *, Value *> Loads;
 1114   SmallVector<std::pair<BasicBlock *, Value *>, 4> Worklist;
 1119     BasicBlock *EHBlock;
 1140       for (BasicBlock *PredBlock : predecessors(EHBlock)) {
 1148     BasicBlock *PredBlock, Value *PredVal, AllocaInst *SpillSlot,
 1149     SmallVectorImpl<std::pair<BasicBlock *, Value *>> &Worklist) {
 1162                                       DenseMap<BasicBlock *, Value *> &Loads,
 1181     BasicBlock *IncomingBlock = UsingPHI->getIncomingBlock(U);
 1187       BasicBlock *PHIBlock = UsingInst->getParent();
 1188       BasicBlock *NewBlock = SplitEdge(IncomingBlock, PHIBlock);
 1217       for (BasicBlock *FuncletPad : ColorsForPHIBlock)
lib/ExecutionEngine/Interpreter/Execution.cpp
  936   BasicBlock *Dest;
  954   BasicBlock *Dest = nullptr;
  958       Dest = cast<BasicBlock>(Case.getCaseSuccessor());
  983 void Interpreter::SwitchToNewBasicBlock(BasicBlock *Dest, ExecutionContext &SF){
  984   BasicBlock *PrevBB = SF.CurBB;      // Remember where we came from...
 1141       BasicBlock::iterator me(CS.getInstruction());
 1142       BasicBlock *Parent = CS.getInstruction()->getParent();
lib/ExecutionEngine/Interpreter/Interpreter.h
   62   BasicBlock           *CurBB;      // The currently executing BB
   63   BasicBlock::iterator  CurInst;    // The next instruction to execute
  195   void SwitchToNewBasicBlock(BasicBlock *Dest, ExecutionContext &SF);
lib/ExecutionEngine/Orc/IndirectionUtils.cpp
  241   BasicBlock *EntryBlock = BasicBlock::Create(M.getContext(), "entry", &F);
  241   BasicBlock *EntryBlock = BasicBlock::Create(M.getContext(), "entry", &F);
lib/ExecutionEngine/Orc/SpeculateAnalyses.cpp
   26 SmallVector<const BasicBlock *, 8> findBBwithCalls(const Function &F,
   28   SmallVector<const BasicBlock *, 8> BBs;
   52 void SpeculateQuery::findCalles(const BasicBlock *BB,
   91   SmallVector<std::pair<const BasicBlock *, uint64_t>, 8> BBFreqs;
  149 void SequenceBBQuery::traverseToEntryBlock(const BasicBlock *AtBB,
  176   DenseSet<const BasicBlock *> PredSkipNodes;
  192 void SequenceBBQuery::traverseToExitBlock(const BasicBlock *AtBB,
  217   DenseSet<const BasicBlock *> SuccSkipNodes;
  257   ArrayRef<std::pair<const BasicBlock *, uint64_t>> HotBlocksRef(BBFreqs);
lib/ExecutionEngine/Orc/Speculation.cpp
  102           BasicBlock &ProgramEntry = Fn.getEntryBlock();
  104           BasicBlock *SpeculateBlock = BasicBlock::Create(
  104           BasicBlock *SpeculateBlock = BasicBlock::Create(
  106           BasicBlock *SpeculateDecisionBlock = BasicBlock::Create(
  106           BasicBlock *SpeculateDecisionBlock = BasicBlock::Create(
lib/FuzzMutate/IRMutator.cpp
   31   BasicBlock *BB = BasicBlock::Create(Context, "BB", F);
   31   BasicBlock *BB = BasicBlock::Create(Context, "BB", F);
   50 void IRMutationStrategy::mutate(BasicBlock &BB, RandomIRBuilder &IB) {
  106 void InjectorIRStrategy::mutate(BasicBlock &BB, RandomIRBuilder &IB) {
  187   BasicBlock *BB = Inst.getParent();
lib/FuzzMutate/Operations.cpp
  142     BasicBlock *Block = Inst->getParent();
  143     BasicBlock *Next = Block->splitBasicBlock(Inst, "BB");
lib/FuzzMutate/RandomIRBuilder.cpp
   21 Value *RandomIRBuilder::findOrCreateSource(BasicBlock &BB,
   26 Value *RandomIRBuilder::findOrCreateSource(BasicBlock &BB,
   41 Value *RandomIRBuilder::newSource(BasicBlock &BB, ArrayRef<Instruction *> Insts,
   95 void RandomIRBuilder::connectToSink(BasicBlock &BB,
  120 void RandomIRBuilder::newSink(BasicBlock &BB, ArrayRef<Instruction *> Insts,
  133 Value *RandomIRBuilder::findPointer(BasicBlock &BB,
lib/IR/AsmWriter.cpp
  126         if (!isa<BasicBlock>(Op) && !isa<GlobalValue>(Op))
  167     for (const BasicBlock &BB : F) {
  197       !isa<GlobalVariable>(V) && !isa<Function>(V) && !isa<BasicBlock>(V);
  281     for (const BasicBlock &BB : F)
  285     for (const BasicBlock &BB : F)
  290     for (const BasicBlock &BB : F)
  322   if (const BasicBlock *BB = dyn_cast<BasicBlock>(V))
  322   if (const BasicBlock *BB = dyn_cast<BasicBlock>(V))
  872   if (const BasicBlock *BB = dyn_cast<BasicBlock>(V))
  872   if (const BasicBlock *BB = dyn_cast<BasicBlock>(V))
 2407   void printBasicBlock(const BasicBlock *BB);
 3532     for (const BasicBlock &BB : *F)
 3566 void AssemblyWriter::printBasicBlock(const BasicBlock *BB) {
 3800     for (const BasicBlock *PadBB : CatchSwitch->handlers()) {
 3807     if (const BasicBlock *UnwindDest = CatchSwitch->getUnwindDest())
 4149   if (const BasicBlock *BB =
 4150           IsInFunction ? nullptr : dyn_cast<BasicBlock>(Order.V)) {
 4306   } else if (const BasicBlock *BB = dyn_cast<BasicBlock>(this)) {
 4306   } else if (const BasicBlock *BB = dyn_cast<BasicBlock>(this)) {
lib/IR/BasicBlock.cpp
   41                        BasicBlock *InsertBefore)
   53 void BasicBlock::insertInto(Function *NewParent, BasicBlock *InsertBefore) {
   92 iterator_range<filter_iterator<BasicBlock::const_iterator,
  101 iterator_range<filter_iterator<BasicBlock::iterator,
  110 filter_iterator<BasicBlock::const_iterator,
  121 iplist<BasicBlock>::iterator BasicBlock::eraseFromParent() {
  127 void BasicBlock::moveBefore(BasicBlock *MovePos) {
  134 void BasicBlock::moveAfter(BasicBlock *MovePos) {
  223 BasicBlock::const_iterator BasicBlock::getFirstInsertionPt() const {
  240 const BasicBlock *BasicBlock::getSinglePredecessor() const {
  243   const BasicBlock *ThePred = *PI;
  253 const BasicBlock *BasicBlock::getUniquePredecessor() const {
  256   const BasicBlock *PredBB = *PI;
  275 const BasicBlock *BasicBlock::getSingleSuccessor() const {
  278   const BasicBlock *TheSucc = *SI;
  283 const BasicBlock *BasicBlock::getUniqueSuccessor() const {
  286   const BasicBlock *SuccBB = *SI;
  297 iterator_range<BasicBlock::phi_iterator> BasicBlock::phis() {
  308 void BasicBlock::removePredecessor(BasicBlock *Pred,
  333     BasicBlock *Other = APN->getIncomingBlock(APN->getIncomingBlock(0) == Pred);
  414 BasicBlock *BasicBlock::splitBasicBlock(iterator I, const Twine &BBName) {
  419   BasicBlock *New = BasicBlock::Create(getContext(), BBName, getParent(),
  419   BasicBlock *New = BasicBlock::Create(getContext(), BBName, getParent(),
  441 void BasicBlock::replacePhiUsesWith(BasicBlock *Old, BasicBlock *New) {
  441 void BasicBlock::replacePhiUsesWith(BasicBlock *Old, BasicBlock *New) {
  452 void BasicBlock::replaceSuccessorsPhiUsesWith(BasicBlock *Old,
  453                                               BasicBlock *New) {
  464 void BasicBlock::replaceSuccessorsPhiUsesWith(BasicBlock *New) {
  492 BasicBlock::iterator llvm::skipDebugIntrinsics(BasicBlock::iterator It) {
lib/IR/Constants.cpp
 1460 BlockAddress *BlockAddress::get(BasicBlock *BB) {
 1465 BlockAddress *BlockAddress::get(Function *F, BasicBlock *BB) {
 1475 BlockAddress::BlockAddress(Function *F, BasicBlock *BB)
 1483 BlockAddress *BlockAddress::lookup(const BasicBlock *BB) {
 1506   BasicBlock *NewBB = getBasicBlock();
 1512     NewBB = cast<BasicBlock>(To);
lib/IR/Core.cpp
 2567   return isa<BasicBlock>(unwrap(Val));
 2571   return wrap(unwrap<BasicBlock>(Val));
 2592   for (BasicBlock &BB : *Fn)
 2617   BasicBlock *Block = unwrap(BB);
 2625   BasicBlock *Block = unwrap(BB);
 2634   return wrap(llvm::BasicBlock::Create(*unwrap(C), Name));
 2639   BasicBlock *ToInsert = unwrap(BB);
 2640   BasicBlock *CurBB = unwrap(Builder)->GetInsertBlock();
 2654   return wrap(BasicBlock::Create(*unwrap(C), Name, unwrap<Function>(FnRef)));
 2664   BasicBlock *BB = unwrap(BBRef);
 2665   return wrap(BasicBlock::Create(*unwrap(C), Name, BB->getParent(), BB));
 2696   BasicBlock *Block = unwrap(BB);
 2697   BasicBlock::iterator I = Block->begin();
 2704   BasicBlock *Block = unwrap(BB);
 2705   BasicBlock::iterator I = Block->end();
 2713   BasicBlock::iterator I(Instr);
 2721   BasicBlock::iterator I(Instr);
 2997   BasicBlock *BB = unwrap(Block);
 3008   BasicBlock *BB = unwrap(Block);
lib/IR/DIBuilder.cpp
  858                                       BasicBlock *InsertAtEnd) {
  873                                     BasicBlock *InsertAtEnd) {
  891                                                 BasicBlock *InsertAtEnd) {
  898                                          BasicBlock *InsertBB,
  921                                       BasicBlock *InsertBB, Instruction *InsertBefore) {
  942     const DILocation *DL, BasicBlock *InsertBB, Instruction *InsertBefore) {
  964     BasicBlock *InsertBB, Instruction *InsertBefore) {
lib/IR/DebugInfo.cpp
   70     for (const BasicBlock &BB : F)
  321   for (BasicBlock &BB : F) {
  638     for (auto &BB : F) {
lib/IR/DiagnosticInfo.cpp
  237           *cast<BasicBlock>(CodeRegion)->getParent(), Loc, CodeRegion) {}
  248 static const BasicBlock &getFirstFunctionBlock(const Function *Func) {
  271           *cast<BasicBlock>(CodeRegion)->getParent(), Loc, CodeRegion) {}
  292           *cast<BasicBlock>(CodeRegion)->getParent(), Loc, CodeRegion) {}
  306                                    *cast<BasicBlock>(CodeRegion)->getParent(),
  325           *cast<BasicBlock>(CodeRegion)->getParent(), Loc, CodeRegion) {}
lib/IR/Dominators.cpp
  117   const BasicBlock *UseBB = User->getParent();
  118   const BasicBlock *DefBB = Def->getParent();
  143   BasicBlock::const_iterator I = DefBB->begin();
  153                               const BasicBlock *UseBB) const {
  154   const BasicBlock *DefBB = Def->getParent();
  170     BasicBlock *NormalDest = II->getNormalDest();
  179                               const BasicBlock *UseBB) const {
  182   const BasicBlock *Start = BBE.getStart();
  183   const BasicBlock *End = BBE.getEnd();
  215     const BasicBlock *BB = *PI;
  240   const BasicBlock *UseBB;
  250   const BasicBlock *DefBB = Def->getParent();
  255   const BasicBlock *UseBB;
  275     BasicBlock *NormalDest = II->getNormalDest();
  292   BasicBlock::const_iterator I = DefBB->begin();
lib/IR/Function.cpp
  211   for (const BasicBlock &BB : BasicBlocks)
  362   for (BasicBlock &BB : *this)
lib/IR/IRBuilder.cpp
   86 static InvokeInst *createInvokeHelper(Function *Invokee, BasicBlock *NormalDest,
   87                                       BasicBlock *UnwindDest,
  654     Value *ActualInvokee, BasicBlock *NormalDest, BasicBlock *UnwindDest,
  654     Value *ActualInvokee, BasicBlock *NormalDest, BasicBlock *UnwindDest,
  676     BasicBlock *NormalDest, BasicBlock *UnwindDest,
  676     BasicBlock *NormalDest, BasicBlock *UnwindDest,
  687     BasicBlock *NormalDest, BasicBlock *UnwindDest, uint32_t Flags,
  687     BasicBlock *NormalDest, BasicBlock *UnwindDest, uint32_t Flags,
  697     BasicBlock *NormalDest, BasicBlock *UnwindDest, ArrayRef<Use> InvokeArgs,
  697     BasicBlock *NormalDest, BasicBlock *UnwindDest, ArrayRef<Use> InvokeArgs,
lib/IR/IRPrintingPasses.cpp
  122   bool runOnBasicBlock(BasicBlock &BB) override {
lib/IR/Instruction.cpp
   29     BasicBlock *BB = InsertBefore->getParent();
   36                          BasicBlock *InsertAtEnd)
   51 void Instruction::setParent(BasicBlock *P) {
   94 void Instruction::moveBefore(BasicBlock &BB,
  495 bool Instruction::isUsedOutsideOfBlock(const BasicBlock *BB) const {
  656 BasicBlock *Instruction::getSuccessor(unsigned idx) const {
  668 void Instruction::setSuccessor(unsigned idx, BasicBlock *B) {
  680 void Instruction::replaceSuccessorWith(BasicBlock *OldBB, BasicBlock *NewBB) {
  680 void Instruction::replaceSuccessorWith(BasicBlock *OldBB, BasicBlock *NewBB) {
lib/IR/Instructions.cpp
  200                                const Twine &NameStr, BasicBlock *InsertAtEnd)
  226                                        BasicBlock *InsertAtEnd) {
  430                    BasicBlock *InsertAtEnd)
  523                                  BasicBlock *InsertAtEnd, Type *IntPtrTy,
  567   BasicBlock *BB = InsertBefore ? InsertBefore->getParent() : InsertAtEnd;
  636 Instruction *CallInst::CreateMalloc(BasicBlock *InsertAtEnd,
  643 Instruction *CallInst::CreateMalloc(BasicBlock *InsertAtEnd,
  655                                BasicBlock *InsertAtEnd) {
  661   BasicBlock *BB = InsertBefore ? InsertBefore->getParent() : InsertAtEnd;
  699 Instruction *CallInst::CreateFree(Value *Source, BasicBlock *InsertAtEnd) {
  706                                   BasicBlock *InsertAtEnd) {
  716 void InvokeInst::init(FunctionType *FTy, Value *Fn, BasicBlock *IfNormal,
  717                       BasicBlock *IfException, ArrayRef<Value *> Args,
  783 void CallBrInst::init(FunctionType *FTy, Value *Fn, BasicBlock *Fallthrough,
  784                       ArrayRef<BasicBlock *> IndirectDests,
  820 void CallBrInst::updateArgBlockAddresses(unsigned i, BasicBlock *B) {
  822   if (BasicBlock *OldBB = getIndirectDest(i)) {
  881 ReturnInst::ReturnInst(LLVMContext &C, Value *retVal, BasicBlock *InsertAtEnd)
  889 ReturnInst::ReturnInst(LLVMContext &Context, BasicBlock *InsertAtEnd)
  909 ResumeInst::ResumeInst(Value *Exn, BasicBlock *InsertAtEnd)
  930 void CleanupReturnInst::init(Value *CleanupPad, BasicBlock *UnwindBB) {
  939 CleanupReturnInst::CleanupReturnInst(Value *CleanupPad, BasicBlock *UnwindBB,
  948 CleanupReturnInst::CleanupReturnInst(Value *CleanupPad, BasicBlock *UnwindBB,
  949                                      unsigned Values, BasicBlock *InsertAtEnd)
  960 void CatchReturnInst::init(Value *CatchPad, BasicBlock *BB) {
  972 CatchReturnInst::CatchReturnInst(Value *CatchPad, BasicBlock *BB,
  980 CatchReturnInst::CatchReturnInst(Value *CatchPad, BasicBlock *BB,
  981                                  BasicBlock *InsertAtEnd)
  992 CatchSwitchInst::CatchSwitchInst(Value *ParentPad, BasicBlock *UnwindDest,
 1004 CatchSwitchInst::CatchSwitchInst(Value *ParentPad, BasicBlock *UnwindDest,
 1006                                  const Twine &NameStr, BasicBlock *InsertAtEnd)
 1026 void CatchSwitchInst::init(Value *ParentPad, BasicBlock *UnwindDest,
 1052 void CatchSwitchInst::addHandler(BasicBlock *Handler) {
 1102                                const Twine &NameStr, BasicBlock *InsertAtEnd)
 1117 UnreachableInst::UnreachableInst(LLVMContext &Context, BasicBlock *InsertAtEnd)
 1131 BranchInst::BranchInst(BasicBlock *IfTrue, Instruction *InsertBefore)
 1139 BranchInst::BranchInst(BasicBlock *IfTrue, BasicBlock *IfFalse, Value *Cond,
 1139 BranchInst::BranchInst(BasicBlock *IfTrue, BasicBlock *IfFalse, Value *Cond,
 1152 BranchInst::BranchInst(BasicBlock *IfTrue, BasicBlock *InsertAtEnd)
 1152 BranchInst::BranchInst(BasicBlock *IfTrue, BasicBlock *InsertAtEnd)
 1159 BranchInst::BranchInst(BasicBlock *IfTrue, BasicBlock *IfFalse, Value *Cond,
 1159 BranchInst::BranchInst(BasicBlock *IfTrue, BasicBlock *IfFalse, Value *Cond,
 1160                        BasicBlock *InsertAtEnd)
 1215                        BasicBlock *InsertAtEnd)
 1224                        const Twine &Name, BasicBlock *InsertAtEnd)
 1240                        BasicBlock *InsertAtEnd)
 1275   const BasicBlock *Parent = getParent();
 1295                    BasicBlock *InsertAE)
 1303                    BasicBlock *InsertAE)
 1312                    MaybeAlign Align, BasicBlock *InsertAE)
 1330                    BasicBlock *InsertAE)
 1370 StoreInst::StoreInst(Value *val, Value *addr, BasicBlock *InsertAtEnd)
 1378                      BasicBlock *InsertAtEnd)
 1387                      BasicBlock *InsertAtEnd)
 1407                      BasicBlock *InsertAtEnd)
 1484                                      BasicBlock *InsertAtEnd)
 1530                              BasicBlock *InsertAtEnd)
 1587                      BasicBlock *InsertAtEnd)
 1720                                        BasicBlock *InsertAE)
 1759                                      BasicBlock *InsertAE)
 1808                                      BasicBlock *InsertAtEnd)
 2202                              BasicBlock *InsertAtEnd)
 2217                                      BasicBlock *InsertAtEnd) {
 2259                                BasicBlock *InsertAtEnd)
 2348                                        BasicBlock *InsertAtEnd) {
 2363                                           BasicBlock *InsertAtEnd) {
 2377                                              BasicBlock *InsertAtEnd) {
 2389                                              BasicBlock *InsertAtEnd) {
 2402                                            BasicBlock *InsertAtEnd) {
 2416                                           BasicBlock *InsertAtEnd) {
 2770   const Twine &Name, BasicBlock *InsertAtEnd) {
 2801                                         BasicBlock *InsertAtEnd) {
 2817                                         BasicBlock *InsertAtEnd) {
 2833                                          BasicBlock *InsertAtEnd) {
 2841                                       BasicBlock *InsertAtEnd) {
 2877   BasicBlock *InsertAtEnd) {
 2927                                       BasicBlock *InsertAtEnd) {
 2954                                  BasicBlock *InsertAtEnd) {
 3309   Value *S, Type *Ty, const Twine &Name, BasicBlock *InsertAtEnd
 3321   Value *S, Type *Ty, const Twine &Name, BasicBlock *InsertAtEnd
 3332   Value *S, Type *Ty, const Twine &Name, BasicBlock *InsertAtEnd
 3344   Value *S, Type *Ty, const Twine &Name, BasicBlock *InsertAtEnd
 3356   Value *S, Type *Ty, const Twine &Name, BasicBlock *InsertAtEnd
 3368   Value *S, Type *Ty, const Twine &Name, BasicBlock *InsertAtEnd
 3380   Value *S, Type *Ty, const Twine &Name, BasicBlock *InsertAtEnd
 3392   Value *S, Type *Ty, const Twine &Name, BasicBlock *InsertAtEnd
 3404   Value *S, Type *Ty, const Twine &Name, BasicBlock *InsertAtEnd
 3416   Value *S, Type *Ty, const Twine &Name, BasicBlock *InsertAtEnd
 3428   Value *S, Type *Ty, const Twine &Name, BasicBlock *InsertAtEnd
 3440   Value *S, Type *Ty, const Twine &Name, BasicBlock *InsertAtEnd
 3452   Value *S, Type *Ty, const Twine &Name, BasicBlock *InsertAtEnd
 3477                  Value *RHS, const Twine &Name, BasicBlock *InsertAtEnd)
 3510                 const Twine &Name, BasicBlock *InsertAtEnd) {
 3796 void SwitchInst::init(Value *Value, BasicBlock *Default, unsigned NumReserved) {
 3810 SwitchInst::SwitchInst(Value *Value, BasicBlock *Default, unsigned NumCases,
 3821 SwitchInst::SwitchInst(Value *Value, BasicBlock *Default, unsigned NumCases,
 3822                        BasicBlock *InsertAtEnd)
 3843 void SwitchInst::addCase(ConstantInt *OnVal, BasicBlock *Dest) {
 3953     ConstantInt *OnVal, BasicBlock *Dest,
 4049                                BasicBlock *InsertAtEnd)
 4068 void IndirectBrInst::addDestination(BasicBlock *DestBB) {
lib/IR/LLVMContextImpl.h
 1308   DenseMap<std::pair<const Function *, const BasicBlock *>, BlockAddress *>
lib/IR/LegacyPassManager.cpp
  223   BasicBlock &BB = *F->begin();
  307   else if (isa<BasicBlock>(V))
 1389   for (BasicBlock &BB : F) {
lib/IR/Metadata.cpp
  339   if (BasicBlock *BB = cast<Instruction>(V)->getParent()) {
lib/IR/Pass.cpp
  198 static std::string getDescription(const BasicBlock &BB) {
  203 bool BasicBlockPass::skipBasicBlock(const BasicBlock &BB) const {
lib/IR/SafepointIRVerifier.cpp
   71   SetVector<const BasicBlock *> DeadBlocks;
   83   bool hasLiveIncomingEdge(const PHINode *PN, const BasicBlock *InBB) const {
   85     const BasicBlock* BB = PN->getParent();
  100   bool isDeadBlock(const BasicBlock *BB) const {
  114   bool hasLiveIncomingEdges(const BasicBlock *BB) const {
  129     for (const BasicBlock &BB : F)
  135     for (const BasicBlock *BB : RPOT) {
  158   void addDeadBlock(const BasicBlock *BB) {
  159     SmallVector<const BasicBlock *, 4> NewDead;
  160     SmallSetVector<const BasicBlock *, 4> DF;
  164       const BasicBlock *D = NewDead.pop_back_val();
  169       SmallVector<BasicBlock *, 8> Dom;
  177       for (BasicBlock *B : Dom)
  178         for (BasicBlock *S : successors(B))
  188     BasicBlock *BB = cast_or_null<BasicBlock>(DeadEdge.get());
  188     BasicBlock *BB = cast_or_null<BasicBlock>(DeadEdge.get());
  447   DenseMap<const BasicBlock *, BasicBlockState *> BlockMap;
  459   bool hasLiveIncomingEdge(const PHINode *PN, const BasicBlock *InBB) const {
  463   BasicBlockState *getBasicBlockState(const BasicBlock *BB);
  464   const BasicBlockState *getBasicBlockState(const BasicBlock *BB) const;
  478   bool isMapped(const BasicBlock *BB) const {
  496   bool removeValidUnrelocatedDefs(const BasicBlock *BB,
  503   void gatherDominatingDefs(const BasicBlock *BB, AvailableValueSet &Result,
  511   static void transferBlock(const BasicBlock *BB, BasicBlockState &BBS,
  540   for (const BasicBlock &BB : F)
  561 BasicBlockState *GCPtrTracker::getBasicBlockState(const BasicBlock *BB) {
  567     const BasicBlock *BB) const {
  582   for (const BasicBlock *BB : RPOT) {
  606   SetVector<const BasicBlock *> Worklist;
  615     const BasicBlock *BB = Worklist.pop_back_val();
  622       const BasicBlock *PBB = *PredIt;
  645 bool GCPtrTracker::removeValidUnrelocatedDefs(const BasicBlock *BB,
  664           const BasicBlock *InBB = PN->getIncomingBlock(i);
  733 void GCPtrTracker::gatherDominatingDefs(const BasicBlock *BB,
  758 void GCPtrTracker::transferBlock(const BasicBlock *BB, BasicBlockState &BBS,
  797         const BasicBlock *InBB = PN->getIncomingBlock(i);
lib/IR/SymbolTableListTraitsImpl.h
   95       ValueSubClass &V = *first;
lib/IR/TypeFinder.cpp
   60     for (const BasicBlock &BB : FI)
lib/IR/Value.cpp
  139 bool Value::isUsedInBasicBlock(const BasicBlock *BB) const {
  146   BasicBlock::const_iterator BI = BB->begin(), BE = BB->end();
  167     if (BasicBlock *P = I->getParent())
  170   } else if (BasicBlock *BB = dyn_cast<BasicBlock>(V)) {
  170   } else if (BasicBlock *BB = dyn_cast<BasicBlock>(V)) {
  425   if (BasicBlock *BB = dyn_cast<BasicBlock>(this))
  425   if (BasicBlock *BB = dyn_cast<BasicBlock>(this))
  426     BB->replaceSuccessorsPhiUsesWith(cast<BasicBlock>(New));
  439 void Value::replaceUsesOutsideBlock(Value *New, BasicBlock *BB) {
  735 const Value *Value::DoPHITranslation(const BasicBlock *CurBB,
  736                                      const BasicBlock *PredBB) const {
lib/IR/Verifier.cpp
  336     for (const BasicBlock &BB : F) {
  418   void visitBasicBlock(BasicBlock &BB);
  843   } else if (BasicBlock *BB = dyn_cast<BasicBlock>(L->getValue()))
  843   } else if (BasicBlock *BB = dyn_cast<BasicBlock>(L->getValue()))
 2080   BasicBlock *UnwindDest;
 2269     const BasicBlock *Entry = &F.getEntryBlock();
 2375 void Verifier::visitBasicBlock(BasicBlock &BB) {
 2384     SmallVector<BasicBlock*, 8> Preds(pred_begin(&BB), pred_end(&BB));
 2385     SmallVector<std::pair<BasicBlock*, Value*>, 8> Values;
 2503     if (isa<BasicBlock>(CBI.getOperand(i)))
 2509     SmallPtrSet<BasicBlock *, 4> ArgBBs;
 2513     for (BasicBlock *BB : CBI.getIndirectDests())
 3589   BasicBlock *BB = I.getParent();
 3598     for (BasicBlock *PredBB : predecessors(BB)) {
 3623   for (BasicBlock *PredBB : predecessors(BB)) {
 3716   BasicBlock *BB = CPI.getParent();
 3744   BasicBlock *BB = CPI.getParent();
 3776       BasicBlock *UnwindDest;
 3907       BasicBlock *SwitchUnwindDest = CatchSwitch->getUnwindDest();
 3924   BasicBlock *BB = CatchSwitch.getParent();
 3941   if (BasicBlock *UnwindDest = CatchSwitch.getUnwindDest()) {
 3956   for (BasicBlock *Handler : CatchSwitch.handlers()) {
 3970   if (BasicBlock *UnwindDest = CRI.getUnwindDest()) {
 4061   BasicBlock *BB = I.getParent();
 4133     } else if (BasicBlock *OpBB = dyn_cast<BasicBlock>(I.getOperand(i))) {
 4133     } else if (BasicBlock *OpBB = dyn_cast<BasicBlock>(I.getOperand(i))) {
 4436     BasicBlock *BB = Call.getParent();
 4508       const BasicBlock *InvokeBB =
 4933   BasicBlock *BB = DII.getParent();
 4968   BasicBlock *BB = DLI.getParent();
lib/Target/AArch64/AArch64FalkorHWPFFix.cpp
  153   for (BasicBlock *BB : L.blocks()) {
lib/Target/AArch64/AArch64FastISel.cpp
 3452   BasicBlock::const_iterator Start(I);
 3453   BasicBlock::const_iterator End(II);
lib/Target/AArch64/AArch64ISelLowering.cpp
 1338   const BasicBlock *LLVM_BB = MBB->getBasicBlock();
lib/Target/AArch64/AArch64PromoteConstant.cpp
  397   BasicBlock *NewBB = NewPt->getParent();
  405     BasicBlock *CurBB = IPI->first->getParent();
  418     BasicBlock *CommonDominator = DT.findNearestCommonDominator(NewBB, CurBB);
lib/Target/AArch64/AArch64StackTagging.cpp
  338   BasicBlock::iterator BI(StartInst);
  437   BasicBlock *PrologueBB = nullptr;
  498   const BasicBlock *ABB = A->getParent();
  499   const BasicBlock *BBB = B->getParent();
  528   for (auto &BB : *F) {
  529     for (BasicBlock::iterator IT = BB.begin(); IT != BB.end(); ++IT) {
lib/Target/AMDGPU/AMDGPUAnnotateKernelFeatures.cpp
  275   for (BasicBlock &BB : F) {
lib/Target/AMDGPU/AMDGPUAnnotateUniformValues.cpp
   79 static void DFS(BasicBlock *Root, SetVector<BasicBlock*> & Set) {
   79 static void DFS(BasicBlock *Root, SetVector<BasicBlock*> & Set) {
   90   SetVector<BasicBlock *> Checklist;
   91   BasicBlock *Start = Load->getParent();
  107     BasicBlock::iterator StartIt = (!L && (BB == Load->getParent())) ?
lib/Target/AMDGPU/AMDGPUAtomicOptimizer.cpp
  415   BasicBlock *PixelEntryBB = nullptr;
  416   BasicBlock *PixelExitBB = nullptr;
  557   BasicBlock *const EntryBB = I.getParent();
lib/Target/AMDGPU/AMDGPUCodeGenPrepare.cpp
 1039   for (BasicBlock &BB : F) {
 1040     BasicBlock::iterator Next;
 1041     for (BasicBlock::iterator I = BB.begin(), E = BB.end(); I != E; I = Next) {
lib/Target/AMDGPU/AMDGPUISelDAGToDAG.cpp
  927   const BasicBlock *BB = FuncInfo->MBB->getBasicBlock();
lib/Target/AMDGPU/AMDGPUInline.cpp
  163   const BasicBlock &BB = Callee->getEntryBlock();
lib/Target/AMDGPU/AMDGPULibCalls.cpp
  139   BasicBlock::iterator getEntryIns(CallInst * UI);
  646   BasicBlock *BB = CI->getParent();
 1292   BasicBlock * const CBB = CI->getParent();
 1299       BasicBlock::iterator BBI = LI->getIterator();
 1324     BasicBlock::iterator BBI = CI->getIterator();
 1348   BasicBlock::iterator ItOld = B.GetInsertPoint();
 1405 BasicBlock::iterator AMDGPULibCalls::getEntryIns(CallInst * UI) {
 1407   BasicBlock * BB = &Func->getEntryBlock();
 1409   BasicBlock::iterator ItNew = BB->begin();
 1416   BasicBlock::iterator ItNew = getEntryIns(UI);
 1755   for (auto &BB : F) {
 1756     for (BasicBlock::iterator I = BB.begin(), E = BB.end(); I != E; ) {
 1780   for (auto &BB : F) {
 1781     for (BasicBlock::iterator I = BB.begin(), E = BB.end(); I != E; ) {
lib/Target/AMDGPU/AMDGPULowerKernelArguments.cpp
   72   BasicBlock &EntryBlock = *F.begin();
lib/Target/AMDGPU/AMDGPUPromoteAlloca.cpp
  164   BasicBlock &EntryBB = *F.begin();
lib/Target/AMDGPU/AMDGPURewriteOutArguments.cpp
  265   for (BasicBlock &BB : F) {
  303         BasicBlock *BB = RI->getParent();
  443   BasicBlock *StubBB = BasicBlock::Create(Ctx, "", &F);
  443   BasicBlock *StubBB = BasicBlock::Create(Ctx, "", &F);
lib/Target/AMDGPU/AMDGPUTargetTransformInfo.cpp
  104   for (const BasicBlock *BB : L->getBlocks()) {
  120           BasicBlock *Succ0 = Br->getSuccessor(0);
  121           BasicBlock *Succ1 = Br->getSuccessor(1);
lib/Target/AMDGPU/AMDGPUUnifyDivergentExitNodes.cpp
   98                                BasicBlock &BB) {
   99   SmallVector<BasicBlock *, 8> Stack;
  100   SmallPtrSet<BasicBlock *, 8> Visited;
  102   for (BasicBlock *Pred : predecessors(&BB))
  106     BasicBlock *Top = Stack.pop_back_val();
  110     for (BasicBlock *Pred : predecessors(Top)) {
  119 static BasicBlock *unifyReturnBlockSet(Function &F,
  120                                        ArrayRef<BasicBlock *> ReturningBlocks,
  126   BasicBlock *NewRetBlock = BasicBlock::Create(F.getContext(), Name, &F);
  126   BasicBlock *NewRetBlock = BasicBlock::Create(F.getContext(), Name, &F);
  141   for (BasicBlock *BB : ReturningBlocks) {
  152   for (BasicBlock *BB : ReturningBlocks) {
  169   SmallVector<BasicBlock *, 4> ReturningBlocks;
  170   SmallVector<BasicBlock *, 4> UnreachableBlocks;
  173   BasicBlock *DummyReturnBB = nullptr;
  175   for (BasicBlock *BB : PDT.getRoots()) {
  186         DummyReturnBB = BasicBlock::Create(F.getContext(),
  195         BasicBlock *LoopHeaderBB = BI->getSuccessor(0);
  201         BasicBlock *TransitionBB = BB->splitBasicBlock(BI, "TransitionBlock");
  212     BasicBlock *UnreachableBlock = nullptr;
  217       UnreachableBlock = BasicBlock::Create(F.getContext(),
  221       for (BasicBlock *BB : UnreachableBlocks) {
lib/Target/AMDGPU/SIAnnotateControlFlow.cpp
   52 using StackEntry = std::pair<BasicBlock *, Value *>;
   83   bool isTopOfStack(BasicBlock *BB);
   87   void push(BasicBlock *BB, Value *Saved);
  103   void closeControlFlow(BasicBlock *BB);
  168 bool SIAnnotateControlFlow::isTopOfStack(BasicBlock *BB) {
  178 void SIAnnotateControlFlow::push(BasicBlock *BB, Value *Saved) {
  185   BasicBlock *IDom = DT->getNode(Phi->getParent())->getIDom()->getBlock();
  232     BasicBlock *Parent = Inst->getParent();
  261   BasicBlock *BB = Term->getParent();
  266   BasicBlock *Target = Term->getSuccessor(1);
  273   for (BasicBlock *Pred : predecessors(Target)) {
  291 void SIAnnotateControlFlow::closeControlFlow(BasicBlock *BB) {
  300     SmallVector <BasicBlock *, 8> Latches;
  303     SmallVector<BasicBlock *, 2> Preds;
  304     for (BasicBlock *Pred : predecessors(BB)) {
  330   for (df_iterator<BasicBlock *> I = df_begin(&F.getEntryBlock()),
  332     BasicBlock *BB = *I;
lib/Target/ARM/ARMCodeGenPrepare.cpp
  532       BasicBlock &BB = Arg->getParent()->front();
  846   return isa<BasicBlock>(V);
 1022   for (BasicBlock &BB : F) {
lib/Target/ARM/ARMFastISel.cpp
 1344   for (const BasicBlock *SuccBB : IB->successors())
lib/Target/ARM/ARMISelLowering.cpp
10014   const BasicBlock *LLVM_BB = BB->getBasicBlock();
10481     const BasicBlock *LLVM_BB = BB->getBasicBlock();
10614     const BasicBlock *LLVM_BB = BB->getBasicBlock();
lib/Target/ARM/ARMParallelDSP.cpp
  224     bool Search(Value *V, BasicBlock *BB, Reduction &R);
  225     bool RecordMemoryOps(BasicBlock *BB);
  349 bool ARMParallelDSP::RecordMemoryOps(BasicBlock *BB) {
  439 bool ARMParallelDSP::Search(Value *V, BasicBlock *BB, Reduction &R) {
  516   for (auto &BB : F) {
lib/Target/ARM/ARMTargetTransformInfo.cpp
  973     for (auto *BB : L->getBlocks()) {
 1019   SmallVector<BasicBlock*, 4> ExitingBlocks;
 1038   for (auto *BB : L->getBlocks()) {
lib/Target/ARM/MVETailPredication.cpp
  130   BasicBlock *Preheader = L->getLoopPreheader();
  162   for (auto *BB : L->getBlocks()) {
  293   for (auto *BB : L->getBlocks()) {
  402   if (BasicBlock *Exit = L->getUniqueExitBlock()) {
lib/Target/AVR/AVRISelLowering.cpp
 1493   const BasicBlock *LLVM_BB = BB->getBasicBlock();
 1636   const BasicBlock *LLVM_BB = MBB->getBasicBlock();
lib/Target/BPF/BPFAbstractMemberAccess.cpp
  309     for (auto &BB : F)
  493   for (auto &BB : F)
  849   BasicBlock *BB = Call->getParent();
lib/Target/BPF/BPFISelLowering.cpp
  652   const BasicBlock *LLVM_BB = BB->getBasicBlock();
lib/Target/Hexagon/HexagonCommonGEP.cpp
  122     void getBlockTraversalOrder(BasicBlock *Root, ValueVect &Order);
  128     BasicBlock *recalculatePlacement(GepNode *Node, NodeChildrenMap &NCM,
  130     BasicBlock *recalculatePlacementRec(GepNode *Node, NodeChildrenMap &NCM,
  134     bool isInMainPath(BasicBlock *B, Loop *L);
  135     BasicBlock *adjustForInvariance(GepNode *Node, NodeChildrenMap &NCM,
  142     Value *fabricateGEP(NodeVect &NA, BasicBlock::iterator At,
  143                         BasicBlock *LocB);
  322 void HexagonCommonGEP::getBlockTraversalOrder(BasicBlock *Root,
  419     BasicBlock *B = cast<BasicBlock>(*I);
  419     BasicBlock *B = cast<BasicBlock>(*I);
  420     for (BasicBlock::iterator J = B->begin(), F = B->end(); J != F; ++J) {
  669 static BasicBlock *nearest_common_dominator(DominatorTree *DT, T &Blocks) {
  686   BasicBlock *Dom = cast<BasicBlock>(*I);
  686   BasicBlock *Dom = cast<BasicBlock>(*I);
  688     BasicBlock *B = cast_or_null<BasicBlock>(*I);
  688     BasicBlock *B = cast_or_null<BasicBlock>(*I);
  698 static BasicBlock *nearest_common_dominatee(DominatorTree *DT, T &Blocks) {
  707     BasicBlock *DomB = cast<BasicBlock>(*I);
  707     BasicBlock *DomB = cast<BasicBlock>(*I);
  711       BasicBlock *B = cast<BasicBlock>(*I);
  711       BasicBlock *B = cast<BasicBlock>(*I);
  724 static BasicBlock::iterator first_use_of_in_block(T &Values, BasicBlock *B) {
  724 static BasicBlock::iterator first_use_of_in_block(T &Values, BasicBlock *B) {
  725     BasicBlock::iterator FirstUse = B->end(), BEnd = B->end();
  743       BasicBlock::iterator It = In->getIterator();
  750 static bool is_empty(const BasicBlock *B) {
  754 BasicBlock *HexagonCommonGEP::recalculatePlacement(GepNode *Node,
  778       BasicBlock *PB = isa<PHINode>(R)
  800   BasicBlock *DomB = nearest_common_dominator(DT, Bs);
  821 BasicBlock *HexagonCommonGEP::recalculatePlacementRec(GepNode *Node,
  832   BasicBlock *LB = recalculatePlacement(Node, NCM, Loc);
  843   BasicBlock *HdrB = L->getHeader(), *DefB = In->getParent();
  854 bool HexagonCommonGEP::isInMainPath(BasicBlock *B, Loop *L) {
  855   BasicBlock *HB = L->getHeader();
  856   BasicBlock *LB = L->getLoopLatch();
  865 static BasicBlock *preheader(DominatorTree *DT, Loop *L) {
  866   if (BasicBlock *PH = L->getLoopPreheader())
  876 BasicBlock *HexagonCommonGEP::adjustForInvariance(GepNode *Node,
  890   BasicBlock *TopB = nearest_common_dominatee(DT, Bs);
  900   BasicBlock *LocB = cast_or_null<BasicBlock>(Loc[Node]);
  900   BasicBlock *LocB = cast_or_null<BasicBlock>(Loc[Node]);
  906       BasicBlock *NewLoc = preheader(DT, Lp);
  939       BasicBlock *B = cast<BasicBlock>(I->second);
  939       BasicBlock *B = cast<BasicBlock>(I->second);
  957   BasicBlock *PB = cast<Instruction>(R)->getParent();
 1089 Value *HexagonCommonGEP::fabricateGEP(NodeVect &NA, BasicBlock::iterator At,
 1090       BasicBlock *LocB) {
 1188     BasicBlock *LastB = cast<BasicBlock>(LocV);
 1188     BasicBlock *LastB = cast<BasicBlock>(LocV);
 1199       BasicBlock *ChildB = cast_or_null<BasicBlock>(Loc[Child]);
 1199       BasicBlock *ChildB = cast_or_null<BasicBlock>(Loc[Child]);
 1205     BasicBlock::iterator InsertAt = LastB->getTerminator()->getIterator();
 1209       BasicBlock::iterator FirstUse = first_use_of_in_block(Urs, LastB);
 1249     BasicBlock *B = cast<BasicBlock>(BO[i]);
 1249     BasicBlock *B = cast<BasicBlock>(BO[i]);
 1255     BasicBlock *B = cast<BasicBlock>(BO[i-1]);
 1255     BasicBlock *B = cast<BasicBlock>(BO[i-1]);
 1256     BasicBlock::InstListType &IL = B->getInstList();
 1258     using reverse_iterator = BasicBlock::InstListType::reverse_iterator;
 1277     for (BasicBlock::iterator I = A->begin(), E = A->end(); I != E; ++I)
lib/Target/Hexagon/HexagonConstExtenders.cpp
  741       const BasicBlock *ThisB = V.BA->getBasicBlock();
  742       const BasicBlock *OtherB = ER.V.BA->getBasicBlock();
lib/Target/Hexagon/HexagonGenExtract.cpp
   77     bool visitBlock(BasicBlock *B);
   99   BasicBlock *BB = In->getParent();
  221 bool HexagonGenExtract::visitBlock(BasicBlock *B) {
  231   BasicBlock::iterator I = std::prev(B->end()), NextI, Begin = B->begin();
  259   BasicBlock *Entry = GraphTraits<Function*>::getEntryNode(&F);
lib/Target/Hexagon/HexagonISelLowering.cpp
 1725   const BasicBlock *Parent = PN->getParent();
 1728     BasicBlock *Blk = PN->getIncomingBlock(i);
 3241   BasicBlock *BB = Builder.GetInsertBlock();
 3264   BasicBlock *BB = Builder.GetInsertBlock();
lib/Target/Hexagon/HexagonLoopIdiomRecognition.cpp
  145     void collectStores(Loop *CurLoop, BasicBlock *BB,
  149     bool runOnLoopBlock(Loop *CurLoop, BasicBlock *BB, const SCEV *BECount,
  150         SmallVectorImpl<BasicBlock*> &ExitBlocks);
  216       Value *materialize(BasicBlock *B, BasicBlock::iterator At);
  216       Value *materialize(BasicBlock *B, BasicBlock::iterator At);
  233       void link(Instruction *I, BasicBlock *B, BasicBlock::iterator At);
  233       void link(Instruction *I, BasicBlock *B, BasicBlock::iterator At);
  315   BasicBlock *Block = Exp->getParent();
  497 void Simplifier::Context::link(Instruction *I, BasicBlock *B,
  498       BasicBlock::iterator At) {
  510 Value *Simplifier::Context::materialize(BasicBlock *B,
  511       BasicBlock::iterator At) {
  574     void promoteTo(Instruction *In, IntegerType *DestTy, BasicBlock *LoopB);
  575     bool promoteTypes(BasicBlock *LoopB, BasicBlock *ExitB);
  575     bool promoteTypes(BasicBlock *LoopB, BasicBlock *ExitB);
  577     Value *getCountIV(BasicBlock *BB);
  586     bool convertShiftsToLeft(BasicBlock *LoopB, BasicBlock *ExitB,
  586     bool convertShiftsToLeft(BasicBlock *LoopB, BasicBlock *ExitB,
  588     void cleanupLoopBody(BasicBlock *LoopB);
  606     bool scanSelect(SelectInst *SI, BasicBlock *LoopB, BasicBlock *PrehB,
  606     bool scanSelect(SelectInst *SI, BasicBlock *LoopB, BasicBlock *PrehB,
  609     Value *generate(BasicBlock::iterator At, ParsedValues &PV);
  623 Value *PolynomialMultiplyRecognize::getCountIV(BasicBlock *BB) {
  627   BasicBlock *PB = (*PI == BB) ? *std::next(PI) : *PI;
  655 static void replaceAllUsesOfWithIn(Value *I, Value *J, BasicBlock *BB) {
  856       BasicBlock *LoopB, BasicBlock *PrehB, Value *CIV, ParsedValues &PV,
  856       BasicBlock *LoopB, BasicBlock *PrehB, Value *CIV, ParsedValues &PV,
 1001       IntegerType *DestTy, BasicBlock *LoopB) {
 1014       BasicBlock *InB = P->getIncomingBlock(i);
 1052 bool PolynomialMultiplyRecognize::promoteTypes(BasicBlock *LoopB,
 1053       BasicBlock *ExitB) {
 1089   BasicBlock::iterator End = EndI ? EndI->getIterator() : ExitB->end();
 1119   auto *BB = cast<Instruction>(Out)->getParent();
 1292 bool PolynomialMultiplyRecognize::convertShiftsToLeft(BasicBlock *LoopB,
 1293       BasicBlock *ExitB, unsigned IterCount) {
 1468 void PolynomialMultiplyRecognize::cleanupLoopBody(BasicBlock *LoopB) {
 1522 Value *PolynomialMultiplyRecognize::generate(BasicBlock::iterator At,
 1769   BasicBlock *LoopB = CurLoop->getHeader();
 1774   BasicBlock *ExitB = CurLoop->getExitBlock();
 1777   BasicBlock *EntryB = CurLoop->getLoopPreheader();
 1894   BasicBlock::iterator At(EntryB->getTerminator());
 1988   for (auto *B : L->blocks())
 1998 void HexagonLoopIdiomRecognize::collectStores(Loop *CurLoop, BasicBlock *BB,
 2029   BasicBlock *Preheader = CurLoop->getLoopPreheader();
 2131   BasicBlock *ExitB;
 2134     SmallVector<BasicBlock*, 8> ExitBlocks;
 2169     BasicBlock *Header = CurLoop->getHeader();
 2176     BasicBlock *NewPreheader = BasicBlock::Create(Ctx, HeaderName+".rtli.ph",
 2176     BasicBlock *NewPreheader = BasicBlock::Create(Ctx, HeaderName+".rtli.ph",
 2219     BasicBlock *MemmoveB = BasicBlock::Create(Ctx, Header->getName()+".rtli",
 2219     BasicBlock *MemmoveB = BasicBlock::Create(Ctx, Header->getName()+".rtli",
 2229     BasicBlock *ExitD = Preheader;
 2231       BasicBlock *PB = *PI;
 2305   SmallSet<BasicBlock*,8> LoopBlocks;
 2306   for (auto *B : L->blocks())
 2321       BasicBlock *PB = OpI->getParent();
 2332   for (auto *B : L->blocks()) {
 2342         BasicBlock *UseB = UseI->getParent();
 2355 bool HexagonLoopIdiomRecognize::runOnLoopBlock(Loop *CurLoop, BasicBlock *BB,
 2356       const SCEV *BECount, SmallVectorImpl<BasicBlock*> &ExitBlocks) {
 2391   SmallVector<BasicBlock *, 8> ExitBlocks;
 2397   for (auto *BB : L->getBlocks()) {
lib/Target/Hexagon/HexagonOptimizeSZextends.cpp
  102   for (auto &B : F) {
lib/Target/Hexagon/HexagonVectorLoopCarriedReuse.cpp
  297     Value *findValueInBlock(Value *Op, BasicBlock *BB);
  461     BasicBlock *BB = PN->getParent();
  593                                                        BasicBlock *BB) {
  607   BasicBlock *LoopPH = CurLoop->getLoopPreheader();
  633   BasicBlock *BB = BEInst->getParent();
  694     BasicBlock *BB = PN->getParent();
  728   BasicBlock *BB = CurLoop->getHeader();
lib/Target/Lanai/LanaiAsmPrinter.cpp
  222   if (const BasicBlock *B = Pred->getBasicBlock())
lib/Target/MSP430/MSP430ISelLowering.cpp
 1463   const BasicBlock *LLVM_BB = BB->getBasicBlock();
 1560   const BasicBlock *LLVM_BB = BB->getBasicBlock();
lib/Target/Mips/Mips16HardFloat.cpp
   46 static void EmitInlineAsm(LLVMContext &C, BasicBlock *BB, StringRef AsmText) {
  279   BasicBlock *BB = BasicBlock::Create(Context, "entry", FStub);
  279   BasicBlock *BB = BasicBlock::Create(Context, "entry", FStub);
  382   for (auto &BB: F)
  464   BasicBlock *BB = BasicBlock::Create(Context, "entry", FStub);
  464   BasicBlock *BB = BasicBlock::Create(Context, "entry", FStub);
lib/Target/Mips/Mips16ISelLowering.cpp
  521   const BasicBlock *LLVM_BB = BB->getBasicBlock();
  584   const BasicBlock *LLVM_BB = BB->getBasicBlock();
  650   const BasicBlock *LLVM_BB = BB->getBasicBlock();
lib/Target/Mips/MipsAsmPrinter.cpp
  481   if (const BasicBlock *bb = Pred->getBasicBlock())
lib/Target/Mips/MipsBranchExpansion.cpp
  403   const BasicBlock *BB = MBB->getBasicBlock();
lib/Target/Mips/MipsExpandPseudo.cpp
  113   const BasicBlock *LLVM_BB = BB.getBasicBlock();
  250   const BasicBlock *LLVM_BB = BB.getBasicBlock();
  387   const BasicBlock *LLVM_BB = BB.getBasicBlock();
  577   const BasicBlock *LLVM_BB = BB.getBasicBlock();
lib/Target/Mips/MipsISelLowering.cpp
 1647   const BasicBlock *LLVM_BB = BB->getBasicBlock();
 1825   const BasicBlock *LLVM_BB = BB->getBasicBlock();
 4430   const BasicBlock *LLVM_BB = BB->getBasicBlock();
 4506   const BasicBlock *LLVM_BB = BB->getBasicBlock();
lib/Target/Mips/MipsOs16.cpp
   77     for (BasicBlock::const_iterator I = BB->begin(), E = BB->end();
lib/Target/Mips/MipsSEISelLowering.cpp
 3040   const BasicBlock *LLVM_BB = BB->getBasicBlock();
 3109   const BasicBlock *LLVM_BB = BB->getBasicBlock();
lib/Target/NVPTX/NVPTXAllocaHoisting.cpp
   46     for (BasicBlock::iterator BI = I->begin(), BE = I->end(); BI != BE;) {
lib/Target/NVPTX/NVPTXAsmPrinter.cpp
  426     if (const BasicBlock *PBB = PMBB->getBasicBlock()) {
  688       const BasicBlock *bb = I->getParent();
  739       const BasicBlock *bb = instr->getParent();
lib/Target/NVPTX/NVPTXGenericToNVVM.cpp
  109       for (BasicBlock::iterator II = BBI->begin(), IE = BBI->end(); II != IE;
lib/Target/NVPTX/NVPTXImageOptimizer.cpp
   61     for (BasicBlock::iterator I = (*BI).begin(), E = (*BI).end();
  154       BasicBlock *Dest;
lib/Target/NVPTX/NVPTXLowerAggrCopies.cpp
   70     for (BasicBlock::iterator II = BI->begin(), IE = BI->end(); II != IE;
lib/Target/NVPTX/NVPTXLowerAlloca.cpp
   69   for (auto &BB : F)
lib/Target/NVPTX/NVPTXLowerArgs.cpp
  183   BasicBlock::iterator InsertPt;
  211     for (auto &B : F) {
lib/Target/PowerPC/PPCBoolRetToInt.cpp
  201     for (auto &BB : F) {
lib/Target/PowerPC/PPCExpandISEL.cpp
  336   const BasicBlock *LLVM_BB = MBB->getBasicBlock();
lib/Target/PowerPC/PPCFastISel.cpp
 1866   for (const BasicBlock *SuccBB : IB->successors())
lib/Target/PowerPC/PPCISelDAGToDAG.cpp
  521   const BasicBlock *BB = FuncInfo->MBB->getBasicBlock();
  526   const BasicBlock *TBB = BBTerm->getSuccessor(0);
  527   const BasicBlock *FBB = BBTerm->getSuccessor(1);
lib/Target/PowerPC/PPCISelLowering.cpp
10331   const BasicBlock *LLVM_BB = BB->getBasicBlock();
10435   const BasicBlock *LLVM_BB = BB->getBasicBlock();
10619   const BasicBlock *BB = MBB->getBasicBlock();
10883   const BasicBlock *LLVM_BB = BB->getBasicBlock();
lib/Target/PowerPC/PPCLoopPreIncPrep.cpp
  144                            SmallSet<BasicBlock *, 16> &BBChanged);
  327     Loop *L, Bucket &BucketChain, SmallSet<BasicBlock *, 16> &BBChanged) {
  365   BasicBlock *Header = L->getHeader();
  367   BasicBlock *LoopPredecessor = L->getLoopPredecessor();
  473   SmallSet<BasicBlock *, 16> BBChanged;
  493   BasicBlock *BB = MemI->getParent();
  497   BasicBlock *PredBB = L->getLoopPredecessor();
  498   BasicBlock *LatchBB = L->getLoopLatch();
  504   iterator_range<BasicBlock::phi_iterator> PHIIter = BB->phis();
  551   BasicBlock *LoopPredecessor = L->getLoopPredecessor();
lib/Target/PowerPC/PPCReduceCRLogicals.cpp
  199   const BasicBlock *LLVM_BB = ThisMBB->getBasicBlock();
lib/Target/PowerPC/PPCTargetTransformInfo.cpp
  216 bool PPCTTIImpl::mightUseCTR(BasicBlock *BB,
  263   for (BasicBlock::iterator J = BB->begin(), JE = BB->end();
  510     for (BasicBlock *BB : L->blocks())
  524   SmallVector<BasicBlock*, 4> ExitingBlocks;
lib/Target/PowerPC/PPCTargetTransformInfo.h
   36   bool mightUseCTR(BasicBlock *BB, TargetLibraryInfo *LibInfo);
lib/Target/RISCV/RISCVISelLowering.cpp
 1105   const BasicBlock *LLVM_BB = BB->getBasicBlock();
 1288   const BasicBlock *LLVM_BB = BB->getBasicBlock();
lib/Target/Sparc/SparcISelLowering.cpp
 3134   const BasicBlock *LLVM_BB = BB->getBasicBlock();
lib/Target/SystemZ/SystemZPostRewrite.cpp
  161   const BasicBlock *BB = MBB.getBasicBlock();
lib/Target/WebAssembly/WebAssemblyExceptionInfo.cpp
  160     if (const auto *BB = MBB->getBasicBlock())
lib/Target/WebAssembly/WebAssemblyFixFunctionBitcasts.cpp
  123   BasicBlock *BB = BasicBlock::Create(M->getContext(), "body", Wrapper);
  123   BasicBlock *BB = BasicBlock::Create(M->getContext(), "body", Wrapper);
  213     BasicBlock *BB = BasicBlock::Create(M->getContext(), "body", Wrapper);
  213     BasicBlock *BB = BasicBlock::Create(M->getContext(), "body", Wrapper);
lib/Target/WebAssembly/WebAssemblyISelLowering.cpp
  354   const BasicBlock *LLVMBB = BB->getBasicBlock();
lib/Target/WebAssembly/WebAssemblyLowerEmscriptenEHSjLj.cpp
  261   void wrapTestSetjmp(BasicBlock *BB, Instruction *InsertPt, Value *Threw,
  263                       Value *&LongjmpResult, BasicBlock *&EndBB);
  540     BasicBlock *BB, Instruction *InsertPt, Value *Threw, Value *SetjmpTable,
  542     BasicBlock *&EndBB) {
  550   BasicBlock *ThenBB1 = BasicBlock::Create(C, "if.then1", F);
  550   BasicBlock *ThenBB1 = BasicBlock::Create(C, "if.then1", F);
  551   BasicBlock *ElseBB1 = BasicBlock::Create(C, "if.else1", F);
  551   BasicBlock *ElseBB1 = BasicBlock::Create(C, "if.else1", F);
  552   BasicBlock *EndBB1 = BasicBlock::Create(C, "if.end", F);
  552   BasicBlock *EndBB1 = BasicBlock::Create(C, "if.end", F);
  563   BasicBlock *ThenBB2 = BasicBlock::Create(C, "if.then2", F);
  563   BasicBlock *ThenBB2 = BasicBlock::Create(C, "if.then2", F);
  564   BasicBlock *EndBB2 = BasicBlock::Create(C, "if.end2", F);
  564   BasicBlock *EndBB2 = BasicBlock::Create(C, "if.end2", F);
  604   for (BasicBlock &BB : F) {
  749   for (BasicBlock &BB : F) {
  788   for (BasicBlock &BB : F) {
  808   for (BasicBlock &BB : F) {
  828   for (BasicBlock &BB : F) {
  889   BasicBlock &EntryBB = F.getEntryBlock();
  911     BasicBlock *BB = CI->getParent();
  917     BasicBlock *Tail = SplitBlock(BB, CI->getNextNode());
  952   std::vector<BasicBlock *> BBs;
  953   for (BasicBlock &BB : F)
  958     BasicBlock *BB = BBs[I];
  976       BasicBlock *Tail;
 1025       BasicBlock *EndBB = nullptr;
 1053   for (BasicBlock &BB : F) {
lib/Target/WebAssembly/WebAssemblyLowerGlobalDtors.cpp
  145       BasicBlock *BB = BasicBlock::Create(C, "body", CallDtors);
  145       BasicBlock *BB = BasicBlock::Create(C, "body", CallDtors);
  161       BasicBlock *EntryBB = BasicBlock::Create(C, "entry", RegisterCallDtors);
  161       BasicBlock *EntryBB = BasicBlock::Create(C, "entry", RegisterCallDtors);
  162       BasicBlock *FailBB = BasicBlock::Create(C, "fail", RegisterCallDtors);
  162       BasicBlock *FailBB = BasicBlock::Create(C, "fail", RegisterCallDtors);
  163       BasicBlock *RetBB = BasicBlock::Create(C, "return", RegisterCallDtors);
  163       BasicBlock *RetBB = BasicBlock::Create(C, "return", RegisterCallDtors);
lib/Target/WebAssembly/WebAssemblyTargetMachine.cpp
  241       for (auto &B : F) {
lib/Target/X86/X86CmovConversion.cpp
  667   const BasicBlock *BB = MBB->getBasicBlock();
lib/Target/X86/X86ExpandPseudo.cpp
   80   const BasicBlock *BB = MBB->getBasicBlock();
lib/Target/X86/X86FastISel.cpp
  273   BasicBlock::const_iterator Start(I);
  274   BasicBlock::const_iterator End(II);
lib/Target/X86/X86FrameLowering.cpp
  534   const BasicBlock *LLVM_BB = MBB.getBasicBlock();
lib/Target/X86/X86ISelLowering.cpp
29179   const BasicBlock *BB = MBB->getBasicBlock();
29354     const BasicBlock *LLVM_BB = MBB->getBasicBlock();
29525   const BasicBlock *LLVM_BB = MBB->getBasicBlock();
29792   const BasicBlock *LLVM_BB = ThisMBB->getBasicBlock();
29954   const BasicBlock *LLVM_BB = ThisMBB->getBasicBlock();
30018   const BasicBlock *LLVM_BB = BB->getBasicBlock();
30473   const BasicBlock *BB = MBB->getBasicBlock();
30664   const BasicBlock *BB = MBB->getBasicBlock();
lib/Target/X86/X86RetpolineThunks.cpp
  214   BasicBlock *Entry = BasicBlock::Create(Ctx, "entry", F);
  214   BasicBlock *Entry = BasicBlock::Create(Ctx, "entry", F);
lib/Target/X86/X86WinEHState.cpp
   72   int getBaseStateForBB(DenseMap<BasicBlock *, ColorVector> &BlockColors,
   73                         WinEHFuncInfo &FuncInfo, BasicBlock *BB);
   74   int getStateForCallSite(DenseMap<BasicBlock *, ColorVector> &BlockColors,
  165   for (BasicBlock &BB : F) {
  367   for (BasicBlock &BB : *F) {
  408   BasicBlock *EntryBB = BasicBlock::Create(Context, "entry", Trampoline);
  408   BasicBlock *EntryBB = BasicBlock::Create(Context, "entry", Trampoline);
  516     DenseMap<BasicBlock *, ColorVector> &BlockColors, WinEHFuncInfo &FuncInfo,
  517     BasicBlock *BB) {
  522   BasicBlock *FuncletEntryBB = BBColors.front();
  535     DenseMap<BasicBlock *, ColorVector> &BlockColors, WinEHFuncInfo &FuncInfo,
  549 static int getPredState(DenseMap<BasicBlock *, int> &FinalStates, Function &F,
  550                         int ParentBaseState, BasicBlock *BB) {
  561   for (BasicBlock *PredBB : predecessors(BB)) {
  590 static int getSuccState(DenseMap<BasicBlock *, int> &InitialStates, Function &F,
  591                         int ParentBaseState, BasicBlock *BB) {
  598   for (BasicBlock *SuccBB : successors(BB)) {
  662   DenseMap<BasicBlock *, ColorVector> BlockColors = colorEHFunclets(F);
  666   DenseMap<BasicBlock *, int> InitialStates;
  668   DenseMap<BasicBlock *, int> FinalStates;
  671   std::deque<BasicBlock *> Worklist;
  673   for (BasicBlock *BB : RPOT) {
  704     BasicBlock *BB = Worklist.front();
  718     for (BasicBlock *SuccBB : successors(BB))
  723   for (BasicBlock *BB : RPOT) {
  735   for (BasicBlock *BB : RPOT) {
  737     BasicBlock *FuncletEntryBB = BBColors.front();
  764   for (BasicBlock *BB : RPOT) {
  779     BasicBlock *FuncletEntryBB = BBColors.front();
lib/Target/XCore/XCoreISelLowering.cpp
 1534   const BasicBlock *LLVM_BB = BB->getBasicBlock();
lib/Target/XCore/XCoreLowerThreadLocal.cpp
  138               BasicBlock *PredBB = PN->getIncomingBlock(I);
lib/Transforms/AggressiveInstCombine/AggressiveInstCombine.cpp
  121   BasicBlock *GuardBB = Phi.getIncomingBlock(RotSrc == P1);
  122   BasicBlock *RotBB = Phi.getIncomingBlock(RotSrc != P1);
  125   BasicBlock *PhiBB = Phi.getParent();
  324   for (BasicBlock &BB : F) {
  343     for (BasicBlock &BB : F)
lib/Transforms/AggressiveInstCombine/TruncInstCombine.cpp
  391   for (auto &BB : F) {
lib/Transforms/CFGuard/CFGuard.cpp
  267   for (BasicBlock &BB : F.getBasicBlockList()) {
lib/Transforms/Coroutines/CoroEarly.cpp
  126     auto *Entry = BasicBlock::Create(C, "entry", NoopFn);
  126     auto *Entry = BasicBlock::Create(C, "entry", NoopFn);
lib/Transforms/Coroutines/CoroElide.cpp
  157   for (BasicBlock &B : *F) {
lib/Transforms/Coroutines/CoroFrame.cpp
   45   SmallVector<BasicBlock *, SmallVectorThreshold> V;
   51     for (BasicBlock &BB : F)
   56   size_t blockToIndex(BasicBlock *BB) const {
   62   BasicBlock *indexToBlock(unsigned Index) const { return V[Index]; }
   91     BasicBlock *BB = Mapping.indexToBlock(&BD - &Block[0]);
   95   BlockData &getBlockData(BasicBlock *BB) {
  104   bool hasPathCrossingSuspendPoint(BasicBlock *DefBB, BasicBlock *UseBB) const {
  104   bool hasPathCrossingSuspendPoint(BasicBlock *DefBB, BasicBlock *UseBB) const {
  115   bool isDefinitionAcrossSuspend(BasicBlock *DefBB, User *U) const {
  124     BasicBlock *UseBB = I->getParent();
  142     auto *DefBB = I.getParent();
  169     BasicBlock *const B = Mapping.indexToBlock(I);
  202     BasicBlock *SuspendBlock = BarrierInst->getParent();
  225       for (BasicBlock *SI : successors(B)) {
  299   BasicBlock *userBlock() const { return User->getParent(); }
  553   BasicBlock *CurrentBlock = CatchSwitch->getParent();
  554   BasicBlock *NewBlock = CurrentBlock->splitBasicBlock(CatchSwitch);
  597   BasicBlock *CurrentBlock = nullptr;
  691           BasicBlock *DefBlock = cast<Instruction>(E.def())->getParent();
  743   BasicBlock *FramePtrBB = FramePtr->getParent();
  796 static void setUnwindEdgeTo(Instruction *TI, BasicBlock *Succ) {
  809 static void updatePhiNodes(BasicBlock *DestBB, BasicBlock *OldPred,
  809 static void updatePhiNodes(BasicBlock *DestBB, BasicBlock *OldPred,
  810                            BasicBlock *NewPred,
  813   for (BasicBlock::iterator I = DestBB->begin(); isa<PHINode>(I); ++I) {
  836 static BasicBlock *ehAwareSplitEdge(BasicBlock *BB, BasicBlock *Succ,
  836 static BasicBlock *ehAwareSplitEdge(BasicBlock *BB, BasicBlock *Succ,
  836 static BasicBlock *ehAwareSplitEdge(BasicBlock *BB, BasicBlock *Succ,
  843   auto *NewBB = BasicBlock::Create(BB->getContext(), "", BB->getParent(), Succ);
  843   auto *NewBB = BasicBlock::Create(BB->getContext(), "", BB->getParent(), Succ);
  867 static void rewritePHIs(BasicBlock &BB) {
  902   SmallVector<BasicBlock *, 8> Preds(pred_begin(&BB), pred_end(&BB));
  903   for (BasicBlock *Pred : Preds) {
  904     auto *IncomingBB = ehAwareSplitEdge(Pred, &BB, LandingPad, ReplPHI);
  928   SmallVector<BasicBlock *, 8> WorkList;
  930   for (BasicBlock &BB : F)
  935   for (BasicBlock *BB : WorkList)
  957   BasicBlock *CurrentBlock = nullptr;
  994 static BasicBlock *splitBlockIfNotFirst(Instruction *I, const Twine &Name) {
  995   auto *BB = I->getParent();
 1012 static bool isSuspendBlock(BasicBlock *BB) {
 1016 typedef SmallPtrSet<BasicBlock*, 8> VisitedBlocksSet;
 1020 static bool isSuspendReachableFrom(BasicBlock *From,
 1057 static bool willLeaveFunctionImmediatelyAfter(BasicBlock *BB,
lib/Transforms/Coroutines/CoroInternal.h
  110   BasicBlock *AllocaSpillBlock;
  115     BasicBlock *ResumeEntryBlock;
  123     BasicBlock *ReturnBlock;
lib/Transforms/Coroutines/CoroSplit.cpp
  215   auto *BB = End->getParent();
  277   auto *NewEntry = BasicBlock::Create(C, "resume.entry", &F);
  277   auto *NewEntry = BasicBlock::Create(C, "resume.entry", &F);
  278   auto *UnreachBB = BasicBlock::Create(C, "unreachable", &F);
  278   auto *UnreachBB = BasicBlock::Create(C, "unreachable", &F);
  339     auto *SuspendBB = S->getParent();
  340     auto *ResumeBB =
  342     auto *LandingBB = ResumeBB->splitBasicBlock(
  376   BasicBlock *ResumeBB = FinalCaseIt->getCaseSuccessor();
  379     BasicBlock *OldSwitchBB = Switch->getParent();
  380     auto *NewSwitchBB = OldSwitchBB->splitBasicBlock(Switch, "Switch");
  565   auto *Entry = cast<BasicBlock>(VMap[Shape.AllocaSpillBlock]);
  565   auto *Entry = cast<BasicBlock>(VMap[Shape.AllocaSpillBlock]);
  589     auto *SwitchBB =
  590       cast<BasicBlock>(VMap[Shape.SwitchLowering.ResumeEntryBlock]);
  890 scanPHIsAndUpdateValueMap(Instruction *Prev, BasicBlock *NewBlock,
  892   auto *PrevBB = Prev->getParent();
  919         BasicBlock *BB = BR->getSuccessor(0);
  930         BasicBlock *BB = SI->findCaseValue(Cond)->getCaseSuccessor();
 1018 static bool hasCallsInBlocksBetween(BasicBlock *SaveBB, BasicBlock *ResDesBB) {
 1018 static bool hasCallsInBlocksBetween(BasicBlock *SaveBB, BasicBlock *ResDesBB) {
 1019   SmallPtrSet<BasicBlock *, 8> Set;
 1020   SmallVector<BasicBlock *, 8> Worklist;
 1029     auto *BB = Worklist.pop_back_val();
 1031     for (auto *Pred : predecessors(BB))
 1040   for (auto *BB : Set)
 1048   auto *SaveBB = Save->getParent();
 1049   auto *ResumeOrDestroyBB = ResumeOrDestroy->getParent();
 1076     auto *Pred = Suspend->getParent()->getSinglePredecessor();
 1233   BasicBlock *ReturnBB = nullptr;
 1258       ReturnBB = BasicBlock::Create(F.getContext(), "coro.return", &F,
 1425   auto *Entry = BasicBlock::Create(C, "entry", DevirtFn);
 1425   auto *Entry = BasicBlock::Create(C, "entry", DevirtFn);
lib/Transforms/IPO/ArgumentPromotion.cpp
  624   BasicBlock &EntryBlock = Arg->getParent()->front();
  749   df_iterator_default_set<BasicBlock *, 16> TranspBlocks;
  754     BasicBlock *BB = Load->getParent();
  763     for (BasicBlock *P : predecessors(BB)) {
  764       for (BasicBlock *TranspBB : inverse_depth_first_ext(P, TranspBlocks))
  922   for (BasicBlock &BB : *F)
lib/Transforms/IPO/Attributor.cpp
  220         const BasicBlock *IncomingBB = PHI->getIncomingBlock(u);
 1809   SmallPtrSet<BasicBlock *, 32> Visited;
 1812   for (BasicBlock *BB : depth_first(&F)) {
 1814     for (auto *SuccBB : successors(BB)) {
 2156       BasicBlock *BB = I->getParent();
 2163         BasicBlock *NormalDestBB = II->getNormalDest();
 2204             BasicBlock *SplitBB =
 2224     for (BasicBlock &BB : F)
 2235   bool isAssumedDead(const BasicBlock *BB) const override {
 2245   bool isKnownDead(const BasicBlock *BB) const override {
 2281   void assumeLive(Attributor &A, const BasicBlock &BB) {
 2300   DenseSet<const BasicBlock *> AssumedLiveBlocks;
 2329   const BasicBlock *BB = I->getParent();
 2368   for (const BasicBlock *SuccBB : successors(BB)) {
 3594         auto *NBB = II->getNormalDest();
 4610       SmallVector<BasicBlock *, 8> ToBeDeletedBBs;
lib/Transforms/IPO/BlockExtractor.cpp
   41   SmallVector<SmallVector<BasicBlock *, 16>, 4> GroupsOfBlocks;
   47   void init(const SmallVectorImpl<SmallVector<BasicBlock *, 16>>
   49     for (const SmallVectorImpl<BasicBlock *> &GroupOfBlocks :
   51       SmallVector<BasicBlock *, 16> NewGroup;
   61   BlockExtractor(const SmallVectorImpl<BasicBlock *> &BlocksToExtract,
   65     SmallVector<SmallVector<BasicBlock *, 16>, 4> MassagedGroupsOfBlocks;
   66     for (BasicBlock *BB : BlocksToExtract) {
   67       SmallVector<BasicBlock *, 16> NewGroup;
   74   BlockExtractor(const SmallVectorImpl<SmallVector<BasicBlock *, 16>>
   96     const SmallVectorImpl<BasicBlock *> &BlocksToExtract, bool EraseFunctions) {
  100     const SmallVectorImpl<SmallVector<BasicBlock *, 16>>
  136   for (BasicBlock &BB : F) {
  141       BasicBlock *Parent = II->getParent();
  142       BasicBlock *LPad = II->getUnwindDest();
  158       SmallVector<BasicBlock *, 2> NewBBs;
  195     SmallVector<BasicBlock *, 32> BlocksToExtractVec;
  196     for (BasicBlock *BB : BBs) {
lib/Transforms/IPO/CrossDSOCFI.cpp
  126   BasicBlock *BB = BasicBlock::Create(Ctx, "entry", F);
  126   BasicBlock *BB = BasicBlock::Create(Ctx, "entry", F);
  127   BasicBlock *ExitBB = BasicBlock::Create(Ctx, "exit", F);
  127   BasicBlock *ExitBB = BasicBlock::Create(Ctx, "exit", F);
  129   BasicBlock *TrapBB = BasicBlock::Create(Ctx, "fail", F);
  129   BasicBlock *TrapBB = BasicBlock::Create(Ctx, "fail", F);
  144     BasicBlock *TestBB = BasicBlock::Create(Ctx, "test", F);
  144     BasicBlock *TestBB = BasicBlock::Create(Ctx, "test", F);
lib/Transforms/IPO/DeadArgumentElimination.cpp
  139   for (BasicBlock &BB : Fn) {
  971           BasicBlock *NewEdge = SplitEdge(New->getParent(), II->getNormalDest());
 1033     for (BasicBlock &BB : *NF)
lib/Transforms/IPO/FunctionAttrs.cpp
  593       for (BasicBlock &BB : *F)
  638   BasicBlock &Entry = F.getEntryBlock();
  863   for (BasicBlock &BB : *F)
  976   for (BasicBlock &BB : *F)
 1368   for (auto &BB : *F)
lib/Transforms/IPO/GlobalDCE.cpp
   87   BasicBlock &Entry = F->getEntryBlock();
lib/Transforms/IPO/GlobalOpt.cpp
 1346   BasicBlock *OrigBB = CI->getParent();
 1347   BasicBlock *ContBB =
 1352   BasicBlock *NullPtrBlock = BasicBlock::Create(OrigBB->getContext(),
 1352   BasicBlock *NullPtrBlock = BasicBlock::Create(OrigBB->getContext(),
 1369     BasicBlock *FreeBlock = BasicBlock::Create(Cmp->getContext(), "free_it",
 1369     BasicBlock *FreeBlock = BasicBlock::Create(Cmp->getContext(), "free_it",
 1371     BasicBlock *NextBlock = BasicBlock::Create(Cmp->getContext(), "next",
 1371     BasicBlock *NextBlock = BasicBlock::Create(Cmp->getContext(), "next",
 2156   for (BasicBlock &BB : *F)
 2217   for (BasicBlock &BB : F) {
lib/Transforms/IPO/HotColdSplitting.cpp
   94 bool blockEndsInUnreachable(const BasicBlock &BB) {
  103 bool unlikelyExecuted(BasicBlock &BB) {
  129 static bool mayExtractBlock(const BasicBlock &BB) {
  218 static int getOutliningBenefit(ArrayRef<BasicBlock *> Region,
  223   for (BasicBlock *BB : Region)
  233 static int getOutliningPenalty(ArrayRef<BasicBlock *> Region,
  258   SmallPtrSet<BasicBlock *, 2> SuccsOutsideRegion;
  259   for (BasicBlock *BB : Region) {
  267     for (BasicBlock *SuccBB : successors(BB)) {
  351 using BlockTy = std::pair<BasicBlock *, unsigned>;
  367   BasicBlock *SuggestedEntryPoint = nullptr;
  373   static unsigned getEntryPointScore(BasicBlock &BB, unsigned Score) {
  390   static std::vector<OutliningRegion> create(BasicBlock &SinkBB,
  394     SmallPtrSet<BasicBlock *, 4> RegionBlocks;
  413       BasicBlock &PredBB = **PredIt;
  461       BasicBlock &SuccBB = **SuccIt;
  491   ArrayRef<std::pair<BasicBlock *, unsigned>> blocks() const { return Blocks; }
  504     BasicBlock *NextEntryPoint = nullptr;
  508       BasicBlock *BB = Block.first;
  534   SmallPtrSet<BasicBlock *, 4> ColdBlocks;
  560   for (BasicBlock *BB : RPOT) {
lib/Transforms/IPO/IPConstantPropagation.cpp
  178   for (BasicBlock &BB : F)
lib/Transforms/IPO/Inliner.cpp
  508                               const BasicBlock *Block, const Function &Callee,
  562     for (BasicBlock &BB : *F)
  682         BasicBlock *Block = CS.getParent();
 1074       BasicBlock *Block = CS.getParent();
lib/Transforms/IPO/LoopExtractor.cpp
  117     SmallVector<BasicBlock*, 8> ExitBlocks;
  131     SmallVector<BasicBlock*, 8> ExitBlocks;
lib/Transforms/IPO/LowerTypeTests.cpp
  738   BasicBlock *InitialBB = CI->getParent();
  782         BasicBlock *Then = InitialBB->splitBasicBlock(CI->getIterator());
  783         BasicBlock *Else = Br->getSuccessor(1);
 1257     BasicBlock *BB =
 1258         BasicBlock::Create(M.getContext(), "entry", WeakInitializerFn);
 1384   BasicBlock *BB = BasicBlock::Create(M.getContext(), "entry", F);
 1384   BasicBlock *BB = BasicBlock::Create(M.getContext(), "entry", F);
lib/Transforms/IPO/MergeFunctions.cpp
  263   void filterInstsUnrelatedToPDI(BasicBlock *GEntryBlock,
  530   std::vector<BasicBlock *> WorklistBB;
  537     BasicBlock *BB = WorklistBB.back();
  553     BasicBlock *GEntryBlock, std::vector<Instruction *> &PDIUnrelatedWL) {
  555   for (BasicBlock::iterator BI = GEntryBlock->begin(), BIE = GEntryBlock->end();
  636   for (BasicBlock::iterator BI = GEntryBlock->begin(), BE = GEntryBlock->end();
  680   BasicBlock *GEntryBlock = nullptr;
  682   BasicBlock *BB = nullptr;
  700     BB = BasicBlock::Create(F->getContext(), "", NewG);
lib/Transforms/IPO/PartialInlining.cpp
  166   SmallVector<BasicBlock *, 4> Entries;
  169   BasicBlock *ReturnBlock = nullptr;
  172   BasicBlock *NonReturnBlock = nullptr;
  175   SmallVector<BasicBlock *, 4> ReturnBlockPreds;
  184     OutlineRegionInfo(ArrayRef<BasicBlock *> Region,
  185                       BasicBlock *EntryBlock, BasicBlock *ExitBlock,
  185                       BasicBlock *EntryBlock, BasicBlock *ExitBlock,
  186                       BasicBlock *ReturnBlock)
  189     SmallVector<BasicBlock *, 8> Region;
  190     BasicBlock *EntryBlock;
  191     BasicBlock *ExitBlock;
  192     BasicBlock *ReturnBlock;
  252     typedef std::pair<Function *, BasicBlock *> FuncBodyCallerPair;
  321   std::tuple<DebugLoc, BasicBlock *> getOneDebugLoc(Function *F) {
  324     BasicBlock *Block = CS.getParent();
  339   static int computeBBInlineCost(BasicBlock *BB);
  394   BasicBlock *EntryBlock = &F->front();
  415     BasicBlock *Dom = BlockList.front();
  421     BasicBlock *ExitBlock = nullptr;
  422     for (auto *Block : BlockList) {
  451   for (auto &BB : *F)
  464   BasicBlock *CurrEntry = EntryBlock;
  465   std::vector<BasicBlock *> DFS;
  466   DenseMap<BasicBlock *, bool> VisitedMap;
  476     auto *thisBB = DFS.back();
  500       SmallVector<BasicBlock *, 8> DominateVector;
  505       BasicBlock *ExitBlock = nullptr;
  510       for (auto *BB : DominateVector)
  531       for (auto *BB : DominateVector)
  534       BasicBlock *ReturnBlock = ExitBlock->getSingleSuccessor();
  557   BasicBlock *EntryBlock = &F->front();
  578     return std::make_tuple<BasicBlock *, BasicBlock *>(nullptr, nullptr);
  578     return std::make_tuple<BasicBlock *, BasicBlock *>(nullptr, nullptr);
  588     return std::make_tuple<BasicBlock *, BasicBlock *>(nullptr, nullptr);
  588     return std::make_tuple<BasicBlock *, BasicBlock *>(nullptr, nullptr);
  594   BasicBlock *CurrEntry = EntryBlock;
  606     BasicBlock *Succ1 = *succ_begin(CurrEntry);
  607     BasicBlock *Succ2 = *(succ_begin(CurrEntry) + 1);
  609     BasicBlock *ReturnBlock, *NonReturnBlock;
  620     BasicBlock *CommSucc;
  621     BasicBlock *OtherSucc;
  639   DenseSet<BasicBlock *> Entries;
  640   for (BasicBlock *E : OutliningInfo->Entries)
  654         for (BasicBlock *E : OutliningInfo->Entries) {
  676     BasicBlock *Cand = OutliningInfo->NonReturnBlock;
  683     BasicBlock *Succ1 = *succ_begin(Cand);
  684     BasicBlock *Succ2 = *(succ_begin(Cand) + 1);
  686     BasicBlock *ReturnBlock, *NonReturnBlock;
  709   for (auto *E : OI->Entries) {
  722   BasicBlock *OutliningCallBB = Cloner.OutlinedFunctions.back().second;
  848 int PartialInlinerImpl::computeBBInlineCost(BasicBlock *BB) {
  895     BasicBlock* OutliningCallBB = FuncBBPair.second;
  901     for (BasicBlock &BB : *OutlinedFunc)
  956     BasicBlock *CallBB = CS.getInstruction()->getParent();
  975   ClonedOI->ReturnBlock = cast<BasicBlock>(VMap[OI->ReturnBlock]);
  976   ClonedOI->NonReturnBlock = cast<BasicBlock>(VMap[OI->NonReturnBlock]);
  977   for (BasicBlock *BB : OI->Entries) {
  978     ClonedOI->Entries.push_back(cast<BasicBlock>(VMap[BB]));
  980   for (BasicBlock *E : OI->ReturnBlockPreds) {
  981     BasicBlock *NewE = cast<BasicBlock>(VMap[E]);
  981     BasicBlock *NewE = cast<BasicBlock>(VMap[E]);
 1004     SmallVector<BasicBlock *, 8> Region;
 1005     for (BasicBlock *BB : RegionInfo.Region) {
 1006       Region.push_back(cast<BasicBlock>(VMap[BB]));
 1008     BasicBlock *NewEntryBlock = cast<BasicBlock>(VMap[RegionInfo.EntryBlock]);
 1008     BasicBlock *NewEntryBlock = cast<BasicBlock>(VMap[RegionInfo.EntryBlock]);
 1009     BasicBlock *NewExitBlock = cast<BasicBlock>(VMap[RegionInfo.ExitBlock]);
 1009     BasicBlock *NewExitBlock = cast<BasicBlock>(VMap[RegionInfo.ExitBlock]);
 1010     BasicBlock *NewReturnBlock = nullptr;
 1012       NewReturnBlock = cast<BasicBlock>(VMap[RegionInfo.ReturnBlock]);
 1024     BasicBlock::iterator I = BB->begin();
 1047   BasicBlock *PreReturn = ClonedOI->ReturnBlock;
 1065   BasicBlock::iterator I = PreReturn->begin();
 1079     for (BasicBlock *E : ClonedOI->ReturnBlockPreds) {
 1106     for (BasicBlock* BB : Region)
 1158       BasicBlock *OutliningCallBB = OCS.getInstruction()->getParent();
 1201   std::vector<BasicBlock *> ToExtract;
 1205   for (BasicBlock &BB : *ClonedFunc)
 1224     BasicBlock *OutliningCallBB =
 1363     BasicBlock *Block;
lib/Transforms/IPO/PruneEH.cpp
   51 static void DeleteBasicBlock(BasicBlock *BB, CallGraph &CG);
  108       for (const BasicBlock &BB : *F) {
  193         BasicBlock *UnwindBlock = II->getUnwindDest();
  204     for (BasicBlock::iterator I = BB->begin(), E = BB->end(); I != E; )
  212           BasicBlock *New = BB->splitBasicBlock(I);
  231 static void DeleteBasicBlock(BasicBlock *BB, CallGraph &CG) {
  237   for (BasicBlock::iterator I = BB->end(), E = BB->begin(); I != E; ) {
  262     std::vector<BasicBlock *> Succs(succ_begin(BB), succ_end(BB));
lib/Transforms/IPO/SampleProfile.cpp
  141 using BlockWeightMap = DenseMap<const BasicBlock *, uint64_t>;
  142 using EquivalenceClassMap = DenseMap<const BasicBlock *, const BasicBlock *>;
  142 using EquivalenceClassMap = DenseMap<const BasicBlock *, const BasicBlock *>;
  143 using Edge = std::pair<const BasicBlock *, const BasicBlock *>;
  143 using Edge = std::pair<const BasicBlock *, const BasicBlock *>;
  146     DenseMap<const BasicBlock *, SmallVector<const BasicBlock *, 8>>;
  146     DenseMap<const BasicBlock *, SmallVector<const BasicBlock *, 8>>;
  299   ErrorOr<uint64_t> getBlockWeight(const BasicBlock *BB);
  309   void printBlockWeight(raw_ostream &OS, const BasicBlock *BB) const;
  310   void printBlockEquivalence(raw_ostream &OS, const BasicBlock *BB);
  314   void findEquivalencesFor(BasicBlock *BB1, ArrayRef<BasicBlock *> Descendants,
  314   void findEquivalencesFor(BasicBlock *BB1, ArrayRef<BasicBlock *> Descendants,
  315                            DominatorTreeBase<BasicBlock, IsPostDom> *DomTree);
  339   SmallPtrSet<const BasicBlock *, 32> VisitedBlocks;
  630                                                 const BasicBlock *BB) {
  631   const BasicBlock *Equiv = EquivalenceClass[BB];
  641                                            const BasicBlock *BB) const {
  721 ErrorOr<uint64_t> SampleProfileLoader::getBlockWeight(const BasicBlock *BB) {
  743   for (const auto &BB : F) {
  859   BasicBlock *BB = I->getParent();
  917     for (auto &BB : F) {
 1042     BasicBlock *BB1, ArrayRef<BasicBlock *> Descendants,
 1042     BasicBlock *BB1, ArrayRef<BasicBlock *> Descendants,
 1043     DominatorTreeBase<BasicBlock, IsPostDom> *DomTree) {
 1044   const BasicBlock *EC = EquivalenceClass[BB1];
 1046   for (const auto *BB2 : Descendants) {
 1084   SmallVector<BasicBlock *, 8> DominatedBBs;
 1087   for (auto &BB : F) {
 1088     BasicBlock *BB1 = &BB;
 1124   for (auto &BI : F) {
 1125     const BasicBlock *BB = &BI;
 1126     const BasicBlock *EquivBB = EquivalenceClass[BB];
 1171   for (const auto &BI : F) {
 1172     const BasicBlock *BB = &BI;
 1173     const BasicBlock *EC = EquivalenceClass[BB];
 1260           const BasicBlock *OtherEC;
 1317   for (auto &BI : F) {
 1318     BasicBlock *B1 = &BI;
 1321     SmallPtrSet<BasicBlock *, 16> Visited;
 1325       BasicBlock *B2 = *PI;
 1335       BasicBlock *B2 = *SI;
 1375   for (auto &BI : F) {
 1376     BasicBlock *BB = &BI;
 1381     BasicBlock *Header = L->getHeader();
 1420   for (auto &BI : F) {
 1421     BasicBlock *BB = &BI;
 1471       BasicBlock *Succ = TI->getSuccessor(I);
lib/Transforms/IPO/SyntheticCountsPropagation.cpp
  120     BasicBlock *CSBB = CS.getInstruction()->getParent();
lib/Transforms/IPO/WholeProgramDevirt.cpp
  322     BasicBlock *Block = CS.getParent();
 1072   BasicBlock *BB = BasicBlock::Create(M.getContext(), "", JT, nullptr);
 1072   BasicBlock *BB = BasicBlock::Create(M.getContext(), "", JT, nullptr);
lib/Transforms/InstCombine/InstCombineCalls.cpp
 1483   BasicBlock::iterator BI(I), BE(I.getParent()->end());
 3873     BasicBlock::iterator BI(II);
 4184   for (BasicBlock::iterator I = AdjustTramp->getIterator(),
 4660         BasicBlock::iterator I = II->getNormalDest()->getFirstInsertionPt();
 4663         BasicBlock::iterator I = CBI->getDefaultDest()->getFirstInsertionPt();
lib/Transforms/InstCombine/InstCombineCompares.cpp
  632     BasicBlock &Entry = A->getParent()->getEntryBlock();
 1461   BasicBlock *CmpBB = Cmp.getParent();
 1462   BasicBlock *DomBB = CmpBB->getSinglePredecessor();
 1467   BasicBlock *TrueBB, *FalseBB;
 4824                                     const BasicBlock *DB) const {
 4845   const BasicBlock *BB = SI->getParent();
 4902     BasicBlock *Succ = SI->getParent()->getTerminator()->getSuccessor(1);
lib/Transforms/InstCombine/InstCombineInternal.h
  457                         const BasicBlock *DB) const;
  643     BasicBlock *BB = Old.getParent();
lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp
  205       BasicBlock::iterator It(New);
  364       BasicBlock &EntryBlock = AI.getParent()->getParent()->getEntryBlock();
  980   BasicBlock::iterator BBI(LI);
 1409   BasicBlock::iterator BBI(SI);
 1493   BasicBlock *StoreBB = SI.getParent();
 1494   BasicBlock *DestBB = StoreBB->getTerminator()->getSuccessor(0);
 1502   BasicBlock *OtherBB = *PredIter;
 1510   BasicBlock::iterator BBI(OtherBB->getTerminator());
 1560     for (BasicBlock::iterator I = StoreBB->begin(); &*I != &SI; ++I) {
lib/Transforms/InstCombine/InstCombineMulDivRem.cpp
  610   BasicBlock::iterator BBI = I.getIterator(), BBFront = I.getParent()->begin();
lib/Transforms/InstCombine/InstCombinePHI.cpp
  178   auto *BB = PN.getParent();
  235     auto *IncomingBB = PN.getIncomingBlock(i);
  263         BasicBlock::iterator InsertPos(IncomingI);
  269         auto *InsertBB = &IncomingBB->getParent()->getEntryBlock();
  468       BasicBlock *InBB = PN.getIncomingBlock(i);
  494   BasicBlock::iterator BBI = L->getIterator(), E = L->getParent()->end();
 1031   DenseMap<BasicBlock*, Value*> PredValues;
 1056         BasicBlock *Pred = PN->getIncomingBlock(i);
 1239       BasicBlock *BBA = PN.getIncomingBlock(i);
 1240       BasicBlock *BBB = FirstPN->getIncomingBlock(i);
lib/Transforms/InstCombine/InstCombineVectorOps.cpp
  121     BasicBlock *inBB = PN->getIncomingBlock(i);
  143       BasicBlock::iterator InsertPos;
  548   BasicBlock *InsertionBlock = (ExtVecOpInst && !isa<PHINode>(ExtVecOpInst))
lib/Transforms/InstCombine/InstructionCombining.cpp
  952   BasicBlock *NonConstBB = nullptr;
 1001     BasicBlock *PhiTransBB = PN->getParent();
 1003       BasicBlock *ThisBB = PN->getIncomingBlock(i);
 2448   BasicBlock *FreeInstrBB = FI.getParent();
 2449   BasicBlock *PredBB = FreeInstrBB->getSinglePredecessor();
 2460   BasicBlock *SuccBB;
 2480   BasicBlock *TrueBB, *FalseBB;
 2499   for (BasicBlock::iterator It = FreeInstrBB->begin(), End = FreeInstrBB->end();
 3118 static bool TryToSinkInstruction(Instruction *I, BasicBlock *DestBlock) {
 3120   BasicBlock *SrcBlock = I->getParent();
 3146     for (BasicBlock::iterator Scan = I->getIterator(),
 3152   BasicBlock::iterator InsertPos = DestBlock->getFirstInsertionPt();
 3262       BasicBlock *BB = I->getParent();
 3264       BasicBlock *UserParent;
 3330         BasicBlock *InstParent = I->getParent();
 3331         BasicBlock::iterator InsertPos = I->getIterator();
 3370 static bool AddReachableCodeToWorklist(BasicBlock *BB, const DataLayout &DL,
 3371                                        SmallPtrSetImpl<BasicBlock *> &Visited,
 3375   SmallVector<BasicBlock*, 256> Worklist;
 3388     for (BasicBlock::iterator BBI = BB->begin(), E = BB->end(); BBI != E; ) {
 3449         BasicBlock *ReachableBB = BI->getSuccessor(!CondVal);
 3460     for (BasicBlock *SuccBB : successors(TI))
 3487   SmallPtrSet<BasicBlock *, 32> Visited;
 3494   for (BasicBlock &BB : F) {
lib/Transforms/Instrumentation/AddressSanitizer.cpp
  927     for (BasicBlock *BB : depth_first(&F.getEntryBlock())) visit(*BB);
 1713     BasicBlock *NextBB = CheckTerm->getSuccessor(0);
 1719       BasicBlock *CrashBlock =
 1720         BasicBlock::Create(*C, "", NextBB->getParent(), NextBB);
 1771   for (auto &BB : GlobalInit.getBasicBlockList())
 2034   BasicBlock *AsanDtorBB = BasicBlock::Create(*C, "", AsanDtorFunction);
 2034   BasicBlock *AsanDtorBB = BasicBlock::Create(*C, "", AsanDtorFunction);
 2645   SmallVector<BasicBlock *, 16> AllBlocks;
 2653   for (auto &BB : F) {
 2923   BasicBlock *CondBlock = cast<Instruction>(Cond)->getParent();
 2925   BasicBlock *ThenBlock = ThenTerm->getParent();
 2949   BasicBlock &FirstBB = *F.begin();
lib/Transforms/Instrumentation/BoundsChecking.cpp
  125   BasicBlock::iterator SplitI = IRB.GetInsertPoint();
  126   BasicBlock *OldBB = SplitI->getParent();
  127   BasicBlock *Cont = OldBB->splitBasicBlock(SplitI);
  175   BasicBlock *TrapBB = nullptr;
  185     TrapBB = BasicBlock::Create(Fn->getContext(), "trap", Fn);
lib/Transforms/Instrumentation/CFGMST.h
   46   DenseMap<const BasicBlock *, std::unique_ptr<BBInfo>> BBInfos;
   61   bool unionGroups(const BasicBlock *BB1, const BasicBlock *BB2) {
   61   bool unionGroups(const BasicBlock *BB1, const BasicBlock *BB2) {
   81   BBInfo &getBBInfo(const BasicBlock *BB) const {
   88   BBInfo *findBBInfo(const BasicBlock *BB) const {
  101     const BasicBlock *Entry = &(F.getEntryBlock());
  127           BasicBlock *TargetBB = TI->getSuccessor(i);
  239       const BasicBlock *BB = BI.first;
  253   Edge &addEdge(const BasicBlock *Src, const BasicBlock *Dest, uint64_t W) {
  253   Edge &addEdge(const BasicBlock *Src, const BasicBlock *Dest, uint64_t W) {
lib/Transforms/Instrumentation/CGProfile.cpp
   47     for (auto &BB : F) {
lib/Transforms/Instrumentation/ControlHeightReduction.cpp
  188   BasicBlock *getEntryBlock() {
  193   BasicBlock *getExitBlock() {
  202     BasicBlock *NextEntry = Next->getEntryBlock();
  207     for (BasicBlock *Pred : predecessors(NextEntry))
  281     BasicBlock *Parent = I->getParent();
  376                         BasicBlock *PreEntryBlock,
  377                         BasicBlock *ExitBlock,
  380   BranchInst *createMergedBranch(BasicBlock *PreEntryBlock,
  381                                  BasicBlock *EntryBlock,
  382                                  BasicBlock *NewEntryBlock,
  385                                BasicBlock *PreEntryBlock,
  669   BasicBlock *IfThen = BI->getSuccessor(0);
  670   BasicBlock *IfElse = BI->getSuccessor(1);
  712   BasicBlock *EntryBB = R->getEntry();
  748   BasicBlock *Entry = R->getEntry();
  749   BasicBlock *Exit = R->getExit();  // null if top level.
  767   for (BasicBlock *Pred : predecessors(Entry))
  781       BasicBlock *S0 = BI->getSuccessor(0);
  782       BasicBlock *S1 = BI->getSuccessor(1);
  822       BasicBlock *BB = E->getEntry();
  890   BasicBlock *EntryBB = R->getEntry();
 1573                               BasicBlock *EntryBlock, BasicBlock *ExitBlock,
 1573                               BasicBlock *EntryBlock, BasicBlock *ExitBlock,
 1575   DenseSet<BasicBlock *> BlocksInScopeSet;
 1576   SmallVector<BasicBlock *, 8> BlocksInScopeVec;
 1578     for (BasicBlock *BB : RI.R->blocks()) { // This includes the blocks in the
 1589   for (BasicBlock *BB : BlocksInScopeVec) {
 1619         for (BasicBlock *Pred : predecessors(ExitBlock)) {
 1661     CHRScope *Scope, BasicBlock *PreEntryBlock) {
 1700   BasicBlock *EntryBlock = FirstRegion->getEntry();
 1702   BasicBlock *ExitBlock = LastRegion->getExit();
 1724   BasicBlock *NewEntryBlock =
 1729   BasicBlock *PreEntryBlock = EntryBlock;
 1763                            BasicBlock *PreEntryBlock,
 1764                            BasicBlock *ExitBlock,
 1772   SmallVector<BasicBlock*, 8> NewBlocks;
 1774     for (BasicBlock *BB : RI.R->blocks()) { // This includes the blocks in the
 1777       BasicBlock *NewBB = CloneBasicBlock(BB, VMap, ".nonchr", &F);
 1802         BasicBlock *Pred = PN.getIncomingBlock(I);
 1808           PN.addIncoming(V, cast<BasicBlock>(VMap[Pred]));
 1815 BranchInst *CHR::createMergedBranch(BasicBlock *PreEntryBlock,
 1816                                     BasicBlock *EntryBlock,
 1817                                     BasicBlock *NewEntryBlock,
 1831                                          cast<BasicBlock>(VMap[NewEntryBlock]),
 1842                                   BasicBlock *PreEntryBlock,
 1897   BasicBlock *IfThen = BI->getSuccessor(1);
 1898   BasicBlock *IfElse = BI->getSuccessor(0);
 1899   BasicBlock *RegionExitBlock = R->getExit();
 1911   BasicBlock *HotTarget = IsTrueBiased ? IfThen : IfElse;
lib/Transforms/Instrumentation/DataFlowSanitizer.cpp
  401     BasicBlock *Block;
  657   BasicBlock *BB = BasicBlock::Create(*Ctx, "entry", NewF);
  657   BasicBlock *BB = BasicBlock::Create(*Ctx, "entry", NewF);
  687     BasicBlock *BB = BasicBlock::Create(*Ctx, "entry", F);
  687     BasicBlock *BB = BasicBlock::Create(*Ctx, "entry", F);
  935     SmallVector<BasicBlock *, 4> BBList(depth_first(&i->getEntryBlock()));
  937     for (BasicBlock *i : BBList) {
 1127     BasicBlock *Head = Pos->getParent();
 1137     BasicBlock *Tail = BI->getSuccessor(0);
 1231     BasicBlock *FallbackBB = BasicBlock::Create(*DFS.Ctx, "", F);
 1231     BasicBlock *FallbackBB = BasicBlock::Create(*DFS.Ctx, "", F);
 1251     BasicBlock *Head = Pos->getParent();
 1252     BasicBlock *Tail = Head->splitBasicBlock(Pos->getIterator());
 1272       BasicBlock *NextBB = BasicBlock::Create(*DFS.Ctx, "", F);
 1272       BasicBlock *NextBB = BasicBlock::Create(*DFS.Ctx, "", F);
 1687         BasicBlock *NewBB =
lib/Transforms/Instrumentation/GCOVProfiling.cpp
  351       for (auto &BB : *F) {
  367     GCOVBlock &getBlock(BasicBlock *BB) {
  379       for (BasicBlock &I : *F) {
  422       for (BasicBlock &I : *F) {
  438       for (BasicBlock &I : *F)
  448     DenseMap<BasicBlock *, GCOVBlock> Blocks;
  595   for (auto &BB : F) {
  621 static bool shouldKeepInEntry(BasicBlock::iterator It) {
  701       BasicBlock &EntryBlock = F.getEntryBlock();
  702       BasicBlock::iterator It = EntryBlock.begin();
  718       for (auto &BB : F) {
  786       DenseMap<std::pair<BasicBlock *, BasicBlock *>, unsigned> EdgeToCounter;
  786       DenseMap<std::pair<BasicBlock *, BasicBlock *>, unsigned> EdgeToCounter;
  788       for (auto &BB : F) {
  793           for (BasicBlock *Succ : successors(TI)) {
  810       for (auto &BB : F) {
  818           for (BasicBlock *Pred : predecessors(&BB)) {
  863     BasicBlock *BB = BasicBlock::Create(*Ctx, "entry", F);
  863     BasicBlock *BB = BasicBlock::Create(*Ctx, "entry", F);
  952   BasicBlock *BB = BasicBlock::Create(*Ctx, "entry", WriteoutF);
  952   BasicBlock *BB = BasicBlock::Create(*Ctx, "entry", WriteoutF);
 1083   auto *FileLoopHeader =
 1084       BasicBlock::Create(*Ctx, "file.loop.header", WriteoutF);
 1085   auto *CounterLoopHeader =
 1086       BasicBlock::Create(*Ctx, "counter.loop.header", WriteoutF);
 1087   auto *FileLoopLatch = BasicBlock::Create(*Ctx, "file.loop.latch", WriteoutF);
 1087   auto *FileLoopLatch = BasicBlock::Create(*Ctx, "file.loop.latch", WriteoutF);
 1088   auto *ExitBB = BasicBlock::Create(*Ctx, "exit", WriteoutF);
 1088   auto *ExitBB = BasicBlock::Create(*Ctx, "exit", WriteoutF);
 1203   BasicBlock *Entry = BasicBlock::Create(*Ctx, "entry", FlushF);
 1203   BasicBlock *Entry = BasicBlock::Create(*Ctx, "entry", FlushF);
lib/Transforms/Instrumentation/HWAddressSanitizer.cpp
 1117   for (auto &BB : F) {
 1211     for (auto &BB : F)
 1480     auto *BB = BasicBlock::Create(*C, "entry", ThunkFn);
 1480     auto *BB = BasicBlock::Create(*C, "entry", ThunkFn);
lib/Transforms/Instrumentation/InstrOrderFile.cpp
  117     BasicBlock *OrigEntry = &F.getEntryBlock();
  125     BasicBlock *NewEntry =
  126         BasicBlock::Create(M.getContext(), "order_file_entry", &F, OrigEntry);
  129     BasicBlock *UpdateOrderFileBB =
  130         BasicBlock::Create(M.getContext(), "order_file_set", &F, OrigEntry);
lib/Transforms/Instrumentation/InstrProfiling.cpp
  183       BasicBlock *PH, ArrayRef<BasicBlock *> ExitBlocks,
  183       BasicBlock *PH, ArrayRef<BasicBlock *> ExitBlocks,
  196       BasicBlock *ExitBlock = ExitBlocks[i];
  227   ArrayRef<BasicBlock *> ExitBlocks;
  244     SmallVector<BasicBlock *, 8> LoopExitBlocks;
  245     SmallPtrSet<BasicBlock *, 8> BlockSet;
  248     for (BasicBlock *ExitBlock : LoopExitBlocks) {
  273         auto *BB = Cand.first->getParent();
  305     SmallVector<BasicBlock *, 8> ExitingBlocks;
  318     SmallVector<BasicBlock *, 8> LoopExitBlocks;
  328     BasicBlock *PH = LP->getLoopPreheader();
  332     SmallVector<BasicBlock *, 8> ExitingBlocks;
  352     for (auto *TargetBlock : LoopExitBlocks) {
  366   SmallVector<BasicBlock *, 8> ExitBlocks;
  412   for (BasicBlock &BB : *F) {
  458     BasicBlock *BB = CounterLoad->getParent();
  518     for (BasicBlock &BB : F)
  961   IRBuilder<> IRB(BasicBlock::Create(M->getContext(), "", RegisterF));
 1007   IRBuilder<> IRB(BasicBlock::Create(M->getContext(), "", User));
 1043   IRBuilder<> IRB(BasicBlock::Create(M->getContext(), "", F));
lib/Transforms/Instrumentation/Instrumentation.cpp
   25 static BasicBlock::iterator moveBeforeInsertPoint(BasicBlock::iterator I, BasicBlock::iterator IP) {
   25 static BasicBlock::iterator moveBeforeInsertPoint(BasicBlock::iterator I, BasicBlock::iterator IP) {
   25 static BasicBlock::iterator moveBeforeInsertPoint(BasicBlock::iterator I, BasicBlock::iterator IP) {
   41 BasicBlock::iterator llvm::PrepareToSplitEntryBlock(BasicBlock &BB,
   41 BasicBlock::iterator llvm::PrepareToSplitEntryBlock(BasicBlock &BB,
   42                                                     BasicBlock::iterator IP) {
lib/Transforms/Instrumentation/MemorySanitizer.cpp
 1026   BasicBlock *ActualFnStart;
 1252   BasicBlock *insertKmsanPrologue(Function &F) {
 1253     BasicBlock *ret =
 1288     for (BasicBlock *BB : depth_first(ActualFnStart))
 3359     BasicBlock::iterator NextInsn;
 3364       BasicBlock *NormalDest = cast<InvokeInst>(&I)->getNormalDest();
lib/Transforms/Instrumentation/PGOInstrumentation.cpp
  481   const BasicBlock *SrcBB;
  482   const BasicBlock *DestBB;
  488   PGOEdge(const BasicBlock *Src, const BasicBlock *Dest, uint64_t W = 1)
  488   PGOEdge(const BasicBlock *Src, const BasicBlock *Dest, uint64_t W = 1)
  548   void getInstrumentBBs(std::vector<BasicBlock *> &InstrumentBBs);
  552   BasicBlock *getInstrBB(Edge *E);
  555   BBInfo &getBBInfo(const BasicBlock *BB) const { return MST.getBBInfo(BB); }
  558   BBInfo *findBBInfo(const BasicBlock *BB) const { return MST.findBBInfo(BB); }
  614   for (auto &BB : F) {
  617       BasicBlock *Succ = TI->getSuccessor(I);
  722     std::vector<BasicBlock *> &InstrumentBBs) {
  730     BasicBlock *InstrBB = getInstrBB(E);
  739     const BasicBlock *SrcBB = E->SrcBB;
  740     const BasicBlock *DestBB = E->DestBB;
  751 BasicBlock *FuncPGOInstrumentation<Edge, BBInfo>::getInstrBB(Edge *E) {
  755   BasicBlock *SrcBB = const_cast<BasicBlock *>(E->SrcBB);
  756   BasicBlock *DestBB = const_cast<BasicBlock *>(E->DestBB);
  780   BasicBlock *InstrBB = SplitCriticalEdge(TI, SuccNum);
  813   std::vector<BasicBlock *> InstrumentBBs;
  820   for (auto *InstrBB : InstrumentBBs) {
  878   PGOUseEdge(const BasicBlock *Src, const BasicBlock *Dest, uint64_t W = 1)
  878   PGOUseEdge(const BasicBlock *Src, const BasicBlock *Dest, uint64_t W = 1)
  994   UseBBInfo &getBBInfo(const BasicBlock *BB) const {
  999   UseBBInfo *findBBInfo(const BasicBlock *BB) const {
 1066   std::vector<BasicBlock *> InstrumentBBs;
 1077   for (BasicBlock *InstrBB : InstrumentBBs) {
 1098     const BasicBlock *SrcBB = E->SrcBB;
 1106       const BasicBlock *DestBB = E->DestBB;
 1220     for (auto &BB : reverse(F)) {
 1262   for (auto &BB : F) {
 1272   for (auto &BB : F) {
 1292   for (auto &BB : F) {
 1310       const BasicBlock *SrcBB = E->SrcBB;
 1311       const BasicBlock *DestBB = E->DestBB;
 1324 static bool isIndirectBrTarget(BasicBlock *BB) {
 1335   for (auto &BB : F) {
 1686 static std::string getSimpleNodeName(const BasicBlock *Node) {
 1751   using NodeRef = const BasicBlock *;
 1782   std::string getNodeLabel(const BasicBlock *Node, const PGOUseFunc *Graph) {
lib/Transforms/Instrumentation/PGOMemOPSizeOpt.cpp
  337   BasicBlock *BB = MI->getParent();
  342   BasicBlock *DefaultBB = SplitBlock(BB, MI, DT);
  343   BasicBlock::iterator It(*MI);
  346   BasicBlock *MergeBB = SplitBlock(DefaultBB, &(*It), DT);
  373     BasicBlock *CaseBB = BasicBlock::Create(
  373     BasicBlock *CaseBB = BasicBlock::Create(
lib/Transforms/Instrumentation/PoisonChecking.cpp
  261   for (BasicBlock &BB : F)
  273   for (BasicBlock &BB : F)
  301   for (BasicBlock &BB : F)
lib/Transforms/Instrumentation/SanitizerCoverage.cpp
  204   bool InjectCoverage(Function &F, ArrayRef<BasicBlock *> AllBlocks,
  209   GlobalVariable *CreatePCArray(Function &F, ArrayRef<BasicBlock *> AllBlocks);
  210   void CreateFunctionLocalArrays(Function &F, ArrayRef<BasicBlock *> AllBlocks);
  211   void InjectCoverageAtBlock(Function &F, BasicBlock &BB, size_t Idx,
  480 static bool isFullDominator(const BasicBlock *BB, const DominatorTree *DT) {
  484   for (const BasicBlock *SUCC : make_range(succ_begin(BB), succ_end(BB))) {
  493 static bool isFullPostDominator(const BasicBlock *BB,
  498   for (const BasicBlock *PRED : make_range(pred_begin(BB), pred_end(BB))) {
  506 static bool shouldInstrumentBlock(const Function &F, const BasicBlock *BB,
  541 static bool IsBackEdge(BasicBlock *From, BasicBlock *To,
  541 static bool IsBackEdge(BasicBlock *From, BasicBlock *To,
  561         for (BasicBlock *B : BR->successors())
  594   SmallVector<BasicBlock *, 16> BlocksToInstrument;
  604   for (auto &BB : F) {
  668                                        ArrayRef<BasicBlock *> AllBlocks) {
  695     Function &F, ArrayRef<BasicBlock *> AllBlocks) {
  709                                              ArrayRef<BasicBlock *> AllBlocks,
  847 void ModuleSanitizerCoverage::InjectCoverageAtBlock(Function &F, BasicBlock &BB,
  850   BasicBlock::iterator IP = BB.getFirstInsertionPt();
lib/Transforms/Instrumentation/ThreadSanitizer.cpp
  454   for (auto &BB : F) {
lib/Transforms/ObjCARC/DependencyAnalysis.cpp
  221                                 BasicBlock *StartBB, Instruction *StartInst,
  223                                 SmallPtrSetImpl<const BasicBlock *> &Visited,
  225   BasicBlock::iterator StartPos = StartInst->getIterator();
  227   SmallVector<std::pair<BasicBlock *, BasicBlock::iterator>, 4> Worklist;
  227   SmallVector<std::pair<BasicBlock *, BasicBlock::iterator>, 4> Worklist;
  230     std::pair<BasicBlock *, BasicBlock::iterator> Pair =
  230     std::pair<BasicBlock *, BasicBlock::iterator> Pair =
  232     BasicBlock *LocalStartBB = Pair.first;
  233     BasicBlock::iterator LocalStartPos = Pair.second;
  234     BasicBlock::iterator StartBBBegin = LocalStartBB->begin();
  244             BasicBlock *PredBB = *PI;
  262   for (const BasicBlock *BB : Visited) {
  265     for (const BasicBlock *Succ : successors(BB))
lib/Transforms/ObjCARC/DependencyAnalysis.h
   55                       BasicBlock *StartBB, Instruction *StartInst,
   57                       SmallPtrSetImpl<const BasicBlock *> &Visited,
lib/Transforms/ObjCARC/ObjCARC.h
   87   auto *BB = PN.getParent();
   93       auto *BB = PN.getIncomingBlock(I);
lib/Transforms/ObjCARC/ObjCARCAPElim.cpp
   44     static bool OptimizeBB(BasicBlock *BB);
   74     for (const BasicBlock &BB : *Callee) {
   90 bool ObjCARCAPElim::OptimizeBB(BasicBlock *BB) {
   94   for (BasicBlock::iterator I = BB->begin(), E = BB->end(); I != E; ) {
lib/Transforms/ObjCARC/ObjCARCContract.cpp
   94                         SmallPtrSetImpl<const BasicBlock *> &Visited);
  128   BasicBlock::const_iterator I = ++Call->getIterator();
  157     SmallPtrSetImpl<const BasicBlock *> &Visited) {
  297   BasicBlock::iterator I = Store->getIterator();
  298   BasicBlock::iterator Begin = Store->getParent()->begin();
  322                const DenseMap<BasicBlock *, ColorVector> &BlockColors) {
  338                const DenseMap<BasicBlock *, ColorVector> &BlockColors) {
  379   BasicBlock *BB = Release->getParent();
  473     BasicBlock::iterator BBI = Inst->getIterator();
  474     BasicBlock *InstParent = Inst->getParent();
  481         BasicBlock *Pred = InstParent->getSinglePredecessor();
  560   DenseMap<BasicBlock *, ColorVector> BlockColors;
  579   SmallPtrSet<const BasicBlock *, 4> Visited;
  582   DenseMap<const BasicBlock *, unsigned> BBSizeMap;
  653           BasicBlock *IncomingBB = PHI->getIncomingBlock(ValNo);
  658             BasicBlock *InsertBB = IncomingBB;
lib/Transforms/ObjCARC/ObjCARCOpts.cpp
  201     SmallVector<BasicBlock *, 2> Preds;
  205     SmallVector<BasicBlock *, 2> Succs;
  313     using edge_iterator = SmallVectorImpl<BasicBlock *>::const_iterator;
  320     void addSucc(BasicBlock *Succ) { Succs.push_back(Succ); }
  321     void addPred(BasicBlock *Pred) { Preds.push_back(Pred); }
  509     void CheckForCFGHazards(const BasicBlock *BB,
  510                             DenseMap<const BasicBlock *, BBState> &BBStates,
  512     bool VisitInstructionBottomUp(Instruction *Inst, BasicBlock *BB,
  515     bool VisitBottomUp(BasicBlock *BB,
  516                        DenseMap<const BasicBlock *, BBState> &BBStates,
  521     bool VisitTopDown(BasicBlock *BB,
  522                       DenseMap<const BasicBlock *, BBState> &BBStates,
  524     bool Visit(Function &F, DenseMap<const BasicBlock *, BBState> &BBStates,
  534     PairUpRetainsAndReleases(DenseMap<const BasicBlock *, BBState> &BBStates,
  543     bool PerformCodePlacement(DenseMap<const BasicBlock *, BBState> &BBStates,
  601       BasicBlock::const_iterator I(Call);
  608       BasicBlock *RetainRVParent = RetainRV->getParent();
  610         BasicBlock::const_iterator I = RetainRVParent->begin();
  632   BasicBlock::iterator I = RetainRV->getIterator(),
  720 CloneCallInstForBB(CallInst &CI, BasicBlock &BB,
  721                    const DenseMap<BasicBlock *, ColorVector> &BlockColors) {
  750   DenseMap<BasicBlock *, ColorVector> BlockColors;
  966         SmallPtrSet<const BasicBlock *, 4> Visited;
 1107 ObjCARCOpt::CheckForCFGHazards(const BasicBlock *BB,
 1108                                DenseMap<const BasicBlock *, BBState> &BBStates,
 1131     for (const BasicBlock *Succ : successors(BB)) {
 1134       const DenseMap<const BasicBlock *, BBState>::iterator BBI =
 1196     Instruction *Inst, BasicBlock *BB, BlotMapVector<Value *, RRInfo> &Retains,
 1264 bool ObjCARCOpt::VisitBottomUp(BasicBlock *BB,
 1265                                DenseMap<const BasicBlock *, BBState> &BBStates,
 1277     const BasicBlock *Succ = *SI;
 1278     DenseMap<const BasicBlock *, BBState>::iterator I = BBStates.find(Succ);
 1295   for (BasicBlock::iterator I = BB->end(), E = BB->begin(); I != E; --I) {
 1319     BasicBlock *Pred = *PI;
 1400 ObjCARCOpt::VisitTopDown(BasicBlock *BB,
 1401                          DenseMap<const BasicBlock *, BBState> &BBStates,
 1412     const BasicBlock *Pred = *PI;
 1413     DenseMap<const BasicBlock *, BBState>::iterator I = BBStates.find(Pred);
 1452                   SmallVectorImpl<BasicBlock *> &PostOrder,
 1453                   SmallVectorImpl<BasicBlock *> &ReverseCFGPostOrder,
 1455                   DenseMap<const BasicBlock *, BBState> &BBStates) {
 1457   SmallPtrSet<BasicBlock *, 16> Visited;
 1460   SmallPtrSet<BasicBlock *, 16> OnStack;
 1461   SmallVector<std::pair<BasicBlock *, succ_iterator>, 16> SuccStack;
 1465   BasicBlock *EntryBB = &F.getEntryBlock();
 1474     BasicBlock *CurrBB = SuccStack.back().first;
 1478       BasicBlock *SuccBB = *SuccStack.back().second++;
 1504   SmallVector<std::pair<BasicBlock *, BBState::edge_iterator>, 16> PredStack;
 1505   for (BasicBlock &ExitBB : F) {
 1518         BasicBlock *BB = *PredStack.back().second++;
 1531                        DenseMap<const BasicBlock *, BBState> &BBStates,
 1539   SmallVector<BasicBlock *, 16> PostOrder;
 1540   SmallVector<BasicBlock *, 16> ReverseCFGPostOrder;
 1547   for (BasicBlock *BB : llvm::reverse(ReverseCFGPostOrder)) {
 1555   for (BasicBlock *BB : llvm::reverse(PostOrder)) {
 1622     DenseMap<const BasicBlock *, BBState> &BBStates,
 1821     DenseMap<const BasicBlock *, BBState> &BBStates,
 1909     BasicBlock *CurrentBB = &*Current.getBasicBlockIterator();
 1910     for (BasicBlock::iterator B = CurrentBB->begin(),
 2050   DenseMap<const BasicBlock *, BBState> BBStates;
 2072                              SmallPtrSetImpl<const BasicBlock *> &Visited,
 2094 FindPredecessorRetainWithSafePath(const Value *Arg, BasicBlock *BB,
 2097                                   SmallPtrSetImpl<const BasicBlock *> &Visited,
 2119 FindPredecessorAutoreleaseWithSafePath(const Value *Arg, BasicBlock *BB,
 2122                                        SmallPtrSetImpl<const BasicBlock *> &V,
 2156   SmallPtrSet<const BasicBlock *, 4> Visited;
 2157   for (BasicBlock &BB: F) {
lib/Transforms/ObjCARC/PtrState.cpp
  256 void BottomUpPtrState::HandlePotentialUse(BasicBlock *BB, Instruction *Inst,
  266     BasicBlock::iterator InsertAfter;
lib/Transforms/ObjCARC/PtrState.h
  183   void HandlePotentialUse(BasicBlock *BB, Instruction *Inst, const Value *Ptr,
lib/Transforms/Scalar/ADCE.cpp
  103   BasicBlock *BB = nullptr;
  124   MapVector<BasicBlock *, BlockInfoType> BlockInfo;
  125   bool isLive(BasicBlock *BB) { return BlockInfo[BB].Live; }
  139   SmallSetVector<BasicBlock *, 16> BlocksWithDeadTerminators;
  144   SmallPtrSet<BasicBlock *, 16> NewLiveBlocks;
  164   void markLive(BasicBlock *BB) { markLive(BlockInfo[BB]); }
  191   void makeUnconditional(BasicBlock *BB, BasicBlock *Target);
  191   void makeUnconditional(BasicBlock *BB, BasicBlock *Target);
  224   for (auto &BB : F) {
  256     using StatusMap = DenseMap<BasicBlock *, bool>;
  265       void completed(BasicBlock *BB) { (*this)[BB] = false; }
  269       bool onStack(BasicBlock *BB) {
  279     for (auto *BB: depth_first_ext(&F.getEntryBlock(), State)) {
  284       for (auto *Succ : successors(BB))
  298     auto *BB = PDTChild->getBlock();
  313   auto *BB = &F.getEntryBlock();
  397       for (auto *BB : successors(I->getParent()))
  454   for (auto *PredBB : predecessors(Info.BB)) {
  482   const SmallPtrSet<BasicBlock *, 16> BWDT{
  486   SmallVector<BasicBlock *, 32> IDFBlocks;
  494   for (auto *BB : IDFBlocks) {
  573   for (auto *BB : BlocksWithDeadTerminators) {
  589     for (auto *Succ : successors(BB)) {
  598     SmallPtrSet<BasicBlock *, 4> RemovedSuccessors;
  600     for (auto *Succ : successors(BB)) {
  611     for (auto *Succ : RemovedSuccessors) {
  638   SmallPtrSet<BasicBlock*, 16> Visited;
  640   for (auto &BB : F) {
  643     for (BasicBlock *Block : inverse_post_order_ext(&BB,Visited))
  648 void AggressiveDeadCodeElimination::makeUnconditional(BasicBlock *BB,
  649                                                       BasicBlock *Target) {
lib/Transforms/Scalar/CallSiteSplitting.cpp
  130 static void recordCondition(CallSite CS, BasicBlock *From, BasicBlock *To,
  130 static void recordCondition(CallSite CS, BasicBlock *From, BasicBlock *To,
  153 static void recordConditions(CallSite CS, BasicBlock *Pred,
  155   BasicBlock *From = Pred;
  156   BasicBlock *To = Pred;
  157   SmallPtrSet<BasicBlock *, 4> Visited;
  179 static SmallVector<BasicBlock *, 2> getTwoPredecessors(BasicBlock *BB) {
  180   SmallVector<BasicBlock *, 2> Preds(predecessors((BB)));
  195   BasicBlock *CallSiteBB = Instr->getParent();
  197   SmallVector<BasicBlock *, 2> Preds(predecessors(CallSiteBB));
  241 static void copyMustTailReturn(BasicBlock *SplitBB, Instruction *CI,
  306     const SmallVectorImpl<std::pair<BasicBlock *, ConditionsTy>> &Preds,
  309   BasicBlock *TailBB = Instr->getParent();
  329     BasicBlock *PredBB = Preds[i].first;
  330     BasicBlock *SplitBlock = DuplicateInstructionsInSplitBetween(
  368     SmallVector<BasicBlock *, 2> Splits(predecessors((TailBB)));
  421   BasicBlock *Parent = Instr->getParent();
  445 using PredsWithCondsTy = SmallVector<std::pair<BasicBlock *, ConditionsTy>, 2>;
  472   BasicBlock *StopAt = CSDTNode ? CSDTNode->getIDom()->getBlock() : nullptr;
  474   SmallVector<std::pair<BasicBlock *, ConditionsTy>, 2> PredsCS;
  475   for (auto *Pred : make_range(Preds.rbegin(), Preds.rend())) {
  514     BasicBlock &BB = *BI++;
lib/Transforms/Scalar/ConstantHoisting.cpp
  206                                  BasicBlock *Entry,
  207                                  SetVector<BasicBlock *> &BBs) {
  210   SmallPtrSet<BasicBlock *, 8> Path;
  214   SmallPtrSet<BasicBlock *, 16> Candidates;
  222     BasicBlock *Node = BB;
  248   SmallVector<BasicBlock *, 16> Orders;
  251     BasicBlock *Node = Orders[Idx++];
  260       std::pair<SetVector<BasicBlock *>, BlockFrequency>;
  264   DenseMap<BasicBlock *, InsertPtsCostPair> InsertPtsMap;
  267     BasicBlock *Node = *RIt;
  283     BasicBlock *Parent = DT.getNode(Node)->getIDom()->getBlock();
  312   SetVector<BasicBlock *> BBs;
  326       BasicBlock::iterator InsertPt = BB->begin();
  335     BasicBlock *BB, *BB1, *BB2;
  502   for (BasicBlock &BB : Fn)
  712     BasicBlock *IncomingBB = PHI->getIncomingBlock(Idx);
  847           BasicBlock *OrigMatInsertBB =
  927                                    BasicBlock &Entry, ProfileSummaryInfo *PSI) {
lib/Transforms/Scalar/CorrelatedValuePropagation.cpp
  181   BasicBlock *ToBB = P->getParent();
  191     BasicBlock *IncomingBB = P->getIncomingBlock(IncomingConstant.second);
  215   BasicBlock *BB = P->getParent();
  340   BasicBlock *BB = I->getParent();
  353   DenseMap<BasicBlock*, int> SuccessorsCount;
  354   for (auto *Succ : successors(BB))
  395         BasicBlock *Succ = CI->getCaseSuccessor();
  754   BasicBlock *BB = BinOp->getParent();
  789   BasicBlock *BB = BinOp->getParent();
  837   for (BasicBlock *BB : depth_first(&F.getEntryBlock())) {
  839     for (BasicBlock::iterator BI = BB->begin(), BE = BB->end(); BI != BE;) {
lib/Transforms/Scalar/DCE.cpp
   53     for (auto &BB : F) {
   54       for (BasicBlock::iterator DI = BB.begin(); DI != BB.end(); ) {
lib/Transforms/Scalar/DeadStoreElimination.cpp
   99 deleteDeadInstruction(Instruction *I, BasicBlock::iterator *BBI,
  110   BasicBlock::iterator NewIter = *BBI;
  588   SmallVector<BasicBlock *, 16> WorkList;
  589   SmallPtrSet<BasicBlock *, 8> Visited;
  590   BasicBlock::iterator FirstBBI(FirstI);
  592   BasicBlock::iterator SecondBBI(SecondI);
  593   BasicBlock *FirstBB = FirstI->getParent();
  594   BasicBlock *SecondBB = SecondI->getParent();
  603     BasicBlock *B = WorkList.pop_back_val();
  606     BasicBlock::iterator BI = (B == FirstBB ? FirstBBI : B->begin());
  608     BasicBlock::iterator EI;
  640 static void findUnconditionalPreds(SmallVectorImpl<BasicBlock *> &Blocks,
  641                                    BasicBlock *BB, DominatorTree *DT) {
  643     BasicBlock *Pred = *I;
  663   SmallVector<BasicBlock *, 16> Blocks;
  668     BasicBlock *BB = Blocks.pop_back_val();
  692       BasicBlock::iterator BBI(Dependency);
  747 static bool handleEndBlock(BasicBlock &BB, AliasAnalysis *AA,
  759   BasicBlock &Entry = BB.getParent()->front();
  779   for (BasicBlock::iterator BBI = BB.end(); BBI != BB.begin(); ){
 1026 static bool eliminateNoopStore(Instruction *Inst, BasicBlock::iterator &BBI,
 1073 static bool eliminateDeadStores(BasicBlock &BB, AliasAnalysis *AA,
 1086   for (BasicBlock::iterator BBI = BB.begin(), BBE = BB.end(); BBI != BBE; ) {
 1317   for (BasicBlock &BB : F)
lib/Transforms/Scalar/DivRemPairs.cpp
  127   for (auto &BB : F) {
lib/Transforms/Scalar/EarlyCSE.cpp
  699                              const BasicBlock *BB, const BasicBlock *Pred);
  699                              const BasicBlock *BB, const BasicBlock *Pred);
  812                                      const BranchInst *BI, const BasicBlock *BB,
  813                                      const BasicBlock *Pred) {
  865   BasicBlock *BB = Node->getBlock();
  882   if (BasicBlock *Pred = BB->getSinglePredecessor()) {
  899   for (BasicBlock::iterator I = BB->begin(), E = BB->end(); I != E;) {
lib/Transforms/Scalar/FlattenCFGPass.cpp
   62   for (auto &BB : F)
   71       if (auto *BB = cast_or_null<BasicBlock>(BlockHandle))
   71       if (auto *BB = cast_or_null<BasicBlock>(BlockHandle))
lib/Transforms/Scalar/Float2Int.cpp
  123   for (BasicBlock &BB : F) {
lib/Transforms/Scalar/GVN.cpp
  240   BasicBlock *BB;
  245   static AvailableValueInBlock get(BasicBlock *BB, AvailableValue &&AV) {
  252   static AvailableValueInBlock get(BasicBlock *BB, Value *V,
  257   static AvailableValueInBlock getUndef(BasicBlock *BB) {
  657 static bool IsValueFullyAvailableInBlock(BasicBlock *BB,
  658                             DenseMap<BasicBlock*, char> &FullyAvailableBlocks,
  665   std::pair<DenseMap<BasicBlock*, char>::iterator, bool> IV =
  708   SmallVector<BasicBlock*, 32> BBWorklist;
  712     BasicBlock *Entry = BBWorklist.pop_back_val();
  749     BasicBlock *BB = AV.BB;
  988     BasicBlock *DepBB = Deps[i].getBB();
 1034   SmallPtrSet<BasicBlock *, 4> Blockers(UnavailableBlocks.begin(),
 1039   BasicBlock *LoadBB = LI->getParent();
 1040   BasicBlock *TmpBB = LoadBB;
 1085   MapVector<BasicBlock *, Value *> PredLoads;
 1086   DenseMap<BasicBlock*, char> FullyAvailableBlocks;
 1089   for (BasicBlock *UnavailableBB : UnavailableBlocks)
 1092   SmallVector<BasicBlock *, 4> CriticalEdgePred;
 1093   for (BasicBlock *Pred : predecessors(LoadBB)) {
 1150   for (BasicBlock *OrigPred : CriticalEdgePred) {
 1151     BasicBlock *NewPred = splitCriticalEdges(OrigPred, LoadBB);
 1163     BasicBlock *UnavailablePred = PredLoad.first;
 1174     BasicBlock *Cur = LI->getParent();
 1241     BasicBlock *UnavailablePred = PredLoad.first;
 1390 static bool hasUsersIn(Value *V, BasicBlock *BB) {
 1425   for (BasicBlock *Successor : successors(IntrinsicI->getParent())) {
 1583 bool GVN::ValueTable::areAllValsInBB(uint32_t Num, const BasicBlock *BB,
 1592 uint32_t GVN::ValueTable::phiTranslate(const BasicBlock *Pred,
 1593                                        const BasicBlock *PhiBlock, uint32_t Num,
 1606                                        const BasicBlock *Pred,
 1607                                        const BasicBlock *PhiBlock, GVN &Gvn) {
 1640 uint32_t GVN::ValueTable::phiTranslateImpl(const BasicBlock *Pred,
 1641                                            const BasicBlock *PhiBlock,
 1695                                                const BasicBlock &CurrBlock) {
 1696   for (const BasicBlock *Pred : predecessors(&CurrBlock)) {
 1708 Value *GVN::findLeader(const BasicBlock *BB, uint32_t num) {
 1741   const BasicBlock *Pred = E.getEnd()->getSinglePredecessor();
 1751   for (BasicBlock *BB : RPOT)
 1991     BasicBlock *TrueSucc = BI->getSuccessor(0);
 1992     BasicBlock *FalseSucc = BI->getSuccessor(1);
 1997     BasicBlock *Parent = BI->getParent();
 2014     BasicBlock *Parent = SI->getParent();
 2018     SmallDenseMap<BasicBlock *, unsigned, 16> SwitchEdges;
 2024       BasicBlock *Dst = i->getCaseSuccessor();
 2103     BasicBlock *BB = &*FI++;
 2144 bool GVN::processBlock(BasicBlock *BB) {
 2156   for (BasicBlock::iterator BI = BB->begin(), BE = BB->end();
 2196 bool GVN::performScalarPREInsertion(Instruction *Instr, BasicBlock *Pred,
 2197                                     BasicBlock *Curr, unsigned int ValNo) {
 2282   BasicBlock *PREPred = nullptr;
 2283   BasicBlock *CurrentBlock = CurInst->getParent();
 2289   SmallVector<std::pair<Value *, BasicBlock *>, 8> predMap;
 2290   for (BasicBlock *P : predecessors(CurrentBlock)) {
 2424   for (BasicBlock *CurrentBlock : depth_first(&F.getEntryBlock())) {
 2433     for (BasicBlock::iterator BI = CurrentBlock->begin(),
 2449 BasicBlock *GVN::splitCriticalEdges(BasicBlock *Pred, BasicBlock *Succ) {
 2449 BasicBlock *GVN::splitCriticalEdges(BasicBlock *Pred, BasicBlock *Succ) {
 2449 BasicBlock *GVN::splitCriticalEdges(BasicBlock *Pred, BasicBlock *Succ) {
 2450   BasicBlock *BB =
 2484   for (BasicBlock *BB : RPOT)
 2522 void GVN::addDeadBlock(BasicBlock *BB) {
 2523   SmallVector<BasicBlock *, 4> NewDead;
 2524   SmallSetVector<BasicBlock *, 4> DF;
 2528     BasicBlock *D = NewDead.pop_back_val();
 2533     SmallVector<BasicBlock *, 8> Dom;
 2538     for (BasicBlock *B : Dom) {
 2539       for (BasicBlock *S : successors(B)) {
 2544         for (BasicBlock *P : predecessors(S))
 2566   for(SmallSetVector<BasicBlock *, 4>::iterator I = DF.begin(), E = DF.end();
 2568     BasicBlock *B = *I;
 2574     SmallVector<BasicBlock *, 4> Preds(pred_begin(B), pred_end(B));
 2575     for (BasicBlock *P : Preds) {
 2582         if (BasicBlock *S = splitCriticalEdges(P, B))
 2588     for (BasicBlock *P : predecessors(B)) {
 2625   BasicBlock *DeadRoot =
 2642   for (BasicBlock *BB : DeadBlocks) {
lib/Transforms/Scalar/GVNHoist.cpp
  117 using BBSideEffectsSet = DenseMap<const BasicBlock *, bool>;
  123 using HoistingPointInfo = std::pair<BasicBlock *, SmallVecInsn>;
  146   BasicBlock *Dest;
  157 using OutValuesType = DenseMap<BasicBlock *, SmallVector<CHIArg, 2>>;
  159     DenseMap<BasicBlock *, SmallVector<std::pair<VNType, Instruction *>, 2>>;
  270     for (const BasicBlock *BB : depth_first(&F.getEntryBlock())) {
  338   DenseSet<const BasicBlock *> HoistBarrier;
  339   SmallVector<BasicBlock *, 32> IDFBlocks;
  346   bool hasEH(const BasicBlock *BB) {
  366   bool successorDominate(const BasicBlock *BB, const BasicBlock *A) {
  366   bool successorDominate(const BasicBlock *BB, const BasicBlock *A) {
  367     for (const BasicBlock *Succ : successors(BB))
  385                     const BasicBlock *BB) {
  391     const BasicBlock *OldBB = OldPt->getParent();
  392     const BasicBlock *NewBB = NewPt->getParent();
  418   bool hasEHhelper(const BasicBlock *BB, const BasicBlock *SrcBB,
  418   bool hasEHhelper(const BasicBlock *BB, const BasicBlock *SrcBB,
  446     const BasicBlock *NewBB = NewPt->getParent();
  447     const BasicBlock *OldBB = Def->getBlock();
  457       const BasicBlock *BB = *I;
  485   bool hasEHOnPath(const BasicBlock *HoistPt, const BasicBlock *SrcBB,
  485   bool hasEHOnPath(const BasicBlock *HoistPt, const BasicBlock *SrcBB,
  495       const BasicBlock *BB = *I;
  523     const BasicBlock *NewBB = NewPt->getParent();
  524     const BasicBlock *OldBB = OldPt->getParent();
  525     const BasicBlock *UBB = U->getBlock();
  529     BasicBlock *DBB = D->getBlock();
  560   bool safeToHoistScalar(const BasicBlock *HoistBB, const BasicBlock *BB,
  560   bool safeToHoistScalar(const BasicBlock *HoistBB, const BasicBlock *BB,
  584       BasicBlock *Dest = CHI.Dest;
  596   void checkSafety(CHIArgs C, BasicBlock *BB, InsKind K,
  617   void fillRenameStack(BasicBlock *BB, InValuesType &ValueBBs,
  630   void fillChiArgs(BasicBlock *BB, OutValuesType &CHIBBs,
  677       BasicBlock *BB = Node->getBlock();
  699     for (std::pair<BasicBlock *, SmallVector<CHIArg, 2>> &A : CHIBBs) {
  700       BasicBlock *BB = A.first;
  762     SmallVector<BasicBlock *, 2> IDFBlocks;
  771       SmallPtrSet<BasicBlock *, 2> VNBlocks;
  773         BasicBlock *BBI = I->getParent();
  818                             const BasicBlock *HoistPt) const {
  829                                const BasicBlock *HoistPt) const {
  848   void makeGepsAvailable(Instruction *Repl, BasicBlock *HoistPt,
  974   bool makeGepOperandsAvailable(Instruction *Repl, BasicBlock *HoistPt,
 1012       BasicBlock *DestBB = HP.first;
 1085     for (BasicBlock *BB : depth_first(&F.getEntryBlock())) {
lib/Transforms/Scalar/GVNSink.cpp
  119   ArrayRef<BasicBlock *> Blocks;
  120   SmallSetVector<BasicBlock *, 4> ActiveBlocks;
  125   LockstepReverseIterator(ArrayRef<BasicBlock *> Blocks) : Blocks(Blocks) {
  132     for (BasicBlock *BB : Blocks)
  135     for (BasicBlock *BB : Blocks) {
  156   SmallSetVector<BasicBlock *, 4> &getActiveBlocks() { return ActiveBlocks; }
  158   void restrictToBlocks(SmallSetVector<BasicBlock *, 4> &Blocks) {
  200   SmallVector<BasicBlock *, 4> Blocks;
  231   SmallVector<BasicBlock *, 4> Blocks;
  238     SmallVector<std::pair<BasicBlock *, Value *>, 4> Ops;
  274   void restrictToBlocks(const SmallSetVector<BasicBlock *, 4> &NewBlocks) {
  538     auto *BB = Inst->getParent();
  569     for (auto *N : RPOT)
  594   void analyzeInitialPHIs(BasicBlock *BB, ModelledPHISet &PHIs,
  606   unsigned sinkBB(BasicBlock *BBEnd);
  610   void sinkLastInstruction(ArrayRef<BasicBlock *> Blocks, BasicBlock *BBEnd);
  610   void sinkLastInstruction(ArrayRef<BasicBlock *> Blocks, BasicBlock *BBEnd);
  613   void foldPointlessPHINodes(BasicBlock *BB) {
  755   for (auto *C : ActivePreds)
  761 unsigned GVNSink::sinkBB(BasicBlock *BBEnd) {
  764   SmallVector<BasicBlock *, 4> Preds;
  765   for (auto *B : predecessors(BBEnd)) {
  814   BasicBlock *InsertBB = BBEnd;
  832 void GVNSink::sinkLastInstruction(ArrayRef<BasicBlock *> Blocks,
  833                                   BasicBlock *BBEnd) {
  835   for (BasicBlock *BB : Blocks)
lib/Transforms/Scalar/GuardWidening.cpp
  134   std::function<bool(BasicBlock*)> BlockFilter;
  292                              std::function<bool(BasicBlock*)> BlockFilter)
  310   DenseMap<BasicBlock *, SmallVector<Instruction *, 8>> GuardsInBlock;
  321     auto *BB = (*DFI)->getBlock();
  378     auto *CurBB = DFSI.getPath(i)->getBlock();
  478     auto *DominatingBlock = DominatingGuard->getParent();
  479     auto *DominatedBlock = DominatedInstr->getParent();
  831   BasicBlock *RootBB = L.getLoopPredecessor();
  892     BasicBlock *RootBB = L->getLoopPredecessor();
lib/Transforms/Scalar/IndVarSimplify.cpp
  162   bool linearFunctionTestReplace(Loop *L, BasicBlock *ExitingBB,
  248     BasicBlock *InsertBB = PHI->getIncomingBlock(i);
  505   BasicBlock *Header = L->getHeader();
  589   SmallVector<BasicBlock*, 8> ExitBlocks;
  596   for (BasicBlock *ExitBB : ExitBlocks) {
  605     BasicBlock::iterator BBI = ExitBB->begin();
  753   SmallVector<BasicBlock *, 8> ExitBlocks;
  757   for (auto *ExitBB : ExitBlocks) {
  763         auto *IncomingBB = PN.getIncomingBlock(IncomingValIdx);
  799         auto *LoopPreheader = L->getLoopPreheader();
  820   BasicBlock *Preheader = L->getLoopPreheader();
  829   SmallVector<BasicBlock *, 4> ExitingBlocks;
  831   SmallVector<BasicBlock *, 8> ExitBlocks;
  836   BasicBlock *ExitBlock = ExitBlocks[0];
  837   BasicBlock::iterator BI = ExitBlock->begin();
  861   for (auto *BB : L->blocks())
 1776   if (BasicBlock *LatchBlock = L->getLoopLatch()) {
 1865   BasicBlock *NarrowUserBB = NarrowUser->getParent();
 1874     auto *BB = DTB->getBlock();
 1882     auto *TrueSuccessor = BI->getSuccessor(0);
 1883     auto *FalseSuccessor = BI->getSuccessor(1);
 1973   for (BasicBlock::iterator I = L->getHeader()->begin(); isa<PHINode>(I); ++I) {
 2058 static bool isLoopExitTestBasedOn(Value *V, BasicBlock *ExitingBB) {
 2071 static bool needsLFTR(Loop *L, BasicBlock *ExitingBB) {
 2204 static bool AlmostDeadIV(PHINode *Phi, BasicBlock *LatchBlock, Value *Cond) {
 2247 static PHINode *FindLoopCounter(Loop *L, BasicBlock *ExitingBB,
 2257   BasicBlock *LatchBlock = L->getLoopLatch();
 2261   for (BasicBlock::iterator I = L->getHeader()->begin(); isa<PHINode>(I); ++I) {
 2331 static Value *genLoopLimit(PHINode *IndVar, BasicBlock *ExitingBB,
 2422 linearFunctionTestReplace(Loop *L, BasicBlock *ExitingBB,
 2567   BasicBlock *ExitBlock = L->getExitBlock();
 2570   BasicBlock *Preheader = L->getLoopPreheader();
 2574   BasicBlock::iterator InsertPt = ExitBlock->getFirstInsertionPt();
 2575   BasicBlock::iterator I(Preheader->getTerminator());
 2611       BasicBlock *UseBB = User->getParent();
 2658   SmallVector<BasicBlock*, 16> ExitingBlocks;
 2665   for (BasicBlock *ExitingBB : ExitingBlocks) {
 2683   SmallVector<BasicBlock*, 16> ExitingBlocks;
 2750   for (BasicBlock *ExitingBB : ExitingBlocks) {
 2808   SmallVector<BasicBlock*, 16> ExitingBlocks;
 2856     BasicBlock *ExitBlock =
 2920   for (BasicBlock *BB : L->blocks())
 2939   for (BasicBlock *ExitingBB : ExitingBlocks) {
 3037     SmallVector<BasicBlock*, 16> ExitingBlocks;
 3039     for (BasicBlock *ExitingBB : ExitingBlocks) {
lib/Transforms/Scalar/InductiveRangeCheckElimination.cpp
  446   BasicBlock *Header = nullptr;
  447   BasicBlock *Latch = nullptr;
  452   BasicBlock *LatchExit = nullptr;
  476     Result.Header = cast<BasicBlock>(Map(Header));
  477     Result.Latch = cast<BasicBlock>(Map(Latch));
  479     Result.LatchExit = cast<BasicBlock>(Map(LatchExit));
  507     std::vector<BasicBlock *> Blocks;
  519     BasicBlock *PseudoExit = nullptr;
  520     BasicBlock *ExitSelector = nullptr;
  577   changeIterationSpaceEnd(const LoopStructure &LS, BasicBlock *Preheader,
  579                           BasicBlock *ContinuationBlock) const;
  583   BasicBlock *createPreheader(const LoopStructure &LS, BasicBlock *OldPreheader,
  583   BasicBlock *createPreheader(const LoopStructure &LS, BasicBlock *OldPreheader,
  591       LoopStructure &LS, BasicBlock *ContinuationBlockAndPreheader,
  598   void addToParentLoopIfNeeded(ArrayRef<BasicBlock *> BBs);
  612   BasicBlock *OriginalPreheader = nullptr;
  616   BasicBlock *MainLoopPreheader = nullptr;
  744   BasicBlock *Latch = L.getLoopLatch();
  757   BasicBlock *Header = L.getHeader();
  758   BasicBlock *Preheader = L.getLoopPreheader();
 1006   BasicBlock *LatchExit = LatchBr->getSuccessor(LatchBrExitIdx);
 1130   for (BasicBlock *BB : OriginalLoop.getBlocks()) {
 1131     BasicBlock *Clone = CloneBasicBlock(BB, Result.Map, Twine(".") + Tag, &F);
 1144   auto *ClonedLatch =
 1145       cast<BasicBlock>(GetClonedValue(OriginalLoop.getLoopLatch()));
 1153     BasicBlock *ClonedBB = Result.Blocks[i];
 1154     BasicBlock *OriginalBB = OriginalLoop.getBlocks()[i];
 1166     for (auto *SBB : successors(OriginalBB)) {
 1179     const LoopStructure &LS, BasicBlock *Preheader, Value *ExitSubloopAt,
 1180     BasicBlock *ContinuationBlock) const {
 1254   BasicBlock *BBInsertLocation = LS.Latch->getNextNode();
 1255   RRI.ExitSelector = BasicBlock::Create(Ctx, Twine(LS.Tag) + ".exit.selector",
 1257   RRI.PseudoExit = BasicBlock::Create(Ctx, Twine(LS.Tag) + ".pseudo.exit", &F,
 1334     LoopStructure &LS, BasicBlock *ContinuationBlock,
 1344 BasicBlock *LoopConstrainer::createPreheader(const LoopStructure &LS,
 1345                                              BasicBlock *OldPreheader,
 1347   BasicBlock *Preheader = BasicBlock::Create(Ctx, Tag, &F, LS.Header);
 1347   BasicBlock *Preheader = BasicBlock::Create(Ctx, Tag, &F, LS.Header);
 1355 void LoopConstrainer::addToParentLoopIfNeeded(ArrayRef<BasicBlock *> BBs) {
 1360   for (BasicBlock *BB : BBs)
 1375   for (auto *BB : Original->blocks())
 1377       New.addBasicBlockToLoop(cast<BasicBlock>(VM[BB]), LI);
 1387   BasicBlock *Preheader = nullptr;
 1500   BasicBlock *PostLoopPreheader = nullptr;
 1512   BasicBlock *NewMainLoopPreheader =
 1514   BasicBlock *NewBlocks[] = {PostLoopPreheader,        PreLoopRRI.PseudoExit,
 1791   BasicBlock *Preheader = L->getLoopPreheader();
lib/Transforms/Scalar/InferAddressSpaces.cpp
 1006           BasicBlock::iterator InsertPos = std::next(Inst->getIterator());
lib/Transforms/Scalar/InstSimplifyPass.cpp
   36     for (BasicBlock &BB : F) {
lib/Transforms/Scalar/JumpThreading.cpp
  210 static void updatePredecessorProfileMetadata(PHINode *PN, BasicBlock *BB) {
  225     auto *PredBB = IncomingBB;
  226     auto *SuccBB = PhiBB;
  227     SmallPtrSet<BasicBlock *, 16> Visited;
  233       auto *SinglePredBB = PredBB->getSinglePredecessor();
  263     BasicBlock *PredBB = PredOutEdge.first;
  379   SmallPtrSet<BasicBlock *, 16> Unreachable;
  383   for (auto &BB : F)
  394     for (auto &BB : F) {
  453   auto *BB = Cond->getParent();
  476 static unsigned getJumpThreadDuplicationCost(BasicBlock *BB,
  481   BasicBlock::const_iterator I(BB->getFirstNonPHI());
  561   SmallVector<std::pair<const BasicBlock*,const BasicBlock*>, 32> Edges;
  561   SmallVector<std::pair<const BasicBlock*,const BasicBlock*>, 32> Edges;
  594     Value *V, BasicBlock *BB, PredValueInfo &Result,
  596     DenseSet<std::pair<Value *, BasicBlock *>> &RecursionSet,
  607     for (BasicBlock *Pred : predecessors(BB))
  635     for (BasicBlock *P : predecessors(BB)) {
  709       SmallPtrSet<BasicBlock*, 4> LHSKnownBBs;
  787         BasicBlock *PredBB = PN->getIncomingBlock(i);
  833         for (BasicBlock *P : predecessors(BB)) {
  865             for (BasicBlock *P : predecessors(BB)) {
  952     for (BasicBlock *Pred : predecessors(BB))
  964 static unsigned GetBestDestForJumpOnUndef(BasicBlock *BB) {
  967   BasicBlock *TestBB = BBTerm->getSuccessor(MinSucc);
  982 static bool hasAddressTakenAndUsed(BasicBlock *BB) {
  994 bool JumpThreadingPass::ProcessBlock(BasicBlock *BB) {
 1005   if (BasicBlock *SinglePred = BB->getSinglePredecessor()) {
 1102       BasicBlock *Succ = BBTerm->getSuccessor(i);
 1160         BasicBlock *ToRemoveSucc = CondBr->getSuccessor(ToRemove);
 1242 bool JumpThreadingPass::ProcessImpliedCondition(BasicBlock *BB) {
 1248   BasicBlock *CurrentBB = BB;
 1249   BasicBlock *CurrentPred = BB->getSinglePredecessor();
 1265       BasicBlock *KeepSucc = BI->getSuccessor(*Implication ? 0 : 1);
 1266       BasicBlock *RemoveSucc = BI->getSuccessor(*Implication ? 1 : 0);
 1282 static bool isOpDefinedInBlock(Value *Op, BasicBlock *BB) {
 1299   BasicBlock *LoadBB = LoadI->getParent();
 1318   BasicBlock::iterator BBIt(LoadI);
 1353   SmallPtrSet<BasicBlock*, 8> PredsScanned;
 1355   using AvailablePredsTy = SmallVector<std::pair<BasicBlock *, Value *>, 8>;
 1358   BasicBlock *OneUnavailablePred = nullptr;
 1363   for (BasicBlock *PredBB : predecessors(LoadBB)) {
 1384     BasicBlock *SinglePredBB = PredBB;
 1419   BasicBlock *UnavailablePred = nullptr;
 1444     SmallVector<BasicBlock*, 8> PredsToSplit;
 1445     SmallPtrSet<BasicBlock*, 8> AvailablePredSet;
 1451     for (BasicBlock *P : predecessors(LoadBB)) {
 1498     BasicBlock *P = *PI;
 1530 static BasicBlock *
 1531 FindMostPopularDest(BasicBlock *BB,
 1532                     const SmallVectorImpl<std::pair<BasicBlock *,
 1533                                           BasicBlock *>> &PredToDestList) {
 1540   DenseMap<BasicBlock*, unsigned> DestPopularity;
 1549   DenseMap<BasicBlock*, unsigned>::iterator DPI = DestPopularity.begin();
 1550   BasicBlock *MostPopularDest = DPI->first;
 1552   SmallVector<BasicBlock*, 4> SamePopularity;
 1592 bool JumpThreadingPass::ProcessThreadableEdges(Value *Cond, BasicBlock *BB,
 1618   SmallPtrSet<BasicBlock*, 16> SeenPreds;
 1619   SmallVector<std::pair<BasicBlock*, BasicBlock*>, 16> PredToDestList;
 1619   SmallVector<std::pair<BasicBlock*, BasicBlock*>, 16> PredToDestList;
 1621   BasicBlock *OnlyDest = nullptr;
 1622   BasicBlock *MultipleDestSentinel = (BasicBlock*)(intptr_t)~0ULL;
 1627     BasicBlock *Pred = PredValue.second;
 1633     BasicBlock *DestBB;
 1683       for (BasicBlock *SuccBB : successors(BB)) {
 1722   BasicBlock *MostPopularDest = OnlyDest;
 1741   SmallVector<BasicBlock*, 16> PredsToFactor;
 1744       BasicBlock *Pred = PredToDest.first;
 1749       for (BasicBlock *Succ : successors(Pred))
 1768   BasicBlock *BB = PN->getParent();
 1772   SmallVector<BasicBlock*, 1> PredBBs;
 1780     BasicBlock *PredBB = PN->getIncomingBlock(i);
 1797   BasicBlock *BB = BO->getParent();
 1868   SmallVector<BasicBlock*, 8> BlocksToFoldInto;
 1903 static void AddPHINodeEntriesForMappedBlock(BasicBlock *PHIBB,
 1904                                             BasicBlock *OldPred,
 1905                                             BasicBlock *NewPred,
 1926 bool JumpThreadingPass::ThreadEdge(BasicBlock *BB,
 1927                                    const SmallVectorImpl<BasicBlock *> &PredBBs,
 1928                                    BasicBlock *SuccBB) {
 1959   BasicBlock *PredBB;
 1985   BasicBlock *NewBB = BasicBlock::Create(BB->getContext(),
 1985   BasicBlock *NewBB = BasicBlock::Create(BB->getContext(),
 1997   BasicBlock::iterator BI = BB->begin();
 2103 BasicBlock *JumpThreadingPass::SplitBlockPreds(BasicBlock *BB,
 2103 BasicBlock *JumpThreadingPass::SplitBlockPreds(BasicBlock *BB,
 2104                                                ArrayRef<BasicBlock *> Preds,
 2106   SmallVector<BasicBlock *, 2> NewBBs;
 2110   DenseMap<BasicBlock *, BlockFrequency> FreqMap;
 2144 bool JumpThreadingPass::doesBlockHaveProfileData(BasicBlock *BB) {
 2164 void JumpThreadingPass::UpdateBlockFreqAndEdgeWeight(BasicBlock *PredBB,
 2165                                                      BasicBlock *BB,
 2166                                                      BasicBlock *NewBB,
 2167                                                      BasicBlock *SuccBB) {
 2184   for (BasicBlock *Succ : successors(BB)) {
 2263     BasicBlock *BB, const SmallVectorImpl<BasicBlock *> &PredBBs) {
 2263     BasicBlock *BB, const SmallVectorImpl<BasicBlock *> &PredBBs) {
 2286   BasicBlock *PredBB;
 2308     BasicBlock *OldPredBB = PredBB;
 2320   BasicBlock::iterator BI = BB->begin();
 2356         if (BasicBlock *SuccBB = dyn_cast<BasicBlock>(New->getOperand(i)))
 2356         if (BasicBlock *SuccBB = dyn_cast<BasicBlock>(New->getOperand(i)))
 2424 void JumpThreadingPass::UnfoldSelectInstr(BasicBlock *Pred, BasicBlock *BB,
 2424 void JumpThreadingPass::UnfoldSelectInstr(BasicBlock *Pred, BasicBlock *BB,
 2437   BasicBlock *NewBB = BasicBlock::Create(BB->getContext(), "select.unfold",
 2437   BasicBlock *NewBB = BasicBlock::Create(BB->getContext(), "select.unfold",
 2453   for (BasicBlock::iterator BI = BB->begin();
 2459 bool JumpThreadingPass::TryToUnfoldSelect(SwitchInst *SI, BasicBlock *BB) {
 2466     BasicBlock *Pred = CondPHI->getIncomingBlock(I);
 2497 bool JumpThreadingPass::TryToUnfoldSelect(CmpInst *CondCmp, BasicBlock *BB) {
 2507     BasicBlock *Pred = CondLHS->getIncomingBlock(I);
 2562 bool JumpThreadingPass::TryToUnfoldSelectInCurrBB(BasicBlock *BB) {
 2568   for (BasicBlock::iterator BI = BB->begin();
 2609     BasicBlock *SplitBB = SI->getParent();
 2610     BasicBlock *NewBB = Term->getParent();
 2623     for (auto *Succ : successors(SplitBB)) {
 2652 bool JumpThreadingPass::ProcessGuards(BasicBlock *BB) {
 2656   BasicBlock *Pred1, *Pred2;
 2671   auto *Parent = Pred1->getSinglePredecessor();
 2686 bool JumpThreadingPass::ThreadGuard(BasicBlock *BB, IntrinsicInst *Guard,
 2692   BasicBlock *TrueDest = BI->getSuccessor(0);
 2693   BasicBlock *FalseDest = BI->getSuccessor(1);
 2713   BasicBlock *PredUnguardedBlock = TrueDestIsSafe ? TrueDest : FalseDest;
 2714   BasicBlock *PredGuardedBlock = FalseDestIsSafe ? TrueDest : FalseDest;
 2723   BasicBlock *GuardedBlock = DuplicateInstructionsInSplitBetween(
 2729   BasicBlock *UnguardedBlock = DuplicateInstructionsInSplitBetween(
lib/Transforms/Scalar/LICM.cpp
  134 static bool inSubLoop(BasicBlock *BB, Loop *CurLoop, LoopInfo *LI);
  139                   BasicBlock *Dest, ICFLoopSafetyInfo *SafetyInfo,
  157     Instruction &I, BasicBlock &ExitBlock, PHINode &PN, const LoopInfo *LI,
  265   void cloneBasicBlockAnalysis(BasicBlock *From, BasicBlock *To,
  265   void cloneBasicBlockAnalysis(BasicBlock *From, BasicBlock *To,
  353     for (auto *BB : L->getBlocks()) {
  370   BasicBlock *Preheader = L->getLoopPreheader();
  406     SmallVector<BasicBlock *, 8> ExitBlocks;
  420       for (BasicBlock *ExitBlock : ExitBlocks) {
  516     BasicBlock *BB = DTN->getBlock();
  522     for (BasicBlock::iterator II = BB->end(); II != BB->begin();) {
  579   DenseMap<BasicBlock *, BasicBlock *> HoistDestinationMap;
  579   DenseMap<BasicBlock *, BasicBlock *> HoistDestinationMap;
  583   DenseMap<BranchInst *, BasicBlock *> HoistableBranches;
  599     BasicBlock *TrueDest = BI->getSuccessor(0);
  600     BasicBlock *FalseDest = BI->getSuccessor(1);
  610     SmallPtrSet<BasicBlock *, 4> TrueDestSucc, FalseDestSucc;
  613     BasicBlock *CommonSucc = nullptr;
  652     SmallPtrSet<BasicBlock *, 8> PredecessorBlocks;
  653     BasicBlock *BB = PN->getParent();
  654     for (BasicBlock *PredBB : predecessors(BB))
  684   BasicBlock *getOrCreateHoistedBlock(BasicBlock *BB) {
  684   BasicBlock *getOrCreateHoistedBlock(BasicBlock *BB) {
  701     BasicBlock *InitialPreheader = CurLoop->getLoopPreheader();
  715     BasicBlock *TrueDest = BI->getSuccessor(0);
  716     BasicBlock *FalseDest = BI->getSuccessor(1);
  717     BasicBlock *CommonSucc = HoistableBranches[BI];
  718     BasicBlock *HoistTarget = getOrCreateHoistedBlock(BI->getParent());
  724       BasicBlock *New =
  725           BasicBlock::Create(C, Orig->getName() + ".licm", Orig->getParent());
  736     BasicBlock *HoistTrueDest = CreateHoistedBlock(TrueDest);
  737     BasicBlock *HoistFalseDest = CreateHoistedBlock(FalseDest);
  738     BasicBlock *HoistCommonSucc = CreateHoistedBlock(CommonSucc);
  744       BasicBlock *TargetSucc = HoistTarget->getSingleSuccessor();
  820   for (BasicBlock *BB : Worklist) {
  826     for (BasicBlock::iterator II = BB->begin(), E = BB->end(); II != E;) {
  944         BasicBlock *Dominator =
 1055     for (auto *BB : L->getBlocks())
 1065   for (auto *BB : L->getBlocks())
 1237       for (auto *BB : CurLoop->getBlocks())
 1307     const BasicBlock *BB = GEP->getParent();
 1334       const BasicBlock *BB = PN->getParent();
 1359     Instruction &I, BasicBlock &ExitBlock, PHINode &PN, const LoopInfo *LI,
 1381       BasicBlock *BBColor = CV.front();
 1456     SmallDenseMap<BasicBlock *, Instruction *, 32> &SunkCopies,
 1461   BasicBlock *ExitBlock = TPN->getParent();
 1473   BasicBlock *BB = PN->getParent();
 1483     BasicBlock *BBPred = *PI;
 1495   SmallVector<BasicBlock *, 32> ExitBlocks;
 1497   SmallPtrSet<BasicBlock *, 32> ExitBlockSet(ExitBlocks.begin(),
 1500   BasicBlock *ExitBB = PN->getParent();
 1536   SmallSetVector<BasicBlock *, 8> PredBBs(pred_begin(ExitBB), pred_end(ExitBB));
 1538     BasicBlock *PredBB = *PredBBs.begin();
 1542       BasicBlock *NewPred = SplitBlockPredecessors(
 1600     BasicBlock *BB = PN->getIncomingBlock(U);
 1628   SmallVector<BasicBlock *, 32> ExitBlocks;
 1630   SmallPtrSet<BasicBlock *, 32> ExitBlockSet(ExitBlocks.begin(),
 1635   SmallDenseMap<BasicBlock *, Instruction *, 32> SunkCopies;
 1664                   BasicBlock *Dest, ICFLoopSafetyInfo *SafetyInfo,
 1736   SmallVectorImpl<BasicBlock *> &LoopExitBlocks;
 1749   Value *maybeInsertLCSSAPHI(Value *V, BasicBlock *BB) const {
 1757           for (BasicBlock *Pred : PredCache.get(BB))
 1795       BasicBlock *ExitBlock = LoopExitBlocks[i];
 1881   BasicBlock *Preheader = CurLoop->getLoopPreheader();
 2187     for (BasicBlock *BB : InnerL->blocks())
 2191   for (BasicBlock *BB : L->blocks())
 2209 void LegacyLICMPass::cloneBasicBlockAnalysis(BasicBlock *From, BasicBlock *To,
 2209 void LegacyLICMPass::cloneBasicBlockAnalysis(BasicBlock *From, BasicBlock *To,
 2265   for (BasicBlock *BB : CurLoop->getBlocks())
 2320   for (auto *BB : CurLoop->getBlocks())
 2333 static bool inSubLoop(BasicBlock *BB, Loop *CurLoop, LoopInfo *LI) {
lib/Transforms/Scalar/LoopDeletion.cpp
   43                        SmallVectorImpl<BasicBlock *> &ExitingBlocks,
   44                        BasicBlock *ExitBlock, bool &Changed,
   45                        BasicBlock *Preheader) {
   96   auto *Preheader = L->getLoopPreheader();
  105   for (auto *Pred: predecessors(Preheader)) {
  106     BasicBlock *Taken, *NotTaken;
  142   BasicBlock *Preheader = L->getLoopPreheader();
  157   BasicBlock *ExitBlock = L->getUniqueExitBlock();
  173   SmallVector<BasicBlock *, 4> ExitingBlocks;
lib/Transforms/Scalar/LoopDistribute.cpp
  163     for (auto *B : OrigLoop->getBlocks())
  184   Loop *cloneLoopWithPreheader(BasicBlock *InsertBefore, BasicBlock *LoopDomBB,
  184   Loop *cloneLoopWithPreheader(BasicBlock *InsertBefore, BasicBlock *LoopDomBB,
  218     for (auto *Block : OrigLoop->getBlocks())
  248     for (auto *BB : getDistributedLoop()->getBlocks())
  268   SmallVector<BasicBlock *, 8> ClonedLoopBlocks;
  442     BasicBlock *OrigPH = L->getLoopPreheader();
  445     BasicBlock *Pred = OrigPH->getSinglePredecessor();
  447     BasicBlock *ExitBlock = L->getExitBlock();
  463     BasicBlock *TopPH = OrigPH;
  678     BasicBlock *PH = L->getLoopPreheader();
lib/Transforms/Scalar/LoopFuse.cpp
  133   BasicBlock *Preheader;
  135   BasicBlock *Header;
  137   BasicBlock *ExitingBlock;
  139   BasicBlock *ExitBlock;
  141   BasicBlock *Latch;
  179     for (BasicBlock *BB : L->blocks()) {
  237   BasicBlock *getEntryBlock() const {
  251   BasicBlock *getNonLoopBlock() const {
  356     BasicBlock *LHSEntryBlock = LHS.getEntryBlock();
  357     BasicBlock *RHSEntryBlock = RHS.getEntryBlock();
  594     BasicBlock *FC0EntryBlock = FC0.getEntryBlock();
  595     BasicBlock *FC1EntryBlock = FC1.getEntryBlock();
  905     BasicBlock *L0Header = L0.getHeader();
 1021     for (BasicBlock *BB : FC1.L->blocks())
 1092       auto *GuardBlock = FC.GuardBranch->getParent();
 1275     SmallVector<BasicBlock *, 8> Blocks(FC1.L->block_begin(),
 1277     for (BasicBlock *BB : Blocks) {
 1353     BasicBlock *FC0GuardBlock = FC0.GuardBranch->getParent();
 1354     BasicBlock *FC1GuardBlock = FC1.GuardBranch->getParent();
 1355     BasicBlock *FC0NonLoopBlock = FC0.getNonLoopBlock();
 1356     BasicBlock *FC1NonLoopBlock = FC1.getNonLoopBlock();
 1528     SmallVector<BasicBlock *, 8> Blocks(FC1.L->block_begin(),
 1530     for (BasicBlock *BB : Blocks) {
lib/Transforms/Scalar/LoopIdiomRecognize.cpp
  193   bool runOnLoopBlock(BasicBlock *BB, const SCEV *BECount,
  194                       SmallVectorImpl<BasicBlock *> &ExitBlocks);
  196   void collectStores(BasicBlock *BB);
  221     BasicBlock *HeaderBrEqualBB, *HeaderBrUnequalBB;
  222     BasicBlock *LatchBrFinishBB, *LatchBrContinueBB;
  239   BasicBlock *transformBCmpControlFlow(ICmpInst *ComparedEqual);
  246   void transformLoopToPopcount(BasicBlock *PreCondBB, Instruction *CntInst,
  249   void transformLoopToCountable(Intrinsic::ID IntrinID, BasicBlock *PreCondBB,
  394   SmallVector<BasicBlock *, 8> ExitBlocks;
  412   for (auto *BB : CurLoop->getBlocks()) {
  577 void LoopIdiomRecognize::collectStores(BasicBlock *BB) {
  616     BasicBlock *BB, const SCEV *BECount,
  617     SmallVectorImpl<BasicBlock *> &ExitBlocks) {
  642   for (BasicBlock::iterator I = BB->begin(), E = BB->end(); I != E;) {
  958   BasicBlock *Preheader = CurLoop->getLoopPreheader();
 1078   BasicBlock *Preheader = CurLoop->getLoopPreheader();
 1223 static Value *matchCondition(BranchInst *BI, BasicBlock *LoopEntry,
 1236   BasicBlock *TrueSucc = BI->getSuccessor(0);
 1237   BasicBlock *FalseSucc = BI->getSuccessor(1);
 1252                                  BasicBlock *LoopEntry) {
 1284 static bool detectPopcountIdiom(Loop *CurLoop, BasicBlock *PreCondBB,
 1289   BasicBlock *LoopEntry;
 1341     for (BasicBlock::iterator Iter = LoopEntry->getFirstNonPHI()->getIterator(),
 1423   BasicBlock *LoopEntry;
 1466   for (BasicBlock::iterator Iter = LoopEntry->getFirstNonPHI()->getIterator(),
 1535   BasicBlock *PH = CurLoop->getLoopPreheader();
 1542     auto *PreCondBB = PH->getSinglePredecessor();
 1601   BasicBlock *LoopBody = *(CurLoop->block_begin());
 1608   BasicBlock *PH = CurLoop->getLoopPreheader();
 1617   auto *PreCondBB = PH->getSinglePredecessor();
 1693     Intrinsic::ID IntrinID, BasicBlock *Preheader, Instruction *CntInst,
 1750   BasicBlock *Body = *(CurLoop->block_begin());
 1783 void LoopIdiomRecognize::transformLoopToPopcount(BasicBlock *PreCondBB,
 1786   BasicBlock *PreHead = CurLoop->getLoopPreheader();
 1856   BasicBlock *Body = *(CurLoop->block_begin());
 1960   BasicBlock *LoopHeaderBB = CurLoop->getHeader();
 1961   BasicBlock *LoopLatchBB = CurLoop->getLoopLatch();
 1971   SmallVector<BasicBlock *, 2> ExitBlocks;
 1996   for (const BasicBlock *ExitBB : ExitBlocks) {
 1998       for (const BasicBlock *LoopBB :
 2016   for (BasicBlock *LoopBB : CurLoop->blocks()) {
 2226 BasicBlock *
 2231   BasicBlock *PreheaderBB = CurLoop->getLoopPreheader();
 2232   BasicBlock *HeaderBB = CurLoop->getHeader();
 2233   BasicBlock *LoopLatchBB = CurLoop->getLoopLatch();
 2271   auto *PhonyPreheaderBB = BasicBlock::Create(
 2271   auto *PhonyPreheaderBB = BasicBlock::Create(
 2281   auto *PhonySuccessorBB =
 2282       BasicBlock::Create(Context, LoopName + ".phonysuccessorbb", Func,
 2291   auto *ComparedUnequalBB =
 2292       BasicBlock::Create(Context, ComparedEqual->getName() + ".unequalbb", Func,
 2294   auto *ComparedEqualBB =
 2295       BasicBlock::Create(Context, ComparedEqual->getName() + ".equalbb", Func,
 2344     auto *OldLoopBB = const_cast<BasicBlock *>(Edge.first);
 2345     auto *SuccessorBB = const_cast<BasicBlock *>(Edge.second);
 2351     BasicBlock *NewBB = GetReplacementBB(OldLoopBB);
 2453   BasicBlock *DispatchBB = PhonySuccessorBB;
 2548   for (BasicBlock *BB : {ComparedEqualBB, ComparedUnequalBB}) {
 2551     BasicBlock *SuccessorBB = OldTerminator->getSuccessor(0);
 2660   BasicBlock *BB = transformBCmpControlFlow(ComparedEqual);
lib/Transforms/Scalar/LoopInstSimplify.cpp
   85     for (BasicBlock *BB : RPOT) {
lib/Transforms/Scalar/LoopInterchange.cpp
   92   for (BasicBlock *BB : L->blocks()) {
  301   for (BasicBlock::iterator I = L->getHeader()->begin(); isa<PHINode>(I); ++I) {
  347   bool containsUnsafeInstructions(BasicBlock *BB);
  400                            BasicBlock *LoopNestExit,
  408                         BasicBlock *OrigInnerPreHeader,
  409                         BasicBlock *OrigOuterPreHeader);
  425   BasicBlock *LoopExit;
  523     BasicBlock *LoopNestExit = OuterMostLoop->getExitBlock();
  588 bool LoopInterchangeLegality::containsUnsafeInstructions(BasicBlock *BB) {
  595   BasicBlock *OuterLoopHeader = OuterLoop->getHeader();
  596   BasicBlock *InnerLoopPreHeader = InnerLoop->getLoopPreheader();
  597   BasicBlock *OuterLoopLatch = OuterLoop->getLoopLatch();
  609   for (BasicBlock *Succ : successors(OuterLoopHeaderBI))
  629   BasicBlock *InnerLoopPreheader = InnerLoop->getLoopPreheader();
  719 static bool containsSafePHI(BasicBlock *Block, bool isOuterLoopExitBlock) {
  738   BasicBlock *InnerLoopPreHeader = InnerLoop->getLoopPreheader();
  739   BasicBlock *InnerLoopLatch = InnerLoop->getLoopLatch();
  834   BasicBlock *InnerExit = InnerLoop->getExitBlock();
  931   BasicBlock *LoopNestExit = OuterLoop->getUniqueExitBlock();
  976   for (auto *BB : OuterLoop->blocks())
 1032   for (BasicBlock *BB : InnerLoop->blocks()) {
 1165     Loop *NewInner, Loop *NewOuter, BasicBlock *OrigInnerPreHeader,
 1166     BasicBlock *OrigOuterPreHeader) {
 1188   SmallVector<BasicBlock *, 8> OrigInnerBBs(NewOuter->blocks());
 1192   for (BasicBlock *BB : NewInner->blocks())
 1198   BasicBlock *OuterHeader = NewOuter->getHeader();
 1199   BasicBlock *OuterLatch = NewOuter->getLoopLatch();
 1200   for (BasicBlock *BB : OrigInnerBBs) {
 1226     BasicBlock *InnerLoopPreHeader = InnerLoop->getLoopPreheader();
 1247     BasicBlock *NewLatch =
 1294     BasicBlock *InnerLoopHeader = InnerLoop->getHeader();
 1310 static void moveBBContents(BasicBlock *FromBB, Instruction *InsertBefore) {
 1320 static void updateSuccessor(BranchInst *BI, BasicBlock *OldBB,
 1321                             BasicBlock *NewBB,
 1340 static void moveLCSSAPhis(BasicBlock *InnerExit, BasicBlock *InnerHeader,
 1340 static void moveLCSSAPhis(BasicBlock *InnerExit, BasicBlock *InnerHeader,
 1341                           BasicBlock *InnerLatch, BasicBlock *OuterHeader,
 1341                           BasicBlock *InnerLatch, BasicBlock *OuterHeader,
 1342                           BasicBlock *OuterLatch, BasicBlock *OuterExit) {
 1342                           BasicBlock *OuterLatch, BasicBlock *OuterExit) {
 1430   BasicBlock *OuterLoopPreHeader = OuterLoop->getLoopPreheader();
 1431   BasicBlock *InnerLoopPreHeader = InnerLoop->getLoopPreheader();
 1449   BasicBlock *InnerLoopHeader = InnerLoop->getHeader();
 1450   BasicBlock *OuterLoopHeader = OuterLoop->getHeader();
 1451   BasicBlock *InnerLoopLatch = InnerLoop->getLoopLatch();
 1452   BasicBlock *OuterLoopLatch = OuterLoop->getLoopLatch();
 1453   BasicBlock *OuterLoopPredecessor = OuterLoopPreHeader->getUniquePredecessor();
 1454   BasicBlock *InnerLoopLatchPredecessor =
 1456   BasicBlock *InnerLoopLatchSuccessor;
 1457   BasicBlock *OuterLoopLatchSuccessor;
 1480   BasicBlock *InnerLoopHeaderSuccessor = InnerLoopHeader->getUniqueSuccessor();
 1566   BasicBlock *OuterLoopPreHeader = OuterLoop->getLoopPreheader();
 1567   BasicBlock *InnerLoopPreHeader = InnerLoop->getLoopPreheader();
 1568   BasicBlock *OuterLoopHeader = OuterLoop->getHeader();
lib/Transforms/Scalar/LoopLoadElimination.cpp
  146 static bool doesStoreDominatesAllLatches(BasicBlock *StoreBlock, Loop *L,
  148   SmallVector<BasicBlock *, 8> Latches;
  433     auto *PH = L->getLoopPreheader();
  544       auto *HeaderBB = L->getHeader();
lib/Transforms/Scalar/LoopPredication.cpp
  256   BasicBlock *Preheader;
  837   BasicBlock *LoopLatch = L->getLoopLatch();
  848   BasicBlock *TrueDest = BI->getSuccessor(0);
  906   SmallVector<std::pair<BasicBlock *, BasicBlock *>, 8> ExitEdges;
  906   SmallVector<std::pair<BasicBlock *, BasicBlock *>, 8> ExitEdges;
  918   auto *LatchBlock = L->getLoopLatch();
lib/Transforms/Scalar/LoopRerollPass.cpp
  480     bool reroll(Instruction *IV, Loop *L, BasicBlock *Header,
  574   BasicBlock *Header = L->getHeader();
  575   for (BasicBlock::iterator I = Header->begin(),
  653   BasicBlock *Header = L->getHeader();
  654   for (BasicBlock::iterator I = Header->begin(),
 1167   BasicBlock *Header = L->getHeader();
 1421   BasicBlock *Header = L->getHeader();
 1435   for (BasicBlock::reverse_iterator J = Header->rbegin(), JE = Header->rend();
 1485   BasicBlock *Header = L->getHeader();
 1615 bool LoopReroll::reroll(Instruction *IV, Loop *L, BasicBlock *Header,
 1652   BasicBlock *Header = L->getHeader();
lib/Transforms/Scalar/LoopSimplifyCFG.cpp
   56 static BasicBlock *getOnlyLiveSuccessor(BasicBlock *BB) {
   56 static BasicBlock *getOnlyLiveSuccessor(BasicBlock *BB) {
   83 static void removeBlockFromLoops(BasicBlock *BB, Loop *FirstLoop,
   95 static Loop *getInnermostLoopFor(SmallPtrSetImpl<BasicBlock *> &BBs,
   98   for (BasicBlock *BB : BBs) {
  140   SmallPtrSet<BasicBlock *, 8> LiveLoopBlocks;
  143   SmallVector<BasicBlock *, 8> DeadLoopBlocks;
  146   SmallPtrSet<BasicBlock *, 8> LiveExitBlocks;
  149   SmallVector<BasicBlock *, 8> DeadExitBlocks;
  151   SmallPtrSet<BasicBlock *, 8> BlocksInLoopAfterFolding;
  155   SmallVector<BasicBlock *, 8> FoldCandidates;
  166       for (const BasicBlock *BB : S)
  172       for (const BasicBlock *BB : S)
  190     DenseMap<const BasicBlock *, unsigned> RPO;
  196       BasicBlock *BB = *I;
  197       for (auto *Succ : successors(BB))
  228       BasicBlock *BB = *I;
  236       BasicBlock *TheOnlySucc = getOnlyLiveSuccessor(BB);
  247       for (BasicBlock *Succ : successors(BB))
  262     SmallVector<BasicBlock *, 8> ExitBlocks;
  264     SmallPtrSet<BasicBlock *, 8> UniqueDeadExits;
  265     for (auto *ExitBlock : ExitBlocks)
  275       BasicBlock *TheOnlySucc = getOnlyLiveSuccessor(From);
  300       BasicBlock *BB = *I;
  354     BasicBlock *Preheader = L.getLoopPreheader();
  355     BasicBlock *NewPreheader = llvm::SplitBlock(
  364     for (BasicBlock *BB : DeadExitBlocks) {
  393         for (auto *BB : L.blocks())
  431       SmallSetVector<BasicBlock *, 8> DeadLoopBlocksSet(DeadLoopBlocks.begin(),
  442     for (auto *BB : DeadLoopBlocks)
  448             for (auto *BB : DL->getBlocks())
  456     for (auto *BB : DeadLoopBlocks) {
  467     for (auto *BB : DeadLoopBlocks)
  476     for (BasicBlock *BB : FoldCandidates) {
  478       BasicBlock *TheOnlySucc = getOnlyLiveSuccessor(BB);
  485       SmallPtrSet<BasicBlock *, 2> DeadSuccessors;
  488       for (auto *Succ : successors(BB))
  516       for (auto *DeadSucc : DeadSuccessors)
  535     BasicBlock *Header = L.getHeader();
  652     BasicBlock *Succ = cast_or_null<BasicBlock>(Block);
  652     BasicBlock *Succ = cast_or_null<BasicBlock>(Block);
  656     BasicBlock *Pred = Succ->getSinglePredecessor();
lib/Transforms/Scalar/LoopSink.cpp
   82 static BlockFrequency adjustedSumFreq(SmallPtrSetImpl<BasicBlock *> &BBs,
   85   for (BasicBlock *B : BBs)
  119 static SmallPtrSet<BasicBlock *, 2>
  123   SmallPtrSet<BasicBlock *, 2> BBsToSinkInto;
  128   SmallPtrSet<BasicBlock *, 2> BBsDominatedByColdestBB;
  138   for (BasicBlock *ColdestBB : ColdLoopBBs) {
  140     for (BasicBlock *SinkedBB : BBsToSinkInto)
  147       for (BasicBlock *DominatedBB : BBsDominatedByColdestBB) {
  155   for (BasicBlock *BB : BBsToSinkInto) {
  175                             const SmallVectorImpl<BasicBlock *> &ColdLoopBBs,
  176                             const SmallDenseMap<BasicBlock *, int, 16> &LoopBlockNumber,
  180   SmallPtrSet<BasicBlock *, 2> BBs;
  199   SmallPtrSet<BasicBlock *, 2> BBsToSinkInto =
  206     for (auto *BB : BBsToSinkInto)
  214   SmallVector<BasicBlock *, 2> SortedBBsToSinkInto;
  221   BasicBlock *MoveBB = *SortedBBsToSinkInto.begin();
  224   for (BasicBlock *N : makeArrayRef(SortedBBsToSinkInto).drop_front(1)) {
  255   BasicBlock *Preheader = L.getLoopPreheader();
  277   for (BasicBlock *BB : L.blocks())
  282   SmallVector<BasicBlock *, 10> ColdLoopBBs;
  283   SmallDenseMap<BasicBlock *, int, 16> LoopBlockNumber;
  285   for (BasicBlock *B : L.blocks())
lib/Transforms/Scalar/LoopStrengthReduce.cpp
 2032   BasicBlock::iterator
 2033     HoistInsertPosition(BasicBlock::iterator IP,
 2035   BasicBlock::iterator
 2036     AdjustInsertPositionForExpand(BasicBlock::iterator IP,
 2042                 BasicBlock::iterator IP, SCEVExpander &Rewriter,
 2373   BasicBlock *LatchBlock = L->getLoopLatch();
 2374   SmallVector<BasicBlock*, 8> ExitingBlocks;
 2385   for (BasicBlock *ExitingBlock : ExitingBlocks) {
 2506     BasicBlock *BB =
 3041   SmallVector<BasicBlock *,8> LatchPath;
 3042   BasicBlock *LoopHeader = L->getHeader();
 3050   for (BasicBlock *BB : reverse(LatchPath)) {
 3425         const BasicBlock *UseBB = !isa<PHINode>(UserInst) ?
 5005 BasicBlock::iterator
 5006 LSRInstance::HoistInsertPosition(BasicBlock::iterator IP,
 5039     BasicBlock *IDom;
 5062 BasicBlock::iterator
 5063 LSRInstance::AdjustInsertPositionForExpand(BasicBlock::iterator LowestIP,
 5089     SmallVector<BasicBlock *, 4> ExitingBlocks;
 5092       BasicBlock *BB = ExitingBlocks[0];
 5105   BasicBlock::iterator IP = HoistInsertPosition(LowestIP, Inputs);
 5128                            const Formula &F, BasicBlock::iterator IP,
 5308   DenseMap<BasicBlock *, Value *> Inserted;
 5312       BasicBlock *BB = PN->getIncomingBlock(i);
 5321         BasicBlock *Parent = PN->getParent();
 5325           BasicBlock *NewBB = nullptr;
 5332             SmallVector<BasicBlock*, 2> NewBBs;
 5356       std::pair<DenseMap<BasicBlock *, Value *>::iterator, bool> Pair =
 5405                 for (BasicBlock::iterator I = Block->begin(); isa<PHINode>(I);
 5526          for (BasicBlock *PredBB : PN->blocks())
 5541     BasicBlock *BB = Rung->getBlock();
lib/Transforms/Scalar/LoopUnrollAndJamPass.cpp
  257   for (BasicBlock *BB : SubLoop->getBlocks()) {
  288   BasicBlock *Latch = L->getLoopLatch();
  289   BasicBlock *Exit = L->getExitingBlock();
  290   BasicBlock *SubLoopLatch = SubLoop->getLoopLatch();
  291   BasicBlock *SubLoopExit = SubLoop->getExitingBlock();
lib/Transforms/Scalar/LoopUnrollPass.cpp
  354   SmallSetVector<BasicBlock *, 16> BBWorklist;
  355   SmallSetVector<std::pair<BasicBlock *, BasicBlock *>, 4> ExitWorklist;
  355   SmallSetVector<std::pair<BasicBlock *, BasicBlock *>, 4> ExitWorklist;
  509       BasicBlock *BB = BBWorklist[Idx];
  566       BasicBlock *KnownSucc = nullptr;
  599       for (BasicBlock *Succ : successors(BB))
  617     BasicBlock *ExitingBB, *ExitBB;
  644   for (BasicBlock *BB : L->blocks())
 1084   BasicBlock *ExitingBlock = L->getLoopLatch();
lib/Transforms/Scalar/LoopUnswitch.cpp
  187     BasicBlock *loopHeader = nullptr;
  188     BasicBlock *loopPreheader = nullptr;
  196     std::vector<BasicBlock*> LoopBlocks;
  198     std::vector<BasicBlock*> NewBlocks;
  213     bool isUnreachableDueToPreviousUnswitching(BasicBlock *);
  243                         const SmallVectorImpl<BasicBlock *> &ExitBlocks);
  250                                   BasicBlock *ExitBlock, Instruction *TI);
  258                                         BasicBlock *TrueDest,
  259                                         BasicBlock *FalseDest,
  559 bool LoopUnswitch::isUnreachableDueToPreviousUnswitching(BasicBlock *BB) {
  561   BasicBlock *DomBB = Node->getBlock();
  575     BasicBlock *UnreachableSucc =
  811     for (BasicBlock::iterator BBI = (*I)->begin(), E = (*I)->end();
  833 static bool isTrivialLoopExitBlockHelper(Loop *L, BasicBlock *BB,
  834                                          BasicBlock *&ExitBB,
  835                                          std::set<BasicBlock*> &Visited) {
  868 static BasicBlock *isTrivialLoopExitBlock(Loop *L, BasicBlock *BB) {
  868 static BasicBlock *isTrivialLoopExitBlock(Loop *L, BasicBlock *BB) {
  869   std::set<BasicBlock*> Visited;
  871   BasicBlock *ExitBB = nullptr;
  920       New.addBasicBlockToLoop(cast<BasicBlock>(VM[*I]), *LI);
  933                                                   BasicBlock *TrueDest,
  934                                                   BasicBlock *FalseDest,
  954   auto *OldBranchSucc = OldBranch->getSuccessor(0);
  955   auto *OldBranchParent = OldBranch->getParent();
 1000                                             BasicBlock *ExitBlock,
 1015   BasicBlock *NewPH = SplitEdge(loopPreheader, loopHeader, DT, LI, MSSAU.get());
 1026   BasicBlock *NewExit =
 1058   BasicBlock *CurrentBB = currentLoop->getHeader();
 1076   SmallPtrSet<BasicBlock*, 8> Visited;
 1123   BasicBlock *LoopExitBB = nullptr;
 1181       BasicBlock *LoopExitCandidate;
 1216                                const SmallVectorImpl<BasicBlock *> &ExitBlocks){
 1219     BasicBlock *ExitBlock = ExitBlocks[i];
 1220     SmallVector<BasicBlock *, 4> Preds(pred_begin(ExitBlock),
 1254   BasicBlock *NewPreheader =
 1261   SmallVector<BasicBlock*, 8> ExitBlocks;
 1281     BasicBlock *NewBB = CloneBasicBlock(LoopBlocks[i], VMap, ".us", F);
 1309     BasicBlock *NewExit = cast<BasicBlock>(VMap[ExitBlocks[i]]);
 1309     BasicBlock *NewExit = cast<BasicBlock>(VMap[ExitBlocks[i]]);
 1316     BasicBlock *ExitSucc = NewExit->getTerminator()->getSuccessor(0);
 1333         BasicBlock *BB = *I;
 1529     BasicBlock *Switch = SI->getParent();
 1530     BasicBlock *SISucc = DeadCase.getCaseSuccessor();
 1531     BasicBlock *Latch = L->getLoopLatch();
 1548     BasicBlock *NewSISucc = DeadCase.getCaseSuccessor();
 1549     BasicBlock *OldSISucc = *succ_begin(NewSISucc);
 1551     BasicBlock *Abort = BasicBlock::Create(Context, "us-unreachable",
 1551     BasicBlock *Abort = BasicBlock::Create(Context, "us-unreachable",
 1618         BasicBlock *Pred = BI->getParent();
 1620         BasicBlock *Succ = BI->getSuccessor(0);
 1621         BasicBlock *SinglePred = Succ->getSinglePredecessor();
lib/Transforms/Scalar/LoopVersioningLICM.cpp
  392   for (auto *Block : CurLoop->getBlocks())
  546   for (auto *Block : CurLoop->getBlocks()) {
  591   for (auto *Block : L->getBlocks()) {
lib/Transforms/Scalar/LowerAtomic.cpp
  117 static bool runOnBasicBlock(BasicBlock &BB) {
  119   for (BasicBlock::iterator DI = BB.begin(), DE = BB.end(); DI != DE;) {
  140   for (BasicBlock &BB : F) {
lib/Transforms/Scalar/LowerConstantIntrinsics.cpp
   62     BasicBlock *Target, *Other;
   74       BasicBlock *Source = BI->getParent();
   91   for (BasicBlock *BB : RPOT) {
lib/Transforms/Scalar/LowerExpectIntrinsic.cpp
  169     BasicBlock *BB = PhiDef->getIncomingBlock(i);
  212     auto *OpndIncomingBB = PhiDef->getIncomingBlock(i);
  324   for (BasicBlock &BB : F) {
lib/Transforms/Scalar/MakeGuardsExplicit.cpp
   59   BasicBlock *BB = Guard->getParent();
lib/Transforms/Scalar/MemCpyOptimizer.cpp
  315   BasicBlock::iterator BI(StartInst);
  534 bool MemCpyOptPass::processStore(StoreInst *SI, BasicBlock::iterator &BBI) {
  632         for (BasicBlock::iterator I = --SI->getIterator(), E = C->getIterator();
  707 bool MemCpyOptPass::processMemSet(MemSetInst *MSI, BasicBlock::iterator &BBI) {
 1339   for (BasicBlock &BB : F) {
 1347     for (BasicBlock::iterator BI = BB.begin(), BE = BB.end(); BI != BE;) {
lib/Transforms/Scalar/MergeICmps.cpp
  230   void split(BasicBlock *NewParent, AliasAnalysis &AA) const;
  233   BasicBlock *BB = nullptr;
  272 void BCECmpBlock::split(BasicBlock *NewParent, AliasAnalysis &AA) const {
  352 BCECmpBlock visitCmpBlock(Value *const Val, BasicBlock *const Block,
  353                           const BasicBlock *const PhiBlock,
  382     BasicBlock *const FalseBlock = BranchI->getSuccessor(1);
  408    BCECmpChain(const std::vector<BasicBlock *> &Blocks, PHINode &Phi,
  432   BasicBlock *EntryBlock_;
  435 BCECmpChain::BCECmpChain(const std::vector<BasicBlock *> &Blocks, PHINode &Phi,
  443     BasicBlock *const Block = Blocks[BlockIdx];
  593       const BasicBlock *const BB = Comparisons[I].BB;
  605 static BasicBlock *mergeComparisons(ArrayRef<BCECmpBlock> Comparisons,
  606                                     BasicBlock *const InsertBefore,
  607                                     BasicBlock *const NextCmpBlock,
  615   BasicBlock *const BB =
  616       BasicBlock::Create(Context, MergedBlockName(Comparisons).Name,
  660   BasicBlock *const PhiBB = Phi.getParent();
  704   BasicBlock *NextCmpBlock = Phi_.getParent();
  725     BasicBlock* const Pred = *pred_begin(EntryBlock_);
  747   SmallVector<BasicBlock *, 16> DeadBlocks;
  758 std::vector<BasicBlock *> getOrderedBlocks(PHINode &Phi,
  759                                            BasicBlock *const LastBlock,
  762   std::vector<BasicBlock *> Blocks(NumBlocks);
  764   BasicBlock *CurBlock = LastBlock;
  774     auto *SinglePredecessor = CurBlock->getSinglePredecessor();
  816   BasicBlock *LastBlock = nullptr;
lib/Transforms/Scalar/MergedLoadStoreMotion.cpp
  114   BasicBlock *getDiamondTail(BasicBlock *BB);
  114   BasicBlock *getDiamondTail(BasicBlock *BB);
  115   bool isDiamondHead(BasicBlock *BB);
  117   StoreInst *canSinkFromBlock(BasicBlock *BB, StoreInst *SI);
  118   PHINode *getPHIOperand(BasicBlock *BB, StoreInst *S0, StoreInst *S1);
  122   void sinkStoresAndGEPs(BasicBlock *BB, StoreInst *SinkCand,
  124   bool mergeStores(BasicBlock *BB);
  131 BasicBlock *MergedLoadStoreMotion::getDiamondTail(BasicBlock *BB) {
  131 BasicBlock *MergedLoadStoreMotion::getDiamondTail(BasicBlock *BB) {
  139 bool MergedLoadStoreMotion::isDiamondHead(BasicBlock *BB) {
  146   BasicBlock *Succ0 = BI->getSuccessor(0);
  147   BasicBlock *Succ1 = BI->getSuccessor(1);
  154   BasicBlock *Succ0Succ = Succ0->getSingleSuccessor();
  155   BasicBlock *Succ1Succ = Succ1->getSingleSuccessor();
  186 StoreInst *MergedLoadStoreMotion::canSinkFromBlock(BasicBlock *BB1,
  189   BasicBlock *BB0 = Store0->getParent();
  209 PHINode *MergedLoadStoreMotion::getPHIOperand(BasicBlock *BB, StoreInst *S0,
  242 void MergedLoadStoreMotion::sinkStoresAndGEPs(BasicBlock *BB, StoreInst *S0,
  251   BasicBlock::iterator InsertPt = BB->getFirstInsertionPt();
  282 bool MergedLoadStoreMotion::mergeStores(BasicBlock *HeadBB) {
  285   BasicBlock *TailBB = getDiamondTail(HeadBB);
  286   BasicBlock *SinkBB = TailBB;
  291   BasicBlock *Pred0 = *SI;
  294   BasicBlock *Pred1 = *SI;
  306   for (BasicBlock::reverse_iterator RBI = Pred0->rbegin(), RBE = Pred0->rend();
  357     BasicBlock *BB = &*FI++;
lib/Transforms/Scalar/NaryReassociate.cpp
  234     BasicBlock *BB = Node->getBlock();
lib/Transforms/Scalar/NewGVN.cpp
  536   DenseMap<const Value *, BasicBlock *> TempToBlock;
  570   DenseMap<BasicBlock *, SparseBitVector<>> RevisitOnReachabilityChange;
  624   SmallPtrSet<const BasicBlock *, 8> ReachableBlocks;
  637   DenseMap<const BasicBlock *, std::pair<unsigned, unsigned>> BlockInstRange;
  674   using ValPair = std::pair<Value *, BasicBlock *>;
  677                                      BasicBlock *, bool &HasBackEdge,
  727                            BasicBlock *PredBB);
  728   bool OpIsSafeForPHIOfOpsHelper(Value *V, const BasicBlock *PHIBlock,
  731   bool OpIsSafeForPHIOfOps(Value *Op, const BasicBlock *PHIBlock,
  733   void addPhiOfOps(PHINode *Op, BasicBlock *BB, Instruction *ExistingValue);
  754                                                  BasicBlock *PHIBlock) const;
  780   void updateReachableEdge(BasicBlock *, BasicBlock *);
  780   void updateReachableEdge(BasicBlock *, BasicBlock *);
  781   void processOutgoingEdges(Instruction *, BasicBlock *);
  796   void deleteInstructionsInBlock(BasicBlock *);
  798                             const BasicBlock *) const;
  824   std::pair<unsigned, unsigned> assignDFSNumbers(BasicBlock *, unsigned);
  831   BasicBlock *getBlockForValue(Value *V) const;
  835   MemoryPhi *getMemoryAccess(const BasicBlock *) const;
  861   bool isBackedge(BasicBlock *From, BasicBlock *To) const;
  861   bool isBackedge(BasicBlock *From, BasicBlock *To) const;
  892 bool NewGVN::isBackedge(BasicBlock *From, BasicBlock *To) const {
  892 bool NewGVN::isBackedge(BasicBlock *From, BasicBlock *To) const {
  899 static std::string getBlockName(const BasicBlock *B) {
  911 MemoryPhi *NewGVN::getMemoryAccess(const BasicBlock *BB) const {
  916 BasicBlock *NewGVN::getBlockForValue(Value *V) const {
  918     auto *Parent = I->getParent();
  983                                            BasicBlock *PHIBlock,
  995     auto *BB = P.second;
 1740                                      BasicBlock *PHIBlock) const {
 2431 void NewGVN::updateReachableEdge(BasicBlock *From, BasicBlock *To) {
 2431 void NewGVN::updateReachableEdge(BasicBlock *From, BasicBlock *To) {
 2470 void NewGVN::processOutgoingEdges(Instruction *TI, BasicBlock *B) {
 2473   BasicBlock *TrueSucc, *FalseSucc;
 2520       BasicBlock *TargetBlock = Case.getCaseSuccessor();
 2524         BasicBlock *TargetBlock = SI->getSuccessor(i);
 2532       BasicBlock *TargetBlock = TI->getSuccessor(i);
 2562 void NewGVN::addPhiOfOps(PHINode *Op, BasicBlock *BB,
 2583     Value *V, const BasicBlock *PHIBlock,
 2632 bool NewGVN::OpIsSafeForPHIOfOps(Value *V, const BasicBlock *PHIBlock,
 2654                                  BasicBlock *PredBB) {
 2716   BasicBlock *SamePHIBlock = nullptr;
 2749   auto *PHIBlock = getBlockForValue(OpPHI);
 2752     auto *PredBB = OpPHI->getIncomingBlock(PredNum);
 2873     BasicBlock *BB = DTN->getBlock();
 2976 std::pair<unsigned, unsigned> NewGVN::assignDFSNumbers(BasicBlock *B,
 3025   const BasicBlock *PHIBlock = MP->getBlock();
 3350   const BasicBlock *LastBlock = getBlockForValue(InstrFromDFSNum(FirstInstr));
 3367       const BasicBlock *CurrBlock = getBlockForValue(V);
 3444     BasicBlock *B = DTN->getBlock();
 3487   for (auto &BB : make_filter_range(F, UnreachableBlockPred)) {
 3565     BasicBlock *BB = getBlockForValue(D);
 3613         BasicBlock *IBlock;
 3657     BasicBlock *BB = getBlockForValue(D);
 3679 void NewGVN::deleteInstructionsInBlock(BasicBlock *BB) {
 3689   for (BasicBlock::reverse_iterator I(StartPoint); I != BB->rend();) {
 3774                                   const BasicBlock *BB) const {
 3854   DenseMap<const BasicBlock *, unsigned> ReachablePredCount;
 3864       auto *BB = BBPair.first;
 3952             auto *DefBlock = getBlockForValue(Def);
lib/Transforms/Scalar/PartiallyInlineLibCalls.cpp
   31                          BasicBlock &CurrBB, Function::iterator &BB,
   55   BasicBlock *JoinBB = llvm::SplitBlock(&CurrBB, Call->getNextNode());
   62   BasicBlock *LibCallBB = BasicBlock::Create(CurrBB.getContext(), "call.sqrt",
   62   BasicBlock *LibCallBB = BasicBlock::Create(CurrBB.getContext(), "call.sqrt",
   97     for (BasicBlock::iterator II = CurrBB->begin(), IE = CurrBB->end();
lib/Transforms/Scalar/PlaceSafepoints.cpp
  198 static bool containsUnconditionalCallSafepoint(Loop *L, BasicBlock *Header,
  199                                                BasicBlock *Pred,
  214   BasicBlock *Current = Pred;
  241                                     BasicBlock *Pred) {
  267                       DenseSet<BasicBlock *> &Seen,
  268                       std::vector<BasicBlock *> &Worklist) {
  269   for (BasicBlock::iterator BBI(Start), BBE0 = Start->getParent()->end(),
  282       BasicBlock *BB = BBI->getParent();
  283       for (BasicBlock *Succ : successors(BB)) {
  294                             DenseSet<BasicBlock *> &Seen) {
  296   std::vector<BasicBlock *> Worklist;
  300     BasicBlock *BB = Worklist.back();
  312   BasicBlock *Header = L->getHeader();
  313   SmallVector<BasicBlock*, 16> LoopLatches;
  315   for (BasicBlock *Pred : LoopLatches) {
  399     BasicBlock *nextBB = I->getParent()->getUniqueSuccessor();
  549         SetVector<BasicBlock *> Headers;
  551           BasicBlock *Succ = Term->getSuccessor(i);
  561         SetVector<BasicBlock *> SplitBackedges;
  562         for (BasicBlock *Header : Headers) {
  563           BasicBlock *NewBB = SplitEdge(Term->getParent(), Header, &DT);
  623   BasicBlock *OrigBB = InsertBefore->getParent();
  640   BasicBlock::iterator Before(PollCall), After(PollCall);
  660   DenseSet<BasicBlock *> BBs;    // new BBs + insertee
  664   BasicBlock::iterator Start = IsBegin ? OrigBB->begin() : std::next(Before);
lib/Transforms/Scalar/Reassociate.cpp
  177   for (BasicBlock *BB : RPOT) {
  872     BasicBlock::iterator InsertPt;
  880       const BasicBlock *BB = InsertPt->getParent();
 1093   BasicBlock::iterator InsertPt = ++BO->getIterator();
 2327   for (BasicBlock *BI : RPOT) {
 2409   for (BasicBlock *BI : RPOT) {
 2412     for (BasicBlock::iterator II = BI->begin(), IE = BI->end(); II != IE;)
lib/Transforms/Scalar/Reg2Mem.cpp
   50       const BasicBlock *BB = Inst->getParent();
   75   BasicBlock *BBEntry = &F.getEntryBlock();
   82   BasicBlock::iterator I = BBEntry->begin();
   92   for (BasicBlock &ibb : F)
   93     for (BasicBlock::iterator iib = ibb.begin(), iie = ibb.end(); iib != iie;
  109   for (BasicBlock &ibb : F)
  110     for (BasicBlock::iterator iib = ibb.begin(), iie = ibb.end(); iib != iie;
lib/Transforms/Scalar/RewriteStatepointsForGC.cpp
  234   MapVector<BasicBlock *, SetVector<Value *>> KillSet;
  238   MapVector<BasicBlock *, SetVector<Value *>> LiveSet;
  242   MapVector<BasicBlock *, SetVector<Value *>> LiveIn;
  246   MapVector<BasicBlock *, SetVector<Value *>> LiveOut;
  964         BasicBlock *BB = I->getParent();
 1041         BasicBlock *InBB = PN->getIncomingBlock(i);
 1220 static BasicBlock *
 1221 normalizeForInvokeSafepoint(BasicBlock *BB, BasicBlock *InvokeParent,
 1221 normalizeForInvokeSafepoint(BasicBlock *BB, BasicBlock *InvokeParent,
 1223   BasicBlock *Ret = BB;
 1531     BasicBlock *UnwindBlock = II->getUnwindDest();
 1548     BasicBlock *NormalDest = II->getNormalDest();
 1850         BasicBlock *NormalDest = Invoke->getNormalDest();
 1996   SmallDenseMap<Value *, BasicBlock *, 8> CurrentIncomingValues;
 2008     BasicBlock *CurrentIncomingBB = CIVI->second;
 2562   for (BasicBlock &BB : F)
 2588   for (BasicBlock &BB : F) {
 2638 static void computeLiveInValues(BasicBlock::reverse_iterator Begin,
 2671 static void computeLiveOutSeed(BasicBlock *BB, SetVector<Value *> &LiveTmp) {
 2672   for (BasicBlock *Succ : successors(BB)) {
 2687 static SetVector<Value *> computeKillSet(BasicBlock *BB) {
 2717                           BasicBlock &BB) {
 2726   SmallSetVector<BasicBlock *, 32> Worklist;
 2729   for (BasicBlock &BB : F) {
 2750     BasicBlock *BB = Worklist.pop_back_val();
 2756     for (BasicBlock *Succ : successors(BB)) {
 2786   for (BasicBlock &BB : F)
 2793   BasicBlock *BB = Inst->getParent();
lib/Transforms/Scalar/SCCP.cpp
  195   SmallPtrSet<BasicBlock *, 8> BBExecutable; // The BBs that are executable.
  243   SmallVector<BasicBlock *, 64>  BBWorkList;
  247   using Edge = std::pair<BasicBlock *, BasicBlock *>;
  247   using Edge = std::pair<BasicBlock *, BasicBlock *>;
  279   bool MarkBlockExecutable(BasicBlock *BB) {
  346   bool isBlockExecutable(BasicBlock *BB) const {
  352   bool isEdgeFeasible(BasicBlock *From, BasicBlock *To);
  352   bool isEdgeFeasible(BasicBlock *From, BasicBlock *To);
  554   bool markEdgeExecutable(BasicBlock *Source, BasicBlock *Dest) {
  554   bool markEdgeExecutable(BasicBlock *Source, BasicBlock *Dest) {
  728     BasicBlock* T = Addr->getBasicBlock();
  757 bool SCCPSolver::isEdgeFeasible(BasicBlock *From, BasicBlock *To) {
  757 bool SCCPSolver::isEdgeFeasible(BasicBlock *From, BasicBlock *To) {
  864   BasicBlock *BB = TI.getParent();
 1405       BasicBlock *BB = BBWorkList.back();
 1436   for (BasicBlock &BB : F) {
 1689       BasicBlock *DefaultSuccessor = TI->getSuccessor(1);
 1718       BasicBlock *DefaultSuccessor = IBR->getSuccessor(0);
 1741       BasicBlock *DefaultSuccessor = SI->case_begin()->getCaseSuccessor();
 1829   for (BasicBlock &BB : F) {
 1842     for (BasicBlock::iterator BI = BB.begin(), E = BB.end(); BI != E;) {
 1955   for (BasicBlock &BB : F) {
 1972   BasicBlock *Dest = nullptr;
 2071     SmallVector<BasicBlock *, 512> BlocksToErase;
 2094       for (BasicBlock::iterator BI = BB->begin(), E = BB->end(); BI != E; ) {
 2113     for (BasicBlock *BB : BlocksToErase) {
 2126     for (BasicBlock *DeadBB : BlocksToErase) {
 2142         BasicBlock *InstBB = I->getParent();
 2163     for (BasicBlock &BB : F) {
 2164       for (BasicBlock::iterator BI = BB.begin(), E = BB.end(); BI != E;) {
lib/Transforms/Scalar/SROA.cpp
  142   void InsertHelper(Instruction *I, const Twine &Name, BasicBlock *BB,
  143                     BasicBlock::iterator InsertPt) const {
 1201   BasicBlock *BB = PN.getParent();
 1219     for (BasicBlock::iterator BBI(PN); &*BBI != LI; ++BBI)
 1285   DenseMap<BasicBlock*, Value*> InjectedLoads;
 1287     BasicBlock *Pred = PN.getIncomingBlock(Idx);
 4564   BasicBlock &EntryBB = F.getEntryBlock();
 4565   for (BasicBlock::iterator I = EntryBB.begin(), E = std::prev(EntryBB.end());
lib/Transforms/Scalar/Scalarizer.cpp
   82   Scatterer(BasicBlock *bb, BasicBlock::iterator bbi, Value *v,
   82   Scatterer(BasicBlock *bb, BasicBlock::iterator bbi, Value *v,
   92   BasicBlock *BB;
   93   BasicBlock::iterator BBI;
  238 Scatterer::Scatterer(BasicBlock *bb, BasicBlock::iterator bbi, Value *v,
  238 Scatterer::Scatterer(BasicBlock *bb, BasicBlock::iterator bbi, Value *v,
  319   ReversePostOrderTraversal<BasicBlock *> RPOT(&F.getEntryBlock());
  320   for (BasicBlock *BB : RPOT) {
  321     for (BasicBlock::iterator II = BB->begin(), IE = BB->end(); II != IE;) {
  339     BasicBlock *BB = &F->getEntryBlock();
  345     BasicBlock *BB = VOp->getParent();
  758     BasicBlock *IncomingBlock = PHI.getIncomingBlock(I);
  837       BasicBlock *BB = Op->getParent();
lib/Transforms/Scalar/SeparateConstOffsetFromGEP.cpp
 1126   for (BasicBlock &B : F) {
 1127     for (BasicBlock::iterator I = B.begin(), IE = B.end(); I != IE;)
 1202     BasicBlock *BB = Node->getBlock();
 1212   for (BasicBlock &B : F) {
lib/Transforms/Scalar/SimpleLoopUnswitch.cpp
  159 static bool areLoopExitPHIsLoopInvariant(Loop &L, BasicBlock &ExitingBB,
  160                                          BasicBlock &ExitBB) {
  177 static void buildPartialUnswitchConditionalBranch(BasicBlock &BB,
  180                                                   BasicBlock &UnswitchedSucc,
  181                                                   BasicBlock &NormalSucc) {
  197 static void rewritePHINodesForUnswitchedExitBlock(BasicBlock &UnswitchedBB,
  198                                                   BasicBlock &OldExitingBB,
  199                                                   BasicBlock &OldPH) {
  219 static void rewritePHINodesForExitAndUnswitchedBlocks(BasicBlock &ExitBB,
  220                                                       BasicBlock &UnswitchedBB,
  221                                                       BasicBlock &OldExitingBB,
  222                                                       BasicBlock &OldPH,
  264 static void hoistLoopToNewParent(Loop &L, BasicBlock &Preheader,
  272   SmallVector<BasicBlock *, 4> Exits;
  275   for (auto *ExitBB : Exits)
  314     for (BasicBlock *BB : L.blocks())
  376   auto *LoopExitBB = BI.getSuccessor(0);
  384   auto *ContinueBB = BI.getSuccessor(1 - LoopExitSuccIdx);
  385   auto *ParentBB = BI.getParent();
  431   BasicBlock *OldPH = L.getLoopPreheader();
  432   BasicBlock *NewPH = SplitEdge(OldPH, L.getHeader(), &DT, &LI, MSSAU);
  438   BasicBlock *UnswitchedBB;
  582   auto *ParentBB = SI.getParent();
  586     auto *SuccBB = Case.getCaseSuccessor();
  591   BasicBlock *DefaultExitBB = nullptr;
  622   SmallVector<std::tuple<ConstantInt *, BasicBlock *,
  651   BasicBlock *CommonSuccBB = nullptr;
  671   BasicBlock *OldPH = L.getLoopPreheader();
  672   BasicBlock *NewPH = SplitEdge(OldPH, L.getHeader(), &DT, &LI, MSSAU);
  685   SmallPtrSet<BasicBlock *, 2> UnswitchedExitBBs;
  686   SmallDenseMap<BasicBlock *, BasicBlock *, 2> SplitExitBBMap;
  686   SmallDenseMap<BasicBlock *, BasicBlock *, 2> SplitExitBBMap;
  695       auto *SplitBB =
  707     BasicBlock *ExitBB = std::get<1>(ExitCase);
  720     BasicBlock *&SplitExitBB = SplitExitBBMap[ExitBB];
  736     BasicBlock *UnswitchedBB = std::get<1>(ExitCase);
  769     BasicBlock *BB = SI.getParent();
  808   for (auto *UnswitchedExitBB : UnswitchedExitBBs) {
  867   BasicBlock *CurrentBB = L.getHeader();
  868   SmallPtrSet<BasicBlock *, 8> Visited;
  969 static BasicBlock *buildClonedLoopBlocks(
  970     Loop &L, BasicBlock *LoopPH, BasicBlock *SplitBB,
  970     Loop &L, BasicBlock *LoopPH, BasicBlock *SplitBB,
  971     ArrayRef<BasicBlock *> ExitBlocks, BasicBlock *ParentBB,
  971     ArrayRef<BasicBlock *> ExitBlocks, BasicBlock *ParentBB,
  972     BasicBlock *UnswitchedSuccBB, BasicBlock *ContinueSuccBB,
  972     BasicBlock *UnswitchedSuccBB, BasicBlock *ContinueSuccBB,
  973     const SmallDenseMap<BasicBlock *, BasicBlock *, 16> &DominatingSucc,
  973     const SmallDenseMap<BasicBlock *, BasicBlock *, 16> &DominatingSucc,
  977   SmallVector<BasicBlock *, 4> NewBlocks;
  984     BasicBlock *NewBB = CloneBasicBlock(OldBB, VMap, ".us", OldBB->getParent());
 1002   auto *ClonedPH = CloneBlock(LoopPH);
 1005   for (auto *LoopBB : L.blocks())
 1012   for (auto *ExitBB : ExitBlocks) {
 1021     auto *MergeBB = SplitBlock(ExitBB, &ExitBB->front(), &DT, &LI, MSSAU);
 1030     auto *ClonedExitBB = CloneBlock(ExitBB);
 1066   for (auto *ClonedBB : NewBlocks)
 1077   for (auto *LoopBB : L.blocks())
 1079       for (auto *SuccBB : successors(LoopBB))
 1080         if (auto *ClonedSuccBB = cast_or_null<BasicBlock>(VMap.lookup(SuccBB)))
 1080         if (auto *ClonedSuccBB = cast_or_null<BasicBlock>(VMap.lookup(SuccBB)))
 1086   auto *ClonedParentBB = cast<BasicBlock>(VMap.lookup(ParentBB));
 1086   auto *ClonedParentBB = cast<BasicBlock>(VMap.lookup(ParentBB));
 1087   for (auto *SuccBB : successors(ParentBB)) {
 1091     auto *ClonedSuccBB = cast_or_null<BasicBlock>(VMap.lookup(SuccBB));
 1091     auto *ClonedSuccBB = cast_or_null<BasicBlock>(VMap.lookup(SuccBB));
 1101   auto *ClonedSuccBB = cast<BasicBlock>(VMap.lookup(UnswitchedSuccBB));
 1101   auto *ClonedSuccBB = cast<BasicBlock>(VMap.lookup(UnswitchedSuccBB));
 1124   SmallPtrSet<BasicBlock *, 4> SuccSet;
 1125   for (auto *ClonedBB : NewBlocks) {
 1126     for (auto *SuccBB : successors(ClonedBB))
 1146     for (auto *BB : OrigL.blocks()) {
 1147       auto *ClonedBB = cast<BasicBlock>(VMap.lookup(BB));
 1147       auto *ClonedBB = cast<BasicBlock>(VMap.lookup(BB));
 1200 static void buildClonedLoops(Loop &OrigL, ArrayRef<BasicBlock *> ExitBlocks,
 1205   auto *OrigPH = OrigL.getLoopPreheader();
 1206   auto *OrigHeader = OrigL.getHeader();
 1208   auto *ClonedPH = cast<BasicBlock>(VMap.lookup(OrigPH));
 1208   auto *ClonedPH = cast<BasicBlock>(VMap.lookup(OrigPH));
 1209   auto *ClonedHeader = cast<BasicBlock>(VMap.lookup(OrigHeader));
 1209   auto *ClonedHeader = cast<BasicBlock>(VMap.lookup(OrigHeader));
 1216   SmallVector<BasicBlock *, 4> ClonedExitsInLoops;
 1217   SmallDenseMap<BasicBlock *, Loop *, 16> ExitLoopMap;
 1219   for (auto *ExitBB : ExitBlocks)
 1220     if (auto *ClonedExitBB = cast_or_null<BasicBlock>(VMap.lookup(ExitBB)))
 1220     if (auto *ClonedExitBB = cast_or_null<BasicBlock>(VMap.lookup(ExitBB)))
 1236   SmallSetVector<BasicBlock *, 16> ClonedLoopBlocks;
 1237   for (auto *BB : OrigL.blocks())
 1238     if (auto *ClonedBB = cast_or_null<BasicBlock>(VMap.lookup(BB)))
 1238     if (auto *ClonedBB = cast_or_null<BasicBlock>(VMap.lookup(BB)))
 1245   SmallVector<BasicBlock *, 16> Worklist;
 1246   SmallPtrSet<BasicBlock *, 16> BlocksInClonedLoop;
 1247   for (auto *Pred : predecessors(ClonedHeader)) {
 1273       BasicBlock *BB = Worklist.pop_back_val();
 1282       for (auto *Pred : predecessors(BB))
 1303     for (auto *BB : OrigL.blocks()) {
 1304       auto *ClonedBB = cast_or_null<BasicBlock>(VMap.lookup(BB));
 1304       auto *ClonedBB = cast_or_null<BasicBlock>(VMap.lookup(BB));
 1326       auto *ClonedChildHeader =
 1327           cast_or_null<BasicBlock>(VMap.lookup(ChildL->getHeader()));
 1334       for (auto *ChildLoopBB : ChildL->blocks())
 1352   SmallPtrSet<BasicBlock *, 16> UnloopedBlockSet;
 1355   for (auto *ClonedBB : ClonedLoopBlocks)
 1374     BasicBlock *ExitBB = OrderedClonedExitsInLoops.pop_back_val();
 1381       BasicBlock *BB = Worklist.pop_back_val();
 1386       for (BasicBlock *PredBB : predecessors(BB)) {
 1415   for (auto *BB : llvm::concat<BasicBlock *const>(
 1415   for (auto *BB : llvm::concat<BasicBlock *const>(
 1422     auto *BB = BBAndL.first;
 1433     auto *ClonedChildHeader =
 1434         cast_or_null<BasicBlock>(VMap.lookup(ChildL->getHeader()));
 1439     for (auto *ChildLoopBB : ChildL->blocks())
 1450 deleteDeadClonedBlocks(Loop &L, ArrayRef<BasicBlock *> ExitBlocks,
 1454   SmallVector<BasicBlock *, 16> DeadBlocks;
 1455   for (BasicBlock *BB : llvm::concat<BasicBlock *const>(L.blocks(), ExitBlocks))
 1455   for (BasicBlock *BB : llvm::concat<BasicBlock *const>(L.blocks(), ExitBlocks))
 1457       if (BasicBlock *ClonedBB = cast_or_null<BasicBlock>(VMap->lookup(BB)))
 1457       if (BasicBlock *ClonedBB = cast_or_null<BasicBlock>(VMap->lookup(BB)))
 1459           for (BasicBlock *SuccBB : successors(ClonedBB))
 1466     SmallSetVector<BasicBlock *, 8> DeadBlockSet(DeadBlocks.begin(),
 1472   for (BasicBlock *BB : DeadBlocks)
 1475   for (BasicBlock *BB : DeadBlocks)
 1480                                      SmallVectorImpl<BasicBlock *> &ExitBlocks,
 1485   SmallSetVector<BasicBlock *, 8> DeadBlockSet;
 1489   SmallVector<BasicBlock *, 16> DeathCandidates(ExitBlocks.begin(),
 1493     auto *BB = DeathCandidates.pop_back_val();
 1495       for (BasicBlock *SuccBB : successors(BB)) {
 1514     for (auto *BB : DeadBlockSet)
 1539   for (auto *BB : DeadBlockSet) {
 1548   for (auto *BB : DeadBlockSet)
 1563 static SmallPtrSet<const BasicBlock *, 16> recomputeLoopBlockSet(Loop &L,
 1565   SmallPtrSet<const BasicBlock *, 16> LoopBlockSet;
 1567   auto *PH = L.getLoopPreheader();
 1568   auto *Header = L.getHeader();
 1571   SmallVector<BasicBlock *, 16> Worklist;
 1575   for (auto *Pred : predecessors(Header)) {
 1599     BasicBlock *BB = Worklist.pop_back_val();
 1616         auto *InnerPH = InnerL->getLoopPreheader();
 1630         for (auto *InnerBB : InnerL->blocks()) {
 1648     for (auto *Pred : predecessors(BB))
 1674 static bool rebuildLoopAfterUnswitch(Loop &L, ArrayRef<BasicBlock *> ExitBlocks,
 1677   auto *PH = L.getLoopPreheader();
 1683   SmallVector<BasicBlock *, 4> ExitsInLoops;
 1685   for (auto *ExitBB : ExitBlocks)
 1706       for (auto *BB : L.blocks())
 1731   SmallPtrSet<BasicBlock *, 16> UnloopedBlocks(BlocksSplitI, Blocks.end());
 1736   for (auto *BB : make_range(BlocksSplitI, Blocks.end()))
 1747   SmallPtrSet<BasicBlock *, 16> NewExitLoopBlocks;
 1752         for (auto *BB : UnloopedBlocks)
 1759   SmallVector<BasicBlock *, 16> Worklist;
 1765     BasicBlock *ExitBB = ExitsInLoops.pop_back_val();
 1780       BasicBlock *BB = Worklist.pop_back_val();
 1785       for (BasicBlock *PredBB : predecessors(BB)) {
 1810     for (auto *BB : NewExitLoopBlocks)
 1824   for (auto *BB : UnloopedBlocks)
 1878 void visitDomSubTree(DominatorTree &DT, BasicBlock *BB, CallableT Callable) {
 1903     SmallVectorImpl<BasicBlock *> &ExitBlocks, DominatorTree &DT, LoopInfo &LI,
 1906   auto *ParentBB = TI.getParent();
 1944   BasicBlock *RetainedSuccBB =
 1946   SmallSetVector<BasicBlock *, 4> UnswitchedSuccBBs;
 1974   for (auto *ExitBB : ExitBlocks) {
 2000   SmallDenseMap<BasicBlock *, BasicBlock *, 16> DominatingSucc;
 2000   SmallDenseMap<BasicBlock *, BasicBlock *, 16> DominatingSucc;
 2001   for (auto *SuccBB : llvm::concat<BasicBlock *const>(
 2001   for (auto *SuccBB : llvm::concat<BasicBlock *const>(
 2017   BasicBlock *SplitBB = L.getLoopPreheader();
 2018   BasicBlock *LoopPH = SplitEdge(SplitBB, L.getHeader(), &DT, &LI, MSSAU);
 2026   SmallDenseMap<BasicBlock *, BasicBlock *, 4> ClonedPHs;
 2026   SmallDenseMap<BasicBlock *, BasicBlock *, 4> ClonedPHs;
 2027   for (auto *SuccBB : UnswitchedSuccBBs) {
 2049       BasicBlock *ClonedPH = ClonedPHs.begin()->second;
 2069       for (BasicBlock *SuccBB : UnswitchedSuccBBs)
 2082       for (BasicBlock *SuccBB : UnswitchedSuccBBs)
 2091       for (BasicBlock *SuccBB : UnswitchedSuccBBs)
 2102       BasicBlock *UnswitchedSuccBB = *UnswitchedSuccBBs.begin();
 2124       for (BasicBlock *SuccBB : UnswitchedSuccBBs)
 2138     BasicBlock *ClonedPH = ClonedPHs.begin()->second;
 2201     BasicBlock *ClonedPH = ClonedPHs.begin()->second;
 2328                       const SmallDenseMap<BasicBlock *, int, 4> &BBCostMap,
 2376                     SmallVectorImpl<BasicBlock *> &ExitBlocks,
 2380   BasicBlock *CheckBB = GI->getParent();
 2387   SmallPtrSet<BasicBlock *, 4> Successors;
 2388   for (auto *Succ : successors(CheckBB))
 2399   BasicBlock *GuardedBlock = CheckBI->getSuccessor(0);
 2402   BasicBlock *DeoptBlock = CheckBI->getSuccessor(1);
 2414   for (auto *Succ : successors(CheckBB))
 2419   for (auto *Succ : Successors)
 2460   BasicBlock *Latch = L.getLoopLatch();
 2461   BasicBlock *CondBlock = TI.getParent();
 2479     BasicBlock *CondBlock = CI->getParent();
 2542   for (auto *BB : L.blocks()) {
 2599   if (containsIrreducibleCFG<const BasicBlock *>(RPOT, LI))
 2602   SmallVector<BasicBlock *, 4> ExitBlocks;
 2609   for (auto *ExitBB : ExitBlocks)
 2626   SmallDenseMap<BasicBlock *, int, 4> BBCostMap;
 2634   for (auto *BB : L.blocks()) {
 2673     BasicBlock &BB = *TI.getParent();
 2674     SmallPtrSet<BasicBlock *, 4> Visited;
 2677     for (BasicBlock *SuccBB : successors(&BB)) {
lib/Transforms/Scalar/SimplifyCFGPass.cpp
   75   BasicBlock *RetBlock = nullptr;
   79     BasicBlock &BB = *BBI++;
   89       BasicBlock::iterator I(Ret);
  152   SmallVector<std::pair<const BasicBlock *, const BasicBlock *>, 32> Edges;
  152   SmallVector<std::pair<const BasicBlock *, const BasicBlock *>, 32> Edges;
  154   SmallPtrSet<BasicBlock *, 16> LoopHeaders;
lib/Transforms/Scalar/Sink.cpp
   36 static bool AllUsesDominatedByBlock(Instruction *Inst, BasicBlock *BB,
   45     BasicBlock *UseBlock = UseInst->getParent();
   94 static bool IsAcceptableTarget(Instruction *Inst, BasicBlock *SuccToSinkTo,
  162   BasicBlock *SuccToSinkTo = nullptr;
  170     BasicBlock *Candidate = (*I)->getBlock();
  198 static bool ProcessBlock(BasicBlock &BB, DominatorTree &DT, LoopInfo &LI,
  211   BasicBlock::iterator I = BB.end();
  246     for (BasicBlock &I : F)
lib/Transforms/Scalar/SpeculateAroundPHIs.cpp
   52   auto *PhiBB = PN.getParent();
  116         auto *ParentBB = OpI->getParent();
  217   SmallPtrSet<BasicBlock *, 16> IncomingConstantBlocks;
  561                           SmallSetVector<BasicBlock *, 16> &PredSet,
  567   auto *ParentBB = SpecPNs[0]->getParent();
  568   SmallVector<BasicBlock *, 16> SpecPreds;
  570   for (auto *PredBB : PredSet) {
  571     auto *NewPredBB = SplitCriticalEdge(
  643       SmallDenseMap<BasicBlock *, Value *, 16> IncomingValueMap;
  647       for (auto *PredBB : SpecPreds)
  653     auto *PredBB = SpecPreds[PredIdx];
  770   SmallSetVector<BasicBlock *, 16> PredSet;
  771   for (auto *PredBB : PNs[0]->blocks()) {
  810   for (auto *BB : ReversePostOrderTraversal<Function *>(&F)) {
lib/Transforms/Scalar/SpeculativeExecution.cpp
  161   for (auto& B : F) {
  167 bool SpeculativeExecutionPass::runOnBasicBlock(BasicBlock &B) {
  174   BasicBlock &Succ0 = *BI->getSuccessor(0);
  175   BasicBlock &Succ1 = *BI->getSuccessor(1);
  254     BasicBlock &FromBlock, BasicBlock &ToBlock) {
  254     BasicBlock &FromBlock, BasicBlock &ToBlock) {
lib/Transforms/Scalar/StructurizeCFG.cpp
   72 using BBValuePair = std::pair<BasicBlock *, Value *>;
   75 using BBVector = SmallVector<BasicBlock *, 8>;
   79 using BBSet = SmallPtrSet<BasicBlock *, 8>;
   82 using BB2BBVecMap = MapVector<BasicBlock *, BBVector>;
   84 using BBPhiMap = DenseMap<BasicBlock *, PhiMap>;
   85 using BBPredicates = DenseMap<BasicBlock *, Value *>;
   86 using PredMap = DenseMap<BasicBlock *, BBPredicates>;
   87 using BB2BBMap = DenseMap<BasicBlock *, BasicBlock *>;
   87 using BB2BBMap = DenseMap<BasicBlock *, BasicBlock *>;
   96   BasicBlock *Result = nullptr;
  100   void addBlock(BasicBlock *BB, bool Remember) {
  107     BasicBlock *NewResult = DT->findNearestCommonDominator(Result, BB);
  118   void addBlock(BasicBlock *BB) {
  122   void addAndRememberBlock(BasicBlock *BB) {
  128   BasicBlock *result() { return Result; }
  227   void delPhiValues(BasicBlock *From, BasicBlock *To);
  227   void delPhiValues(BasicBlock *From, BasicBlock *To);
  229   void addPhiValues(BasicBlock *From, BasicBlock *To);
  229   void addPhiValues(BasicBlock *From, BasicBlock *To);
  233   void killTerminator(BasicBlock *BB);
  235   void changeExit(RegionNode *Node, BasicBlock *NewExit,
  238   BasicBlock *getNextFlow(BasicBlock *Dominator);
  238   BasicBlock *getNextFlow(BasicBlock *Dominator);
  240   BasicBlock *needPrefix(bool NeedEmpty);
  242   BasicBlock *needPostfix(BasicBlock *Flow, bool ExitUseAllowed);
  242   BasicBlock *needPostfix(BasicBlock *Flow, bool ExitUseAllowed);
  244   void setPrevNode(BasicBlock *BB);
  246   bool dominatesPredicates(BasicBlock *BB, RegionNode *Node);
  250   void wireFlow(bool ExitUseAllowed, BasicBlock *LoopEnd);
  252   void handleLoops(bool ExitUseAllowed, BasicBlock *LoopEnd);
  387     BasicBlock *Exit = N->getNodeAs<Region>()->getExit();
  393     BasicBlock *BB = N->getNodeAs<BasicBlock>();
  393     BasicBlock *BB = N->getNodeAs<BasicBlock>();
  396     for (BasicBlock *Succ : Term->successors())
  415     BasicBlock *Parent = Inst->getParent();
  426     BasicBlock &EntryBlock = Arg->getParent()->getEntryBlock();
  451   BasicBlock *BB = N->getEntry();
  455   for (BasicBlock *P : predecessors(BB)) {
  465         BasicBlock *Succ = Term->getSuccessor(i);
  473             BasicBlock *Other = Term->getSuccessor(!i);
  497       BasicBlock *Entry = R->getEntry();
  544     BasicBlock *Parent = Term->getParent();
  545     BasicBlock *SuccTrue = Term->getSuccessor(0);
  546     BasicBlock *SuccFalse = Term->getSuccessor(1);
  558     for (std::pair<BasicBlock *, Value *> BBAndPred : Preds) {
  559       BasicBlock *BB = BBAndPred.first;
  583 void StructurizeCFG::delPhiValues(BasicBlock *From, BasicBlock *To) {
  583 void StructurizeCFG::delPhiValues(BasicBlock *From, BasicBlock *To) {
  594 void StructurizeCFG::addPhiValues(BasicBlock *From, BasicBlock *To) {
  594 void StructurizeCFG::addPhiValues(BasicBlock *From, BasicBlock *To) {
  607     BasicBlock *To = AddedPhi.first;
  631       for (BasicBlock *FI : From)
  661 void StructurizeCFG::killTerminator(BasicBlock *BB) {
  676 void StructurizeCFG::changeExit(RegionNode *Node, BasicBlock *NewExit,
  680     BasicBlock *OldExit = SubRegion->getExit();
  681     BasicBlock *Dominator = nullptr;
  686       BasicBlock *BB = *BBI++;
  712     BasicBlock *BB = Node->getNodeAs<BasicBlock>();
  712     BasicBlock *BB = Node->getNodeAs<BasicBlock>();
  722 BasicBlock *StructurizeCFG::getNextFlow(BasicBlock *Dominator) {
  722 BasicBlock *StructurizeCFG::getNextFlow(BasicBlock *Dominator) {
  724   BasicBlock *Insert = Order.empty() ? ParentRegion->getExit() :
  726   BasicBlock *Flow = BasicBlock::Create(Context, FlowBlockName,
  726   BasicBlock *Flow = BasicBlock::Create(Context, FlowBlockName,
  734 BasicBlock *StructurizeCFG::needPrefix(bool NeedEmpty) {
  735   BasicBlock *Entry = PrevNode->getEntry();
  744   BasicBlock *Flow = getNextFlow(Entry);
  753 BasicBlock *StructurizeCFG::needPostfix(BasicBlock *Flow,
  753 BasicBlock *StructurizeCFG::needPostfix(BasicBlock *Flow,
  758   BasicBlock *Exit = ParentRegion->getExit();
  765 void StructurizeCFG::setPrevNode(BasicBlock *BB) {
  771 bool StructurizeCFG::dominatesPredicates(BasicBlock *BB, RegionNode *Node) {
  787   for (std::pair<BasicBlock*, Value*> Pred : Preds) {
  788     BasicBlock *BB = Pred.first;
  804                               BasicBlock *LoopEnd) {
  816     BasicBlock *Flow = needPrefix(false);
  819     BasicBlock *Entry = Node->getEntry();
  820     BasicBlock *Next = needPostfix(Flow, ExitUseAllowed);
  839                                  BasicBlock *LoopEnd) {
  841   BasicBlock *LoopStart = Node->getEntry();
  863     BasicBlock *NewEntry =
  864       BasicBlock::Create(LoopStart->getContext(),
  874   BasicBlock *Next = needPostfix(LoopEnd, ExitUseAllowed);
  884   BasicBlock *Exit = ParentRegion->getExit();
  909   for (BasicBlock *BB : ParentRegion->blocks())
lib/Transforms/Scalar/TailRecursionElimination.cpp
  200   for (auto &BB : F) {
  216   DenseMap<BasicBlock *, VisitType> Visited;
  221   SmallVector<BasicBlock *, 32> WorklistUnescaped, WorklistEscaped;
  232   BasicBlock *BB = &F.getEntryBlock();
  282     for (auto *SuccBB : make_range(succ_begin(BB), succ_end(BB))) {
  299         auto *NextBB = WorklistUnescaped.pop_back_val();
  384   if (BasicBlock *UniquePred = RI->getParent()->getUniquePredecessor())
  400   for (BasicBlock &BBI : *F) {
  442 static Instruction *firstNonDbg(BasicBlock::iterator I) {
  451   BasicBlock *BB = TI->getParent();
  460   BasicBlock::iterator BBI(TI);
  500     CallInst *CI, ReturnInst *Ret, BasicBlock *&OldEntry,
  520   BasicBlock::iterator BBI(CI);
  559   BasicBlock *BB = Ret->getParent();
  572     BasicBlock *NewEntry = BasicBlock::Create(F->getContext(), "", F, OldEntry);
  572     BasicBlock *NewEntry = BasicBlock::Create(F->getContext(), "", F, OldEntry);
  583       for (BasicBlock::iterator OEBI = OldEntry->begin(), E = OldEntry->end(),
  643       BasicBlock *P = *PI;
  668     for (BasicBlock &BBI : *F)
  687     BasicBlock *BB, ReturnInst *Ret, BasicBlock *&OldEntry,
  687     BasicBlock *BB, ReturnInst *Ret, BasicBlock *&OldEntry,
  703     BasicBlock *Pred = *PI;
  712     BasicBlock *Pred = BI->getParent();
  736     ReturnInst *Ret, BasicBlock *&OldEntry, bool &TailCallsAreMarkedTail,
  766   BasicBlock *OldEntry = nullptr;
  782     BasicBlock *BB = &*BBI++; // foldReturnAndProcessPred may delete BB.
lib/Transforms/Utils/AddDiscriminators.cpp
  177   using BBSet = DenseSet<const BasicBlock *>;
  188   for (BasicBlock &B : F) {
  231   for (BasicBlock &B : F) {
lib/Transforms/Utils/BasicBlockUtils.cpp
   55     ArrayRef<BasicBlock *> BBs,
   58   for (auto *BB : BBs) {
   61     SmallPtrSet<BasicBlock *, 4> UniqueSuccessors;
   62     for (BasicBlock *Succ : successors(BB)) {
   88 void llvm::DeleteDeadBlock(BasicBlock *BB, DomTreeUpdater *DTU,
   93 void llvm::DeleteDeadBlocks(ArrayRef <BasicBlock *> BBs, DomTreeUpdater *DTU,
   97   SmallPtrSet<BasicBlock *, 4> Dead(BBs.begin(), BBs.end());
   99   for (auto *BB : Dead)
  100     for (BasicBlock *Pred : predecessors(BB))
  110   for (BasicBlock *BB : BBs)
  119   df_iterator_default_set<BasicBlock*> Reachable;
  122   for (BasicBlock *BB : depth_first_ext(&F, Reachable))
  126   std::vector<BasicBlock*> DeadBlocks;
  129       BasicBlock *BB = &*I;
  139 void llvm::FoldSingleEntryPHINodes(BasicBlock *BB,
  156 bool llvm::DeleteDeadPHIs(BasicBlock *BB, const TargetLibraryInfo *TLI) {
  171 bool llvm::MergeBlockIntoPredecessor(BasicBlock *BB, DomTreeUpdater *DTU,
  179   BasicBlock *PredBB = BB->getUniquePredecessor();
  195   BasicBlock *NewSucc = nullptr;
  321 void llvm::ReplaceInstWithValue(BasicBlock::InstListType &BIL,
  322                                 BasicBlock::iterator &BI, Value *V) {
  335 void llvm::ReplaceInstWithInst(BasicBlock::InstListType &BIL,
  336                                BasicBlock::iterator &BI, Instruction *I) {
  346   BasicBlock::iterator New = BIL.insert(BI, I);
  356   BasicBlock::iterator BI(From);
  360 BasicBlock *llvm::SplitEdge(BasicBlock *BB, BasicBlock *Succ, DominatorTree *DT,
  360 BasicBlock *llvm::SplitEdge(BasicBlock *BB, BasicBlock *Succ, DominatorTree *DT,
  360 BasicBlock *llvm::SplitEdge(BasicBlock *BB, BasicBlock *Succ, DominatorTree *DT,
  373   if (BasicBlock *SP = Succ->getSinglePredecessor()) {
  392   for (BasicBlock &BB : F) {
  402 BasicBlock *llvm::SplitBlock(BasicBlock *Old, Instruction *SplitPt,
  402 BasicBlock *llvm::SplitBlock(BasicBlock *Old, Instruction *SplitPt,
  405   BasicBlock::iterator SplitIt = SplitPt->getIterator();
  409   BasicBlock *New = Old->splitBasicBlock(
  437 static void UpdateAnalysisInformation(BasicBlock *OldBB, BasicBlock *NewBB,
  437 static void UpdateAnalysisInformation(BasicBlock *OldBB, BasicBlock *NewBB,
  438                                       ArrayRef<BasicBlock *> Preds,
  468   for (BasicBlock *Pred : Preds) {
  502     for (BasicBlock *Pred : Preds) {
  528 static void UpdatePHINodes(BasicBlock *OrigBB, BasicBlock *NewBB,
  528 static void UpdatePHINodes(BasicBlock *OrigBB, BasicBlock *NewBB,
  529                            ArrayRef<BasicBlock *> Preds, BranchInst *BI,
  532   SmallPtrSet<BasicBlock *, 16> PredSet(Preds.begin(), Preds.end());
  533   for (BasicBlock::iterator I = OrigBB->begin(); isa<PHINode>(I); ) {
  583       BasicBlock *IncomingBB = PN->getIncomingBlock(i);
  594 BasicBlock *llvm::SplitBlockPredecessors(BasicBlock *BB,
  594 BasicBlock *llvm::SplitBlockPredecessors(BasicBlock *BB,
  595                                          ArrayRef<BasicBlock *> Preds,
  606     SmallVector<BasicBlock*, 2> NewBBs;
  615   BasicBlock *NewBB = BasicBlock::Create(
  615   BasicBlock *NewBB = BasicBlock::Create(
  646     for (BasicBlock::iterator I = BB->begin(); isa<PHINode>(I); ++I)
  663 void llvm::SplitLandingPadPredecessors(BasicBlock *OrigBB,
  664                                        ArrayRef<BasicBlock *> Preds,
  666                                        SmallVectorImpl<BasicBlock *> &NewBBs,
  674   BasicBlock *NewBB1 = BasicBlock::Create(OrigBB->getContext(),
  674   BasicBlock *NewBB1 = BasicBlock::Create(OrigBB->getContext(),
  701   SmallVector<BasicBlock*, 8> NewBB2Preds;
  704     BasicBlock *Pred = *i++;
  712   BasicBlock *NewBB2 = nullptr;
  715     NewBB2 = BasicBlock::Create(OrigBB->getContext(),
  725     for (BasicBlock *NewBB2Pred : NewBB2Preds)
  767 ReturnInst *llvm::FoldReturnIntoUncondBranch(ReturnInst *RI, BasicBlock *BB,
  768                                              BasicBlock *Pred,
  815                                              BasicBlock *ThenBlock) {
  816   BasicBlock *Head = SplitBefore->getParent();
  817   BasicBlock *Tail = Head->splitBasicBlock(SplitBefore->getIterator());
  823     ThenBlock = BasicBlock::Create(C, "", Head->getParent(), Tail);
  866   BasicBlock *Head = SplitBefore->getParent();
  867   BasicBlock *Tail = Head->splitBasicBlock(SplitBefore->getIterator());
  870   BasicBlock *ThenBlock = BasicBlock::Create(C, "", Head->getParent(), Tail);
  870   BasicBlock *ThenBlock = BasicBlock::Create(C, "", Head->getParent(), Tail);
  871   BasicBlock *ElseBlock = BasicBlock::Create(C, "", Head->getParent(), Tail);
  871   BasicBlock *ElseBlock = BasicBlock::Create(C, "", Head->getParent(), Tail);
  882 Value *llvm::GetIfCondition(BasicBlock *BB, BasicBlock *&IfTrue,
  882 Value *llvm::GetIfCondition(BasicBlock *BB, BasicBlock *&IfTrue,
  883                              BasicBlock *&IfFalse) {
  885   BasicBlock *Pred1 = nullptr;
  886   BasicBlock *Pred2 = nullptr;
  955   BasicBlock *CommonPred = Pred1->getSinglePredecessor();
lib/Transforms/Utils/BreakCriticalEdges.cpp
  106 static void createPHIsForSplitLoopExit(ArrayRef<BasicBlock *> Preds,
  107                                        BasicBlock *SplitBB,
  108                                        BasicBlock *DestBB) {
  136 BasicBlock *
  145   BasicBlock *TIBB = TI->getParent();
  146   BasicBlock *DestBB = TI->getSuccessor(SuccNum);
  161   BasicBlock *NewBB = BasicBlock::Create(TI->getContext(),
  161   BasicBlock *NewBB = BasicBlock::Create(TI->getContext(),
  179     for (BasicBlock::iterator I = DestBB->begin(); isa<PHINode>(I); ++I) {
  292         SmallVector<BasicBlock *, 4> LoopPreds;
  295           BasicBlock *P = *I;
  307           BasicBlock *NewExitBB = SplitBlockPredecessors(
  323 static BasicBlock *
  324 findIBRPredecessor(BasicBlock *BB, SmallVectorImpl<BasicBlock *> &OtherPreds) {
  324 findIBRPredecessor(BasicBlock *BB, SmallVectorImpl<BasicBlock *> &OtherPreds) {
  334   BasicBlock *IBB = nullptr;
  336     BasicBlock *PredBB = PN->getIncomingBlock(Pred);
  362   SmallSetVector<BasicBlock *, 16> Targets;
  363   for (auto &BB : F) {
  377   for (BasicBlock *Target : Targets) {
  378     SmallVector<BasicBlock *, 16> OtherPreds;
  379     BasicBlock *IBRPred = findIBRPredecessor(Target, OtherPreds);
  390     BasicBlock *BodyBlock = Target->splitBasicBlock(FirstNonPHI, ".split");
  408     BasicBlock *DirectSucc = CloneBasicBlock(Target, VMap, ".clone", &F);
  411     for (BasicBlock *Pred : OtherPreds) {
  414       BasicBlock *Src = Pred != Target ? Pred : BodyBlock;
  433     BasicBlock::iterator Indirect = Target->begin(),
  435     BasicBlock::iterator Direct = DirectSucc->begin();
  436     BasicBlock::iterator MergeInsert = BodyBlock->getFirstInsertionPt();
lib/Transforms/Utils/BypassSlowDivision.cpp
   58     BasicBlock *BB = nullptr;
   81   BasicBlock *MainBB = nullptr;
   85   QuotRemWithBB createSlowBB(BasicBlock *Successor);
   86   QuotRemWithBB createFastBB(BasicBlock *Successor);
   88                                    BasicBlock *PhiBB);
  262 QuotRemWithBB FastDivInsertionTask::createSlowBB(BasicBlock *SuccessorBB) {
  264   DivRemPair.BB = BasicBlock::Create(MainBB->getParent()->getContext(), "",
  285 QuotRemWithBB FastDivInsertionTask::createFastBB(BasicBlock *SuccessorBB) {
  287   DivRemPair.BB = BasicBlock::Create(MainBB->getParent()->getContext(), "",
  313                                                        BasicBlock *PhiBB) {
  412     BasicBlock *SuccessorBB = MainBB->splitBasicBlock(SlowDivOrRem);
  430     BasicBlock *SuccessorBB = MainBB->splitBasicBlock(SlowDivOrRem);
  446 bool llvm::bypassSlowDivision(BasicBlock *BB,
lib/Transforms/Utils/CallPromotionUtils.cpp
   47 static void fixupPHINodeForNormalDest(InvokeInst *Invoke, BasicBlock *OrigBlock,
   48                                       BasicBlock *MergeBlock) {
   78 static void fixupPHINodeForUnwindDest(InvokeInst *Invoke, BasicBlock *OrigBlock,
   79                                       BasicBlock *ThenBlock,
   80                                       BasicBlock *ElseBlock) {
  105                              BasicBlock *MergeBlock, IRBuilder<> &Builder) {
  261   BasicBlock *OrigBlock = OrigInst->getParent();
  276   BasicBlock *ThenBlock = ThenTerm->getParent();
  277   BasicBlock *ElseBlock = ElseTerm->getParent();
  278   BasicBlock *MergeBlock = OrigInst->getParent();
lib/Transforms/Utils/CloneFunction.cpp
   40 BasicBlock *llvm::CloneBasicBlock(const BasicBlock *BB, ValueToValueMapTy &VMap,
   40 BasicBlock *llvm::CloneBasicBlock(const BasicBlock *BB, ValueToValueMapTy &VMap,
   45   BasicBlock *NewBB = BasicBlock::Create(BB->getContext(), "", F);
   45   BasicBlock *NewBB = BasicBlock::Create(BB->getContext(), "", F);
  166     const BasicBlock &BB = *BI;
  169     BasicBlock *CBB = CloneBasicBlock(&BB, VMap, NameSuffix, NewFunc, CodeInfo,
  205            cast<BasicBlock>(VMap[&OldFunc->front()])->getIterator(),
  293     void CloneBlock(const BasicBlock *BB,
  294                     BasicBlock::const_iterator StartingInst,
  295                     std::vector<const BasicBlock*> &ToClone);
  301 void PruningFunctionCloner::CloneBlock(const BasicBlock *BB,
  302                                        BasicBlock::const_iterator StartingInst,
  303                                        std::vector<const BasicBlock*> &ToClone){
  310   BasicBlock *NewBB;
  311   BBEntry = NewBB = BasicBlock::Create(BB->getContext());
  333   for (BasicBlock::const_iterator II = StartingInst, IE = --BB->end();
  397         BasicBlock *Dest = BI->getSuccessor(!Cond->getZExtValue());
  412       BasicBlock *Dest = const_cast<BasicBlock*>(Case.getCaseSuccessor());
  433     for (const BasicBlock *Succ : successors(TI))
  470   const BasicBlock *StartingBB;
  479   std::vector<const BasicBlock*> CloneWorklist;
  482     const BasicBlock *BB = CloneWorklist.back();
  493   for (const BasicBlock &BI : *OldFunc) {
  495     BasicBlock *NewBB = cast_or_null<BasicBlock>(V);
  495     BasicBlock *NewBB = cast_or_null<BasicBlock>(V);
  524     const BasicBlock *OldBB = OPN->getParent();
  525     BasicBlock *NewBB = cast<BasicBlock>(VMap[OldBB]);
  525     BasicBlock *NewBB = cast<BasicBlock>(VMap[OldBB]);
  535         if (BasicBlock *MappedBlock = cast_or_null<BasicBlock>(V)) {
  535         if (BasicBlock *MappedBlock = cast_or_null<BasicBlock>(V)) {
  560       std::map<BasicBlock*, unsigned> PredCount;
  572       BasicBlock::iterator I = NewBB->begin();
  575           BasicBlock *Pred = PCI.first;
  587       BasicBlock::iterator I = NewBB->begin();
  588       BasicBlock::const_iterator OldI = OldBB->begin();
  651   Function::iterator Begin = cast<BasicBlock>(VMap[StartingBB])->getIterator();
  675       BasicBlock *DeadBB = &*I++;
  683     BasicBlock *Dest = BI->getSuccessor(0);
  711   for (Function::iterator I = cast<BasicBlock>(VMap[StartingBB])->getIterator(),
  739     const SmallVectorImpl<BasicBlock *> &Blocks, ValueToValueMapTy &VMap) {
  741   for (auto *BB : Blocks)
  752 Loop *llvm::cloneLoopWithPreheader(BasicBlock *Before, BasicBlock *LoopDomBB,
  752 Loop *llvm::cloneLoopWithPreheader(BasicBlock *Before, BasicBlock *LoopDomBB,
  756                                    SmallVectorImpl<BasicBlock *> &Blocks) {
  768   BasicBlock *OrigPH = OrigLoop->getLoopPreheader();
  770   BasicBlock *NewPH = CloneBasicBlock(OrigPH, VMap, NameSuffix, F);
  797   for (BasicBlock *BB : OrigLoop->getBlocks()) {
  802     BasicBlock *NewBB = CloneBasicBlock(BB, VMap, NameSuffix, F);
  817   for (BasicBlock *BB : OrigLoop->getBlocks()) {
  819     BasicBlock *IDomBB = DT->getNode(BB)->getIDom()->getBlock();
  820     DT->changeImmediateDominator(cast<BasicBlock>(VMap[BB]),
  821                                  cast<BasicBlock>(VMap[IDomBB]));
  835 BasicBlock *llvm::DuplicateInstructionsInSplitBetween(
  836     BasicBlock *BB, BasicBlock *PredBB, Instruction *StopAt,
  836     BasicBlock *BB, BasicBlock *PredBB, Instruction *StopAt,
  844   BasicBlock::iterator BI = BB->begin();
  848   BasicBlock *NewBB = SplitEdge(PredBB, BB);
lib/Transforms/Utils/CodeExtractor.cpp
   85 static bool isBlockValidForExtraction(const BasicBlock &BB,
   86                                       const SetVector<BasicBlock *> &Result,
  118   for (BasicBlock::const_iterator I = BB.begin(), E = BB.end(); I != E; ++I) {
  128       if (auto *UBB = II->getUnwindDest())
  137       if (auto *UBB = CSI->getUnwindDest())
  167       if (auto *UBB = CRI->getUnwindDest())
  195 static SetVector<BasicBlock *>
  196 buildExtractionBlockSet(ArrayRef<BasicBlock *> BBs, DominatorTree *DT,
  199   SetVector<BasicBlock *> Result;
  203   for (BasicBlock *BB : BBs) {
  215   for (auto *BB : Result) {
  230     for (auto *PBB : predecessors(BB))
  244 CodeExtractor::CodeExtractor(ArrayRef<BasicBlock *> BBs, DominatorTree *DT,
  267 static bool definedInRegion(const SetVector<BasicBlock *> &Blocks, Value *V) {
  277 static bool definedInCaller(const SetVector<BasicBlock *> &Blocks, Value *V) {
  285 static BasicBlock *getCommonExitBlock(const SetVector<BasicBlock *> &Blocks) {
  285 static BasicBlock *getCommonExitBlock(const SetVector<BasicBlock *> &Blocks) {
  286   BasicBlock *CommonExitBlock = nullptr;
  288     for (auto *Succ : successors(Block)) {
  309   for (BasicBlock &BB : F) {
  318 void CodeExtractorAnalysisCache::findSideEffectInfoForBlock(BasicBlock &BB) {
  362     BasicBlock &BB, AllocaInst *Addr) const {
  375   for (BasicBlock &BB : *Func) {
  384 BasicBlock *
  385 CodeExtractor::findOrCreateBlockForHoisting(BasicBlock *CommonExitBlock) {
  386   BasicBlock *SinglePredFromOutlineRegion = nullptr;
  389   for (auto *Pred : predecessors(CommonExitBlock)) {
  405     BasicBlock::iterator I = BB->begin();
  423   BasicBlock *NewExitBlock = CommonExitBlock->splitBasicBlock(
  428     BasicBlock *Pred = *PI++;
  445                                   BasicBlock *ExitBlock) const {
  488                                 BasicBlock *&ExitBlock) const {
  511     BasicBlock *BB = AI->getParent();
  574   BasicBlock *Header = *Blocks.begin();
  588     for (auto &BB : *F) {
  600   for (BasicBlock *BB : Blocks) {
  622 void CodeExtractor::severSplitPHINodesOfEntry(BasicBlock *&Header) {
  648   BasicBlock *NewBB = SplitBlock(Header, Header->getFirstNonPHI(), DT);
  652   BasicBlock *OldPred = Header;
  671     BasicBlock::iterator AfterPHIs;
  699     const SmallPtrSetImpl<BasicBlock *> &Exits) {
  700   for (BasicBlock *ExitBB : Exits) {
  701     BasicBlock *NewBB = nullptr;
  719         NewBB = BasicBlock::Create(ExitBB->getContext(),
  722         SmallVector<BasicBlock *, 4> Preds(pred_begin(ExitBB),
  724         for (BasicBlock *PredBB : Preds)
  745   for (BasicBlock *Block : Blocks)
  747       BasicBlock *New =
  768                                            BasicBlock *header,
  769                                            BasicBlock *newRootNode,
  770                                            BasicBlock *newHeader,
  981 static void eraseLifetimeMarkersOnInputs(const SetVector<BasicBlock *> &Blocks,
  984   for (BasicBlock *BB : Blocks) {
 1061                                                     BasicBlock *codeReplacer,
 1188   std::map<BasicBlock *, BasicBlock *> ExitBlockMap;
 1188   std::map<BasicBlock *, BasicBlock *> ExitBlockMap;
 1191   for (BasicBlock *Block : Blocks) {
 1195         BasicBlock *OldTarget = TI->getSuccessor(i);
 1197         BasicBlock *&NewTarget = ExitBlockMap[OldTarget];
 1201           NewTarget = BasicBlock::Create(Context,
 1241     BasicBlock::iterator InsertPt;
 1331   for (BasicBlock *Block : Blocks) {
 1341     BasicBlock *CodeReplacer,
 1342     DenseMap<BasicBlock *, BlockFrequency> &ExitWeights,
 1392   BasicBlock *header = *Blocks.begin();
 1400     for (BasicBlock *Pred : predecessors(header)) {
 1411     for (BasicBlock *Block : Blocks)
 1423   DenseMap<BasicBlock *, BlockFrequency> ExitWeights;
 1424   SmallPtrSet<BasicBlock *, 1> ExitBlocks;
 1425   for (BasicBlock *Block : Blocks) {
 1445   BasicBlock *codeReplacer = BasicBlock::Create(header->getContext(),
 1445   BasicBlock *codeReplacer = BasicBlock::Create(header->getContext(),
 1451   BasicBlock *newFuncRoot = BasicBlock::Create(header->getContext(),
 1451   BasicBlock *newFuncRoot = BasicBlock::Create(header->getContext(),
 1471   BasicBlock *CommonExit = nullptr;
 1498     auto *HoistToBlock = findOrCreateBlockForHoisting(CommonExit);
 1545   for (BasicBlock::iterator I = header->begin(); isa<PHINode>(I); ++I) {
 1552   for (BasicBlock *ExitBB : ExitBlocks)
 1573   for (BasicBlock &BB : *newFunction) {
lib/Transforms/Utils/DemoteRegToStack.cpp
   50       BasicBlock *BB = SplitCriticalEdge(II, SuccNum);
   69       DenseMap<BasicBlock*, Value*> Loads;
   93   BasicBlock::iterator InsertPt;
  141   BasicBlock::iterator InsertPt = P->getIterator();
lib/Transforms/Utils/EntryExitInstrumenter.cpp
   92     for (BasicBlock &BB : F) {
lib/Transforms/Utils/EscapeEnumerator.cpp
   35     BasicBlock *CurBB = &*StateBB++;
   57   for (BasicBlock &BB : F)
   68   BasicBlock *CleanupBB = BasicBlock::Create(C, CleanupBBName, &F);
   68   BasicBlock *CleanupBB = BasicBlock::Create(C, CleanupBBName, &F);
lib/Transforms/Utils/Evaluator.cpp
  328 bool Evaluator::EvaluateBlock(BasicBlock::iterator CurInst,
  329                               BasicBlock *&NextBB) {
  690   SmallPtrSet<BasicBlock*, 32> ExecutedBlocks;
  693   BasicBlock *CurBB = &F->front();
  695   BasicBlock::iterator CurInst = CurBB->begin();
  698     BasicBlock *NextBB = nullptr; // Initialized to avoid compiler warnings.
lib/Transforms/Utils/FlattenCFG.cpp
   40   bool FlattenParallelAndOr(BasicBlock *BB, IRBuilder<> &Builder);
   45   bool MergeIfRegion(BasicBlock *BB, IRBuilder<> &Builder);
   52   bool CompareIfRegionBlock(BasicBlock *Head1, BasicBlock *Head2,
   52   bool CompareIfRegionBlock(BasicBlock *Head1, BasicBlock *Head2,
   53                             BasicBlock *Block1, BasicBlock *Block2);
   53                             BasicBlock *Block1, BasicBlock *Block2);
   58   bool run(BasicBlock *BB);
  136 bool FlattenCFGOpt::FlattenParallelAndOr(BasicBlock *BB, IRBuilder<> &Builder) {
  141   BasicBlock *LastCondBlock = nullptr;
  142   BasicBlock *FirstCondBlock = nullptr;
  143   BasicBlock *UnCondBlock = nullptr;
  147   SmallPtrSet<BasicBlock *, 16> Preds(pred_begin(BB), pred_end(BB));
  148   for (SmallPtrSetIterator<BasicBlock *> PI = Preds.begin(), PE = Preds.end();
  150     BasicBlock *Pred = *PI;
  157     BasicBlock *PP = Pred->getSinglePredecessor();
  190       for (BasicBlock::iterator BI = Pred->begin(), BE = PBI->getIterator();
  206     BasicBlock *PS1 = PBI->getSuccessor(0);
  207     BasicBlock *PS2 = PBI->getSuccessor(1);
  208     BasicBlock *PS = (PS1 == BB) ? PS2 : PS1;
  235   BasicBlock *PS1 = TBB->getSuccessor(0);
  236   BasicBlock *PS2 = TBB->getSuccessor(1);
  250     BasicBlock *CurrBlock = LastCondBlock;
  280   BasicBlock *CB;
  324 bool FlattenCFGOpt::CompareIfRegionBlock(BasicBlock *Head1, BasicBlock *Head2,
  324 bool FlattenCFGOpt::CompareIfRegionBlock(BasicBlock *Head1, BasicBlock *Head2,
  325                                          BasicBlock *Block1,
  326                                          BasicBlock *Block2) {
  339   BasicBlock::iterator iter1 = Block1->begin();
  340   BasicBlock::iterator end1 = Block1->getTerminator()->getIterator();
  341   BasicBlock::iterator iter2 = Block2->begin();
  342   BasicBlock::iterator end2 = Block2->getTerminator()->getIterator();
  369       for (BasicBlock::iterator BI(PBI2), BE(PTI2); BI != BE; ++BI) {
  398 bool FlattenCFGOpt::MergeIfRegion(BasicBlock *BB, IRBuilder<> &Builder) {
  399   BasicBlock *IfTrue2, *IfFalse2;
  405   BasicBlock *SecondEntryBlock = CInst2->getParent();
  409   BasicBlock *IfTrue1, *IfFalse1;
  415   BasicBlock *FirstEntryBlock = CInst1->getParent();
  436   for (BasicBlock::iterator BI(PBI2), BE(PTI2); BI != BE; ++BI) {
  449   BasicBlock *SaveInsertBB = Builder.GetInsertBlock();
  450   BasicBlock::iterator SaveInsertPt = Builder.GetInsertPoint();
  457   for (BasicBlock *Succ : successors(PBI)) {
  485 bool FlattenCFGOpt::run(BasicBlock *BB) {
  499 bool llvm::FlattenCFG(BasicBlock *BB, AliasAnalysis *AA) {
lib/Transforms/Utils/FunctionComparator.cpp
  365       BasicBlock *LBB = LBA->getBasicBlock();
  366       BasicBlock *RBB = RBA->getBasicBlock();
  369       for(BasicBlock &BB : F->getBasicBlockList()) {
  762 int FunctionComparator::cmpBasicBlocks(const BasicBlock *BBL,
  763                                        const BasicBlock *BBR) const {
  764   BasicBlock::const_iterator InstL = BBL->begin(), InstLE = BBL->end();
  765   BasicBlock::const_iterator InstR = BBR->begin(), InstRE = BBR->end();
  852   SmallVector<const BasicBlock *, 8> FnLBBs, FnRBBs;
  853   SmallPtrSet<const BasicBlock *, 32> VisitedBBs; // in terms of F1.
  860     const BasicBlock *BBL = FnLBBs.pop_back_val();
  861     const BasicBlock *BBR = FnRBBs.pop_back_val();
  925   SmallVector<const BasicBlock *, 8> BBs;
  926   SmallPtrSet<const BasicBlock *, 16> VisitedBBs;
  933     const BasicBlock *BB = BBs.pop_back_val();
lib/Transforms/Utils/GuardUtils.cpp
   31   auto *CheckBB = Guard->getParent();
lib/Transforms/Utils/InlineFunction.cpp
   98     BasicBlock *OuterResumeDest;
  101     BasicBlock *InnerResumeDest = nullptr;
  117       BasicBlock *InvokeBB = II->getParent();
  118       BasicBlock::iterator I = OuterResumeDest->begin();
  130     BasicBlock *getOuterResumeDest() const {
  134     BasicBlock *getInnerResumeDest();
  148     void addIncomingPHIValuesFor(BasicBlock *BB) const {
  152     void addIncomingPHIValuesForInto(BasicBlock *src, BasicBlock *dest) const {
  152     void addIncomingPHIValuesForInto(BasicBlock *src, BasicBlock *dest) const {
  153       BasicBlock::iterator I = dest->begin();
  164 BasicBlock *LandingPadInliningInfo::getInnerResumeDest() {
  168   BasicBlock::iterator SplitPoint = ++CallerLPad->getIterator();
  178   BasicBlock::iterator I = OuterResumeDest->begin();
  204   BasicBlock *Dest = getInnerResumeDest();
  205   BasicBlock *Src = RI->getParent();
  253           BasicBlock *HandlerBlock = *HI;
  291           if (BasicBlock *RetUnwindDest = CleanupRet->getUnwindDest())
  487       for (BasicBlock *HandlerBlock : CatchSwitch->handlers()) {
  523 static BasicBlock *HandleCallsInBlockInlinedThroughInvoke(
  524     BasicBlock *BB, BasicBlock *UnwindEdge,
  524     BasicBlock *BB, BasicBlock *UnwindEdge,
  526   for (BasicBlock::iterator BBI = BB->begin(), E = BB->end(); BBI != E; ) {
  584 static void HandleInlinedLandingPad(InvokeInst *II, BasicBlock *FirstNewBlock,
  586   BasicBlock *InvokeDest = II->getUnwindDest();
  617       if (BasicBlock *NewBB = HandleCallsInBlockInlinedThroughInvoke(
  641 static void HandleInlinedEHPad(InvokeInst *II, BasicBlock *FirstNewBlock,
  643   BasicBlock *UnwindDest = II->getUnwindDest();
  652   BasicBlock *InvokeBB = II->getParent();
  664     BasicBlock::iterator I = UnwindDest->begin();
  729         for (BasicBlock *PadBB : CatchSwitch->handlers())
  754       if (BasicBlock *NewBB = HandleCallsInBlockInlinedThroughInvoke(
  822   for (const BasicBlock &I : *CalledFunc)
 1247                                     BasicBlock *InsertBlock,
 1409     for (BasicBlock::iterator BI = FI->begin(), BE = FI->end();
 1450 static void updateCallerBFI(BasicBlock *CallSiteBlock,
 1454                             const BasicBlock &CalleeEntryBlock) {
 1455   SmallPtrSet<BasicBlock *, 16> ClonedBBs;
 1457     if (!isa<BasicBlock>(Entry.first) || !Entry.second)
 1459     auto *OrigBB = cast<BasicBlock>(Entry.first);
 1460     auto *ClonedBB = cast<BasicBlock>(Entry.second);
 1460     auto *ClonedBB = cast<BasicBlock>(Entry.second);
 1472   BasicBlock *EntryClone = cast<BasicBlock>(VMap.lookup(&CalleeEntryBlock));
 1472   BasicBlock *EntryClone = cast<BasicBlock>(VMap.lookup(&CalleeEntryBlock));
 1521   for (BasicBlock &BB : *Callee)
 1577   BasicBlock *OrigBB = TheCall->getParent();
 1635             for (const BasicBlock &CalledBB : *CalledFunc) {
 1643           for (const BasicBlock &CalledBB : *CalledFunc) {
 1809       for (BasicBlock &NewBlock :
 1823     BasicBlock::iterator InsertPoint = Caller->begin()->begin();
 1824     for (BasicBlock::iterator I = FirstNewBlock->begin(),
 2037     BasicBlock *UnwindDest = II->getUnwindDest();
 2056       for (BasicBlock::iterator BBI = BB->begin(), E = BB->end(); BBI != E;) {
 2143         auto *CurBB = RI->getParent();
 2192       BasicBlock *CurBB = RI->getParent();
 2214     for (BasicBlock &NewBB :
 2264   BasicBlock *AfterCallBB;
 2360     BasicBlock *ReturnBB = Returns[0]->getParent();
 2391   BasicBlock *CalleeEntry = cast<BranchInst>(Br)->getSuccessor(0);
lib/Transforms/Utils/InstructionNamer.cpp
   38       for (BasicBlock &BB : F) {
lib/Transforms/Utils/IntegerDivision.cpp
  180   BasicBlock *IBB = Builder.GetInsertBlock();
  217   BasicBlock *SpecialCases = Builder.GetInsertBlock();
  219   BasicBlock *End = SpecialCases->splitBasicBlock(Builder.GetInsertPoint(),
  221   BasicBlock *LoopExit  = BasicBlock::Create(Builder.getContext(),
  221   BasicBlock *LoopExit  = BasicBlock::Create(Builder.getContext(),
  223   BasicBlock *DoWhile   = BasicBlock::Create(Builder.getContext(),
  223   BasicBlock *DoWhile   = BasicBlock::Create(Builder.getContext(),
  225   BasicBlock *Preheader = BasicBlock::Create(Builder.getContext(),
  225   BasicBlock *Preheader = BasicBlock::Create(Builder.getContext(),
  227   BasicBlock *BB1       = BasicBlock::Create(Builder.getContext(),
  227   BasicBlock *BB1       = BasicBlock::Create(Builder.getContext(),
lib/Transforms/Utils/LCSSA.cpp
   68 static bool isExitBlock(BasicBlock *BB,
   69                         const SmallVectorImpl<BasicBlock *> &ExitBlocks) {
   86   SmallDenseMap<Loop*, SmallVector<BasicBlock *,1>> LoopExitBlocks;
   93     BasicBlock *InstBB = I->getParent();
   99     const SmallVectorImpl<BasicBlock *> &ExitBlocks = LoopExitBlocks[L];
  106       BasicBlock *UserBB = User->getParent();
  124     BasicBlock *DomBB = InstBB;
  139     for (BasicBlock *ExitBB : ExitBlocks) {
  152       for (BasicBlock *Pred : PredCache.get(ExitBB)) {
  190       BasicBlock *UserBB = User->getParent();
  223       BasicBlock *UserBB = DVI->getParent();
  276     Loop &L, DominatorTree &DT, SmallVector<BasicBlock *, 8> &ExitBlocks,
  277     SmallSetVector<BasicBlock *, 8> &BlocksDominatingExits) {
  278   SmallVector<BasicBlock *, 8> BBWorklist;
  282   for (BasicBlock *BB : ExitBlocks)
  286     BasicBlock *BB = BBWorklist.pop_back_val();
  294     BasicBlock *IDomBB = DT.getNode(BB)->getIDom()->getBlock();
  330   SmallVector<BasicBlock *, 8> ExitBlocks;
  335   SmallSetVector<BasicBlock *, 8> BlocksDominatingExits;
  348   for (BasicBlock *BB : BlocksDominatingExits) {
lib/Transforms/Utils/LibCallsShrinkWrap.cpp
  491   BasicBlock *CallBB = NewInst->getParent();
  493   BasicBlock *SuccBB = CallBB->getSingleSuccessor();
lib/Transforms/Utils/Local.cpp
  109 bool llvm::ConstantFoldTerminator(BasicBlock *BB, bool DeleteDeadConditions,
  118     BasicBlock *Dest1 = BI->getSuccessor(0);
  119     BasicBlock *Dest2 = BI->getSuccessor(1);
  124       BasicBlock *Destination = Cond->getZExtValue() ? Dest1 : Dest2;
  125       BasicBlock *OldDest     = Cond->getZExtValue() ? Dest2 : Dest1;
  163     BasicBlock *DefaultDest = SI->getDefaultDest();
  164     BasicBlock *TheOnlyDest = DefaultDest;
  206         BasicBlock *ParentBB = SI->getParent();
  237       BasicBlock *BB = SI->getParent();
  243       for (BasicBlock *Succ : successors(SI)) {
  305       BasicBlock *TheOnlyDest = BA->getBasicBlock();
  317           BasicBlock *ParentBB = IBI->getParent();
  318           BasicBlock *DestBB = IBI->getDestination(i);
  602 bool llvm::SimplifyInstructionsInBlock(BasicBlock *BB,
  619   for (BasicBlock::iterator BI = BB->begin(), E = std::prev(BB->end());
  642 void llvm::RemovePredecessorAndSimplify(BasicBlock *BB, BasicBlock *Pred,
  642 void llvm::RemovePredecessorAndSimplify(BasicBlock *BB, BasicBlock *Pred,
  670 void llvm::MergeBasicBlockIntoOnlyPred(BasicBlock *DestBB,
  682   BasicBlock *PredBB = DestBB->getSinglePredecessor();
  759 static bool CanPropagatePredecessorsForPHIs(BasicBlock *BB, BasicBlock *Succ) {
  759 static bool CanPropagatePredecessorsForPHIs(BasicBlock *BB, BasicBlock *Succ) {
  769   SmallPtrSet<BasicBlock*, 16> BBPreds(pred_begin(BB), pred_end(BB));
  773   for (BasicBlock::iterator I = Succ->begin(); isa<PHINode>(I); ++I) {
  782         BasicBlock *IBB = PN->getIncomingBlock(PI);
  800         BasicBlock *IBB = PN->getIncomingBlock(PI);
  816 using PredBlockVector = SmallVector<BasicBlock *, 16>;
  817 using IncomingValueMap = DenseMap<BasicBlock *, Value *>;
  831 static Value *selectIncomingValueForBlock(Value *OldVal, BasicBlock *BB,
  859     BasicBlock *BB = PN->getIncomingBlock(i);
  879     BasicBlock *BB = PN->getIncomingBlock(i);
  894 static void redirectValuesFromPredecessorsToPhi(BasicBlock *BB,
  923       BasicBlock *PredBB = OldValPN->getIncomingBlock(i);
  936       BasicBlock *PredBB = BBPreds[i];
  949 bool llvm::TryToSimplifyUncondBranchFromEmptyBlock(BasicBlock *BB,
  955   BasicBlock *Succ = cast<BranchInst>(BB->getTerminator())->getSuccessor(0);
  975     BasicBlock::iterator BBI = BB->begin();
 1022     for (BasicBlock::iterator I = Succ->begin(); isa<PHINode>(I); ++I) {
 1052         BasicBlock *Pred = *PI;
 1076 bool llvm::EliminateDuplicatePHINodes(BasicBlock *BB) {
 1218   BasicBlock::InstListType::iterator PrevI(I);
 1366   BasicBlock *BB = APN->getParent();
 1394   for (auto &FI : F)
 1448 void llvm::insertDebugValuesForPHIs(BasicBlock *BB,
 1470     BasicBlock *Parent = PHI->getParent();
 1877 unsigned llvm::removeAllNonTerminatorAndEHPadInstructions(BasicBlock *BB) {
 1901   BasicBlock *BB = I->getParent();
 1911   for (BasicBlock *Successor : successors(BB)) {
 1929   BasicBlock::iterator BBI = I->getIterator(), BBE = BB->end();
 1962   BasicBlock *NormalDestBB = II->getNormalDest();
 1966   BasicBlock *BB = II->getParent();
 1967   BasicBlock *UnwindDestBB = II->getUnwindDest();
 1974 BasicBlock *llvm::changeToInvokeAndSplitBasicBlock(CallInst *CI,
 1975                                                    BasicBlock *UnwindEdge) {
 1976   BasicBlock *BB = CI->getParent();
 1980   BasicBlock *Split =
 2013                             SmallPtrSetImpl<BasicBlock *> &Reachable,
 2015   SmallVector<BasicBlock*, 128> Worklist;
 2016   BasicBlock *BB = &F.front();
 2112           BasicBlock *NormalDestBB = II->getNormalDest();
 2113           BasicBlock *UnwindDestBB = II->getUnwindDest();
 2156         BasicBlock *HandlerBB = *I;
 2168     for (BasicBlock *Successor : successors(BB))
 2175 void llvm::removeUnwindEdge(BasicBlock *BB, DomTreeUpdater *DTU) {
 2184   BasicBlock *UnwindDest;
 2193     for (BasicBlock *PadBB : CatchSwitch->handlers())
 2216   SmallPtrSet<BasicBlock *, 16> Reachable;
 2226   SmallSetVector<BasicBlock *, 8> DeadBlockSet;
 2227   for (BasicBlock &BB : F) {
 2240   for (auto *BB : DeadBlockSet) {
 2241     for (BasicBlock *Successor : successors(BB)) {
 2265     for (auto *BB : DeadBlockSet) {
 2275     for (auto *BB : DeadBlockSet)
 2481    auto *BB = From->getParent();
 2507                                         const BasicBlock *BB) {
 2509     auto *I = cast<Instruction>(U.getUser())->getParent();
 2591 void llvm::hoistAllInstructionsInto(BasicBlock *DomBlock, Instruction *InsertPt,
 2592                                     BasicBlock *BB) {
 2614   for (BasicBlock::iterator II = BB->begin(), IE = BB->end(); II != IE;) {
lib/Transforms/Utils/LoopRotationUtils.cpp
   83 static void RewriteUsesOfClonedInstructions(BasicBlock *OrigHeader,
   84                                             BasicBlock *OrigPreheader,
   88   BasicBlock::iterator I, E = OrigHeader->end();
  125         BasicBlock *UserBB = UserInst->getParent();
  151       BasicBlock *UserBB = DbgValue->getParent();
  177   BasicBlock *Header = L->getHeader();
  178   BasicBlock *HeaderExit = Header->getTerminator()->getSuccessor(0);
  209   BasicBlock *OrigHeader = L->getHeader();
  210   BasicBlock *OrigLatch = L->getLoopLatch();
  259   BasicBlock *OrigPreheader = L->getLoopPreheader();
  281   BasicBlock *Exit = BI->getSuccessor(0);
  282   BasicBlock *NewHeader = BI->getSuccessor(1);
  297   BasicBlock::iterator I = OrigHeader->begin(), E = OrigHeader->end();
  386   for (BasicBlock *SuccBB : successors(OrigHeader))
  387     for (BasicBlock::iterator BI = SuccBB->begin();
  455     BasicBlock *NewPH = SplitCriticalEdge(
  464     SmallVector<BasicBlock *, 4> ExitPreds(pred_begin(Exit), pred_end(Exit));
  466     for (BasicBlock *ExitPred : ExitPreds) {
  473       BasicBlock *ExitSplit = SplitCriticalEdge(
  522 static bool shouldSpeculateInstrs(BasicBlock::iterator Begin,
  523                                   BasicBlock::iterator End, Loop *L) {
  530   for (BasicBlock::iterator I = Begin; I != End; ++I) {
  596   BasicBlock *Latch = L->getLoopLatch();
  604   BasicBlock *LastExit = Latch->getSinglePredecessor();
lib/Transforms/Utils/LoopSimplify.cpp
   85 static void placeSplitBlockCarefully(BasicBlock *NewBB,
   86                                      SmallVectorImpl<BasicBlock *> &SplitPreds,
  101   BasicBlock *FoundBB = nullptr;
  122 BasicBlock *llvm::InsertPreheaderForLoop(Loop *L, DominatorTree *DT,
  125   BasicBlock *Header = L->getHeader();
  128   SmallVector<BasicBlock*, 8> OutsideBlocks;
  131     BasicBlock *P = *PI;
  145   BasicBlock *PreheaderBB;
  164 static void addBlockAndPredsToSet(BasicBlock *InputBB, BasicBlock *StopBlock,
  164 static void addBlockAndPredsToSet(BasicBlock *InputBB, BasicBlock *StopBlock,
  165                                   std::set<BasicBlock*> &Blocks) {
  166   SmallVector<BasicBlock *, 8> Worklist;
  169     BasicBlock *BB = Worklist.pop_back_val();
  174         BasicBlock *WBB = *I;
  185   for (BasicBlock::iterator I = L->getHeader()->begin(); isa<PHINode>(I); ) {
  224 static Loop *separateNestedLoop(Loop *L, BasicBlock *Preheader,
  233   BasicBlock *Header = L->getHeader();
  242   SmallVector<BasicBlock*, 8> OuterLoopPreds;
  260   BasicBlock *NewBB = SplitBlockPredecessors(Header, OuterLoopPreds, ".outer",
  289   std::set<BasicBlock*> BlocksInL;
  291     BasicBlock *P = *PI;
  305   SmallVector<BasicBlock *, 8> OuterLoopBlocks;
  310     BasicBlock *BB = L->getBlocks()[i];
  348 static BasicBlock *insertUniqueBackedgeBlock(Loop *L, BasicBlock *Preheader,
  348 static BasicBlock *insertUniqueBackedgeBlock(Loop *L, BasicBlock *Preheader,
  354   BasicBlock *Header = L->getHeader();
  365   std::vector<BasicBlock*> BackedgeBlocks;
  367     BasicBlock *P = *I;
  377   BasicBlock *BEBlock = BasicBlock::Create(Header->getContext(),
  377   BasicBlock *BEBlock = BasicBlock::Create(Header->getContext(),
  391   for (BasicBlock::iterator I = Header->begin(); isa<PHINode>(I); ++I) {
  402       BasicBlock *IBB = PN->getIncomingBlock(i);
  489     SmallPtrSet<BasicBlock*, 4> BadPreds;
  492       BasicBlock *P = *PI;
  498     for (BasicBlock *P : BadPreds) {
  517   SmallVector<BasicBlock*, 8> ExitingBlocks;
  519   for (BasicBlock *ExitingBlock : ExitingBlocks)
  536   BasicBlock *Preheader = L->getLoopPreheader();
  555   BasicBlock *LoopLatch = L->getLoopLatch();
  593   for (BasicBlock::iterator I = L->getHeader()->begin();
  613     BasicBlock *UniqueExit = nullptr;
  614     for (auto *ExitingBB : ExitingBlocks)
  615       for (auto *SuccBB : successors(ExitingBB)) {
  629       BasicBlock *ExitingBlock = ExitingBlocks[i];
  676       const std::vector<DomTreeNodeBase<BasicBlock> *> &Children =
  684         SmallSetVector<BasicBlock *, 8> ExitBlockSet;
lib/Transforms/Utils/LoopUnroll.cpp
   93         PN->setIncomingBlock(i, cast<BasicBlock>(It->second));
  107 static bool needToInsertPhisForLCSSA(Loop *L, std::vector<BasicBlock *> Blocks,
  109   for (BasicBlock *BB : Blocks) {
  131 const Loop* llvm::addClonedBlockToLoopInfo(BasicBlock *OriginalBB,
  132                                            BasicBlock *ClonedBB, LoopInfo *LI,
  186   BasicBlock *PreHeader = L->getLoopPreheader();
  187   BasicBlock *Header = L->getHeader();
  219   for (BasicBlock *BB : L->getBlocks()) {
  220     for (BasicBlock::iterator I = BB->begin(), E = BB->end(); I != E;) {
  282   BasicBlock *Preheader = L->getLoopPreheader();
  288   BasicBlock *LatchBlock = L->getLoopLatch();
  304   BasicBlock *Header = L->getHeader();
  372   SmallVector<BasicBlock *, 4> ExitBlocks;
  374   std::vector<BasicBlock*> OriginalLoopBlocks = L->getBlocks();
  407       BasicBlock *ExitingBlock = L->getLoopLatch();
  532   BasicBlock *LoopExit = nullptr;
  546   for (BasicBlock::iterator I = Header->begin(); isa<PHINode>(I); ++I) {
  550   std::vector<BasicBlock *> Headers;
  551   std::vector<BasicBlock *> HeaderSucc;
  552   std::vector<BasicBlock *> Latches;
  577   std::vector<BasicBlock*> UnrolledLoopBlocks = L->getBlocks();
  588     for (BasicBlock *BB : L->getBlocks())
  602     std::vector<BasicBlock*> NewBlocks;
  608       BasicBlock *New = CloneBasicBlock(*BB, VMap, "." + Twine(It));
  638       for (BasicBlock *Succ : successors(*BB)) {
  657       for (auto *Pred : predecessors(*BB))
  676           BasicBlock *OriginalBBIDom = BBIDom->getBlock();
  678               New, cast<BasicBlock>(LastValueMap[cast<Value>(OriginalBBIDom)]));
  684     for (BasicBlock *NewBlock : NewBlocks) {
  724         BasicBlock *BB = Src;
  725         for (BasicBlock *Succ : successors(BB)) {
  748       BasicBlock *Dest = Headers[j];
  783       BasicBlock *Dest = HeaderSucc[i];
  811       BasicBlock *Dest = Headers[j];
  829     for (auto *BB : OriginalLoopBlocks) {
  831       SmallVector<BasicBlock *, 16> ChildrenToUpdate;
  833         auto *ChildBB = ChildDomNode->getBlock();
  837       BasicBlock *NewIDom;
  838       BasicBlock *&TermBlock = LatchIsExiting ? LatchBlock : Header;
  851         for (BasicBlock *Iter : TermBlocks) {
  865       for (auto *ChildBB : ChildrenToUpdate)
  875   for (BasicBlock *Latch : Latches) {
  882       BasicBlock *Dest = Term->getSuccessor(0);
  883       BasicBlock *Fold = Dest->getUniquePredecessor();
lib/Transforms/Utils/LoopUnrollAndJam.cpp
   47 typedef SmallPtrSet<BasicBlock *, 4> BasicBlockSet;
   56   BasicBlock *SubLoopLatch = SubLoop->getLoopLatch();
   59   for (BasicBlock *BB : L->blocks()) {
   70   BasicBlock *SubLoopPreHeader = SubLoop->getLoopPreheader();
   71   for (BasicBlock *BB : ForeBlocks) {
   92 static bool processHeaderPhiOperands(BasicBlock *Header, BasicBlock *Latch,
   92 static bool processHeaderPhiOperands(BasicBlock *Header, BasicBlock *Latch,
  117 static void moveHeaderPhiOperandsToForeBlocks(BasicBlock *Header,
  118                                               BasicBlock *Latch,
  132   BasicBlock *InsertLocBB = InsertLoc->getParent();
  179   BasicBlock *Header = L->getHeader();
  248   BasicBlock *Preheader = L->getLoopPreheader();
  249   BasicBlock *LatchBlock = L->getLoopLatch();
  254   BasicBlock *LoopExit = BI->getSuccessor(ContinueOnTrue);
  269   std::vector<BasicBlock *> ForeBlocksFirst;
  270   std::vector<BasicBlock *> ForeBlocksLast;
  271   std::vector<BasicBlock *> SubLoopBlocksFirst;
  272   std::vector<BasicBlock *> SubLoopBlocksLast;
  273   std::vector<BasicBlock *> AftBlocksFirst;
  274   std::vector<BasicBlock *> AftBlocksLast;
  299     for (BasicBlock *BB : L->getBlocks())
  314     std::vector<BasicBlock *> NewBlocks;
  320       BasicBlock *New = CloneBasicBlock(*BB, VMap, "." + Twine(It));
  372         BasicBlock *OriginalBBIDom = BBIDom->getBlock();
  376             New, cast<BasicBlock>(LastValueMap[cast<Value>(OriginalBBIDom)]));
  381     for (BasicBlock *NewBlock : NewBlocks) {
  449   BasicBlock *Dest = SubLoopBlocksFirst[0];
  467     BasicBlock *Dest = ForeBlocksFirst[It];
  538   SmallPtrSet<BasicBlock *, 16> MergeBlocks;
  543     BasicBlock *BB = *MergeBlocks.begin();
  546       BasicBlock *Dest = Term->getSuccessor(0);
  547       BasicBlock *Fold = Dest->getUniquePredecessor();
  593   for (BasicBlock *BB : Blocks) {
  732   BasicBlock *Header = L->getHeader();
  733   BasicBlock *Latch = L->getLoopLatch();
  734   BasicBlock *Exit = L->getExitingBlock();
  735   BasicBlock *SubLoopHeader = SubLoop->getHeader();
  736   BasicBlock *SubLoopLatch = SubLoop->getLoopLatch();
  737   BasicBlock *SubLoopExit = SubLoop->getExitingBlock();
lib/Transforms/Utils/LoopUnrollPeel.cpp
   83     SmallVector<BasicBlock *, 4> Exits;
   89       const BasicBlock *Latch = L->getLoopLatch();
  126     PHINode *Phi, Loop *L, BasicBlock *BackEdge,
  177   for (auto *BB : L.blocks()) {
  309     BasicBlock *BackEdge = L->getLoopLatch();
  400 static void updateBranchWeights(BasicBlock *Header, BranchInst *LatchBR,
  424 static void initBranchWeights(BasicBlock *Header, BranchInst *LatchBR,
  441 static void fixupBranchWeights(BasicBlock *Header, BranchInst *LatchBR,
  469     Loop *L, unsigned IterNumber, BasicBlock *InsertTop, BasicBlock *InsertBot,
  469     Loop *L, unsigned IterNumber, BasicBlock *InsertTop, BasicBlock *InsertBot,
  470     SmallVectorImpl<std::pair<BasicBlock *, BasicBlock *> > &ExitEdges,
  470     SmallVectorImpl<std::pair<BasicBlock *, BasicBlock *> > &ExitEdges,
  471     SmallVectorImpl<BasicBlock *> &NewBlocks, LoopBlocksDFS &LoopBlocks,
  474   BasicBlock *Header = L->getHeader();
  475   BasicBlock *Latch = L->getLoopLatch();
  476   BasicBlock *PreHeader = L->getLoopPreheader();
  486     BasicBlock *NewBB = CloneBasicBlock(*BB, VMap, ".peel", F);
  501         DT->addNewBlock(NewBB, cast<BasicBlock>(VMap[IDom->getBlock()]));
  510   InsertTop->getTerminator()->setSuccessor(0, cast<BasicBlock>(VMap[Header]));
  517   BasicBlock *NewLatch = cast<BasicBlock>(VMap[Latch]);
  517   BasicBlock *NewLatch = cast<BasicBlock>(VMap[Latch]);
  535   for (BasicBlock::iterator I = Header->begin(); isa<PHINode>(I); ++I) {
  547     cast<BasicBlock>(VMap[Header])->getInstList().erase(NewPHI);
  560       PHI.addIncoming(LatchVal, cast<BasicBlock>(VMap[Edge.first]));
  587   BasicBlock *Header = L->getHeader();
  588   BasicBlock *PreHeader = L->getLoopPreheader();
  589   BasicBlock *Latch = L->getLoopLatch();
  590   SmallVector<std::pair<BasicBlock *, BasicBlock *>, 4> ExitEdges;
  590   SmallVector<std::pair<BasicBlock *, BasicBlock *>, 4> ExitEdges;
  593   DenseMap<BasicBlock *, BasicBlock *> ExitIDom;
  593   DenseMap<BasicBlock *, BasicBlock *> ExitIDom;
  617       BasicBlock *BB = DT->findNearestCommonDominator(
  671   BasicBlock *InsertTop = SplitEdge(PreHeader, Header, DT, LI);
  672   BasicBlock *InsertBot =
  674   BasicBlock *NewPreHeader =
  686       cast<BranchInst>(cast<BasicBlock>(Latch)->getTerminator());
  692     SmallVector<BasicBlock *, 8> NewBlocks;
  709                                        cast<BasicBlock>(LVMap[Exit.second]));
  732   for (BasicBlock::iterator I = Header->begin(); isa<PHINode>(I); ++I) {
lib/Transforms/Utils/LoopUnrollRuntime.cpp
   67                           BasicBlock *PrologExit,
   68                           BasicBlock *OriginalLoopLatchExit,
   69                           BasicBlock *PreHeader, BasicBlock *NewPreHeader,
   69                           BasicBlock *PreHeader, BasicBlock *NewPreHeader,
   83   BasicBlock *Latch = L->getLoopLatch();
   85   BasicBlock *PrologLatch = cast<BasicBlock>(VMap[Latch]);
   85   BasicBlock *PrologLatch = cast<BasicBlock>(VMap[Latch]);
   92   for (BasicBlock *Succ : successors(Latch)) {
  135   SmallVector<BasicBlock *, 4> PrologExitPreds;
  138     for (BasicBlock *PredBB : predecessors(PrologExit))
  160   SmallVector<BasicBlock *, 4> Preds(predecessors(OriginalLoopLatchExit));
  182 static void ConnectEpilog(Loop *L, Value *ModVal, BasicBlock *NewExit,
  183                           BasicBlock *Exit, BasicBlock *PreHeader,
  183                           BasicBlock *Exit, BasicBlock *PreHeader,
  184                           BasicBlock *EpilogPreHeader, BasicBlock *NewPreHeader,
  184                           BasicBlock *EpilogPreHeader, BasicBlock *NewPreHeader,
  187   BasicBlock *Latch = L->getLoopLatch();
  189   BasicBlock *EpilogLatch = cast<BasicBlock>(VMap[Latch]);
  189   BasicBlock *EpilogLatch = cast<BasicBlock>(VMap[Latch]);
  249   for (BasicBlock *Succ : successors(Latch)) {
  275   SmallVector<BasicBlock*, 4> Preds(predecessors(Exit));
  285   SmallVector<BasicBlock*, 4> NewExitPreds{Latch};
  301                 BasicBlock *InsertTop,
  302                 BasicBlock *InsertBot, BasicBlock *Preheader,
  302                 BasicBlock *InsertBot, BasicBlock *Preheader,
  303                 std::vector<BasicBlock *> &NewBlocks, LoopBlocksDFS &LoopBlocks,
  306   BasicBlock *Header = L->getHeader();
  307   BasicBlock *Latch = L->getLoopLatch();
  320     BasicBlock *NewBB = CloneBasicBlock(*BB, VMap, "." + suffix, F);
  342         BasicBlock *IDomBB = DT->getNode(*BB)->getIDom()->getBlock();
  343         DT->addNewBlock(NewBB, cast<BasicBlock>(VMap[IDomBB]));
  351       BasicBlock *FirstLoopBB = cast<BasicBlock>(VMap[Header]);
  351       BasicBlock *FirstLoopBB = cast<BasicBlock>(VMap[Header]);
  375   for (BasicBlock::iterator I = Header->begin(); isa<PHINode>(I); ++I) {
  384         cast<BasicBlock>(VMap[Header])->getInstList().erase(NewPHI);
  389       BasicBlock *NewLatch = cast<BasicBlock>(VMap[Latch]);
  389       BasicBlock *NewLatch = cast<BasicBlock>(VMap[Latch]);
  427 static bool canSafelyUnrollMultiExitLoop(Loop *L, BasicBlock *LatchExit,
  462     Loop *L, SmallVectorImpl<BasicBlock *> &OtherExits, BasicBlock *LatchExit,
  462     Loop *L, SmallVectorImpl<BasicBlock *> &OtherExits, BasicBlock *LatchExit,
  490   SmallVector<BasicBlock*, 4> ExitingBlocks;
  564   BasicBlock *Latch = L->getLoopLatch();
  565   BasicBlock *Header = L->getHeader();
  578   BasicBlock *LatchExit = LatchBR->getSuccessor(ExitIndex);
  590   SmallVector<BasicBlock *, 4> OtherExits;
  634   BasicBlock *PreHeader = L->getLoopPreheader();
  661   BasicBlock *NewPreHeader;
  662   BasicBlock *NewExit = nullptr;
  663   BasicBlock *PrologExit = nullptr;
  664   BasicBlock *EpilogPreHeader = nullptr;
  665   BasicBlock *PrologPreHeader = nullptr;
  673     SmallVector<BasicBlock*, 4> Preds(predecessors(LatchExit));
  752   BasicBlock *RemainderLoop = UseEpilogRemainder ? NewExit : PrologPreHeader;
  753   BasicBlock *UnrollingLoop = UseEpilogRemainder ? NewPreHeader : PrologExit;
  774   std::vector<BasicBlock *> NewBlocks;
  784   BasicBlock *InsertBot = UseEpilogRemainder ? LatchExit : PrologExit;
  785   BasicBlock *InsertTop = UseEpilogRemainder ? EpilogPreHeader : PrologPreHeader;
  801   for (auto *BB : OtherExits) {
  824                            cast<BasicBlock>(VMap[Phi->getIncomingBlock(i)]));
  844     SmallVector<BasicBlock *, 16> ChildrenToUpdate;
  849     for (auto *BB : L->blocks()) {
  852         auto *DomChildBB = DomChild->getBlock();
  857     for (auto *BB : ChildrenToUpdate)
  878   for (BasicBlock *BB : NewBlocks) {
lib/Transforms/Utils/LoopUtils.cpp
   57   SmallVector<BasicBlock *, 4> InLoopPredecessors;
   67     for (auto *PredBB : predecessors(BB))
   87     auto *NewExitBB = SplitBlockPredecessors(
  102   SmallPtrSet<BasicBlock *, 4> Visited;
  103   for (auto *BB : L->blocks())
  104     for (auto *SuccBB : successors(BB)) {
  123   for (auto *Block : L->getBlocks())
  492     BasicBlock *BB = DTN->getBlock();
  510   auto *Preheader = L->getLoopPreheader();
  525   auto *ExitBlock = L->getUniqueExitBlock();
  611   for (auto *Block : L->blocks())
  654   for (auto *Block : L->blocks())
  669     SmallPtrSet<BasicBlock *, 8> blocks;
  671     for (BasicBlock *BB : blocks)
  684   BasicBlock *Latch = L->getLoopLatch();
  695   SmallVector<BasicBlock *, 4> ExitBlocks;
  727   BasicBlock *InnerLoopLatch = InnerLoop->getLoopLatch();
lib/Transforms/Utils/LoopVersioning.cpp
   62   BasicBlock *RuntimeCheckBB = VersionedLoop->getLoopPreheader();
   94   BasicBlock *PH =
  102   SmallVector<BasicBlock *, 8> NonVersionedLoopBlocks;
  125   BasicBlock *PHIBlock = VersionedLoop->getExitBlock();
lib/Transforms/Utils/LowerInvoke.cpp
   48   for (BasicBlock &BB : F)
lib/Transforms/Utils/LowerMemIntrinsics.cpp
   34   BasicBlock *PreLoopBB = InsertBefore->getParent();
   35   BasicBlock *PostLoopBB = nullptr;
   52     BasicBlock *LoopBB =
   53         BasicBlock::Create(Ctx, "load-store-loop", ParentFunc, PostLoopBB);
  141   BasicBlock *PreLoopBB = InsertBefore->getParent();
  142   BasicBlock *PostLoopBB =
  176   BasicBlock *LoopBB =
  177       BasicBlock::Create(Ctx, "loop-memcpy-expansion", ParentFunc, PostLoopBB);
  198     BasicBlock *ResLoopBB = BasicBlock::Create(Ctx, "loop-memcpy-residual",
  198     BasicBlock *ResLoopBB = BasicBlock::Create(Ctx, "loop-memcpy-residual",
  202     BasicBlock *ResHeaderBB = BasicBlock::Create(
  202     BasicBlock *ResHeaderBB = BasicBlock::Create(
  292   BasicBlock *OrigBB = InsertBefore->getParent();
  314   BasicBlock *CopyBackwardsBB = ThenTerm->getParent();
  316   BasicBlock *CopyForwardBB = ElseTerm->getParent();
  318   BasicBlock *ExitBB = InsertBefore->getParent();
  328   BasicBlock *LoopBB =
  329     BasicBlock::Create(F->getContext(), "copy_backwards_loop", F, CopyForwardBB);
  348   BasicBlock *FwdLoopBB =
  349     BasicBlock::Create(F->getContext(), "copy_forward_loop", F, ExitBB);
  372   BasicBlock *OrigBB = InsertBefore->getParent();
  374   BasicBlock *NewBB =
  376   BasicBlock *LoopBB
  377     = BasicBlock::Create(F->getContext(), "loadstoreloop", F, NewBB);
lib/Transforms/Utils/LowerSwitch.cpp
   91       BasicBlock* BB;
   93       CaseRange(ConstantInt *low, ConstantInt *high, BasicBlock *bb)
  102                            SmallPtrSetImpl<BasicBlock *> &DeleteList,
  105     BasicBlock *switchConvert(CaseItr Begin, CaseItr End,
  107                               Value *Val, BasicBlock *Predecessor,
  108                               BasicBlock *OrigBlock, BasicBlock *Default,
  108                               BasicBlock *OrigBlock, BasicBlock *Default,
  110     BasicBlock *newLeafBlock(CaseRange &Leaf, Value *Val,
  112                              BasicBlock *OrigBlock, BasicBlock *Default);
  112                              BasicBlock *OrigBlock, BasicBlock *Default);
  159   SmallPtrSet<BasicBlock*, 8> DeleteList;
  162     BasicBlock *Cur = &*I++; // Advance over block so we don't traverse new blocks
  175   for (BasicBlock* BB: DeleteList) {
  210 fixPhis(BasicBlock *SuccBB, BasicBlock *OrigBB, BasicBlock *NewBB,
  210 fixPhis(BasicBlock *SuccBB, BasicBlock *OrigBB, BasicBlock *NewBB,
  210 fixPhis(BasicBlock *SuccBB, BasicBlock *OrigBB, BasicBlock *NewBB,
  212   for (BasicBlock::iterator I = SuccBB->begin(),
  247 BasicBlock *
  250                            BasicBlock *Predecessor, BasicBlock *OrigBlock,
  250                            BasicBlock *Predecessor, BasicBlock *OrigBlock,
  251                            BasicBlock *Default,
  309   BasicBlock* NewNode = BasicBlock::Create(Val->getContext(), "NodeBlock");
  309   BasicBlock* NewNode = BasicBlock::Create(Val->getContext(), "NodeBlock");
  314   BasicBlock *LBranch = switchConvert(LHS.begin(), LHS.end(), LowerBound,
  317   BasicBlock *RBranch = switchConvert(RHS.begin(), RHS.end(), NewLowerBound,
  332 BasicBlock *LowerSwitch::newLeafBlock(CaseRange &Leaf, Value *Val,
  335                                       BasicBlock *OrigBlock,
  336                                       BasicBlock *Default) {
  338   BasicBlock* NewLeaf = BasicBlock::Create(Val->getContext(), "LeafBlock");
  338   BasicBlock* NewLeaf = BasicBlock::Create(Val->getContext(), "LeafBlock");
  374   BasicBlock* Succ = Leaf.BB;
  379   for (BasicBlock::iterator I = Succ->begin(); isa<PHINode>(I); ++I) {
  419       BasicBlock* nextBB = J->BB;
  420       BasicBlock* currentBB = I->BB;
  441                                     SmallPtrSetImpl<BasicBlock *> &DeleteList,
  443   BasicBlock *OrigBlock = SI->getParent();
  446   BasicBlock* Default = SI->getDefaultDest();
  517     DenseMap<BasicBlock *, unsigned> Popularity;
  519     BasicBlock *PopSucc = nullptr;
  596   BasicBlock *NewDefault = BasicBlock::Create(SI->getContext(), "NewDefault");
  596   BasicBlock *NewDefault = BasicBlock::Create(SI->getContext(), "NewDefault");
  600   BasicBlock *SwitchBlock =
  612   BasicBlock *OldDefault = SI->getDefaultDest();
lib/Transforms/Utils/Mem2Reg.cpp
   37   BasicBlock &BB = F.getEntryBlock(); // Get the entry node for the function
   45     for (BasicBlock::iterator I = BB.begin(), E = --BB.end(); I != E; ++I)
lib/Transforms/Utils/MetaRenamer.cpp
  149       for (auto &BB : F) {
lib/Transforms/Utils/ModuleUtils.cpp
  131   BasicBlock *CtorBB = BasicBlock::Create(M.getContext(), "", Ctor);
  131   BasicBlock *CtorBB = BasicBlock::Create(M.getContext(), "", Ctor);
lib/Transforms/Utils/PredicateInfo.cpp
   58 const BasicBlock *getBranchBlock(const PredicateBase *PB) {
   75 const std::pair<BasicBlock *, BasicBlock *>
   75 const std::pair<BasicBlock *, BasicBlock *>
  161   const std::pair<BasicBlock *, BasicBlock *>
  161   const std::pair<BasicBlock *, BasicBlock *>
  173     BasicBlock *ASrc, *ADest, *BSrc, *BDest;
  271     BasicBlock *EdgePred = PHI->getIncomingBlock(*VDUse.U);
  297       BasicBlock *IBlock;
  351 void PredicateInfo::processAssume(IntrinsicInst *II, BasicBlock *AssumeBB,
  391 void PredicateInfo::processBranch(BranchInst *BI, BasicBlock *BranchBB,
  393   BasicBlock *FirstBB = BI->getSuccessor(0);
  394   BasicBlock *SecondBB = BI->getSuccessor(1);
  395   SmallVector<BasicBlock *, 2> SuccsToProcess;
  401     for (auto *Succ : SuccsToProcess) {
  461 void PredicateInfo::processSwitch(SwitchInst *SI, BasicBlock *BranchBB,
  468   SmallDenseMap<BasicBlock *, unsigned, 16> SwitchEdges;
  470     BasicBlock *TargetBlock = SI->getSuccessor(i);
  476     BasicBlock *TargetBlock = C.getCaseSuccessor();
  494     BasicBlock *BranchBB = DTN->getBlock();
  831   virtual void emitBasicBlockStartAnnot(const BasicBlock *BB,
lib/Transforms/Utils/PromoteMemoryToRegister.cpp
  109   SmallVector<BasicBlock *, 32> DefiningBlocks;
  110   SmallVector<BasicBlock *, 32> UsingBlocks;
  113   BasicBlock *OnlyBlock;
  166   RenamePassData(BasicBlock *B, BasicBlock *P, ValVector V, LocationVector L)
  166   RenamePassData(BasicBlock *B, BasicBlock *P, ValVector V, LocationVector L)
  169   BasicBlock *BB;
  170   BasicBlock *Pred;
  209     const BasicBlock *BB = I->getParent();
  258   SmallPtrSet<BasicBlock *, 16> Visited;
  262   DenseMap<BasicBlock *, unsigned> BBNumbers;
  265   DenseMap<const BasicBlock *, unsigned> BBNumPreds;
  284   unsigned getNumPreds(const BasicBlock *BB) {
  292                            const SmallPtrSetImpl<BasicBlock *> &DefBlocks,
  293                            SmallPtrSetImpl<BasicBlock *> &LiveInBlocks);
  294   void RenamePass(BasicBlock *BB, BasicBlock *Pred,
  294   void RenamePass(BasicBlock *BB, BasicBlock *Pred,
  298   bool QueuePhiNode(BasicBlock *BB, unsigned AllocaIdx, unsigned &Version);
  352   BasicBlock *StoreBB = OnlyStore->getParent();
  587       for (auto &BB : F)
  604     SmallPtrSet<BasicBlock *, 32> DefBlocks(Info.DefiningBlocks.begin(),
  609     SmallPtrSet<BasicBlock *, 32> LiveInBlocks;
  618     SmallVector<BasicBlock *, 32> PHIBlocks;
  625     for (BasicBlock *BB : PHIBlocks)
  717     BasicBlock *BB = SomePHI->getParent();
  728     SmallVector<BasicBlock *, 16> Preds(pred_begin(BB), pred_end(BB));
  742       SmallVectorImpl<BasicBlock *>::iterator EntIt = llvm::lower_bound(
  756     BasicBlock::iterator BBI = BB->begin();
  760       for (BasicBlock *Pred : Preds)
  775     const SmallPtrSetImpl<BasicBlock *> &DefBlocks,
  776     SmallPtrSetImpl<BasicBlock *> &LiveInBlocks) {
  780   SmallVector<BasicBlock *, 64> LiveInBlockWorklist(Info.UsingBlocks.begin(),
  787     BasicBlock *BB = LiveInBlockWorklist[i];
  793     for (BasicBlock::iterator I = BB->begin();; ++I) {
  818     BasicBlock *BB = LiveInBlockWorklist.pop_back_val();
  828     for (BasicBlock *P : predecessors(BB)) {
  842 bool PromoteMem2Reg::QueuePhiNode(BasicBlock *BB, unsigned AllocaNo,
  876 void PromoteMem2Reg::RenamePass(BasicBlock *BB, BasicBlock *Pred,
  876 void PromoteMem2Reg::RenamePass(BasicBlock *BB, BasicBlock *Pred,
  899       BasicBlock::iterator PNI = BB->begin();
  932   for (BasicBlock::iterator II = BB->begin(); !II->isTerminator();) {
  985   SmallPtrSet<BasicBlock *, 8> VisitedSuccs;
lib/Transforms/Utils/SSAUpdater.cpp
   40 using AvailableValsTy = DenseMap<BasicBlock *, Value *>;
   62 bool SSAUpdater::HasValueForBlock(BasicBlock *BB) const {
   66 Value *SSAUpdater::FindValueForBlock(BasicBlock *BB) const {
   71 void SSAUpdater::AddAvailableValue(BasicBlock *BB, Value *V) {
   79                         SmallDenseMap<BasicBlock *, Value *, 8> &ValueMapping) {
   94 Value *SSAUpdater::GetValueAtEndOfBlock(BasicBlock *BB) {
   99 Value *SSAUpdater::GetValueInMiddleOfBlock(BasicBlock *BB) {
  107   SmallVector<std::pair<BasicBlock *, Value *>, 8> PredValues;
  115       BasicBlock *PredBB = SomePhi->getIncomingBlock(i);
  128       BasicBlock *PredBB = *PI;
  152     SmallDenseMap<BasicBlock *, Value *, 8> ValueMapping(PredValues.begin(),
  223   using BlkT = BasicBlock;
  247     BasicBlock *getIncomingBlock() { return PHI->getIncomingBlock(idx); }
  257   static void FindPredecessorBlocks(BasicBlock *BB,
  258                                     SmallVectorImpl<BasicBlock *> *Preds) {
  272   static Value *GetUndefVal(BasicBlock *BB, SSAUpdater *Updater) {
  278   static Value *CreateEmptyPHI(BasicBlock *BB, unsigned NumPreds,
  287   static void AddPHIOperand(PHINode *PHI, Value *Val, BasicBlock *Pred) {
  323 Value *SSAUpdater::GetValueAtEndOfBlockInternal(BasicBlock *BB) {
  356   DenseMap<BasicBlock *, TinyPtrVector<Instruction *>> UsesByBlock;
  368     BasicBlock *BB = User->getParent();
lib/Transforms/Utils/SSAUpdaterBulk.cpp
   29 static BasicBlock *getUserBB(Use *U) {
   51 void SSAUpdaterBulk::AddAvailableValue(unsigned Var, BasicBlock *BB, Value *V) {
   70 bool SSAUpdaterBulk::HasValueForBlock(unsigned Var, BasicBlock *BB) {
   76 Value *SSAUpdaterBulk::computeValueAt(BasicBlock *BB, RewriteInfo &R,
   80       BasicBlock *IDom = DT->getNode(BB)->getIDom()->getBlock();
   92 ComputeLiveInBlocks(const SmallPtrSetImpl<BasicBlock *> &UsingBlocks,
   93                     const SmallPtrSetImpl<BasicBlock *> &DefBlocks,
   94                     SmallPtrSetImpl<BasicBlock *> &LiveInBlocks,
   99   SmallVector<BasicBlock *, 64> LiveInBlockWorklist(UsingBlocks.begin(),
  105     BasicBlock *BB = LiveInBlockWorklist.pop_back_val();
  115     for (BasicBlock *P : PredCache.get(BB)) {
  140     SmallPtrSet<BasicBlock *, 2> DefBlocks;
  145     SmallPtrSet<BasicBlock *, 2> UsingBlocks;
  149     SmallVector<BasicBlock *, 32> IDFBlocks;
  150     SmallPtrSet<BasicBlock *, 32> LiveInBlocks;
  158     for (auto *FrontierBB : IDFBlocks) {
  169       BasicBlock *PBB = PN->getParent();
  170       for (BasicBlock *Pred : PredCache.get(PBB))
lib/Transforms/Utils/SanitizerStats.cpp
   96   auto BB = BasicBlock::Create(M->getContext(), "", F);
lib/Transforms/Utils/SimplifyCFG.cpp
  165   BasicBlock *Dest;
  167   ValueEqualityComparisonCase(ConstantInt *Value, BasicBlock *Dest)
  175   bool operator==(BasicBlock *RHSDest) const { return Dest == RHSDest; }
  181   SmallPtrSetImpl<BasicBlock *> *LoopHeaders;
  186   BasicBlock *GetValueEqualityComparisonCases(
  189                                                      BasicBlock *Pred,
  210                  SmallPtrSetImpl<BasicBlock *> *LoopHeaders,
  214   bool run(BasicBlock *BB);
  215   bool simplifyOnce(BasicBlock *BB);
  230                        SmallSetVector<BasicBlock *, 4> *FailBlocks = nullptr) {
  237   BasicBlock *SI1BB = SI1->getParent();
  238   BasicBlock *SI2BB = SI2->getParent();
  240   SmallPtrSet<BasicBlock *, 16> SI1Succs(succ_begin(SI1BB), succ_end(SI1BB));
  242   for (BasicBlock *Succ : successors(SI2BB))
  244       for (BasicBlock::iterator BBI = Succ->begin(); isa<PHINode>(BBI); ++BBI) {
  282   BasicBlock *SI1BB = SI1->getParent();
  283   BasicBlock *SI2BB = SI2->getParent();
  284   SmallPtrSet<BasicBlock *, 16> SI1Succs(succ_begin(SI1BB), succ_end(SI1BB));
  285   for (BasicBlock *Succ : successors(SI2BB))
  287       for (BasicBlock::iterator BBI = Succ->begin(); isa<PHINode>(BBI); ++BBI) {
  301 static void AddPredecessorToBlock(BasicBlock *Succ, BasicBlock *NewPred,
  301 static void AddPredecessorToBlock(BasicBlock *Succ, BasicBlock *NewPred,
  302                                   BasicBlock *ExistPred,
  339 static bool DominatesMergePoint(Value *V, BasicBlock *BB,
  360   BasicBlock *PBB = I->getParent();
  726 BasicBlock *SimplifyCFGOpt::GetValueEqualityComparisonCases(
  738   BasicBlock *Succ = BI->getSuccessor(ICI->getPredicate() == ICmpInst::ICMP_NE);
  747 EliminateBlockCases(BasicBlock *BB,
  817     Instruction *TI, BasicBlock *Pred, IRBuilder<> &Builder) {
  832   BasicBlock *PredDef =
  838   BasicBlock *ThisDef = GetValueEqualityComparisonCases(TI, ThisCases);
  892   BasicBlock *TIBB = TI->getParent();
  903   BasicBlock *TheRealDest = nullptr;
  915   BasicBlock *CheckEdge = TheRealDest;
  916   for (BasicBlock *Succ : successors(TIBB))
 1004   BasicBlock *BB = TI->getParent();
 1009   SmallVector<BasicBlock *, 16> Preds(pred_begin(BB), pred_end(BB));
 1011     BasicBlock *Pred = Preds.pop_back_val();
 1018       SmallSetVector<BasicBlock*, 4> FailBlocks;
 1020         for (auto *Succ : FailBlocks) {
 1028       BasicBlock *BBDefault = GetValueEqualityComparisonCases(TI, BBCases);
 1031       BasicBlock *PredDefault = GetValueEqualityComparisonCases(PTI, PredCases);
 1036       SmallVector<BasicBlock *, 8> NewSuccessors;
 1165       for (BasicBlock *NewSuccessor : NewSuccessors)
 1196       BasicBlock *InfLoopBlock = nullptr;
 1202             InfLoopBlock = BasicBlock::Create(BB->getContext(), "infloop",
 1218 static bool isSafeToHoistInvoke(BasicBlock *BB1, BasicBlock *BB2,
 1218 static bool isSafeToHoistInvoke(BasicBlock *BB1, BasicBlock *BB2,
 1220   for (BasicBlock *Succ : successors(BB1)) {
 1244   BasicBlock *BB1 = BI->getSuccessor(0); // The true destination.
 1245   BasicBlock *BB2 = BI->getSuccessor(1); // The false destination
 1247   BasicBlock::iterator BB1_Itr = BB1->begin();
 1248   BasicBlock::iterator BB2_Itr = BB2->begin();
 1266   BasicBlock *BIParent = BI->getParent();
 1355   for (BasicBlock *Succ : successors(BB1)) {
 1396   for (BasicBlock *Succ : successors(BB1)) {
 1419   for (BasicBlock *Succ : successors(BB1))
 1483     auto *Succ = I0->getParent()->getTerminator()->getSuccessor(0);
 1544 static bool sinkLastInstruction(ArrayRef<BasicBlock*> Blocks) {
 1545   auto *BBEnd = Blocks[0]->getTerminator()->getSuccessor(0);
 1550   for (auto *BB : Blocks) {
 1650     ArrayRef<BasicBlock*> Blocks;
 1655     LockstepReverseIterator(ArrayRef<BasicBlock*> Blocks) : Blocks(Blocks) {
 1662       for (auto *BB : Blocks) {
 1704 static bool SinkCommonCodeFromPredecessors(BasicBlock *BB) {
 1746   SmallVector<BasicBlock*,4> UnconditionalPreds;
 1748   for (auto *B : predecessors(BB)) {
 1884 static Value *isSafeToSpeculateStore(Instruction *I, BasicBlock *BrBB,
 1885                                      BasicBlock *StoreBB, BasicBlock *EndBB) {
 1885                                      BasicBlock *StoreBB, BasicBlock *EndBB) {
 1956 static bool SpeculativelyExecuteBB(BranchInst *BI, BasicBlock *ThenBB,
 1963   BasicBlock *BB = BI->getParent();
 1964   BasicBlock *EndBB = ThenBB->getTerminator()->getSuccessor(0);
 1987   for (BasicBlock::iterator BBI = ThenBB->begin(),
 2149 static bool BlockIsSimpleEnoughToThreadThrough(BasicBlock *BB) {
 2176   BasicBlock *BB = BI->getParent();
 2209     BasicBlock *PredBB = PN->getIncomingBlock(i);
 2210     BasicBlock *RealDest = BI->getSuccessor(!CB->getZExtValue());
 2222     BasicBlock *EdgeBB =
 2223         BasicBlock::Create(BB->getContext(), RealDest->getName() + ".critedge",
 2234     BasicBlock::iterator InsertPt = EdgeBB->begin();
 2236     for (BasicBlock::iterator BBI = BB->begin(); &*BBI != BI; ++BBI) {
 2301   BasicBlock *BB = PN->getParent();
 2306   BasicBlock *IfTrue, *IfFalse;
 2319   for (BasicBlock::iterator I = BB->begin(); isa<PHINode>(I); ++NumPhis, ++I)
 2330   for (BasicBlock::iterator II = BB->begin(); isa<PHINode>(II);) {
 2375   BasicBlock *DomBlock = nullptr;
 2376   BasicBlock *IfBlock1 = PN->getIncomingBlock(0);
 2377   BasicBlock *IfBlock2 = PN->getIncomingBlock(1);
 2382     for (BasicBlock::iterator I = IfBlock1->begin(); !I->isTerminator(); ++I)
 2395     for (BasicBlock::iterator I = IfBlock2->begin(); !I->isTerminator(); ++I)
 2448   BasicBlock *TrueSucc = BI->getSuccessor(0);
 2449   BasicBlock *FalseSucc = BI->getSuccessor(1);
 2532 static bool tryCSEWithPredecessor(Instruction *Inst, BasicBlock *PB) {
 2575   BasicBlock *BB = BI->getParent();
 2587     if (BasicBlock *PB = BB->getSinglePredecessor())
 2615   BasicBlock::iterator CondIt = ++Cond->getIterator();
 2663   BasicBlock *TrueDest = BI->getSuccessor(0);
 2664   BasicBlock *FalseDest = (BI->isConditional()) ? BI->getSuccessor(1) : nullptr;
 2669     BasicBlock *PredBlock = *PI;
 2879 static StoreInst *findUniqueStoreInBlocks(BasicBlock *BB1, BasicBlock *BB2) {
 2879 static StoreInst *findUniqueStoreInBlocks(BasicBlock *BB1, BasicBlock *BB2) {
 2881   for (auto *BB : {BB1, BB2}) {
 2896 static Value *ensureValueAvailableInSuccessor(Value *V, BasicBlock *BB,
 2913   BasicBlock *Succ = BB->getSingleSuccessor();
 2923       BasicBlock *OtherPredBB = *PredI == BB ? *++PredI : *PredI;
 2938   for (BasicBlock *PredBB : predecessors(Succ))
 2945 static bool mergeConditionalStoreToAddress(BasicBlock *PTB, BasicBlock *PFB,
 2945 static bool mergeConditionalStoreToAddress(BasicBlock *PTB, BasicBlock *PFB,
 2946                                            BasicBlock *QTB, BasicBlock *QFB,
 2946                                            BasicBlock *QTB, BasicBlock *QFB,
 2947                                            BasicBlock *PostBB, Value *Address,
 3038     BasicBlock *TruePred = QTB ? QTB : QFB->getSinglePredecessor();
 3039     BasicBlock *NewBB = SplitBlockPredecessors(PostBB, { QFB, TruePred},
 3137   BasicBlock *PTB = PBI->getSuccessor(0);
 3138   BasicBlock *PFB = PBI->getSuccessor(1);
 3139   BasicBlock *QTB = QBI->getSuccessor(0);
 3140   BasicBlock *QFB = QBI->getSuccessor(1);
 3141   BasicBlock *PostBB = QFB->getSingleSuccessor();
 3188   for (auto *BB : {PTB, PFB}) {
 3195   for (auto *BB : {QTB, QFB}) {
 3223   BasicBlock *BB = BI->getParent();
 3252         BasicBlock *P = *PI;
 3319   BasicBlock *CommonDest = PBI->getSuccessor(PBIOp);
 3321   for (BasicBlock::iterator II = CommonDest->begin(); isa<PHINode>(II);
 3340   BasicBlock *OtherDest = BI->getSuccessor(BIOp ^ 1);
 3355     BasicBlock *InfLoopBlock =
 3356         BasicBlock::Create(BB->getContext(), "infloop", BB->getParent());
 3459                                        BasicBlock *TrueBB, BasicBlock *FalseBB,
 3459                                        BasicBlock *TrueBB, BasicBlock *FalseBB,
 3466   BasicBlock *KeepEdge1 = TrueBB;
 3467   BasicBlock *KeepEdge2 = TrueBB != FalseBB ? FalseBB : nullptr;
 3470   for (BasicBlock *Succ : successors(OldTerm)) {
 3530   BasicBlock *TrueBB = SI->findCaseValue(TrueVal)->getCaseSuccessor();
 3531   BasicBlock *FalseBB = SI->findCaseValue(FalseVal)->getCaseSuccessor();
 3565   BasicBlock *TrueBB = TBA->getBasicBlock();
 3566   BasicBlock *FalseBB = FBA->getBasicBlock();
 3592   BasicBlock *BB = ICI->getParent();
 3605   BasicBlock *Pred = BB->getSinglePredecessor();
 3647   BasicBlock *SuccBlock = BB->getTerminator()->getSuccessor(0);
 3668   BasicBlock *NewBB =
 3669       BasicBlock::Create(BB->getContext(), "switch.edge", BB->getParent(), BB);
 3734   BasicBlock *DefaultBB = BI->getSuccessor(1);
 3735   BasicBlock *EdgeBB = BI->getSuccessor(0);
 3739   BasicBlock *BB = BI->getParent();
 3754     BasicBlock *NewBB =
 3793   for (BasicBlock::iterator BBI = EdgeBB->begin(); isa<PHINode>(BBI); ++BBI) {
 3820   BasicBlock *BB = RI->getParent();
 3824   BasicBlock::iterator I = cast<Instruction>(RI->getValue())->getIterator(),
 3830   SmallSetVector<BasicBlock *, 4> TrivialUnwindBlocks;
 3836     auto *IncomingBB = PhiLPInst->getIncomingBlock(Idx);
 3868   for (auto *TrivialBB : TrivialUnwindBlocks) {
 3877       BasicBlock *Pred = *PI++;
 3899   BasicBlock *BB = RI->getParent();
 3905   BasicBlock::iterator I = LPInst->getIterator(), E = RI->getIterator();
 3912     BasicBlock *Pred = *PI++;
 3932   BasicBlock *BB = RI->getParent();
 3944   BasicBlock::iterator I = CPInst->getIterator(), E = RI->getIterator();
 3964   BasicBlock *UnwindDest = RI->getUnwindDest();
 3975     for (BasicBlock::iterator I = UnwindDest->begin(),
 4013         for (auto *pred : predecessors(BB)) {
 4021     for (BasicBlock::iterator I = BB->begin(),
 4036       for (auto *pred : predecessors(UnwindDest))
 4045     BasicBlock *PredBB = *PI++;
 4063   BasicBlock *UnwindDest = RI->getUnwindDest();
 4109   BasicBlock *BB = RI->getParent();
 4114   SmallVector<BasicBlock *, 8> UncondBranchPreds;
 4117     BasicBlock *P = *PI;
 4130       BasicBlock *Pred = UncondBranchPreds.pop_back_val();
 4163   BasicBlock *BB = UI->getParent();
 4170     BasicBlock::iterator BBI = UI->getIterator();
 4221   SmallVector<BasicBlock *, 8> Preds(pred_begin(BB), pred_end(BB));
 4279         BasicBlock *CatchSwitchBB = CSI->getParent();
 4285           SmallVector<BasicBlock *, 8> EHPreds(predecessors(CatchSwitchBB));
 4286           for (BasicBlock *EHPred : EHPreds)
 4326   BasicBlock *NewDefaultBlock =
 4344   BasicBlock *DestA = HasDefault ? SI->getDefaultDest() : nullptr;
 4345   BasicBlock *DestB = nullptr;
 4350     BasicBlock *Dest = Case.getCaseSuccessor();
 4375   BasicBlock *ContiguousDest = nullptr;
 4376   BasicBlock *OtherDest = nullptr;
 4518                                               BasicBlock *BB, int *PhiIndex) {
 4528   BasicBlock *Succ = Branch->getSuccessor(0);
 4552   BasicBlock *SwitchBlock = SI->getParent();
 4556     BasicBlock *CaseDest = Case.getCaseSuccessor();
 4678 GetCaseResults(SwitchInst *SI, ConstantInt *CaseVal, BasicBlock *CaseDest,
 4679                BasicBlock **CommonDest,
 4683   BasicBlock *Pred = SI->getParent();
 4768 InitializeUniqueCases(SwitchInst *SI, PHINode *&PHI, BasicBlock *&CommonDest,
 4806   BasicBlock *DefaultDest = SI->getDefaultDest();
 4865   BasicBlock *SelectBB = SI->getParent();
 4874     BasicBlock *Succ = SI->getSuccessor(i);
 4891   BasicBlock *CommonDest = nullptr;
 5226     User *PhiUser, BasicBlock *PhiBlock, BranchInst *RangeCheckBranch,
 5267   BasicBlock *BranchBlock = RangeCheckBranch->getParent();
 5269     BasicBlock *Pred = *PI;
 5322   BasicBlock *CommonDest = nullptr;
 5392   BasicBlock *LookupBB = BasicBlock::Create(
 5392   BasicBlock *LookupBB = BasicBlock::Create(
 5437     BasicBlock *MaskBB = LookupBB;
 5439     LookupBB = BasicBlock::Create(Mod.getContext(), "switch.lookup",
 5502       BasicBlock *PhiBlock = PHI->getParent();
 5517     BasicBlock *Succ = SI->getSuccessor(i);
 5634   BasicBlock *BB = SI->getParent();
 5639     if (BasicBlock *OnlyPred = BB->getSinglePredecessor())
 5685   BasicBlock *BB = IBI->getParent();
 5691     BasicBlock *Dest = IBI->getDestination(i);
 5744                                  BasicBlock *BB) {
 5752   for (BasicBlock *OtherPred : predecessors(Succ)) {
 5755     BasicBlock::iterator I = OtherPred->begin();
 5767     SmallPtrSet<BasicBlock *, 16> Preds;
 5769     for (BasicBlock *Pred : Preds) {
 5785     SmallPtrSet<BasicBlock *, 16> Succs;
 5787     for (BasicBlock *Succ : Succs) {
 5801   BasicBlock *BB = BI->getParent();
 5802   BasicBlock *Succ = BI->getSuccessor(0);
 5815   BasicBlock::iterator I = BB->getFirstNonPHIOrDbg()->getIterator();
 5849 static BasicBlock *allPredecessorsComeFromSameSource(BasicBlock *BB) {
 5849 static BasicBlock *allPredecessorsComeFromSameSource(BasicBlock *BB) {
 5850   BasicBlock *PredPred = nullptr;
 5851   for (auto *P : predecessors(BB)) {
 5852     BasicBlock *PPred = P->getSinglePredecessor();
 5861   BasicBlock *BB = BI->getParent();
 5871     if (BasicBlock *OnlyPred = BB->getSinglePredecessor())
 5954     if (BasicBlock *PrevBB = allPredecessorsComeFromSameSource(BB))
 5978     for (BasicBlock::iterator
 6017 static bool removeUndefIntroducingPredecessor(BasicBlock *BB) {
 6041 bool SimplifyCFGOpt::simplifyOnce(BasicBlock *BB) {
 6115 bool SimplifyCFGOpt::run(BasicBlock *BB) {
 6130 bool llvm::simplifyCFG(BasicBlock *BB, const TargetTransformInfo &TTI,
 6132                        SmallPtrSetImpl<BasicBlock *> *LoopHeaders) {
lib/Transforms/Utils/SimplifyIndVar.cpp
  212   if (auto *BB = L->getLoopPredecessor()) {
  652   if (auto *BB = L->getLoopPreheader())
  951   for (BasicBlock::iterator I = L->getHeader()->begin(); isa<PHINode>(I); ++I) {
lib/Transforms/Utils/SimplifyLibCalls.cpp
 2102     BasicBlock &EntryBB = B.GetInsertBlock()->getParent()->getEntryBlock();
lib/Transforms/Utils/SizeOpts.cpp
   53   static bool isColdBlock(const BasicBlock *BB,
   59                                       const BasicBlock *BB,
   72 bool llvm::shouldOptimizeForSize(const BasicBlock *BB, ProfileSummaryInfo *PSI,
lib/Transforms/Utils/SplitModule.cpp
  135       for (const BasicBlock &BB : *F) {
lib/Transforms/Utils/UnifyFunctionExitNodes.cpp
   49   std::vector<BasicBlock*> ReturningBlocks;
   50   std::vector<BasicBlock*> UnreachableBlocks;
   51   for (BasicBlock &I : F)
   63     UnreachableBlock = BasicBlock::Create(F.getContext(),
   67     for (BasicBlock *BB : UnreachableBlocks) {
   86   BasicBlock *NewRetBlock = BasicBlock::Create(F.getContext(),
   86   BasicBlock *NewRetBlock = BasicBlock::Create(F.getContext(),
  103   for (BasicBlock *BB : ReturningBlocks) {
lib/Transforms/Utils/ValueMapper.cpp
   57   BasicBlock *OldBB;
   58   std::unique_ptr<BasicBlock> TempBB;
   62         TempBB(BasicBlock::Create(Old.getContext())) {}
  496   BasicBlock *BB;
  501     BB = cast_or_null<BasicBlock>(mapValue(BA.getBasicBlock()));
  847     BasicBlock *BB = cast_or_null<BasicBlock>(mapValue(DBB.OldBB));
  847     BasicBlock *BB = cast_or_null<BasicBlock>(mapValue(DBB.OldBB));
  870         PN->setIncomingBlock(i, cast<BasicBlock>(V));
  950   for (BasicBlock &BB : F)
lib/Transforms/Vectorize/LoadStoreVectorizer.cpp
  162   std::pair<BasicBlock::iterator, BasicBlock::iterator>
  293   for (BasicBlock *BB : post_order(&F)) {
  542 std::pair<BasicBlock::iterator, BasicBlock::iterator>
  545   BasicBlock::iterator FirstInstr = C0->getIterator();
  546   BasicBlock::iterator LastInstr = C0->getIterator();
  548   BasicBlock *BB = C0->getParent();
 1041   BasicBlock::iterator First, Last;
 1190   BasicBlock::iterator First, Last;
lib/Transforms/Vectorize/LoopVectorizationLegality.cpp
  314   BasicBlock *Latch = Lp->getLoopLatch();
  359 static bool canIfConvertPHINodes(BasicBlock *BB) {
  430   for (BasicBlock *BB : TheLoop->blocks()) {
  544   BasicBlock *Header = TheLoop->getHeader();
  570   BasicBlock *Header = TheLoop->getHeader();
  578   for (BasicBlock *BB : TheLoop->blocks()) {
  873 bool LoopVectorizationLegality::blockNeedsPredication(BasicBlock *BB) {
  878     BasicBlock *BB, SmallPtrSetImpl<Value *> &SafePtrs, bool PreserveGuards) {
  941   for (BasicBlock *BB : TheLoop->blocks()) {
  964   BasicBlock *Header = TheLoop->getHeader();
  965   for (BasicBlock *BB : TheLoop->blocks()) {
 1226   for (BasicBlock *BB : TheLoop->blocks()) {
lib/Transforms/Vectorize/LoopVectorize.cpp
  415   BasicBlock *createVectorizedLoopSkeleton();
  512                     BasicBlock *MiddleBlock);
  624   void emitMinimumIterationCountCheck(Loop *L, BasicBlock *Bypass);
  628   void emitSCEVChecks(Loop *L, BasicBlock *Bypass);
  631   void emitMemRuntimeChecks(Loop *L, BasicBlock *Bypass);
  711   BasicBlock *LoopVectorPreHeader;
  714   BasicBlock *LoopScalarPreHeader;
  717   BasicBlock *LoopMiddleBlock;
  720   BasicBlock *LoopExitBlock;
  723   BasicBlock *LoopVectorBody;
  726   BasicBlock *LoopScalarBody;
  729   SmallVector<BasicBlock *, 4> LoopBypassBlocks;
 1285   bool blockNeedsPredication(BasicBlock *BB) {
 1377   SmallPtrSet<BasicBlock *, 4> PredicatedBBsAfterVectorization;
 1565     if (!containsIrreducibleCFG<const BasicBlock *>(RPOT, *LI)) {
 1741   auto *LoopVectorLatch = LI->getLoopFor(LoopVectorBody)->getLoopLatch();
 2525   BasicBlock *Header = L->getHeader();
 2526   BasicBlock *Latch = L->getLoopLatch();
 2678                                                          BasicBlock *Bypass) {
 2680   BasicBlock *BB = L->getLoopPreheader();
 2698   BasicBlock *NewBB = BB->splitBasicBlock(BB->getTerminator(), "vector.ph");
 2710 void InnerLoopVectorizer::emitSCEVChecks(Loop *L, BasicBlock *Bypass) {
 2711   BasicBlock *BB = L->getLoopPreheader();
 2730   auto *NewBB = BB->splitBasicBlock(BB->getTerminator(), "vector.ph");
 2743 void InnerLoopVectorizer::emitMemRuntimeChecks(Loop *L, BasicBlock *Bypass) {
 2748   BasicBlock *BB = L->getLoopPreheader();
 2776   auto *NewBB = BB->splitBasicBlock(BB->getTerminator(), "vector.ph");
 2883 BasicBlock *InnerLoopVectorizer::createVectorizedLoopSkeleton() {
 2916   BasicBlock *OldBasicBlock = OrigLoop->getHeader();
 2917   BasicBlock *VectorPH = OrigLoop->getLoopPreheader();
 2918   BasicBlock *ExitBlock = OrigLoop->getExitBlock();
 2938   BasicBlock *VecBody =
 2940   BasicBlock *MiddleBlock =
 2942   BasicBlock *ScalarPH =
 3033     for (BasicBlock *BB : LoopBypassBlocks)
 3108                                        BasicBlock *MiddleBlock) {
 3199 static void cse(BasicBlock *BB) {
 3202   for (BasicBlock::iterator I = BB->begin(), E = BB->end(); I != E;) {
 3524   auto *Preheader = OrigLoop->getLoopPreheader();
 3525   auto *Latch = OrigLoop->getLoopLatch();
 3621   for (auto *BB : predecessors(LoopScalarPreHeader)) {
 3701   BasicBlock *Latch = OrigLoop->getLoopLatch();
 3866   auto *PredBB = PredInst->getParent();
 3880     BasicBlock *BB = I->getParent();
 3934     SmallVector<BasicBlock *, 2> ScalarBBPredecessors(
 3936     SmallVector<BasicBlock *, 2> VectorBBPredecessors(
 3950       BasicBlock *NewPredBB = VectorBBPredecessors[i];
 4439   for (auto *BB : TheLoop->blocks())
 4459   auto *Latch = TheLoop->getLoopLatch();
 4669   BasicBlock *Latch = TheLoop->getLoopLatch();
 4706   for (auto *BB : TheLoop->blocks())
 5075   for (BasicBlock *BB : TheLoop->blocks()) {
 5335   for (BasicBlock *BB : make_range(DFS.beginRPO(), DFS.endRPO())) {
 5526   for (BasicBlock *BB : TheLoop->blocks()) {
 5654   for (BasicBlock *BB : TheLoop->blocks()) {
 5942   for (BasicBlock *BB : TheLoop->blocks()) {
 6042   for (BasicBlock *BB : TheLoop->blocks())
 6524   BasicBlock *Latch = OrigLoop->getLoopLatch();
 6641 VPValue *VPRecipeBuilder::createEdgeMask(BasicBlock *Src, BasicBlock *Dst,
 6641 VPValue *VPRecipeBuilder::createEdgeMask(BasicBlock *Src, BasicBlock *Dst,
 6646   std::pair<BasicBlock *, BasicBlock *> Edge(Src, Dst);
 6646   std::pair<BasicBlock *, BasicBlock *> Edge(Src, Dst);
 6672 VPValue *VPRecipeBuilder::createBlockInMask(BasicBlock *BB, VPlanPtr &Plan) {
 6697   for (auto *Predecessor : predecessors(BB)) {
 7052   auto *Latch = OrigLoop->getLoopLatch();
 7053   for (BasicBlock *BB : OrigLoop->blocks()) {
 7115   for (BasicBlock *BB : make_range(DFS.beginRPO(), DFS.endRPO())) {
 7402   BasicBlock *PredicatedBB = ScalarPredInst->getParent();
 7403   BasicBlock *PredicatingBB = PredicatedBB->getSinglePredecessor();
lib/Transforms/Vectorize/SLPVectorizer.cpp
  185   BasicBlock *BB = I0->getParent();
 1532   SetVector<BasicBlock *> CSEBlocks;
 1683     BlockScheduling(BasicBlock *BB)
 1853     BasicBlock *BB;
 1909   MapVector<BasicBlock *, std::unique_ptr<BlockScheduling>> BlocksSchedules;
 2260   BasicBlock *BB = VL0->getParent();
 3391     BasicBlock::reverse_iterator InstIt = ++Inst->getIterator().getReverse(),
 3558   auto *BB = Front->getParent();
 3770       SmallPtrSet<BasicBlock*, 4> VisitedBBs;
 3774         BasicBlock *IBB = PH->getIncomingBlock(i);
 4405     BasicBlock *PreHeader = L->getLoopPreheader();
 4426   for (BasicBlock *BB : CSEBlocks)
 4446     BasicBlock *BB = (*I)->getBlock();
 4448     for (BasicBlock::iterator it = BB->begin(), e = BB->end(); it != e;) {
 4638   BasicBlock::reverse_iterator UpIter =
 4640   BasicBlock::reverse_iterator UpperEnd = BB->rend();
 4641   BasicBlock::iterator DownIter = ScheduleEnd->getIterator();
 4642   BasicBlock::iterator LowerEnd = BB->end();
 5460 void SLPVectorizerPass::collectSeedInstructions(BasicBlock *BB) {
 6679                                 BasicBlock *ParentBB, LoopInfo *LI) {
 6704   BasicBlock *BBLatch = BBL->getLoopLatch();
 6734     PHINode *P, Instruction *Root, BasicBlock *BB, BoUpSLP &R,
 6808                                                  BasicBlock *BB, BoUpSLP &R,
 6827                                                  BasicBlock *BB, BoUpSLP &R) {
 6843                                                    BasicBlock *BB, BoUpSLP &R) {
 6857 bool SLPVectorizerPass::vectorizeCmpInst(CmpInst *CI, BasicBlock *BB,
 6871     SmallVectorImpl<Instruction *> &Instructions, BasicBlock *BB, BoUpSLP &R) {
 6887 bool SLPVectorizerPass::vectorizeChainsInBlock(BasicBlock *BB, BoUpSLP &R) {
 6949   for (BasicBlock::iterator it = BB->begin(), e = BB->end(); it != e; ++it) {
 7021 bool SLPVectorizerPass::vectorizeGEPIndices(BasicBlock *BB, BoUpSLP &R) {
lib/Transforms/Vectorize/VPRecipeBuilder.h
   45       DenseMap<std::pair<BasicBlock *, BasicBlock *>, VPValue *>;
   45       DenseMap<std::pair<BasicBlock *, BasicBlock *>, VPValue *>;
   46   using BlockMaskCacheTy = DenseMap<BasicBlock *, VPValue *>;
   54   VPValue *createBlockInMask(BasicBlock *BB, VPlanPtr &Plan);
   58   VPValue *createEdgeMask(BasicBlock *Src, BasicBlock *Dst, VPlanPtr &Plan);
   58   VPValue *createEdgeMask(BasicBlock *Src, BasicBlock *Dst, VPlanPtr &Plan);
lib/Transforms/Vectorize/VPlan.cpp
  113 BasicBlock *
  117   BasicBlock *PrevBB = CFG.PrevBB;
  118   BasicBlock *NewBB = BasicBlock::Create(PrevBB->getContext(), getName(),
  118   BasicBlock *NewBB = BasicBlock::Create(PrevBB->getContext(), getName(),
  126     BasicBlock *PredBB = CFG.VPBB2IRBB[PredVPBB];
  166   BasicBlock *NewBB = State->CFG.PrevBB; // Reuse it if possible.
  387   BasicBlock *VectorPreHeaderBB = State->CFG.PrevBB;
  388   BasicBlock *VectorHeaderBB = VectorPreHeaderBB->getSingleSuccessor();
  392   BasicBlock *VectorLatchBB = VectorHeaderBB->splitBasicBlock(
  418     BasicBlock *BB = State->CFG.VPBB2IRBB[VPBB];
  432   BasicBlock *LastBB = State->CFG.PrevBB;
  453 void VPlan::updateDominatorTree(DominatorTree *DT, BasicBlock *LoopPreHeaderBB,
  454                                 BasicBlock *LoopLatchBB) {
  455   BasicBlock *LoopHeaderBB = LoopPreHeaderBB->getSingleSuccessor();
  461   BasicBlock *PostDomSucc = nullptr;
  462   for (auto *BB = LoopHeaderBB; BB != LoopLatchBB; BB = PostDomSucc) {
  464     std::vector<BasicBlock *> Succs(succ_begin(BB), succ_end(BB));
  474     BasicBlock *InterimSucc = Succs[1];
lib/Transforms/Vectorize/VPlan.h
  288     BasicBlock *PrevBB = nullptr;
  292     BasicBlock *LastBB = nullptr;
  296     SmallDenseMap<VPBasicBlock *, BasicBlock *> VPBB2IRBB;
  712   BasicBlock::iterator Begin;
  713   BasicBlock::iterator End;
 1060   BasicBlock *createEmptyBasicBlock(VPTransformState::CFGState &CFG);
 1256                                   BasicBlock *LoopPreHeaderBB,
 1257                                   BasicBlock *LoopLatchBB);
lib/Transforms/Vectorize/VPlanHCFGBuilder.cpp
   55   DenseMap<BasicBlock *, VPBasicBlock *> BB2VPBB;
   63   void setVPBBPredsFromBB(VPBasicBlock *VPBB, BasicBlock *BB);
   65   VPBasicBlock *getOrCreateVPBB(BasicBlock *BB);
   70   void createVPInstructionsForVPBB(VPBasicBlock *VPBB, BasicBlock *BB);
   83 void PlainCFGBuilder::setVPBBPredsFromBB(VPBasicBlock *VPBB, BasicBlock *BB) {
   86   for (BasicBlock *Pred : predecessors(BB))
  109 VPBasicBlock *PlainCFGBuilder::getOrCreateVPBB(BasicBlock *BB) {
  137   BasicBlock *InstParent = Inst->getParent();
  141   BasicBlock *PH = TheLoop->getLoopPreheader();
  149   BasicBlock *Exit = TheLoop->getUniqueExitBlock();
  193                                                   BasicBlock *BB) {
  252   BasicBlock *PreheaderBB = TheLoop->getLoopPreheader();
  265   for (BasicBlock *BB : RPO) {
  310   BasicBlock *LoopExitBB = TheLoop->getUniqueExitBlock();
tools/bugpoint-passes/TestPasses.cpp
   35     bool runOnBasicBlock(BasicBlock &BB) override {
   36       for (BasicBlock::iterator I = BB.begin(), E = BB.end(); I != E; ++I)
   58     bool runOnBasicBlock(BasicBlock &BB) override {
   59       for (BasicBlock::iterator I = BB.begin(), E = BB.end(); I != E; ++I)
tools/bugpoint/BugDriver.h
  213   extractMappedBlocksFromModule(const std::vector<BasicBlock *> &BBs,
tools/bugpoint/CrashDebugger.cpp
  381 void simpleSimplifyCfg(Function &F, SmallVectorImpl<BasicBlock *> &BBs) {
  385   for (auto *BB : BBs) {
  395   SmallPtrSet<BasicBlock *, 16> Visited;
  396   for (auto *BB : depth_first(&F.getEntryBlock()))
  399   SmallVector<BasicBlock *, 16> Unreachable;
  400   for (auto &BB : F)
  407   for (auto *BB : Unreachable) {
  408     for (BasicBlock *Successor : successors(&*BB))
  413   for (auto *BB : Unreachable)
  421 class ReduceCrashingBlocks : public ListReducer<const BasicBlock *> {
  429   Expected<TestResult> doTest(std::vector<const BasicBlock *> &Prefix,
  430                               std::vector<const BasicBlock *> &Kept) override {
  438   bool TestBlocks(std::vector<const BasicBlock *> &Prefix);
  442 bool ReduceCrashingBlocks::TestBlocks(std::vector<const BasicBlock *> &BBs) {
  448   SmallPtrSet<BasicBlock *, 8> Blocks;
  450     Blocks.insert(cast<BasicBlock>(VMap[BBs[i]]));
  464     for (BasicBlock &BB : F) {
  468         for (BasicBlock *Succ : successors(&BB))
  491   for (BasicBlock *BB : Blocks)
  494   SmallVector<BasicBlock *, 16> ToProcess;
  496     for (auto &BB : F)
  524         BBs.push_back(cast<BasicBlock>(V));
  538 class ReduceCrashingConditionals : public ListReducer<const BasicBlock *> {
  547   Expected<TestResult> doTest(std::vector<const BasicBlock *> &Prefix,
  548                               std::vector<const BasicBlock *> &Kept) override {
  556   bool TestBlocks(std::vector<const BasicBlock *> &Prefix);
  561     std::vector<const BasicBlock *> &BBs) {
  567   SmallPtrSet<const BasicBlock *, 8> Blocks;
  568   for (const auto *BB : BBs)
  569     Blocks.insert(cast<BasicBlock>(VMap[BB]));
  584     for (auto &BB : F)
  598   for (const BasicBlock *BB : Blocks)
  601   SmallVector<BasicBlock *, 16> ToProcess;
  603     for (auto &BB : F)
  631         BBs.push_back(cast<BasicBlock>(V));
  643 class ReduceSimplifyCFG : public ListReducer<const BasicBlock *> {
  652   Expected<TestResult> doTest(std::vector<const BasicBlock *> &Prefix,
  653                               std::vector<const BasicBlock *> &Kept) override {
  661   bool TestBlocks(std::vector<const BasicBlock *> &Prefix);
  665 bool ReduceSimplifyCFG::TestBlocks(std::vector<const BasicBlock *> &BBs) {
  671   SmallPtrSet<const BasicBlock *, 8> Blocks;
  672   for (const auto *BB : BBs)
  673     Blocks.insert(cast<BasicBlock>(VMap[BB]));
  688   for (const BasicBlock *BB : Blocks)
  723         BBs.push_back(cast<BasicBlock>(V));
  777       for (BasicBlock::iterator I = FI->begin(), E = FI->end(); I != E;) {
 1010       for (const BasicBlock &BB : F)
 1050           for (BasicBlock::const_iterator I = BI->begin(), E = --BI->end();
 1153     std::vector<const BasicBlock *> Blocks;
 1155       for (BasicBlock &BB : F)
 1175     std::vector<const BasicBlock *> Blocks;
 1177       for (BasicBlock &BB : F)
 1188     std::vector<const BasicBlock *> Blocks;
 1190       for (BasicBlock &BB : F)
tools/bugpoint/ExtractFunction.cpp
   89   const BasicBlock *PBB = I->getParent();
   99   BasicBlock::iterator RI = RBI->begin(); // Get iterator to corresponding inst
  372 BugDriver::extractMappedBlocksFromModule(const std::vector<BasicBlock *> &BBs,
  385   SmallVector<BasicBlock *, 32> BlocksToExtract;
  387     for (BasicBlock &BB : F)
  393   for (BasicBlock *BB : BBs) {
tools/bugpoint/Miscompilation.cpp
  444 class ReduceMiscompiledBlocks : public ListReducer<BasicBlock *> {
  458   Expected<TestResult> doTest(std::vector<BasicBlock *> &Prefix,
  459                               std::vector<BasicBlock *> &Suffix) override {
  477   Expected<bool> TestFuncs(const std::vector<BasicBlock *> &BBs);
  485 ReduceMiscompiledBlocks::TestFuncs(const std::vector<BasicBlock *> &BBs) {
  505   std::vector<BasicBlock *> BBsOnClone;
  511     BasicBlock *BB = cast<BasicBlock>(VMap[BBs[i]]);
  511     BasicBlock *BB = cast<BasicBlock>(VMap[BBs[i]]);
  543   std::vector<BasicBlock *> Blocks;
  545     for (BasicBlock &BB : *MiscompiledFunctions[i])
  815       BasicBlock *BB = BasicBlock::Create(Safe->getContext(), "entry", newMain);
  815       BasicBlock *BB = BasicBlock::Create(Safe->getContext(), "entry", newMain);
  874           BasicBlock *EntryBB =
  875               BasicBlock::Create(F->getContext(), "entry", FuncWrapper);
  876           BasicBlock *DoCallBB =
  877               BasicBlock::Create(F->getContext(), "usecache", FuncWrapper);
  878           BasicBlock *LookupBB =
  879               BasicBlock::Create(F->getContext(), "lookupfp", FuncWrapper);
tools/clang/lib/CodeGen/CGAtomic.cpp
  381   llvm::BasicBlock *StoreExpectedBB =
  386   llvm::BasicBlock *ContinueBB =
  446   llvm::BasicBlock *MonotonicBB = nullptr, *AcquireBB = nullptr,
  455   llvm::BasicBlock *ContBB = CGF.createBasicBlock("atomic.continue", CGF.CurFn);
  521       llvm::BasicBlock *StrongBB =
  523       llvm::BasicBlock *WeakBB = CGF.createBasicBlock("cmxchg.weak", CGF.CurFn);
  524       llvm::BasicBlock *ContBB =
  691   llvm::DenseMap<unsigned, llvm::BasicBlock *> BB;
  695   llvm::BasicBlock *ContBB =
  704     auto *B = BB[S];
 1260   llvm::BasicBlock *MonotonicBB = nullptr, *AcquireBB = nullptr,
 1271   llvm::BasicBlock *ContBB = createBasicBlock("atomic.continue", CurFn);
 1744   auto *ContBB = CGF.createBasicBlock("atomic_cont");
 1745   auto *ExitBB = CGF.createBasicBlock("atomic_exit");
 1773   auto *ContBB = CGF.createBasicBlock("atomic_cont");
 1774   auto *ExitBB = CGF.createBasicBlock("atomic_exit");
 1775   auto *CurBB = CGF.Builder.GetInsertBlock();
 1830   auto *ContBB = CGF.createBasicBlock("atomic_cont");
 1831   auto *ExitBB = CGF.createBasicBlock("atomic_exit");
 1855   auto *ContBB = CGF.createBasicBlock("atomic_cont");
 1856   auto *ExitBB = CGF.createBasicBlock("atomic_exit");
 1857   auto *CurBB = CGF.Builder.GetInsertBlock();
tools/clang/lib/CodeGen/CGBlocks.cpp
 1448     llvm::IRBuilder<> b(llvm::BasicBlock::Create(CGM.getLLVMContext(), "entry",
 1632   llvm::BasicBlock *entry = Builder.GetInsertBlock();
 1633   llvm::BasicBlock::iterator entry_ptr = Builder.GetInsertPoint();
 1645   llvm::BasicBlock *resume = Builder.GetInsertBlock();
tools/clang/lib/CodeGen/CGBuilder.h
   33                     llvm::BasicBlock *BB,
   34                     llvm::BasicBlock::iterator InsertPt) const;
   57   CGBuilderTy(const CodeGenTypeCache &TypeCache, llvm::BasicBlock *BB)
tools/clang/lib/CodeGen/CGBuiltin.cpp
  927     BasicBlock *Begin = Builder.GetInsertBlock();
  928     BasicBlock *End = createBasicBlock("bitscan_end", this->CurFn);
  934     BasicBlock *NotZero = createBasicBlock("bitscan_not_zero", this->CurFn);
 2302     BasicBlock *Begin = Builder.GetInsertBlock();
 2303     BasicBlock *End = createBasicBlock("fpclassify_end", this->CurFn);
 2314     BasicBlock *NotZero = createBasicBlock("fpclassify_not_zero", this->CurFn);
 2322     BasicBlock *NotNan = createBasicBlock("fpclassify_not_nan", this->CurFn);
 2333     BasicBlock *NotInf = createBasicBlock("fpclassify_not_inf", this->CurFn);
 2505     BasicBlock *Entry = Builder.GetInsertBlock();
 2506     BasicBlock *CmpGT = createBasicBlock("wmemcmp.gt");
 2507     BasicBlock *CmpLT = createBasicBlock("wmemcmp.lt");
 2508     BasicBlock *Next = createBasicBlock("wmemcmp.next");
 2509     BasicBlock *Exit = createBasicBlock("wmemcmp.exit");
 2937     llvm::BasicBlock *ContBB = createBasicBlock("atomic.continue", CurFn);
 2939     llvm::BasicBlock *BBs[5] = {
 3005     llvm::BasicBlock *ContBB = createBasicBlock("atomic.continue", CurFn);
 3007     llvm::BasicBlock *BBs[3] = {
 3068     llvm::BasicBlock *AcquireBB, *ReleaseBB, *AcqRelBB, *SeqCstBB;
 3073     llvm::BasicBlock *ContBB = createBasicBlock("atomic.continue", CurFn);
tools/clang/lib/CodeGen/CGCUDANV.cpp
  109     llvm::BasicBlock *DummyBlock =
  110         llvm::BasicBlock::Create(Context, "", DummyFunc);
  266   llvm::BasicBlock *EndBlock = CGF.createBasicBlock("setup.end");
  349   llvm::BasicBlock *EndBlock = CGF.createBasicBlock("setup.end");
  365     llvm::BasicBlock *NextBlock = CGF.createBasicBlock("setup.next");
  402   llvm::BasicBlock *EntryBB =
  403       llvm::BasicBlock::Create(Context, "entry", RegisterKernelsFunc);
  532   llvm::BasicBlock *CtorEntryBB =
  533       llvm::BasicBlock::Create(Context, "entry", ModuleCtorFunc);
  620     llvm::BasicBlock *IfBlock =
  621         llvm::BasicBlock::Create(Context, "if", ModuleCtorFunc);
  622     llvm::BasicBlock *ExitBlock =
  623         llvm::BasicBlock::Create(Context, "exit", ModuleCtorFunc);
  767   llvm::BasicBlock *DtorEntryBB =
  768       llvm::BasicBlock::Create(Context, "entry", ModuleDtorFunc);
  779     llvm::BasicBlock *IfBlock =
  780         llvm::BasicBlock::Create(Context, "if", ModuleDtorFunc);
  781     llvm::BasicBlock *ExitBlock =
  782         llvm::BasicBlock::Create(Context, "exit", ModuleDtorFunc);
tools/clang/lib/CodeGen/CGCUDARuntime.cpp
   29   llvm::BasicBlock *ConfigOKBlock = CGF.createBasicBlock("kcall.configok");
   30   llvm::BasicBlock *ContBlock = CGF.createBasicBlock("kcall.end");
tools/clang/lib/CodeGen/CGCXXABI.cpp
  273 llvm::BasicBlock *
tools/clang/lib/CodeGen/CGCXXABI.h
  264                       QualType DestRecordTy, llvm::BasicBlock *CastEnd) = 0;
  278   virtual llvm::BasicBlock *EmitCtorCompleteObjectHandler(CodeGenFunction &CGF,
  615     llvm::BasicBlock *BB = CGF.createBasicBlock("catchret.dest");
tools/clang/lib/CodeGen/CGCall.cpp
 2589   llvm::BasicBlock *BB = CGF.Builder.GetInsertBlock();
 2749     llvm::BasicBlock *IP = CGF.Builder.GetInsertBlock();
 2754     for (llvm::BasicBlock::reverse_iterator II = IP->rbegin(),
 2781   llvm::BasicBlock *StoreBB = store->getParent();
 2782   llvm::BasicBlock *IP = CGF.Builder.GetInsertBlock();
 3004   llvm::BasicBlock *Check = createBasicBlock("nullcheck");
 3005   llvm::BasicBlock *NoCheck = createBasicBlock("no.nullcheck");
 3119   llvm::BasicBlock *contBB = nullptr;
 3126     llvm::BasicBlock *writebackBB = CGF.createBasicBlock("icr.writeback");
 3257   llvm::BasicBlock *contBB = nullptr;
 3258   llvm::BasicBlock *originBB = nullptr;
 3280       llvm::BasicBlock *copyBB = CGF.createBasicBlock("icr.copy");
 3314     llvm::BasicBlock *copyBB = CGF.Builder.GetInsertBlock();
 3752   llvm::BasicBlock *InvokeDest = getInvokeDest();
 3760     llvm::BasicBlock *ContBB = createBasicBlock("invoke.cont");
 4352   llvm::BasicBlock *InvokeDest = CannotThrow ? nullptr : getInvokeDest();
 4362     llvm::BasicBlock *Cont = createBasicBlock("invoke.cont");
tools/clang/lib/CodeGen/CGClass.cpp
  324   llvm::BasicBlock *origBB = nullptr;
  325   llvm::BasicBlock *endBB = nullptr;
  331     llvm::BasicBlock *notNullBB = createBasicBlock("cast.notnull");
  362     llvm::BasicBlock *notNullBB = Builder.GetInsertBlock();
  397   llvm::BasicBlock *CastNull = nullptr;
  398   llvm::BasicBlock *CastNotNull = nullptr;
  399   llvm::BasicBlock *CastEnd = nullptr;
 1282   llvm::BasicBlock *BaseCtorContinueBB = nullptr;
 1573     llvm::BasicBlock *callDeleteBB = CGF.createBasicBlock("dtor.call_delete");
 1574     llvm::BasicBlock *continueBB = CGF.createBasicBlock("dtor.continue");
 1934     llvm::BasicBlock *loopBB = createBasicBlock("new.ctorloop");
 1946   llvm::BasicBlock *entryBB = Builder.GetInsertBlock();
 1947   llvm::BasicBlock *loopBB = createBasicBlock("arrayctor.loop");
 2008   llvm::BasicBlock *contBB = createBasicBlock("arrayctor.cont");
 2688   llvm::BasicBlock *ContBlock = nullptr;
 2694     llvm::BasicBlock *CheckBlock = createBasicBlock("cast.check");
tools/clang/lib/CodeGen/CGCleanup.cpp
  322                                    llvm::BasicBlock *CleanupEntry) {
  323   llvm::SmallPtrSet<llvm::BasicBlock*, 4> CasesAdded;
  359                                                    llvm::BasicBlock *Block) {
  378 void CodeGenFunction::ResolveBranchFixups(llvm::BasicBlock *Block) {
  385   llvm::SmallPtrSet<llvm::BasicBlock*, 4> ModifiedOptimisticBlocks;
  398     llvm::BasicBlock *BranchBB = Fixup.OptimisticBranchBlock;
  459     llvm::BasicBlock::iterator InsertBefore;
  505 static llvm::BasicBlock *CreateNormalEntry(CodeGenFunction &CGF,
  508   llvm::BasicBlock *Entry = Scope.getNormalBlock();
  521 static llvm::BasicBlock *SimplifyCleanupEntry(CodeGenFunction &CGF,
  522                                               llvm::BasicBlock *Entry) {
  523   llvm::BasicBlock *Pred = Entry->getSinglePredecessor();
  561   llvm::BasicBlock *ContBB = nullptr;
  564     llvm::BasicBlock *CleanupBB = CGF.createBasicBlock("cleanup.action");
  580 static void ForwardPrebranchedFallthrough(llvm::BasicBlock *Exit,
  581                                           llvm::BasicBlock *From,
  582                                           llvm::BasicBlock *To) {
  606   llvm::BasicBlock *entry = scope.getNormalBlock();
  610   llvm::BasicBlock *unreachableBB = CGF.getUnreachableBlock();
  611   for (llvm::BasicBlock::use_iterator
  661   llvm::BasicBlock *EHEntry = Scope.getCachedEHDispatchBlock();
  676   llvm::BasicBlock *FallthroughSource = Builder.GetInsertBlock();
  703     llvm::BasicBlock *prebranchDest;
  721     llvm::BasicBlock *normalEntry = Scope.getNormalBlock();
  782       llvm::BasicBlock *NormalEntry = CreateNormalEntry(*this, Scope);
  817       llvm::BasicBlock *BranchThroughDest = nullptr;
  826       llvm::BasicBlock *FallthroughDest = nullptr;
  844         llvm::BasicBlock *BranchAfter = Scope.getBranchAfterBlock(0);
  856         llvm::BasicBlock *Default =
  900       llvm::BasicBlock *NormalExit = Builder.GetInsertBlock();
  950       llvm::BasicBlock *NewNormalEntry =
  970     llvm::BasicBlock *NextAction = getEHDispatchBlock(EHParent);
tools/clang/lib/CodeGen/CGCleanup.h
   44   llvm::BasicBlock *CachedLandingPad;
   45   llvm::BasicBlock *CachedEHDispatchBlock;
  115   llvm::BasicBlock *getCachedLandingPad() const {
  119   void setCachedLandingPad(llvm::BasicBlock *block) {
  123   llvm::BasicBlock *getCachedEHDispatchBlock() const {
  127   void setCachedEHDispatchBlock(llvm::BasicBlock *block) {
  132     if (llvm::BasicBlock *block = getCachedEHDispatchBlock())
  160     llvm::BasicBlock *Block;
  192   void setCatchAllHandler(unsigned I, llvm::BasicBlock *Block) {
  196   void setHandler(unsigned I, llvm::Constant *Type, llvm::BasicBlock *Block) {
  202   void setHandler(unsigned I, CatchTypeInfo Type, llvm::BasicBlock *Block) {
  241   llvm::BasicBlock *NormalBlock;
  253     llvm::SmallPtrSet<llvm::BasicBlock*, 4> Branches;
  256     SmallVector<std::pair<llvm::BasicBlock*,llvm::ConstantInt*>, 4>
  312   llvm::BasicBlock *getNormalBlock() const { return NormalBlock; }
  313   void setNormalBlock(llvm::BasicBlock *BB) { NormalBlock = BB; }
  373                       llvm::BasicBlock *Block) {
  384   llvm::BasicBlock *getBranchAfterBlock(unsigned I) const {
  409   bool addBranchThrough(llvm::BasicBlock *Block) {
tools/clang/lib/CodeGen/CGCoroutine.cpp
   44   llvm::BasicBlock *SuspendBB = nullptr;
  186   BasicBlock *ReadyBlock = CGF.createBasicBlock(Prefix + Twine(".ready"));
  187   BasicBlock *SuspendBlock = CGF.createBasicBlock(Prefix + Twine(".suspend"));
  188   BasicBlock *CleanupBlock = CGF.createBasicBlock(Prefix + Twine(".cleanup"));
  204     BasicBlock *RealSuspendBlock =
  408       auto *ResumeBB = CGF.getEHResumeBlock(/*isCleanup=*/true);
  409       auto *CleanupContBB = CGF.createBasicBlock("cleanup.cont");
  433     BasicBlock *SaveInsertBlock = CGF.Builder.GetInsertBlock();
  435     auto *FreeBB = CGF.createBasicBlock("coro.free");
  439     auto *AfterFreeBB = CGF.createBasicBlock("after.coro.free");
  548   auto *EntryBB = Builder.GetInsertBlock();
  549   auto *AllocBB = createBasicBlock("coro.alloc");
  550   auto *InitBB = createBasicBlock("coro.init");
  551   auto *FinalBB = createBasicBlock("coro.final");
  552   auto *RetBB = createBasicBlock("coro.ret");
  569   auto *AllocOrInvokeContBB = Builder.GetInsertBlock();
  573     auto *RetOnFailureBB = createBasicBlock("coro.ret.on.failure");
  645       BasicBlock *ContBB = nullptr;
  647         BasicBlock *BodyBB = createBasicBlock("coro.resumed.body");
tools/clang/lib/CodeGen/CGDecl.cpp
  488       llvm::BasicBlock *SkipDtorBB = nullptr;
  491         llvm::BasicBlock *RunDtorBB = CGF.createBasicBlock("nrvo.unused");
 1708     llvm::BasicBlock *SetupBB = createBasicBlock("vla-setup.loop");
 1709     llvm::BasicBlock *LoopBB = createBasicBlock("vla-init.loop");
 1710     llvm::BasicBlock *ContBB = createBasicBlock("vla-init.cont");
 1723     llvm::BasicBlock *OriginBB = Builder.GetInsertBlock();
 2151   llvm::BasicBlock *bodyBB = createBasicBlock("arraydestroy.body");
 2152   llvm::BasicBlock *doneBB = createBasicBlock("arraydestroy.done");
 2161   llvm::BasicBlock *entryBB = Builder.GetInsertBlock();
tools/clang/lib/CodeGen/CGDeclCXX.cpp
  298                                                llvm::BasicBlock *InitBlock,
  299                                                llvm::BasicBlock *NoInitBlock,
  679     llvm::BasicBlock *ExitBlock = nullptr;
  686       llvm::BasicBlock *InitBlock = createBasicBlock("init");
tools/clang/lib/CodeGen/CGException.cpp
  486   llvm::BasicBlock *dispatchBlock = filterScope.getCachedEHDispatchBlock();
  500     llvm::BasicBlock *unexpectedBB = CGF.createBasicBlock("ehspec.unexpected");
  565     llvm::BasicBlock *Handler = createBasicBlock("catch");
  591 llvm::BasicBlock *
  604   llvm::BasicBlock *dispatchBlock = scope.getCachedEHDispatchBlock();
  641 llvm::BasicBlock *
  651   llvm::BasicBlock *DispatchBlock = EHS.getCachedEHDispatchBlock();
  701 llvm::BasicBlock *CodeGenFunction::getInvokeDestImpl() {
  723   llvm::BasicBlock *LP = EHStack.begin()->getCachedLandingPad();
  751 llvm::BasicBlock *CodeGenFunction::EmitLandingPad() {
  765     if (llvm::BasicBlock *lpad = innermostEHScope.getCachedLandingPad())
  774   llvm::BasicBlock *lpad = createBasicBlock("lpad");
  897   llvm::BasicBlock *DispatchBlock = CatchScope.getCachedEHDispatchBlock();
  906   llvm::BasicBlock *UnwindBB =
  941   llvm::BasicBlock *DispatchBlock = CatchScope.getCachedEHDispatchBlock();
  950   llvm::BasicBlock *UnwindBB =
  959   llvm::BasicBlock *WasmCatchStartBlock = CGF.createBasicBlock("catch.start");
 1004     llvm::BasicBlock *NextBlock;
 1054   llvm::BasicBlock *dispatchBlock = catchScope.getCachedEHDispatchBlock();
 1088     llvm::BasicBlock *nextBlock;
 1138   llvm::BasicBlock *DispatchBlock = CatchScope.getCachedEHDispatchBlock();
 1158   llvm::BasicBlock *ContBB = createBasicBlock("try.cont");
 1176   llvm::BasicBlock *WasmCatchStartBlock = nullptr;
 1197     llvm::BasicBlock *CatchBlock = Handlers[I-1].Block;
 1251     llvm::BasicBlock *RethrowBlock = WasmCatchStartBlock;
 1277       llvm::BasicBlock *EndCatchBB = CGF.createBasicBlock("finally.endcatch");
 1278       llvm::BasicBlock *CleanupContBB =
 1321         llvm::BasicBlock *RethrowBB = CGF.createBasicBlock("finally.rethrow");
 1322         llvm::BasicBlock *ContBB = CGF.createBasicBlock("finally.cont");
 1411   llvm::BasicBlock *catchBB = CGF.createBasicBlock("finally.catchall");
 1419   llvm::BasicBlock *catchBB = catchScope.getHandler(0).Block;
 1457 llvm::BasicBlock *CodeGenFunction::getTerminateLandingPad() {
 1491 llvm::BasicBlock *CodeGenFunction::getTerminateHandler() {
 1515 llvm::BasicBlock *CodeGenFunction::getTerminateFunclet() {
 1519   llvm::BasicBlock *&TerminateFunclet = TerminateFunclets[CurrentFuncletPad];
 1560 llvm::BasicBlock *CodeGenFunction::getEHResumeBlock(bool isCleanup) {
 2053   llvm::BasicBlock *ContBB = createBasicBlock("__try.cont");
 2063   llvm::BasicBlock *CatchPadBB = CatchScope.getHandler(0).Block;
 2072   llvm::BasicBlock *ExceptBB = createBasicBlock("__except");
tools/clang/lib/CodeGen/CGExpr.cpp
  130   llvm::BasicBlock *Block = AllocaInsertPt->getParent();
  531         llvm::BasicBlock *Block = OldConditional->getStartingBlock();
  675   llvm::BasicBlock *Done = nullptr;
  702         llvm::BasicBlock *Rest = createBasicBlock("not.null");
  789       llvm::BasicBlock *VptrNotNull = createBasicBlock("vptr.not.null");
 2962                                  llvm::BasicBlock *ContBB) {
 3052   llvm::BasicBlock *Cont = createBasicBlock("cont");
 3053   llvm::BasicBlock *Handlers = createBasicBlock("handler." + CheckName);
 3100     llvm::BasicBlock *NonFatalHandlerBB =
 3102     llvm::BasicBlock *FatalHandlerBB = createBasicBlock("fatal." + CheckName);
 3118   llvm::BasicBlock *Cont = createBasicBlock("cfi.cont");
 3120   llvm::BasicBlock *CheckBB = createBasicBlock("cfi.slowpath");
 3170   llvm::BasicBlock *BB = llvm::BasicBlock::Create(Ctx, "entry", F);
 3170   llvm::BasicBlock *BB = llvm::BasicBlock::Create(Ctx, "entry", F);
 3283   llvm::BasicBlock *Cont = createBasicBlock("cont");
 4229   llvm::BasicBlock *lhsBlock = createBasicBlock("cond.true");
 4230   llvm::BasicBlock *rhsBlock = createBasicBlock("cond.false");
 4231   llvm::BasicBlock *contBlock = createBasicBlock("cond.end");
 4814       llvm::BasicBlock *Cont = createBasicBlock("cont");
 4815       llvm::BasicBlock *TypeCheck = createBasicBlock("typecheck");
tools/clang/lib/CodeGen/CGExprAgg.cpp
  589     llvm::BasicBlock *entryBB = Builder.GetInsertBlock();
  590     llvm::BasicBlock *bodyBB = CGF.createBasicBlock("arrayinit.body");
  624     llvm::BasicBlock *endBB = CGF.createBasicBlock("arrayinit.end");
 1205   llvm::BasicBlock *LHSBlock = CGF.createBasicBlock("cond.true");
 1206   llvm::BasicBlock *RHSBlock = CGF.createBasicBlock("cond.false");
 1207   llvm::BasicBlock *ContBlock = CGF.createBasicBlock("cond.end");
 1666   llvm::BasicBlock *entryBB = Builder.GetInsertBlock();
 1667   llvm::BasicBlock *bodyBB = CGF.createBasicBlock("arrayinit.body");
 1721   llvm::BasicBlock *endBB = CGF.createBasicBlock("arrayinit.end");
tools/clang/lib/CodeGen/CGExprCXX.cpp
 1207   llvm::BasicBlock *EntryBB = Builder.GetInsertBlock();
 1208   llvm::BasicBlock *LoopBB = createBasicBlock("new.loop");
 1209   llvm::BasicBlock *ContBB = createBasicBlock("new.loop.end");
 1650   llvm::BasicBlock *nullCheckBB = nullptr;
 1651   llvm::BasicBlock *contBB = nullptr;
 1661     llvm::BasicBlock *notNullBB = createBasicBlock("new.notnull");
 1737     llvm::BasicBlock *notNullBB = Builder.GetInsertBlock();
 2019   llvm::BasicBlock *DeleteNotNull = createBasicBlock("delete.notnull");
 2020   llvm::BasicBlock *DeleteEnd = createBasicBlock("delete.end");
 2127     llvm::BasicBlock *BadTypeidBlock =
 2129     llvm::BasicBlock *EndBlock = CGF.createBasicBlock("typeid.end");
 2228   llvm::BasicBlock *CastNull = nullptr;
 2229   llvm::BasicBlock *CastNotNull = nullptr;
 2230   llvm::BasicBlock *CastEnd = createBasicBlock("dynamic_cast.end");
tools/clang/lib/CodeGen/CGExprComplex.cpp
  714       llvm::BasicBlock *ContBB = CGF.createBasicBlock("complex_mul_cont");
  715       llvm::BasicBlock *INaNBB = CGF.createBasicBlock("complex_mul_imag_nan");
  717       llvm::BasicBlock *OrigBB = Branch->getParent();
  727       llvm::BasicBlock *LibCallBB = CGF.createBasicBlock("complex_mul_libcall");
 1016   llvm::BasicBlock *LHSBlock = CGF.createBasicBlock("cond.true");
 1017   llvm::BasicBlock *RHSBlock = CGF.createBasicBlock("cond.false");
 1018   llvm::BasicBlock *ContBlock = CGF.createBasicBlock("cond.end");
tools/clang/lib/CodeGen/CGExprScalar.cpp
 2397     llvm::BasicBlock *startBB = Builder.GetInsertBlock();
 2398     llvm::BasicBlock *opBB = CGF.createBasicBlock("atomic_op", CGF.CurFn);
 2560     llvm::BasicBlock *curBlock = Builder.GetInsertBlock();
 2561     llvm::BasicBlock *contBB = CGF.createBasicBlock("atomic_cont", CGF.CurFn);
 2890     llvm::BasicBlock *startBB = Builder.GetInsertBlock();
 2891     llvm::BasicBlock *opBB = CGF.createBasicBlock("atomic_op", CGF.CurFn);
 2916     llvm::BasicBlock *curBlock = Builder.GetInsertBlock();
 2917     llvm::BasicBlock *contBB = CGF.createBasicBlock("atomic_cont", CGF.CurFn);
 3109   llvm::BasicBlock *initialBB = Builder.GetInsertBlock();
 3110   llvm::BasicBlock *continueBB =
 3112   llvm::BasicBlock *overflowBB = CGF.createBasicBlock("overflow", CGF.CurFn);
 3622       llvm::BasicBlock *Orig = Builder.GetInsertBlock();
 3623       llvm::BasicBlock *Cont = CGF.createBasicBlock("cont");
 3624       llvm::BasicBlock *CheckShiftBase = CGF.createBasicBlock("check");
 4000   llvm::BasicBlock *ContBlock = CGF.createBasicBlock("land.end");
 4001   llvm::BasicBlock *RHSBlock  = CGF.createBasicBlock("land.rhs");
 4084   llvm::BasicBlock *ContBlock = CGF.createBasicBlock("lor.end");
 4085   llvm::BasicBlock *RHSBlock = CGF.createBasicBlock("lor.rhs");
 4250   llvm::BasicBlock *LHSBlock = CGF.createBasicBlock("cond.true");
 4251   llvm::BasicBlock *RHSBlock = CGF.createBasicBlock("cond.false");
 4252   llvm::BasicBlock *ContBlock = CGF.createBasicBlock("cond.end");
tools/clang/lib/CodeGen/CGLoopInfo.cpp
  455 LoopInfo::LoopInfo(BasicBlock *Header, const LoopAttributes &Attrs,
  564 void LoopInfoStack::push(BasicBlock *Header, const llvm::DebugLoc &StartLoc,
  573 void LoopInfoStack::push(BasicBlock *Header, clang::ASTContext &Ctx,
  788     for (BasicBlock *Succ : successors(I))
tools/clang/lib/CodeGen/CGLoopInfo.h
   83   LoopInfo(llvm::BasicBlock *Header, const LoopAttributes &Attrs,
   91   llvm::BasicBlock *getHeader() const { return Header; }
  107   llvm::BasicBlock *Header;
  199   void push(llvm::BasicBlock *Header, const llvm::DebugLoc &StartLoc,
  204   void push(llvm::BasicBlock *Header, clang::ASTContext &Ctx,
tools/clang/lib/CodeGen/CGNonTrivialStruct.cpp
  360     llvm::BasicBlock *PreheaderBB = CGF.Builder.GetInsertBlock();
  363     llvm::BasicBlock *HeaderBB = CGF.createBasicBlock("loop.header");
  373     llvm::BasicBlock *ExitBB = CGF.createBasicBlock("loop.exit");
  374     llvm::BasicBlock *LoopBB = CGF.createBasicBlock("loop.body");
tools/clang/lib/CodeGen/CGObjC.cpp
 1712   llvm::BasicBlock *EmptyBB = createBasicBlock("forcoll.empty");
 1713   llvm::BasicBlock *LoopInitBB = createBasicBlock("forcoll.loopinit");
 1743   llvm::BasicBlock *LoopBodyBB = createBasicBlock("forcoll.loopbody");
 1764   llvm::BasicBlock *WasMutatedBB = createBasicBlock("forcoll.mutated");
 1765   llvm::BasicBlock *WasNotMutatedBB = createBasicBlock("forcoll.notmutated");
 1858   llvm::BasicBlock *FetchMoreBB = createBasicBlock("forcoll.refetch");
 2786     llvm::BasicBlock *BB = invoke->getNormalDest();
tools/clang/lib/CodeGen/CGObjCGNU.cpp
 1528     llvm::BasicBlock *EntryBB =
 1529         llvm::BasicBlock::Create(VMContext, "entry", LoadFunction);
 1640       llvm::IRBuilder<> b(llvm::BasicBlock::Create(CGM.getLLVMContext(), "entry",
 2648   llvm::BasicBlock *startBB = nullptr;
 2649   llvm::BasicBlock *messageBB = nullptr;
 2650   llvm::BasicBlock *continueBB = nullptr;
 3799   llvm::BasicBlock *EntryBB =
 3800       llvm::BasicBlock::Create(VMContext, "entry", LoadFunction);
 3819     llvm::BasicBlock *AliasBB =
 3820       llvm::BasicBlock::Create(VMContext, "alias", LoadFunction);
 3821     llvm::BasicBlock *NoAliasBB =
 3822       llvm::BasicBlock::Create(VMContext, "no_alias", LoadFunction);
tools/clang/lib/CodeGen/CGObjCMac.cpp
 1705   llvm::BasicBlock *NullBB;
 1712     llvm::BasicBlock *callBB = CGF.createBasicBlock("msgSend.call");
 1738     llvm::BasicBlock *contBB = nullptr;
 1741     llvm::BasicBlock *callBB = CGF.Builder.GetInsertBlock();
 4137       llvm::BasicBlock *FinallyCallExit =
 4139       llvm::BasicBlock *FinallyNoCallExit =
 4183     llvm::DenseSet<llvm::BasicBlock*> BlocksBeforeTry;
 4272     llvm::BasicBlock &BB = *FI;
 4276     for (llvm::BasicBlock::iterator
 4315   llvm::BasicBlock &Entry = CGF.CurFn->getEntryBlock();
 4316   for (llvm::BasicBlock::iterator
 4525   llvm::BasicBlock *TryBlock = CGF.createBasicBlock("try");
 4526   llvm::BasicBlock *TryHandler = CGF.createBasicBlock("try.handler");
 4568     llvm::BasicBlock *CatchBlock = nullptr;
 4569     llvm::BasicBlock *CatchHandler = nullptr;
 4660       llvm::BasicBlock *MatchedBlock = CGF.createBasicBlock("match");
 4661       llvm::BasicBlock *NextCatchBlock = CGF.createBasicBlock("catch.next");
tools/clang/lib/CodeGen/CGObjCRuntime.cpp
  121     llvm::BasicBlock *Block;
tools/clang/lib/CodeGen/CGOpenMPRuntime.cpp
  151         llvm::BasicBlock *DoneBB = CGF.createBasicBlock(".untied.done.");
  883   llvm::BasicBlock *BodyBB = CGF.createBasicBlock("omp.arrayinit.body");
  884   llvm::BasicBlock *DoneBB = CGF.createBasicBlock("omp.arrayinit.done");
  890   llvm::BasicBlock *EntryBB = CGF.Builder.GetInsertBlock();
 1705       llvm::BasicBlock *TopBlock = CGF.AllocaInsertPt->getParent();
 3029   llvm::BasicBlock *ThenBlock = CGF.createBasicBlock("omp_if.then");
 3030   llvm::BasicBlock *ElseBlock = CGF.createBasicBlock("omp_if.else");
 3031   llvm::BasicBlock *ContBlock = CGF.createBasicBlock("omp_if.end");
 3167   llvm::BasicBlock *ContBlock = nullptr;
 3180       auto *ThenBlock = CGF.createBasicBlock("omp_if.then");
 3497         llvm::BasicBlock *ExitBB = CGF.createBasicBlock(".cancel.exit");
 3498         llvm::BasicBlock *ContBB = CGF.createBasicBlock(".cancel.continue");
 5487   llvm::BasicBlock *BodyBB = CGF.createBasicBlock("omp.arraycpy.body");
 5488   llvm::BasicBlock *DoneBB = CGF.createBasicBlock("omp.arraycpy.done");
 5494   llvm::BasicBlock *EntryBB = CGF.Builder.GetInsertBlock();
 5801   llvm::BasicBlock *DefaultBB = CGF.createBasicBlock(".omp.reduction.default");
 5811   llvm::BasicBlock *Case1BB = CGF.createBasicBlock(".omp.reduction.case1");
 5851   llvm::BasicBlock *Case2BB = CGF.createBasicBlock(".omp.reduction.case2");
 6405       llvm::BasicBlock *ExitBB = CGF.createBasicBlock(".cancel.exit");
 6406       llvm::BasicBlock *ContBB = CGF.createBasicBlock(".cancel.continue");
 6440       llvm::BasicBlock *ExitBB = CGF.createBasicBlock(".cancel.exit");
 6441       llvm::BasicBlock *ContBB = CGF.createBasicBlock(".cancel.continue");
 8899   llvm::BasicBlock *HeadBB = MapperCGF.createBasicBlock("omp.arraymap.head");
 8907   llvm::BasicBlock *BodyBB = MapperCGF.createBasicBlock("omp.arraymap.body");
 8908   llvm::BasicBlock *DoneBB = MapperCGF.createBasicBlock("omp.done");
 8913   llvm::BasicBlock *EntryBB = MapperCGF.Builder.GetInsertBlock();
 8959     llvm::BasicBlock *MemberBB = MapperCGF.createBasicBlock("omp.member");
 8965     llvm::BasicBlock *MemberCombineBB =
 8967     llvm::BasicBlock *TypeBB = MapperCGF.createBasicBlock("omp.type");
 8998     llvm::BasicBlock *AllocBB = MapperCGF.createBasicBlock("omp.type.alloc");
 8999     llvm::BasicBlock *AllocElseBB =
 9001     llvm::BasicBlock *ToBB = MapperCGF.createBasicBlock("omp.type.to");
 9002     llvm::BasicBlock *ToElseBB = MapperCGF.createBasicBlock("omp.type.to.else");
 9003     llvm::BasicBlock *FromBB = MapperCGF.createBasicBlock("omp.type.from");
 9004     llvm::BasicBlock *EndBB = MapperCGF.createBasicBlock("omp.type.end");
 9062   llvm::BasicBlock *ExitBB = MapperCGF.createBasicBlock("omp.arraymap.exit");
 9090     CharUnits ElementSize, llvm::BasicBlock *ExitBB, bool IsInit) {
 9094   llvm::BasicBlock *IsDeleteBB =
 9096   llvm::BasicBlock *BodyBB = MapperCGF.createBasicBlock("omp.array" + Prefix);
 9284     llvm::BasicBlock *OffloadFailedBlock =
 9286     llvm::BasicBlock *OffloadContBlock =
tools/clang/lib/CodeGen/CGOpenMPRuntime.h
  764                                   llvm::BasicBlock *ExitBB, bool IsInit);
tools/clang/lib/CodeGen/CGOpenMPRuntimeNVPTX.cpp
  123   llvm::BasicBlock *ContBlock = nullptr;
  136       auto *ThenBlock = CGF.createBasicBlock("omp_if.then");
 1204   llvm::BasicBlock *WorkerBB = CGF.createBasicBlock(".worker");
 1205   llvm::BasicBlock *MasterCheckBB = CGF.createBasicBlock(".mastercheck");
 1206   llvm::BasicBlock *MasterBB = CGF.createBasicBlock(".master");
 1252   llvm::BasicBlock *TerminateBB = CGF.createBasicBlock(".termination.notifier");
 1327   llvm::BasicBlock *ExecuteBB = CGF.createBasicBlock(".execute");
 1359   llvm::BasicBlock *OMPDeInitBB = CGF.createBasicBlock(".omp.deinit");
 1414   llvm::BasicBlock *AwaitBB = CGF.createBasicBlock(".await.work");
 1415   llvm::BasicBlock *SelectWorkersBB = CGF.createBasicBlock(".select.workers");
 1416   llvm::BasicBlock *ExecuteBB = CGF.createBasicBlock(".execute.parallel");
 1417   llvm::BasicBlock *TerminateBB = CGF.createBasicBlock(".terminate.parallel");
 1418   llvm::BasicBlock *BarrierBB = CGF.createBasicBlock(".barrier.parallel");
 1419   llvm::BasicBlock *ExitBB = CGF.createBasicBlock(".exit");
 1466     llvm::BasicBlock *ExecuteFNBB = CGF.createBasicBlock(".execute.fn");
 1467     llvm::BasicBlock *CheckNextBB = CGF.createBasicBlock(".check.next");
 2141       llvm::BasicBlock *ExitBB = CGF.createBasicBlock(".exit");
 2142       llvm::BasicBlock *SPMDBB = CGF.createBasicBlock(".spmd");
 2143       llvm::BasicBlock *NonSPMDBB = CGF.createBasicBlock(".non-spmd");
 2413         llvm::BasicBlock *ExitBB = CGF.createBasicBlock(".exit");
 2414         llvm::BasicBlock *NonSPMDBB = CGF.createBasicBlock(".non-spmd");
 2613       llvm::BasicBlock *ExitBB = CGF.createBasicBlock(".exit");
 2614       llvm::BasicBlock *SeqBB = CGF.createBasicBlock(".sequential");
 2615       llvm::BasicBlock *ParallelCheckBB = CGF.createBasicBlock(".parcheck");
 2616       llvm::BasicBlock *MasterBB = CGF.createBasicBlock(".master");
 2747   llvm::BasicBlock *LoopBB = CGF.createBasicBlock("omp.critical.loop");
 2748   llvm::BasicBlock *TestBB = CGF.createBasicBlock("omp.critical.test");
 2749   llvm::BasicBlock *SyncBB = CGF.createBasicBlock("omp.critical.sync");
 2750   llvm::BasicBlock *BodyBB = CGF.createBasicBlock("omp.critical.body");
 2751   llvm::BasicBlock *ExitBB = CGF.createBasicBlock("omp.critical.exit");
 2897       llvm::BasicBlock *PreCondBB = CGF.createBasicBlock(".shuffle.pre_cond");
 2898       llvm::BasicBlock *ThenBB = CGF.createBasicBlock(".shuffle.then");
 2899       llvm::BasicBlock *ExitBB = CGF.createBasicBlock(".shuffle.exit");
 2900       llvm::BasicBlock *CurrentBB = Bld.GetInsertBlock();
 3257       llvm::BasicBlock *PrecondBB = nullptr;
 3258       llvm::BasicBlock *ExitBB = nullptr;
 3265         llvm::BasicBlock *BodyBB = CGF.createBasicBlock("body");
 3279       llvm::BasicBlock *ThenBB = CGF.createBasicBlock("then");
 3280       llvm::BasicBlock *ElseBB = CGF.createBasicBlock("else");
 3281       llvm::BasicBlock *MergeBB = CGF.createBasicBlock("ifcont");
 3331       llvm::BasicBlock *W0ThenBB = CGF.createBasicBlock("then");
 3332       llvm::BasicBlock *W0ElseBB = CGF.createBasicBlock("else");
 3333       llvm::BasicBlock *W0MergeBB = CGF.createBasicBlock("ifcont");
 3570   llvm::BasicBlock *ThenBB = CGF.createBasicBlock("then");
 3571   llvm::BasicBlock *ElseBB = CGF.createBasicBlock("else");
 3572   llvm::BasicBlock *MergeBB = CGF.createBasicBlock("ifcont");
 3596   llvm::BasicBlock *CpyThenBB = CGF.createBasicBlock("then");
 3597   llvm::BasicBlock *CpyElseBB = CGF.createBasicBlock("else");
 3598   llvm::BasicBlock *CpyMergeBB = CGF.createBasicBlock("ifcont");
 4402   llvm::BasicBlock *ExitBB = CGF.createBasicBlock(".omp.reduction.done");
 4403   llvm::BasicBlock *ThenBB = CGF.createBasicBlock(".omp.reduction.then");
tools/clang/lib/CodeGen/CGOpenMPRuntimeNVPTX.h
   40     llvm::BasicBlock *ExitBB = nullptr;
tools/clang/lib/CodeGen/CGStmt.cpp
  109     llvm::BasicBlock *incoming = Builder.GetInsertBlock();
  114     llvm::BasicBlock *outgoing = Builder.GetInsertBlock();
  443 void CodeGenFunction::SimplifyForwardingBlocks(llvm::BasicBlock *BB) {
  465 void CodeGenFunction::EmitBlock(llvm::BasicBlock *BB, bool IsFinished) {
  466   llvm::BasicBlock *CurBB = Builder.GetInsertBlock();
  485 void CodeGenFunction::EmitBranch(llvm::BasicBlock *Target) {
  489   llvm::BasicBlock *CurBB = Builder.GetInsertBlock();
  502 void CodeGenFunction::EmitBlockAfterUses(llvm::BasicBlock *block) {
  620   llvm::BasicBlock *CurBB = Builder.GetInsertBlock();
  623   llvm::BasicBlock *IndGotoBB = GetIndirectGotoBlock();
  669   llvm::BasicBlock *ThenBlock = createBasicBlock("if.then");
  670   llvm::BasicBlock *ContBlock = createBasicBlock("if.end");
  671   llvm::BasicBlock *ElseBlock = ContBlock;
  753   llvm::BasicBlock *LoopBody = createBasicBlock("while.body");
  755     llvm::BasicBlock *ExitBlock = LoopExit.getBlock();
  808   llvm::BasicBlock *LoopBody = createBasicBlock("do.body");
  873   llvm::BasicBlock *CondBlock = Continue.getBlock();
  901     llvm::BasicBlock *ExitBlock = LoopExit.getBlock();
  908     llvm::BasicBlock *ForBody = createBasicBlock("for.body");
  974   llvm::BasicBlock *CondBlock = createBasicBlock("for.cond");
  984   llvm::BasicBlock *ExitBlock = LoopExit.getBlock();
  989   llvm::BasicBlock *ForBody = createBasicBlock("for.body");
 1183   llvm::BasicBlock *CaseDest = createBasicBlock("sw.bb");
 1215   llvm::BasicBlock *RestoreBB = Builder.GetInsertBlock();
 1220   llvm::BasicBlock *FalseDest = CaseRangeBlock;
 1296   llvm::BasicBlock *CaseDest = createBasicBlock("sw.bb");
 1344   llvm::BasicBlock *DefaultBlock = SwitchInsn->getDefaultDest();
 1589   llvm::BasicBlock *SavedCRBlock = CaseRangeBlock;
 1645   llvm::BasicBlock *DefaultBlock = createBasicBlock("sw.default");
 2215   SmallVector<llvm::BasicBlock *, 16> Transfer;
 2216   llvm::BasicBlock *Fallthrough = nullptr;
tools/clang/lib/CodeGen/CGStmtOpenMP.cpp
  655   llvm::BasicBlock *BodyBB = createBasicBlock("omp.arraycpy.body");
  656   llvm::BasicBlock *DoneBB = createBasicBlock("omp.arraycpy.done");
  662   llvm::BasicBlock *EntryBB = Builder.GetInsertBlock();
  908   llvm::BasicBlock *CopyBegin = nullptr, *CopyEnd = nullptr;
 1039   llvm::BasicBlock *ThenBB = nullptr;
 1040   llvm::BasicBlock *DoneBB = nullptr;
 1239   llvm::BasicBlock *DoneBB = nullptr;
 1246           llvm::BasicBlock *ThenBB = CGF.createBasicBlock(".omp.reduction.pu");
 1366     llvm::BasicBlock *NextBB = createBasicBlock("omp.body.next");
 1409   llvm::BasicBlock *ExitBlock = LoopExit.getBlock();
 1413   llvm::BasicBlock *LoopBody = createBasicBlock("omp.inner.for.body");
 1484   llvm::BasicBlock *DoneBB = nullptr;
 1493           llvm::BasicBlock *ThenBB = createBasicBlock(".omp.linear.pu");
 1603                         const Expr *Cond, llvm::BasicBlock *TrueBlock,
 1604                         llvm::BasicBlock *FalseBlock, uint64_t TrueCount) {
 1715   llvm::BasicBlock *DoneBB = nullptr;
 1728           llvm::BasicBlock *ThenBB = createBasicBlock(".omp.final.then");
 1792   llvm::BasicBlock *ContBlock = nullptr;
 1797     llvm::BasicBlock *ThenBlock = CGF.createBasicBlock("simd.if.then");
 1880   llvm::BasicBlock *CondBlock = createBasicBlock("omp.dispatch.cond");
 1904   llvm::BasicBlock *ExitBlock = LoopExit.getBlock();
 1908   llvm::BasicBlock *LoopBody = createBasicBlock("omp.dispatch.body");
 2340     llvm::BasicBlock *ContBlock = nullptr;
 2345       llvm::BasicBlock *ThenBlock = createBasicBlock("omp.precond.then");
 2652       llvm::BasicBlock *ExitBB = CGF.createBasicBlock(".omp.sections.exit");
 2667         llvm::BasicBlock *CaseBB = CGF.createBasicBlock(".omp.sections.case");
 3400     llvm::BasicBlock *ContBlock = nullptr;
 3405       llvm::BasicBlock *ThenBlock = createBasicBlock("omp.precond.then");
 5006     llvm::BasicBlock *ContBlock = nullptr;
 5012       llvm::BasicBlock *ThenBlock = CGF.createBasicBlock("taskloop.if.then");
tools/clang/lib/CodeGen/CGVTables.cpp
   74   llvm::BasicBlock *AdjustNull = nullptr;
   75   llvm::BasicBlock *AdjustNotNull = nullptr;
   76   llvm::BasicBlock *AdjustEnd = nullptr;
  128   for (auto &BB : Fn->getBasicBlockList()) {
  201   llvm::BasicBlock *EntryBB = &Fn->front();
  202   llvm::BasicBlock::iterator ThisStore =
  219     for (llvm::BasicBlock &BB : *Fn) {
tools/clang/lib/CodeGen/CodeGenFunction.cpp
  245   llvm::BasicBlock *CurBB = Builder.GetInsertBlock();
  288 static void EmitIfUsed(CodeGenFunction &CGF, llvm::BasicBlock *BB) {
  830   llvm::BasicBlock *EntryBB = createBasicBlock("entry", CurFn);
 1051 void CodeGenFunction::EmitBlockWithFallThrough(llvm::BasicBlock *BB,
 1053   llvm::BasicBlock *SkipCountBB = nullptr;
 1077   for (llvm::BasicBlock &BB : *F)
 1367                                            llvm::BasicBlock *TrueBlock,
 1368                                            llvm::BasicBlock *FalseBlock,
 1398       llvm::BasicBlock *LHSTrue = createBasicBlock("land.lhs.true");
 1444       llvm::BasicBlock *LHSFalse = createBasicBlock("lor.lhs.false");
 1485     llvm::BasicBlock *LHSBlock = createBasicBlock("cond.true");
 1486     llvm::BasicBlock *RHSBlock = createBasicBlock("cond.false");
 1588   llvm::BasicBlock *originBB = CGF.Builder.GetInsertBlock();
 1589   llvm::BasicBlock *loopBB = CGF.createBasicBlock("vla-init.loop");
 1590   llvm::BasicBlock *contBB = CGF.createBasicBlock("vla-init.cont");
 1696   llvm::BasicBlock *BB = getJumpDestForLabel(L).getBlock();
 1703 llvm::BasicBlock *CodeGenFunction::GetIndirectGotoBlock() {
 2131                                    llvm::BasicBlock *BB,
 2132                                    llvm::BasicBlock::iterator InsertPt) const {
 2139     llvm::Instruction *I, const llvm::Twine &Name, llvm::BasicBlock *BB,
 2140     llvm::BasicBlock::iterator InsertPt) const {
 2298   llvm::BasicBlock *CurBlock = createBasicBlock("resolver_entry", Resolver);
 2315     llvm::BasicBlock *RetBlock = createBasicBlock("resolver_return", Resolver);
tools/clang/lib/CodeGen/CodeGenFunction.h
  153     llvm::BasicBlock *block = cast<llvm::Instruction>(value)->getParent();
  236     JumpDest(llvm::BasicBlock *Block,
  242     llvm::BasicBlock *getBlock() const { return Block; }
  252     llvm::BasicBlock *Block;
  290                     llvm::BasicBlock *BB,
  291                     llvm::BasicBlock::iterator InsertPt) const;
  539   llvm::BasicBlock *EHResumeBlock = nullptr;
  558   llvm::BasicBlock *EmitLandingPad();
  560   llvm::BasicBlock *getInvokeDestImpl();
  964   void ResolveBranchFixups(llvm::BasicBlock *Target);
  969   JumpDest getJumpDestInCurrentScope(llvm::BasicBlock *Target) {
  997   llvm::BasicBlock *getEHResumeBlock(bool isCleanup);
  998   llvm::BasicBlock *getEHDispatchBlock(EHScopeStack::stable_iterator scope);
  999   llvm::BasicBlock *
 1004     llvm::BasicBlock *StartBB;
 1024     llvm::BasicBlock *getStartingBlock() const {
 1035     llvm::BasicBlock *block = OutermostConditional->getStartingBlock();
 1377   llvm::BasicBlock *CaseRangeBlock = nullptr;
 1394   llvm::BasicBlock *UnreachableBlock = nullptr;
 1593   llvm::BasicBlock *TerminateLandingPad = nullptr;
 1594   llvm::BasicBlock *TerminateHandler = nullptr;
 1595   llvm::BasicBlock *TrapBB = nullptr;
 1598   llvm::MapVector<llvm::Value *, llvm::BasicBlock *> TerminateFunclets;
 1644   llvm::BasicBlock *getUnreachableBlock() {
 1652   llvm::BasicBlock *getInvokeDest() {
 1853   void EmitBlockWithFallThrough(llvm::BasicBlock *BB, const Stmt *S);
 2025   llvm::BasicBlock *getTerminateLandingPad();
 2029   llvm::BasicBlock *getTerminateFunclet();
 2034   llvm::BasicBlock *getTerminateHandler();
 2061   llvm::BasicBlock *createBasicBlock(const Twine &name = "",
 2063                                      llvm::BasicBlock *before = nullptr) {
 2064     return llvm::BasicBlock::Create(getLLVMContext(), name, parent, before);
 2074   void SimplifyForwardingBlocks(llvm::BasicBlock *BB);
 2084   void EmitBlock(llvm::BasicBlock *BB, bool IsFinished=false);
 2088   void EmitBlockAfterUses(llvm::BasicBlock *BB);
 2098   void EmitBranch(llvm::BasicBlock *Block);
 2384   llvm::BasicBlock *GetIndirectGotoBlock();
 3971                                 llvm::BasicBlock *InitBlock,
 3972                                 llvm::BasicBlock *NoInitBlock,
 4062   void EmitBranchOnBoolExpr(const Expr *Cond, llvm::BasicBlock *TrueBlock,
 4063                             llvm::BasicBlock *FalseBlock, uint64_t TrueCount);
tools/clang/lib/CodeGen/EHScopeStack.h
   40   llvm::BasicBlock *OptimisticBranchBlock;
   46   llvm::BasicBlock *Destination;
tools/clang/lib/CodeGen/ItaniumCXXABI.cpp
  190                                    llvm::BasicBlock *CastEnd) override;
  591   llvm::BasicBlock *FnVirtual = CGF.createBasicBlock("memptr.virtual");
  592   llvm::BasicBlock *FnNonVirtual = CGF.createBasicBlock("memptr.nonvirtual");
  593   llvm::BasicBlock *FnEnd = CGF.createBasicBlock("memptr.end");
 1400     QualType DestTy, QualType DestRecordTy, llvm::BasicBlock *CastEnd) {
 1428     llvm::BasicBlock *BadCastBlock =
 2312   llvm::BasicBlock *InitCheckBlock = CGF.createBasicBlock("init.check");
 2313   llvm::BasicBlock *EndBlock = CGF.createBasicBlock("init.end");
 2327     llvm::BasicBlock *InitBlock = CGF.createBasicBlock("init");
 2674     llvm::BasicBlock *Entry = llvm::BasicBlock::Create(Context, "", Wrapper);
 2674     llvm::BasicBlock *Entry = llvm::BasicBlock::Create(Context, "", Wrapper);
 2691       llvm::BasicBlock *InitBB = llvm::BasicBlock::Create(Context, "", Wrapper);
 2691       llvm::BasicBlock *InitBB = llvm::BasicBlock::Create(Context, "", Wrapper);
 2692       llvm::BasicBlock *ExitBB = llvm::BasicBlock::Create(Context, "", Wrapper);
 2692       llvm::BasicBlock *ExitBB = llvm::BasicBlock::Create(Context, "", Wrapper);
 4334     llvm::BasicBlock *entry =
 4335         llvm::BasicBlock::Create(CGM.getLLVMContext(), "", fn);
tools/clang/lib/CodeGen/MicrosoftCXXABI.cpp
  147                                    llvm::BasicBlock *CastEnd) override;
  163   llvm::BasicBlock *
  167   llvm::BasicBlock *
  870   llvm::BasicBlock *CatchPadBB = CGF.Builder.GetInsertBlock();
  968     QualType DestTy, QualType DestRecordTy, llvm::BasicBlock *CastEnd) {
 1111 llvm::BasicBlock *
 1120   llvm::BasicBlock *CallVbaseCtorsBB = CGF.createBasicBlock("ctor.init_vbases");
 1121   llvm::BasicBlock *SkipVbaseCtorsBB = CGF.createBasicBlock("ctor.skip_vbases");
 1135 llvm::BasicBlock *
 1143   llvm::BasicBlock *CallVbaseDtorsBB = CGF.createBasicBlock("Dtor.dtor_vbases");
 1144   llvm::BasicBlock *SkipVbaseDtorsBB = CGF.createBasicBlock("Dtor.skip_vbases");
 1591   llvm::BasicBlock *BaseDtorEndBB = nullptr;
 2528     llvm::BasicBlock *InitBlock = CGF.createBasicBlock("init");
 2529     llvm::BasicBlock *EndBlock = CGF.createBasicBlock("init.end");
 2564     llvm::BasicBlock *AttemptInitBlock = CGF.createBasicBlock("init.attempt");
 2565     llvm::BasicBlock *EndBlock = CGF.createBasicBlock("init.end");
 2578     llvm::BasicBlock *InitBlock = CGF.createBasicBlock("init");
 2982   llvm::BasicBlock *OriginalBB = nullptr;
 2983   llvm::BasicBlock *SkipAdjustBB = nullptr;
 2984   llvm::BasicBlock *VBaseAdjustBB = nullptr;
 3123   llvm::BasicBlock *OriginalBB = Builder.GetInsertBlock();
 3124   llvm::BasicBlock *ConvertBB = CGF.createBasicBlock("memptr.convert");
 3125   llvm::BasicBlock *ContinueBB = CGF.createBasicBlock("memptr.converted");
tools/clang/lib/CodeGen/TargetInfo.cpp
  374                             Address Addr1, llvm::BasicBlock *Block1,
  375                             Address Addr2, llvm::BasicBlock *Block2,
 3769   llvm::BasicBlock *InRegBlock = CGF.createBasicBlock("vaarg.in_reg");
 3770   llvm::BasicBlock *InMemBlock = CGF.createBasicBlock("vaarg.in_mem");
 3771   llvm::BasicBlock *ContBlock = CGF.createBasicBlock("vaarg.end");
 4238   llvm::BasicBlock *UsingRegs = CGF.createBasicBlock("using_regs");
 4239   llvm::BasicBlock *UsingOverflow = CGF.createBasicBlock("using_overflow");
 4240   llvm::BasicBlock *Cont = CGF.createBasicBlock("cont");
 5329   llvm::BasicBlock *MaybeRegBlock = CGF.createBasicBlock("vaarg.maybe_reg");
 5330   llvm::BasicBlock *InRegBlock = CGF.createBasicBlock("vaarg.in_reg");
 5331   llvm::BasicBlock *OnStackBlock = CGF.createBasicBlock("vaarg.on_stack");
 5332   llvm::BasicBlock *ContBlock = CGF.createBasicBlock("vaarg.end");
 6763   llvm::BasicBlock *InRegBlock = CGF.createBasicBlock("vaarg.in_reg");
 6764   llvm::BasicBlock *InMemBlock = CGF.createBasicBlock("vaarg.in_mem");
 6765   llvm::BasicBlock *ContBlock = CGF.createBasicBlock("vaarg.end");
 9901   auto *BB = llvm::BasicBlock::Create(C, "entry", F);
 9901   auto *BB = llvm::BasicBlock::Create(C, "entry", F);
 9960   auto *BB = llvm::BasicBlock::Create(C, "entry", F);
 9960   auto *BB = llvm::BasicBlock::Create(C, "entry", F);
tools/clang/tools/clang-offload-wrapper/ClangOffloadWrapper.cpp
  260     IRBuilder<> Builder(BasicBlock::Create(C, "entry", Func));
  281     IRBuilder<> Builder(BasicBlock::Create(C, "entry", Func));
tools/clang/unittests/CodeGen/IRMatchers.h
  415 inline const Instruction *match(const BasicBlock *BB,
  437   const BasicBlock *BB = I->getParent();
tools/clang/unittests/CodeGen/TBAAMetadataTest.cpp
   74   const BasicBlock *compile() {
   94     const BasicBlock &BB = *BBPtr;
  135   const BasicBlock *BB = Compiler.compile();
  231   const BasicBlock *BB = Compiler.compile();
  352   const BasicBlock *BB = Compiler.compile();
  444   const BasicBlock *BB = Compiler.compile();
  537   const BasicBlock *BB = Compiler.compile();
  639   const BasicBlock *BB = Compiler.compile();
  761   const BasicBlock *BB = Compiler.compile();
  861   const BasicBlock *BB = Compiler.compile();
  942   const BasicBlock *BB = Compiler.compile();
 1020   const BasicBlock *BB = Compiler.compile();
 1098   const BasicBlock *BB = Compiler.compile();
 1174   const BasicBlock *BB = Compiler.compile();
 1259   const BasicBlock *BB = Compiler.compile();
tools/lldb/source/Expression/IRInterpreter.cpp
   98   const BasicBlock *m_bb;
   99   const BasicBlock *m_prev_bb;
  100   BasicBlock::const_iterator m_ii;
  101   BasicBlock::const_iterator m_ie;
  127   void Jump(const BasicBlock *bb) {
  509     for (BasicBlock::iterator ii = bbi->begin(), ie = bbi->end(); ii != ie;
tools/lldb/source/Plugins/ExpressionParser/Clang/IRDynamicChecks.cpp
  205   virtual bool InspectBasicBlock(llvm::BasicBlock &bb) {
  206     for (llvm::BasicBlock::iterator ii = bb.begin(), last_ii = bb.end();
tools/lldb/source/Plugins/ExpressionParser/Clang/IRDynamicChecks.h
  122   bool FindDataLoads(llvm::Module &M, llvm::BasicBlock &BB);
tools/lldb/source/Plugins/ExpressionParser/Clang/IRForTarget.cpp
  378     BasicBlock &entry_block(llvm_function.getEntryBlock());
  892 bool IRForTarget::RewriteObjCSelectors(BasicBlock &basic_block) {
 1043 bool IRForTarget::RewriteObjCClassReferences(BasicBlock &basic_block) {
 1139 bool IRForTarget::RewritePersistentAllocs(llvm::BasicBlock &basic_block) {
 1386 bool IRForTarget::RemoveCXAAtExit(BasicBlock &basic_block) {
 1418 bool IRForTarget::ResolveCalls(BasicBlock &basic_block) {
 1509 bool IRForTarget::RemoveGuards(BasicBlock &basic_block) {
 1739   BasicBlock &entry_block(llvm_function.getEntryBlock());
 1919     for (BasicBlock &bb : function) {
 1960     for (llvm::BasicBlock &bb : function) {
 1981     for (BasicBlock &bb : function) {
tools/lldb/source/Plugins/ExpressionParser/Clang/IRForTarget.h
  282   bool RewriteObjCSelectors(llvm::BasicBlock &basic_block);
  304   bool RewriteObjCClassReferences(llvm::BasicBlock &basic_block);
  327   bool RewritePersistentAllocs(llvm::BasicBlock &basic_block);
  379   bool ResolveCalls(llvm::BasicBlock &basic_block);
  390   bool RemoveCXAAtExit(llvm::BasicBlock &basic_block);
  419   bool RemoveGuards(llvm::BasicBlock &basic_block);
tools/lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptx86ABIFixups.cpp
  132     for (auto &block : func.getBasicBlockList())
tools/lli/lli.cpp
  324   BasicBlock *BB = BasicBlock::Create(Context, "__main", Result);
  324   BasicBlock *BB = BasicBlock::Create(Context, "__main", Result);
tools/llvm-diff/DiffConsumer.cpp
   35     for (BasicBlock::iterator BI = FI->begin(), BE = FI->end(); BI != BE; ++BI)
  109     } else if (isa<BasicBlock>(I->L)) {
  110       BasicBlock *L = cast<BasicBlock>(I->L);
  110       BasicBlock *L = cast<BasicBlock>(I->L);
  111       BasicBlock *R = cast<BasicBlock>(I->R);
  111       BasicBlock *R = cast<BasicBlock>(I->R);
tools/llvm-diff/DifferenceEngine.cpp
  120   DenseMap<BasicBlock*, BasicBlock*> Blocks;
  120   DenseMap<BasicBlock*, BasicBlock*> Blocks;
  124   unsigned getUnprocPredCount(BasicBlock *Block) const {
  131   typedef std::pair<BasicBlock*, BasicBlock*> BlockPair;
  131   typedef std::pair<BasicBlock*, BasicBlock*> BlockPair;
  154   bool tryUnify(BasicBlock *L, BasicBlock *R) {
  154   bool tryUnify(BasicBlock *L, BasicBlock *R) {
  155     BasicBlock *&Ref = Blocks[L];
  190   void diff(BasicBlock *L, BasicBlock *R) {
  190   void diff(BasicBlock *L, BasicBlock *R) {
  193     BasicBlock::iterator LI = L->begin(), LE = L->end();
  194     BasicBlock::iterator RI = R->begin();
  223   void runBlockDiff(BasicBlock::iterator LI, BasicBlock::iterator RI);
  223   void runBlockDiff(BasicBlock::iterator LI, BasicBlock::iterator RI);
  336       DenseMap<ConstantInt*,BasicBlock*> LCases;
  342         BasicBlock *LCase = LCases[CaseValue];
  354         for (DenseMap<ConstantInt*,BasicBlock*>::iterator
  475     if (isa<BasicBlock>(L))
  476       return Blocks[cast<BasicBlock>(L)] != R;
  517 void FunctionDifferenceEngine::runBlockDiff(BasicBlock::iterator LStart,
  518                                             BasicBlock::iterator RStart) {
  519   BasicBlock::iterator LE = LStart->getParent()->end();
  520   BasicBlock::iterator RE = RStart->getParent()->end();
  543   for (BasicBlock::iterator RI = RStart; RI != RE; ++RI) {
  550     for (BasicBlock::iterator LI = LStart; LI != LE; ++LI, ++Index) {
  575   BasicBlock::iterator LI = LStart, RI = RStart;
  635     BasicBlock::iterator I = LTerm->getIterator();
  648     BasicBlock::iterator I = RTerm->getIterator();
tools/llvm-extract/llvm-extract.cpp
  255   SmallVector<SmallVector<BasicBlock *, 16>, 4> GroupOfBBs;
  268     SmallVector<BasicBlock *, 16> BBs;
  301       for (auto &BB : *F) {
tools/llvm-reduce/deltas/ReduceBasicBlocks.cpp
   27 static void replaceBranchTerminator(BasicBlock &BB,
   28                                     std::set<BasicBlock *> BBsToKeep) {
   30   std::vector<BasicBlock *> ChunkSucessors;
   66                                              std::set<BasicBlock *> BBsToKeep) {
   86   std::set<BasicBlock *> BBsToKeep;
   89     for (auto &BB : F)
   97   std::vector<BasicBlock *> BBsToDelete;
   99     for (auto &BB : F) {
  103         for (auto *Succ : successors(&BB))
  110     for (auto &BB : F) {
  132     for (auto &BB : F) {
tools/llvm-reduce/deltas/ReduceInstructions.cpp
   26     for (auto &BB : F)
   37     for (auto &BB : F)
   54     for (auto &BB : F)
tools/llvm-reduce/deltas/ReduceMetadata.cpp
   66     for (auto &BB : F)
   77     for (auto &BB : F)
  125     for (auto &BB : F)
tools/llvm-stress/llvm-stress.cpp
  182   Modifier(BasicBlock *Block, PieceTable *PT, Random *R)
  327   BasicBlock *BB;
  340   LoadModifier(BasicBlock *BB, PieceTable *PT, Random *R)
  352   StoreModifier(BasicBlock *BB, PieceTable *PT, Random *R)
  372   BinModifier(BasicBlock *BB, PieceTable *PT, Random *R)
  416   ConstModifier(BasicBlock *BB, PieceTable *PT, Random *R)
  467   AllocaModifier(BasicBlock *BB, PieceTable *PT, Random *R)
  479   ExtractElementModifier(BasicBlock *BB, PieceTable *PT, Random *R)
  493   ShuffModifier(BasicBlock *BB, PieceTable *PT, Random *R)
  521   InsertElementModifier(BasicBlock *BB, PieceTable *PT, Random *R)
  537   CastModifier(BasicBlock *BB, PieceTable *PT, Random *R)
  617   SelectModifier(BasicBlock *BB, PieceTable *PT, Random *R)
  641   CmpModifier(BasicBlock *BB, PieceTable *PT, Random *R)
  673   BasicBlock *BB = BasicBlock::Create(F->getContext(), "BB", F);
  673   BasicBlock *BB = BasicBlock::Create(F->getContext(), "BB", F);
  717     BasicBlock *Curr = Instr->getParent();
  718     BasicBlock::iterator Loc = Instr->getIterator();
  719     BasicBlock *Next = Curr->splitBasicBlock(Loc, "CF");
tools/opt/Debugify.cpp
   54 Instruction *findTerminatingInstruction(BasicBlock &BB) {
  105     for (BasicBlock &BB : F) {
  121       BasicBlock::iterator InsertPt = BB.getFirstInsertionPt();
tools/opt/PassPrinters.cpp
  214   bool runOnBasicBlock(BasicBlock &BB) override {
tools/opt/PrintSCC.cpp
   77     const std::vector<BasicBlock *> &nextSCC = *SCCI;
   79     for (std::vector<BasicBlock*>::const_iterator I = nextSCC.begin(),
tools/polly/include/polly/CodeGen/BlockGenerators.h
  141   BasicBlock *EntryBB;
  271   BasicBlock *StartBlock;
  274   BasicBlock *splitBB(BasicBlock *BB);
  274   BasicBlock *splitBB(BasicBlock *BB);
  289   BasicBlock *copyBB(ScopStmt &Stmt, BasicBlock *BB, ValueMapT &BBMap,
  289   BasicBlock *copyBB(ScopStmt &Stmt, BasicBlock *BB, ValueMapT &BBMap,
  304   void copyBB(ScopStmt &Stmt, BasicBlock *BB, BasicBlock *BBCopy,
  304   void copyBB(ScopStmt &Stmt, BasicBlock *BB, BasicBlock *BBCopy,
  584   void removeDeadInstructions(BasicBlock *BB, ValueMapT &BBMap);
  806   DenseMap<BasicBlock *, BasicBlock *> StartBlockMap;
  806   DenseMap<BasicBlock *, BasicBlock *> StartBlockMap;
  810   DenseMap<BasicBlock *, BasicBlock *> EndBlockMap;
  810   DenseMap<BasicBlock *, BasicBlock *> EndBlockMap;
  815   DenseMap<BasicBlock *, ValueMapT> RegionMaps;
  819   DenseMap<BasicBlock *, SmallVector<PHINodePairTy, 4>> IncompletePHINodeMap;
  824   BasicBlock *repairDominance(BasicBlock *BB, BasicBlock *BBCopy);
  824   BasicBlock *repairDominance(BasicBlock *BB, BasicBlock *BBCopy);
  824   BasicBlock *repairDominance(BasicBlock *BB, BasicBlock *BBCopy);
  906                        BasicBlock *IncomingBB, LoopToScevMapT &LTS);
tools/polly/include/polly/CodeGen/CodeGeneration.h
   29 void markBlockUnreachable(BasicBlock &Block, PollyIRBuilder &Builder);
tools/polly/include/polly/CodeGen/IRBuilder.h
  141                     llvm::BasicBlock *BB,
  142                     llvm::BasicBlock::iterator InsertPt) const {
  159 static inline PollyIRBuilder createPollyIRBuilder(llvm::BasicBlock *BB,
tools/polly/include/polly/CodeGen/IslExprBuilder.h
  125                  llvm::LoopInfo &LI, llvm::BasicBlock *StartBlock);
  208   llvm::BasicBlock *StartBlock;
tools/polly/include/polly/CodeGen/IslNodeBuilder.h
   70                  DominatorTree &DT, Scop &S, BasicBlock *StartBlock)
  157   BasicBlock *StartBlock;
tools/polly/include/polly/CodeGen/LoopGenerators.h
   67                   BasicBlock *&ExitBlock, ICmpInst::Predicate Predicate,
  142                             BasicBlock::iterator *LoopBody);
tools/polly/include/polly/CodeGen/Utils.h
   31 using BBPair = std::pair<llvm::BasicBlock *, llvm::BasicBlock *>;
   31 using BBPair = std::pair<llvm::BasicBlock *, llvm::BasicBlock *>;
tools/polly/include/polly/ScopBuilder.h
  141                     DenseMap<BasicBlock *, isl::set> &InvalidDomainMap);
  152       Region *R, DenseMap<BasicBlock *, isl::set> &InvalidDomainMap);
  159   bool buildConditionSets(BasicBlock *BB, Instruction *TI, Loop *L,
  161                           DenseMap<BasicBlock *, isl::set> &InvalidDomainMap,
  172   bool buildConditionSets(BasicBlock *BB, Value *Condition, Instruction *TI,
  174                           DenseMap<BasicBlock *, isl::set> &InvalidDomainMap,
  182   bool buildConditionSets(BasicBlock *BB, SwitchInst *SI, Loop *L,
  184                           DenseMap<BasicBlock *, isl::set> &InvalidDomainMap,
  196       BasicBlock *BB, Value *Condition, __isl_keep isl_set *Domain,
  198       DenseMap<BasicBlock *, isl::set> &InvalidDomainMap,
  210       Region *R, DenseMap<BasicBlock *, isl::set> &InvalidDomainMap);
  236       BasicBlock *BB, Loop *BBLoop,
  237       SmallPtrSetImpl<BasicBlock *> &FinishedExitBlocks,
  238       DenseMap<BasicBlock *, isl::set> &InvalidDomainMap);
  253       Region *R, DenseMap<BasicBlock *, isl::set> &InvalidDomainMap);
  265   isl::set getPredecessorDomainConstraints(BasicBlock *BB, isl::set Domain);
  275       Loop *L, DenseMap<BasicBlock *, isl::set> &InvalidDomainMap);
  289   getPwAff(BasicBlock *BB, DenseMap<BasicBlock *, isl::set> &InvalidDomainMap,
  289   getPwAff(BasicBlock *BB, DenseMap<BasicBlock *, isl::set> &InvalidDomainMap,
  502   void buildSequentialBlockStmts(BasicBlock *BB, bool SplitOnStore = false);
  508   void buildEqivClassBlockStmts(BasicBlock *BB);
  524   void buildAccessFunctions(ScopStmt *Stmt, BasicBlock &BB,
  605                       BasicBlock *IncomingBlock, Value *IncomingValue,
  613                           DenseMap<BasicBlock *, isl::set> &InvalidDomainMap);
tools/polly/include/polly/ScopDetection.h
  419   bool isValidSwitch(BasicBlock &BB, SwitchInst *SI, Value *Condition,
  431   bool isValidBranch(BasicBlock &BB, BranchInst *BI, Value *Condition,
  459   bool isValidCFG(BasicBlock &BB, bool IsLoopBranch, bool AllowUnreachable,
tools/polly/include/polly/ScopDetectionDiagnostic.h
   42 using BBPair = std::pair<BasicBlock *, BasicBlock *>;
   42 using BBPair = std::pair<BasicBlock *, BasicBlock *>;
  199   BasicBlock *BB;
  202   ReportInvalidTerminator(BasicBlock *BB)
  247   BasicBlock *BB;
  251   ReportUnreachableInExit(BasicBlock *BB, DebugLoc DbgLoc)
  298   BasicBlock *BB;
  301   ReportUndefCond(const Instruction *Inst, BasicBlock *BB)
  323   BasicBlock *BB;
  326   ReportInvalidCond(const Instruction *Inst, BasicBlock *BB)
  346   BasicBlock *BB;
  349   ReportUndefOperand(BasicBlock *BB, const Instruction *Inst)
  369   BasicBlock *BB;
  378   ReportNonAffBranch(BasicBlock *BB, const SCEV *LHS, const SCEV *RHS,
  787   BasicBlock *BB;
  790   ReportEntry(BasicBlock *BB);
tools/polly/include/polly/ScopInfo.h
  575   SmallVector<std::pair<BasicBlock *, Value *>, 4> Incoming;
  746   void addIncoming(BasicBlock *IncomingBlock, Value *IncomingValue) {
  758   ArrayRef<std::pair<BasicBlock *, Value *>> getIncoming() const {
 1158   ScopStmt(Scop &parent, BasicBlock &bb, StringRef Name, Loop *SurroundingLoop,
 1261   BasicBlock *BB = nullptr;
 1331   BasicBlock *getBasicBlock() const { return BB; }
 1352   BasicBlock *getEntryBlock() const;
 1364   bool represents(BasicBlock *BB) const {
 1642   BasicBlock *BB;
 1653 bool buildConditionSets(Scop &S, BasicBlock *BB, Value *Condition,
 1655                         DenseMap<BasicBlock *, isl::set> &InvalidDomainMap,
 1667 buildUnsignedConditionSets(Scop &S, BasicBlock *BB, Value *Condition,
 1670                            DenseMap<BasicBlock *, isl::set> &InvalidDomainMap,
 1678 bool buildConditionSets(Scop &S, BasicBlock *BB, Instruction *TI, Loop *L,
 1680                         DenseMap<BasicBlock *, isl::set> &InvalidDomainMap,
 1787   DenseMap<BasicBlock *, std::vector<ScopStmt *>> StmtMap;
 1793   DenseMap<BasicBlock *, isl::set> DomainMap;
 1983   void addScopStmt(BasicBlock *BB, StringRef Name, Loop *SurroundingLoop,
 2199   bool contains(const BasicBlock *BB) const { return R.contains(BB); }
 2205   BasicBlock *getExit() const { return R.getExit(); }
 2208   BasicBlock *getExitingBlock() const { return R.getExitingBlock(); }
 2211   BasicBlock *getEntry() const { return R.getEntry(); }
 2214   BasicBlock *getEnteringBlock() const { return R.getEnteringBlock(); }
 2217   bool isExit(BasicBlock *BB) const { return getExit() == BB; }
 2223   bool isDominatedBy(const DominatorTree &DT, BasicBlock *BB) const;
 2327                        AssumptionSign Sign, BasicBlock *BB);
 2348                      AssumptionSign Sign, BasicBlock *BB);
 2366                         AssumptionSign Sign, BasicBlock *BB = nullptr);
 2378   void invalidate(AssumptionKind Kind, DebugLoc Loc, BasicBlock *BB = nullptr);
 2409   ArrayRef<ScopStmt *> getStmtListFor(BasicBlock *BB) const;
 2422   ScopStmt *getLastStmtFor(BasicBlock *BB) const;
 2591   PWACtx getPwAff(const SCEV *E, BasicBlock *BB = nullptr,
 2598   isl::pw_aff getPwAffOnly(const SCEV *E, BasicBlock *BB = nullptr);
 2611   isl::set getDomainConditions(BasicBlock *BB) const;
 2614   isl::set &getOrInitEmptyDomain(BasicBlock *BB) { return DomainMap[BB]; }
 2617   bool isDomainDefined(BasicBlock *BB) const { return DomainMap.count(BB) > 0; }
 2620   void setDomain(BasicBlock *BB, isl::set &Domain) { DomainMap[BB] = Domain; }
tools/polly/include/polly/Support/SCEVAffinator.h
   39   PWACtx getPwAff(const llvm::SCEV *E, llvm::BasicBlock *BB = nullptr);
   55   using CacheKey = std::pair<const llvm::SCEV *, llvm::BasicBlock *>;
   65   llvm::BasicBlock *BB;
tools/polly/include/polly/Support/ScopHelper.h
  316 void splitEntryBlockForAlloca(llvm::BasicBlock *EntryBlock, llvm::Pass *P);
  324 void splitEntryBlockForAlloca(llvm::BasicBlock *EntryBlock,
  351                            llvm::BasicBlock *RTCBB);
  371 bool isErrorBlock(llvm::BasicBlock &BB, const llvm::Region &R,
  445 llvm::BasicBlock *getUseBlock(const llvm::Use &U);
  479 llvm::Loop *getFirstNonBoxedLoopFor(llvm::BasicBlock *BB, llvm::LoopInfo &LI,
tools/polly/lib/Analysis/ScopBuilder.cpp
  162 static inline BasicBlock *getRegionNodeBasicBlock(RegionNode *RN) {
  164                            : RN->getNodeAs<BasicBlock>();
  168 static inline BasicBlock *
  180     return isErrorBlock(*RN->getNodeAs<BasicBlock>(), R, LI, DT);
  181   for (BasicBlock *BB : RN->getNodeAs<Region>()->blocks())
  344 ScopBuilder::getPwAff(BasicBlock *BB,
  345                       DenseMap<BasicBlock *, isl::set> &InvalidDomainMap,
  361     BasicBlock *BB, Value *Condition, __isl_keep isl_set *Domain,
  363     DenseMap<BasicBlock *, isl::set> &InvalidDomainMap,
  391     BasicBlock *BB, SwitchInst *SI, Loop *L, __isl_keep isl_set *Domain,
  392     DenseMap<BasicBlock *, isl::set> &InvalidDomainMap,
  428     BasicBlock *BB, Value *Condition, Instruction *TI, Loop *L,
  430     DenseMap<BasicBlock *, isl::set> &InvalidDomainMap,
  562     BasicBlock *BB, Instruction *TI, Loop *L, __isl_keep isl_set *Domain,
  563     DenseMap<BasicBlock *, isl::set> &InvalidDomainMap,
  584     Region *R, DenseMap<BasicBlock *, isl::set> &InvalidDomainMap) {
  607     BasicBlock *BB = getRegionNodeBasicBlock(RN);
  626     BasicBlock *BB, Loop *BBLoop,
  627     SmallPtrSetImpl<BasicBlock *> &FinishedExitBlocks,
  628     DenseMap<BasicBlock *, isl::set> &InvalidDomainMap) {
  633   auto *ExitBB = BBReg ? BBReg->getExit() : nullptr;
  641     SmallVector<BasicBlock *, 4> LatchBBs;
  643     for (auto *LatchBB : LatchBBs)
  669 isl::set ScopBuilder::getPredecessorDomainConstraints(BasicBlock *BB,
  688   for (auto *PredBB : predecessors(BB)) {
  724     Loop *L, DenseMap<BasicBlock *, isl::set> &InvalidDomainMap) {
  728   BasicBlock *HeaderBB = L->getHeader();
  737   SmallVector<BasicBlock *, 4> LatchBlocks;
  740   for (BasicBlock *LatchBB : LatchBlocks) {
  826     Region *R, DenseMap<BasicBlock *, isl::set> &InvalidDomainMap) {
  828   auto *EntryBB = R->getEntry();
  866     Region *R, DenseMap<BasicBlock *, isl::set> &InvalidDomainMap) {
  878   SmallPtrSet<BasicBlock *, 8> FinishedExitBlocks;
  896     BasicBlock *BB = getRegionNodeBasicBlock(RN);
  943       BasicBlock *SuccBB = getRegionNodeSuccessor(RN, TI, u);
  994     Region *R, DenseMap<BasicBlock *, isl::set> &InvalidDomainMap) {
 1009     BasicBlock *BB = getRegionNodeBasicBlock(RN);
 1037       auto *SuccBB = getRegionNodeSuccessor(RN, TI, u);
 1096     BasicBlock *OpBB = PHI->getIncomingBlock(u);
 1525     AssumptionCache &AC, DenseMap<BasicBlock *, isl::set> &InvalidDomainMap) {
 1558     BasicBlock *BB = InScop ? CI->getParent() : R.getEntry();
 1910     for (BasicBlock *BB : R->blocks())
 1918   for (BasicBlock *BB : scop->getRegion().blocks()) {
 1937 static std::string makeStmtName(BasicBlock *BB, long BBIdx, int Count,
 1962 void ScopBuilder::buildSequentialBlockStmts(BasicBlock *BB, bool SplitOnStore) {
 2093 void ScopBuilder::buildEqivClassBlockStmts(BasicBlock *BB) {
 2195       BasicBlock *BB = I->getNodeAs<BasicBlock>();
 2195       BasicBlock *BB = I->getNodeAs<BasicBlock>();
 2210 void ScopBuilder::buildAccessFunctions(ScopStmt *Stmt, BasicBlock &BB,
 2582                                  BasicBlock *IncomingBlock,
 2633   BasicBlock *BB = Stmt.getEntryBlock();
 2863   BasicBlock *BB = Stmt.getEntryBlock();
 3550   for (auto *BB : S->getRegion().blocks()) {
 3608   for (BasicBlock *BB : scop->getRegion().blocks()) {
 3662   DenseMap<BasicBlock *, isl::set> InvalidDomainMap;
tools/polly/lib/Analysis/ScopDetection.cpp
  441   for (BasicBlock *BB : AR->blocks()) {
  532 bool ScopDetection::isValidSwitch(BasicBlock &BB, SwitchInst *SI,
  556 bool ScopDetection::isValidBranch(BasicBlock &BB, BranchInst *BI,
  636 bool ScopDetection::isValidCFG(BasicBlock &BB, bool IsLoopBranch,
 1253   SmallVector<BasicBlock *, 4> ExitingBlocks;
 1262   SmallVector<BasicBlock *, 4> LoopControlBlocks;
 1265   for (BasicBlock *ControlBB : LoopControlBlocks) {
 1311   SmallVector<BasicBlock *, 4> ExitBlocks;
 1313   BasicBlock *TheExitBlock = ExitBlocks[0];
 1314   for (BasicBlock *ExitBB : ExitBlocks) {
 1445   for (const BasicBlock *BB : R.blocks())
 1525   for (const BasicBlock *BB : CurRegion.blocks()) {
 1532         SmallVector<BasicBlock *, 1> Latches;
 1534         for (BasicBlock *Latch : Latches)
 1542   for (BasicBlock *BB : CurRegion.blocks()) {
 1554     for (BasicBlock::iterator I = BB->begin(), E = --BB->end(); I != E; ++I)
 1572   for (auto *BB : Context.CurRegion.blocks())
 1583   for (auto *BB : Context.CurRegion.blocks()) {
 1590     for (auto *LBB : L->blocks()) {
 1716   BasicBlock *REntry = R.getEntry();
 1717   BasicBlock *RExit = R.getExit();
 1719   DenseMap<const BasicBlock *, Color> BBColorMap;
 1721   std::stack<std::pair<BasicBlock *, unsigned>> DFSStack;
 1724   BasicBlock *CurrBB, *SuccBB;
 1728   for (auto *BB : R.blocks())
tools/polly/lib/Analysis/ScopDetectionDiagnostic.cpp
  113   SmallPtrSet<BasicBlock *, 32> Seen;
  114   SmallVector<BasicBlock *, 32> Todo;
  117     auto *BB = Todo.pop_back_val();
  749 ReportEntry::ReportEntry(BasicBlock *BB)
  791   for (const BasicBlock *BB : R->blocks())
tools/polly/lib/Analysis/ScopGraphPrinter.cpp
   68       BasicBlock *BB = Node->getNodeAs<BasicBlock>();
   68       BasicBlock *BB = Node->getNodeAs<BasicBlock>();
  101     BasicBlock *srcBB = srcNode->getNodeAs<BasicBlock>();
  101     BasicBlock *srcBB = srcNode->getNodeAs<BasicBlock>();
  102     BasicBlock *destBB = destNode->getNodeAs<BasicBlock>();
  102     BasicBlock *destBB = destNode->getNodeAs<BasicBlock>();
tools/polly/lib/Analysis/ScopInfo.cpp
  474   auto *BB = getStatement()->getEntryBlock();
 1195 ScopStmt::ScopStmt(Scop &parent, BasicBlock &bb, StringRef Name,
 1236 BasicBlock *ScopStmt::getEntryBlock() const {
 1544 bool Scop::isDominatedBy(const DominatorTree &DT, BasicBlock *BB) const {
 1674 isl::set Scop::getDomainConditions(BasicBlock *BB) const {
 1717     for (BasicBlock *BB : Stmt.getRegion()->blocks()) {
 2043                            AssumptionSign Sign, BasicBlock *BB) {
 2106                          AssumptionSign Sign, BasicBlock *BB) {
 2120                             AssumptionSign Sign, BasicBlock *BB) {
 2126 void Scop::invalidate(AssumptionKind Kind, DebugLoc Loc, BasicBlock *BB) {
 2242 __isl_give PWACtx Scop::getPwAff(const SCEV *E, BasicBlock *BB,
 2276 isl::pw_aff Scop::getPwAffOnly(const SCEV *E, BasicBlock *BB) {
 2369 void Scop::addScopStmt(BasicBlock *BB, StringRef Name, Loop *SurroundingLoop,
 2394   for (BasicBlock *BB : R->blocks()) {
 2421 ArrayRef<ScopStmt *> Scop::getStmtListFor(BasicBlock *BB) const {
 2430   BasicBlock *IncomingBB = PHI->getIncomingBlock(U);
 2445 ScopStmt *Scop::getLastStmtFor(BasicBlock *BB) const {
 2455   return getStmtListFor(RN->getNodeAs<BasicBlock>());
 2552     BasicBlock *UserBB = getUseBlock(Use);
tools/polly/lib/CodeGen/BlockGenerators.cpp
  307   auto *StmtBB = Stmt.getEntryBlock();
  398 void BlockGenerator::removeDeadInstructions(BasicBlock *BB, ValueMapT &BBMap) {
  423   BasicBlock *BB = Stmt.getBasicBlock();
  428 BasicBlock *BlockGenerator::splitBB(BasicBlock *BB) {
  428 BasicBlock *BlockGenerator::splitBB(BasicBlock *BB) {
  429   BasicBlock *CopyBB = SplitBlock(Builder.GetInsertBlock(),
  435 BasicBlock *BlockGenerator::copyBB(ScopStmt &Stmt, BasicBlock *BB,
  435 BasicBlock *BlockGenerator::copyBB(ScopStmt &Stmt, BasicBlock *BB,
  438   BasicBlock *CopyBB = splitBB(BB);
  451 void BlockGenerator::copyBB(ScopStmt &Stmt, BasicBlock *BB, BasicBlock *CopyBB,
  451 void BlockGenerator::copyBB(ScopStmt &Stmt, BasicBlock *BB, BasicBlock *CopyBB,
  630   BasicBlock *HeadBlock = Builder.GetInsertBlock();
  637   BasicBlock *ThenBlock = Branch->getSuccessor(0);
  638   BasicBlock *TailBlock = Branch->getSuccessor(1);
  812   BasicBlock *ExitBB = S.getExit();
  813   BasicBlock *PreEntryBB = S.getEnteringBlock();
  861   BasicBlock *ExitBB = S.getExitingBlock();
  863   BasicBlock *MergeBB = S.getExit();
  866   BasicBlock *OptExitBB = *(pred_begin(MergeBB));
  933   auto *ExitBB = S.getExitingBlock();
  934   auto *MergeBB = S.getExit();
  935   auto *AfterMergeBB = MergeBB->getSingleSuccessor();
  936   BasicBlock *OptExitBB = *(pred_begin(MergeBB));
  984       for (auto *BB : Stmt.getRegion()->blocks())
 1369   BasicBlock *BB = Stmt.getBasicBlock();
 1370   BasicBlock *CopyBB = SplitBlock(Builder.GetInsertBlock(),
 1400 BasicBlock *RegionGenerator::repairDominance(BasicBlock *BB,
 1400 BasicBlock *RegionGenerator::repairDominance(BasicBlock *BB,
 1401                                              BasicBlock *BBCopy) {
 1403   BasicBlock *BBIDom = DT.getNode(BB)->getIDom()->getBlock();
 1404   BasicBlock *BBCopyIDom = EndBlockMap.lookup(BBIDom);
 1421                                       BasicBlock *BB) {
 1436 static BasicBlock *findExitDominator(DominatorTree &DT, Region *R) {
 1437   BasicBlock *Common = nullptr;
 1475   BasicBlock *EntryBB = R->getEntry();
 1476   BasicBlock *EntryBBCopy = SplitBlock(Builder.GetInsertBlock(),
 1492   std::deque<BasicBlock *> Blocks;
 1493   SmallSetVector<BasicBlock *, 8> SeenBlocks;
 1498     BasicBlock *BB = Blocks.front();
 1502     BasicBlock *BBCopy = splitBB(BB);
 1503     BasicBlock *BBCopyIDom = repairDominance(BB, BBCopy);
 1542   BasicBlock *ExitBBCopy = SplitBlock(Builder.GetInsertBlock(),
 1548   BasicBlock *ExitDomBBCopy = EndBlockMap.lookup(findExitDominator(DT, R));
 1556   for (BasicBlock *BB : SeenBlocks) {
 1558     BasicBlock *BBCopyStart = StartBlockMap[BB];
 1559     BasicBlock *BBCopyEnd = EndBlockMap[BB];
 1580   for (BasicBlock *BB : SeenBlocks) {
 1585     BasicBlock *BBCopy = StartBlockMap[BB];
 1594     for (auto *PredBB : make_range(pred_begin(BB), pred_end(BB))) {
 1603     for (auto *PredBBCopy : make_range(pred_begin(BBCopy), pred_end(BBCopy)))
 1629   BasicBlock *NewSubregionExit = Builder.GetInsertBlock();
 1634     BasicBlock *FormerExit = SubR->getExitingBlock();
 1645     BasicBlock *OrigIncomingBlock = Pair.first;
 1646     BasicBlock *NewIncomingBlockStart = StartBlockMap.lookup(OrigIncomingBlock);
 1647     BasicBlock *NewIncomingBlockEnd = EndBlockMap.lookup(OrigIncomingBlock);
 1738                                       PHINode *PHICopy, BasicBlock *IncomingBB,
 1742   BasicBlock *BBCopyStart = StartBlockMap[IncomingBB];
 1743   BasicBlock *BBCopyEnd = EndBlockMap[IncomingBB];
 1794   for (BasicBlock *IncomingBB : PHI->blocks())
tools/polly/lib/CodeGen/CodeGeneration.cpp
   77 void markBlockUnreachable(BasicBlock &Block, PollyIRBuilder &Builder) {
  107   for (BasicBlock &BB : F) {
  144   for (auto *BB : R->blocks()) {
  207   BasicBlock *EnteringBB = S.getEnteringBlock();
  219   BasicBlock *StartBlock = std::get<0>(StartExitBlocks);
  220   BasicBlock *ExitBlock = std::get<1>(StartExitBlocks);
  223   auto *SplitBlock = StartBlock->getSinglePredecessor();
  237     BasicBlock *MergeBlock = ExitBlock->getUniqueSuccessor();
  256     auto *ExitingBlock = StartBlock->getUniqueSuccessor();
  258     auto *MergeBlock = ExitingBlock->getUniqueSuccessor();
  262     auto *ExitingBB = S.getExitingBlock();
tools/polly/lib/CodeGen/IRBuilder.cpp
  104   BasicBlock *Header = L->getHeader();
tools/polly/lib/CodeGen/IslExprBuilder.cpp
   43                                BasicBlock *StartBlock)
  608   BasicBlock *CondBB = BasicBlock::Create(Context, "polly.cond", F);
  608   BasicBlock *CondBB = BasicBlock::Create(Context, "polly.cond", F);
tools/polly/lib/CodeGen/IslNodeBuilder.cpp
  209                                  const ScopStmt *Stmt, BasicBlock *BB) {
  235     for (BasicBlock *BB : Stmt->getRegion()->blocks())
  517   BasicBlock *ExitBlock;
  605   std::vector<BasicBlock *> Nodes;
  613   for (BasicBlock *BB : Nodes)
  629   BasicBlock *ParBB = SplitBlock(Builder.GetInsertBlock(),
  663   BasicBlock::iterator LoopBody;
  695   BasicBlock::iterator AfterLoop = Builder.GetInsertPoint();
  789   BasicBlock *CondBB = SplitBlock(Builder.GetInsertBlock(),
  792   BasicBlock *MergeBB = SplitBlock(CondBB, &CondBB->front(), &DT, &LI);
  794   BasicBlock *ThenBB = BasicBlock::Create(Context, "polly.then", F);
  794   BasicBlock *ThenBB = BasicBlock::Create(Context, "polly.then", F);
  795   BasicBlock *ElseBB = BasicBlock::Create(Context, "polly.else", F);
  795   BasicBlock *ElseBB = BasicBlock::Create(Context, "polly.else", F);
 1275   BasicBlock *CondBB = SplitBlock(Builder.GetInsertBlock(),
 1279   BasicBlock *MergeBB = SplitBlock(CondBB, &CondBB->front(), &DT, &LI);
 1284   BasicBlock *ExecBB = BasicBlock::Create(Context, "polly.preload.exec", F);
 1284   BasicBlock *ExecBB = BasicBlock::Create(Context, "polly.preload.exec", F);
 1397   BasicBlock *EntryBB = &Builder.GetInsertBlock()->getParent()->getEntryBlock();
 1512   BasicBlock *PreLoadBB = SplitBlock(Builder.GetInsertBlock(),
tools/polly/lib/CodeGen/LoopGenerators.cpp
   84                          DominatorTree &DT, BasicBlock *&ExitBB,
   95   BasicBlock *BeforeBB = Builder.GetInsertBlock();
   96   BasicBlock *GuardBB =
   97       UseGuard ? BasicBlock::Create(Context, "polly.loop_if", F) : nullptr;
   98   BasicBlock *HeaderBB = BasicBlock::Create(Context, "polly.loop_header", F);
   98   BasicBlock *HeaderBB = BasicBlock::Create(Context, "polly.loop_header", F);
   99   BasicBlock *PreHeaderBB =
  100       BasicBlock::Create(Context, "polly.loop_preheader", F);
  177     ValueMapT &Map, BasicBlock::iterator *LoopBody) {
  180   BasicBlock::iterator BeforeLoop = Builder.GetInsertPoint();
  229   BasicBlock &EntryBB = Builder.GetInsertBlock()->getParent()->getEntryBlock();
tools/polly/lib/CodeGen/LoopGeneratorsGOMP.cpp
  110   BasicBlock *PrevBB = Builder.GetInsertBlock();
  113   BasicBlock *HeaderBB = BasicBlock::Create(Context, "polly.par.setup", SubFn);
  113   BasicBlock *HeaderBB = BasicBlock::Create(Context, "polly.par.setup", SubFn);
  114   BasicBlock *ExitBB = BasicBlock::Create(Context, "polly.par.exit", SubFn);
  114   BasicBlock *ExitBB = BasicBlock::Create(Context, "polly.par.exit", SubFn);
  115   BasicBlock *CheckNextBB =
  116       BasicBlock::Create(Context, "polly.par.checkNext", SubFn);
  117   BasicBlock *PreHeaderBB =
  118       BasicBlock::Create(Context, "polly.par.loadIVBounds", SubFn);
  155   BasicBlock *AfterBB;
  160   BasicBlock::iterator LoopBody = Builder.GetInsertPoint();
tools/polly/lib/CodeGen/LoopGeneratorsKMP.cpp
  134   BasicBlock *PrevBB = Builder.GetInsertBlock();
  137   BasicBlock *HeaderBB = BasicBlock::Create(Context, "polly.par.setup", SubFn);
  137   BasicBlock *HeaderBB = BasicBlock::Create(Context, "polly.par.setup", SubFn);
  138   BasicBlock *ExitBB = BasicBlock::Create(Context, "polly.par.exit", SubFn);
  138   BasicBlock *ExitBB = BasicBlock::Create(Context, "polly.par.exit", SubFn);
  139   BasicBlock *CheckNextBB =
  140       BasicBlock::Create(Context, "polly.par.checkNext", SubFn);
  141   BasicBlock *PreHeaderBB =
  142       BasicBlock::Create(Context, "polly.par.loadIVBounds", SubFn);
  253   BasicBlock *AfterBB;
  258   BasicBlock::iterator LoopBody = Builder.GetInsertPoint();
tools/polly/lib/CodeGen/PerfMonitor.cpp
  120 static BasicBlock *FinalStartBB = nullptr;
  129   FinalStartBB = BasicBlock::Create(M->getContext(), "start", ExitFn);
  219   BasicBlock *Start = BasicBlock::Create(M->getContext(), "start", InitFn);
  219   BasicBlock *Start = BasicBlock::Create(M->getContext(), "start", InitFn);
  220   BasicBlock *EarlyReturn =
  221       BasicBlock::Create(M->getContext(), "earlyreturn", InitFn);
  222   BasicBlock *InitBB = BasicBlock::Create(M->getContext(), "initbb", InitFn);
  222   BasicBlock *InitBB = BasicBlock::Create(M->getContext(), "initbb", InitFn);
tools/polly/lib/CodeGen/Utils.cpp
   31 static BasicBlock *splitEdge(BasicBlock *Prev, BasicBlock *Succ,
   31 static BasicBlock *splitEdge(BasicBlock *Prev, BasicBlock *Succ,
   31 static BasicBlock *splitEdge(BasicBlock *Prev, BasicBlock *Succ,
   50   BasicBlock *MiddleBlock = SplitBlockPredecessors(
   96   BasicBlock *EnteringBB = S.getEnteringBlock();
   97   BasicBlock *EntryBB = S.getEntry();
   99   BasicBlock *SplitBlock =
  116   BasicBlock *ExitingBB = S.getExitingBlock();
  117   BasicBlock *ExitBB = S.getExit();
  119   BasicBlock *MergeBlock =
  143   BasicBlock *StartBlock =
  144       BasicBlock::Create(F->getContext(), "polly.start", F);
  145   BasicBlock *ExitingBlock =
  146       BasicBlock::Create(F->getContext(), "polly.exiting", F);
tools/polly/lib/Support/SCEVAffinator.cpp
  113 PWACtx SCEVAffinator::getPwAff(const SCEV *Expr, BasicBlock *BB) {
tools/polly/lib/Support/SCEVValidator.cpp
  784       BasicBlock *Incoming = PHI->getIncomingBlock(i);
  802     BasicBlock *BB = PHI->getIncomingBlock(i);
tools/polly/lib/Support/ScopHelper.cpp
   46   BasicBlock *EnteringBB = R->getEnteringBlock();
   47   BasicBlock *Entry = R->getEntry();
   61     SmallVector<BasicBlock *, 4> Preds;
   62     for (BasicBlock *P : predecessors(Entry))
   66     BasicBlock *NewEntering =
   71       for (BasicBlock *ExitPred : predecessors(NewEntering)) {
  110   BasicBlock *ExitBB = R->getExit();
  111   BasicBlock *ExitingBB = R->getExitingBlock();
  121     SmallVector<BasicBlock *, 4> Preds;
  122     for (BasicBlock *P : predecessors(ExitBB))
  171 static BasicBlock *splitBlock(BasicBlock *Old, Instruction *SplitPt,
  171 static BasicBlock *splitBlock(BasicBlock *Old, Instruction *SplitPt,
  182   BasicBlock *NewBlock = llvm::SplitBlock(Old, SplitPt, DT, LI);
  200 void polly::splitEntryBlockForAlloca(BasicBlock *EntryBlock, DominatorTree *DT,
  204   BasicBlock::iterator I = EntryBlock->begin();
  212 void polly::splitEntryBlockForAlloca(BasicBlock *EntryBlock, Pass *P) {
  235                         BasicBlock *RTCBB)
  265   BasicBlock *RTCBB;
  397                             BasicBlock *RTCBB) {
  402 bool polly::isErrorBlock(BasicBlock &BB, const Region &R, LoopInfo &LI,
  417     for (BasicBlock &I : *R.getEntry()->getParent())
  473     for (auto *BB : S.blocks())
  485   SmallVector<BasicBlock *, 4> ExitBlocks;
  505     BasicBlock *BB = RN->getNodeAs<BasicBlock>();
  505     BasicBlock *BB = RN->getNodeAs<BasicBlock>();
  586     auto &BB = *UserI->getParent();
  592       for (BasicBlock &I : *R.getEntry()->getParent())
  650 llvm::BasicBlock *polly::getUseBlock(const llvm::Use &U) {
  717 llvm::Loop *polly::getFirstNonBoxedLoopFor(llvm::BasicBlock *BB,
  737 static bool hasDebugCall(BasicBlock *BB) {
  758     for (BasicBlock *RBB : Stmt->getRegion()->blocks())
tools/polly/lib/Support/ScopLocation.cpp
   26   for (const BasicBlock *BB : R->blocks())
tools/polly/lib/Support/VirtualInstruction.cpp
   21   auto *UserBB = getUseBlock(U);
   56   if (isa<BasicBlock>(Val))
  207     for (BasicBlock *BB : Stmt->getRegion()->blocks())
tools/polly/lib/Transform/CodePreparation.cpp
   63   auto &EntryBlock = F.getEntryBlock();
   64   BasicBlock::iterator I = EntryBlock.begin();
tools/polly/lib/Transform/RewriteByReferenceParameters.cpp
   39     BasicBlock *Entry = &Inst.getParent()->getParent()->getEntryBlock();
   82     for (BasicBlock &BB : F)
tools/verify-uselistorder/verify-uselistorder.cpp
  218     for (const BasicBlock &BB : F)
  220     for (const BasicBlock &BB : F)
  225     for (const BasicBlock &BB : F)
  494     for (BasicBlock &BB : F)
  496     for (BasicBlock &BB : F)
  501     for (BasicBlock &BB : F)
unittests/ADT/PostOrderIteratorTest.cpp
   30   BasicBlock *NullBB = nullptr;
unittests/Analysis/AliasAnalysisTest.cpp
  171   auto *BB = BasicBlock::Create(C, "entry", F);
  171   auto *BB = BasicBlock::Create(C, "entry", F);
unittests/Analysis/AliasSetTrackerTest.cpp
   70   for (auto &BB : *Test)
unittests/Analysis/BasicAliasAnalysisTest.cpp
   75   BasicBlock *Entry(BasicBlock::Create(C, "", F));
   75   BasicBlock *Entry(BasicBlock::Create(C, "", F));
  109   BasicBlock *Entry(BasicBlock::Create(C, "", F));
  109   BasicBlock *Entry(BasicBlock::Create(C, "", F));
unittests/Analysis/BlockFrequencyInfoTest.cpp
   64   BasicBlock &BB0 = F->getEntryBlock();
   65   BasicBlock *BB1 = BB0.getTerminator()->getSuccessor(0);
   66   BasicBlock *BB2 = BB0.getTerminator()->getSuccessor(1);
   67   BasicBlock *BB3 = BB1->getSingleSuccessor();
   86   SmallPtrSet<BasicBlock *, 4> BlocksToScale({BB1, BB2});
unittests/Analysis/BranchProbabilityInfoTest.cpp
   63   auto *ExitBB = &F->back();
   64   auto *EntryBB = BasicBlock::Create(C, "entry", F, /*insertBefore=*/ExitBB);
   64   auto *EntryBB = BasicBlock::Create(C, "entry", F, /*insertBefore=*/ExitBB);
   66   auto *PreExitBB =
   67       BasicBlock::Create(C, "preexit", F, /*insertBefore=*/ExitBB);
unittests/Analysis/CFGTest.cpp
   75                                       SmallPtrSet<BasicBlock *, 4> ExclusionSet)
  114       SmallPtrSet<BasicBlock *, 4> ExclusionSet;
  130   SmallPtrSet<BasicBlock *, 4> ExclusionSet;
  396   BasicBlock *OldBB = S[0];
unittests/Analysis/CaptureTrackingTest.cpp
   63     BasicBlock *EntryBB = &F->getEntryBlock();
unittests/Analysis/DivergenceAnalysisTest.cpp
   32 BasicBlock *GetBlockByName(StringRef BlockName, Function &F) {
   33   for (auto &BB : F) {
   82   BasicBlock *BB = BasicBlock::Create(Context, "entry", F);
   82   BasicBlock *BB = BasicBlock::Create(Context, "entry", F);
  154   auto &ExitBlock = *GetBlockByName("for.end.loopexit", *F);
  208   auto &ExitBlock = *GetBlockByName("detached.return", *F);
  284   using SmallBlockVec = SmallVector<const BasicBlock *, 4>;
  299       for (auto &BB : F) {
  320     auto *C = &*ItBlocks++;
  321     auto *D = &*ItBlocks++;
  322     auto *E = &*ItBlocks;
  343     auto *D = &*ItBlocks++;
  344     auto *E = &*ItBlocks;
  364     auto *C = &*ItBlocks++;
  366     auto *E = &*ItBlocks;
  424   auto &ExitBlock = *GetBlockByName("sw.epilog", *F);
unittests/Analysis/DomTreeUpdaterTest.cpp
   67   BasicBlock *BB0 = &*FI++;
   68   BasicBlock *BB1 = &*FI++;
   69   BasicBlock *BB2 = &*FI++;
   70   BasicBlock *BB3 = &*FI++;
  176   BasicBlock *BB0 = &*FI++;
  177   BasicBlock *BB1 = &*FI++;
  180   BasicBlock *NewEntry =
  181       BasicBlock::Create(F->getContext(), "new_entry", F, BB0);
  249   BasicBlock *BB0 = &*FI++;
  250   BasicBlock *BB1 = &*FI++;
  251   BasicBlock *BB2 = &*FI++;
  252   BasicBlock *BB3 = &*FI++;
  338   BasicBlock *BB0 = &*FI++;
  339   BasicBlock *BB1 = &*FI++;
  340   BasicBlock *BB2 = &*FI++;
  341   BasicBlock *BB3 = &*FI++;
  375   std::vector<BasicBlock *> BasicBlocks;
  468   BasicBlock *BB0 = &*FI++;
  469   BasicBlock *BB1 = &*FI++;
  470   BasicBlock *BB2 = &*FI++;
  471   BasicBlock *BB3 = &*FI++;
  551   BasicBlock *BB0 = &*FI++;
  552   BasicBlock *BB1 = &*FI++;
  555   BasicBlock *NewEntry =
  556       BasicBlock::Create(F->getContext(), "new_entry", F, BB0);
  642   BasicBlock *BB0 = &*FI++;
  644   BasicBlock *BB2 = &*FI++;
  645   BasicBlock *BB3 = &*FI++;
  722   BasicBlock *BB0 = &*FI++;
  753   BasicBlock *BB0 = &*FI++;
  754   BasicBlock *BB1 = &*FI++;
  755   BasicBlock *BB2 = &*FI++;
unittests/Analysis/IVDescriptorsTest.cpp
   78         BasicBlock *Header = &*(++FI);
   89         BasicBlock::iterator BBI = Header->begin();
unittests/Analysis/LoopInfoTest.cpp
   82     BasicBlock *Header = &*(++FI);
  132     BasicBlock *Header = &*(++FI);
  263         BasicBlock *Entry = &*(FI);
  267         BasicBlock *Header = &*(++FI);
  321         BasicBlock *Entry = &*(FI);
  325         BasicBlock *Header = &*(++FI);
  379         BasicBlock *Entry = &*(FI);
  383         BasicBlock *Header = &*(++FI);
  437         BasicBlock *Entry = &*(FI);
  441         BasicBlock *Header = &*(++FI);
  495         BasicBlock *Entry = &*(FI);
  499         BasicBlock *Header = &*(++FI);
  554         BasicBlock *Entry = &*(FI);
  558         BasicBlock *Header = &*(++FI);
  612         BasicBlock *Entry = &*(FI);
  616         BasicBlock *Header = &*(++FI);
  667         BasicBlock *Entry = &*(FI);
  671         BasicBlock *Header = &*(++FI);
  725         BasicBlock *Entry = &*(FI);
  729         BasicBlock *Header = &*(++FI);
  783         BasicBlock *Entry = &*(FI);
  788         BasicBlock *Header = &*(++FI);
  843         BasicBlock *Entry = &*(FI);
  847         BasicBlock *Header = &*(++FI);
  903         BasicBlock *Entry = &*(FI);
  907         BasicBlock *Header = &*(++FI);
  967         BasicBlock *Header = &*(++FI);
 1019         BasicBlock *Header = &*(++FI);
 1072         BasicBlock *Entry = &*(FI);
 1076         BasicBlock *Header = &*(++FI);
 1141         BasicBlock *Entry = &*(FI);
 1145         BasicBlock *Header = &*(++FI);
 1233         BasicBlock *Entry = &*(FI);
 1237         BasicBlock *Header = &*(++FI);
 1256         BasicBlock::iterator II = Header->begin();
 1301     BasicBlock *Header = &*(++FI);
 1346         BasicBlock *Header = &*(++FI);
 1347         BasicBlock *Latch = &*(++FI);
 1391     BasicBlock *Header = &*(++FI);
 1395     SmallVector<BasicBlock *, 2> Exits;
 1434     BasicBlock *Header = &*(++FI);
 1438     SmallVector<BasicBlock *, 2> Exits;
unittests/Analysis/MemorySSATest.cpp
   78   BasicBlock *Entry(BasicBlock::Create(C, "", F));
   78   BasicBlock *Entry(BasicBlock::Create(C, "", F));
   79   BasicBlock *Left(BasicBlock::Create(C, "", F));
   79   BasicBlock *Left(BasicBlock::Create(C, "", F));
   80   BasicBlock *Right(BasicBlock::Create(C, "", F));
   80   BasicBlock *Right(BasicBlock::Create(C, "", F));
   81   BasicBlock *Merge(BasicBlock::Create(C, "", F));
   81   BasicBlock *Merge(BasicBlock::Create(C, "", F));
  116   BasicBlock *Entry(BasicBlock::Create(C, "", F));
  116   BasicBlock *Entry(BasicBlock::Create(C, "", F));
  117   BasicBlock *Left(BasicBlock::Create(C, "", F));
  117   BasicBlock *Left(BasicBlock::Create(C, "", F));
  118   BasicBlock *Right(BasicBlock::Create(C, "", F));
  118   BasicBlock *Right(BasicBlock::Create(C, "", F));
  119   BasicBlock *Merge(BasicBlock::Create(C, "", F));
  119   BasicBlock *Merge(BasicBlock::Create(C, "", F));
  206   BasicBlock *Entry(BasicBlock::Create(C, "", F));
  206   BasicBlock *Entry(BasicBlock::Create(C, "", F));
  207   BasicBlock *Left(BasicBlock::Create(C, "", F));
  207   BasicBlock *Left(BasicBlock::Create(C, "", F));
  208   BasicBlock *Right(BasicBlock::Create(C, "", F));
  208   BasicBlock *Right(BasicBlock::Create(C, "", F));
  209   BasicBlock *Merge(BasicBlock::Create(C, "", F));
  209   BasicBlock *Merge(BasicBlock::Create(C, "", F));
  250   BasicBlock *Entry(BasicBlock::Create(C, "", F));
  250   BasicBlock *Entry(BasicBlock::Create(C, "", F));
  251   BasicBlock *Left(BasicBlock::Create(C, "", F));
  251   BasicBlock *Left(BasicBlock::Create(C, "", F));
  252   BasicBlock *Right(BasicBlock::Create(C, "", F));
  252   BasicBlock *Right(BasicBlock::Create(C, "", F));
  253   BasicBlock *Merge(BasicBlock::Create(C, "", F));
  253   BasicBlock *Merge(BasicBlock::Create(C, "", F));
  300   BasicBlock *Entry(BasicBlock::Create(C, "", F));
  300   BasicBlock *Entry(BasicBlock::Create(C, "", F));
  301   BasicBlock *Left(BasicBlock::Create(C, "", F));
  301   BasicBlock *Left(BasicBlock::Create(C, "", F));
  302   BasicBlock *Right(BasicBlock::Create(C, "", F));
  302   BasicBlock *Right(BasicBlock::Create(C, "", F));
  303   BasicBlock *Merge(BasicBlock::Create(C, "", F));
  303   BasicBlock *Merge(BasicBlock::Create(C, "", F));
  336   BasicBlock *Entry(BasicBlock::Create(C, "", F));
  336   BasicBlock *Entry(BasicBlock::Create(C, "", F));
  337   BasicBlock *Left(BasicBlock::Create(C, "", F));
  337   BasicBlock *Left(BasicBlock::Create(C, "", F));
  338   BasicBlock *Right(BasicBlock::Create(C, "", F));
  338   BasicBlock *Right(BasicBlock::Create(C, "", F));
  339   BasicBlock *Merge(BasicBlock::Create(C, "", F));
  339   BasicBlock *Merge(BasicBlock::Create(C, "", F));
  382   BasicBlock *Entry(BasicBlock::Create(C, "", F));
  382   BasicBlock *Entry(BasicBlock::Create(C, "", F));
  383   BasicBlock *Left(BasicBlock::Create(C, "", F));
  383   BasicBlock *Left(BasicBlock::Create(C, "", F));
  384   BasicBlock *Right(BasicBlock::Create(C, "", F));
  384   BasicBlock *Right(BasicBlock::Create(C, "", F));
  385   BasicBlock *Merge(BasicBlock::Create(C, "", F));
  385   BasicBlock *Merge(BasicBlock::Create(C, "", F));
  426   BasicBlock *Entry(BasicBlock::Create(C, "", F));
  426   BasicBlock *Entry(BasicBlock::Create(C, "", F));
  427   BasicBlock *Left(BasicBlock::Create(C, "", F));
  427   BasicBlock *Left(BasicBlock::Create(C, "", F));
  428   BasicBlock *Right(BasicBlock::Create(C, "", F));
  428   BasicBlock *Right(BasicBlock::Create(C, "", F));
  429   BasicBlock *Merge(BasicBlock::Create(C, "", F));
  429   BasicBlock *Merge(BasicBlock::Create(C, "", F));
  481   BasicBlock *Entry(BasicBlock::Create(C, "", F));
  481   BasicBlock *Entry(BasicBlock::Create(C, "", F));
  482   BasicBlock *Left(BasicBlock::Create(C, "", F));
  482   BasicBlock *Left(BasicBlock::Create(C, "", F));
  483   BasicBlock *Right(BasicBlock::Create(C, "", F));
  483   BasicBlock *Right(BasicBlock::Create(C, "", F));
  484   BasicBlock *Merge(BasicBlock::Create(C, "", F));
  484   BasicBlock *Merge(BasicBlock::Create(C, "", F));
  526   BasicBlock *Entry(BasicBlock::Create(C, "", F));
  526   BasicBlock *Entry(BasicBlock::Create(C, "", F));
  527   BasicBlock *Left(BasicBlock::Create(C, "", F));
  527   BasicBlock *Left(BasicBlock::Create(C, "", F));
  528   BasicBlock *Right(BasicBlock::Create(C, "", F));
  528   BasicBlock *Right(BasicBlock::Create(C, "", F));
  529   BasicBlock *Merge(BasicBlock::Create(C, "", F));
  529   BasicBlock *Merge(BasicBlock::Create(C, "", F));
  599   B.SetInsertPoint(BasicBlock::Create(C, "", F));
  630   B.SetInsertPoint(BasicBlock::Create(C, "", F));
  660   B.SetInsertPoint(BasicBlock::Create(C, "", F));
  704   B.SetInsertPoint(BasicBlock::Create(C, "A", F));
  710   BasicBlock *IfThen = BasicBlock::Create(C, "B", F);
  710   BasicBlock *IfThen = BasicBlock::Create(C, "B", F);
  711   BasicBlock *IfEnd = BasicBlock::Create(C, "C", F);
  711   BasicBlock *IfEnd = BasicBlock::Create(C, "C", F);
  768   B.SetInsertPoint(BasicBlock::Create(C, "", F));
  797   B.SetInsertPoint(BasicBlock::Create(C, "", F));
  828   B.SetInsertPoint(BasicBlock::Create(C, "", F));
  889   BasicBlock *IfBB = BasicBlock::Create(C, "if", F);
  889   BasicBlock *IfBB = BasicBlock::Create(C, "if", F);
  890   BasicBlock *LoopStartBB = BasicBlock::Create(C, "loopstart", F);
  890   BasicBlock *LoopStartBB = BasicBlock::Create(C, "loopstart", F);
  891   BasicBlock *LoopMainBB = BasicBlock::Create(C, "loopmain", F);
  891   BasicBlock *LoopMainBB = BasicBlock::Create(C, "loopmain", F);
  892   BasicBlock *AfterLoopBB = BasicBlock::Create(C, "afterloop", F);
  892   BasicBlock *AfterLoopBB = BasicBlock::Create(C, "afterloop", F);
  927   BasicBlock *Entry = BasicBlock::Create(C, "if", F);
  927   BasicBlock *Entry = BasicBlock::Create(C, "if", F);
  972   BasicBlock *Entry = BasicBlock::Create(C, "if", F);
  972   BasicBlock *Entry = BasicBlock::Create(C, "if", F);
 1006   B.SetInsertPoint(BasicBlock::Create(C, "", F));
 1049   B.SetInsertPoint(BasicBlock::Create(C, "", F));
 1100   B.SetInsertPoint(BasicBlock::Create(C, "", F));
 1142   B.SetInsertPoint(BasicBlock::Create(C, "", F));
 1225   BasicBlock *Entry = BasicBlock::Create(C, "entry", F);
 1225   BasicBlock *Entry = BasicBlock::Create(C, "entry", F);
 1282   BasicBlock *Entry = BasicBlock::Create(C, "entry", F);
 1282   BasicBlock *Entry = BasicBlock::Create(C, "entry", F);
 1283   BasicBlock *BlockA = BasicBlock::Create(C, "a", F);
 1283   BasicBlock *BlockA = BasicBlock::Create(C, "a", F);
 1284   BasicBlock *BlockB = BasicBlock::Create(C, "b", F);
 1284   BasicBlock *BlockB = BasicBlock::Create(C, "b", F);
 1285   BasicBlock *BlockC = BasicBlock::Create(C, "c", F);
 1285   BasicBlock *BlockC = BasicBlock::Create(C, "c", F);
 1337   B.SetInsertPoint(BasicBlock::Create(C, "", F));
 1415   BasicBlock *Entry(BasicBlock::Create(C, "entry", F));
 1415   BasicBlock *Entry(BasicBlock::Create(C, "entry", F));
 1416   BasicBlock *Header(BasicBlock::Create(C, "header", F));
 1416   BasicBlock *Header(BasicBlock::Create(C, "header", F));
 1417   BasicBlock *Body(BasicBlock::Create(C, "body", F));
 1417   BasicBlock *Body(BasicBlock::Create(C, "body", F));
 1418   BasicBlock *Exit(BasicBlock::Create(C, "exit", F));
 1418   BasicBlock *Exit(BasicBlock::Create(C, "exit", F));
 1472   BasicBlock *Entry(BasicBlock::Create(C, "entry", F));
 1472   BasicBlock *Entry(BasicBlock::Create(C, "entry", F));
 1473   BasicBlock *Header(BasicBlock::Create(C, "header", F));
 1473   BasicBlock *Header(BasicBlock::Create(C, "header", F));
 1474   BasicBlock *Body(BasicBlock::Create(C, "body", F));
 1474   BasicBlock *Body(BasicBlock::Create(C, "body", F));
 1475   BasicBlock *Exit(BasicBlock::Create(C, "exit", F));
 1475   BasicBlock *Exit(BasicBlock::Create(C, "exit", F));
 1543   BasicBlock *Entry(BasicBlock::Create(C, "entry", F));
 1543   BasicBlock *Entry(BasicBlock::Create(C, "entry", F));
 1544   BasicBlock *ABlock(BasicBlock::Create(C, "a", F));
 1544   BasicBlock *ABlock(BasicBlock::Create(C, "a", F));
 1545   BasicBlock *BBlock(BasicBlock::Create(C, "b", F));
 1545   BasicBlock *BBlock(BasicBlock::Create(C, "b", F));
 1546   BasicBlock *CBlock(BasicBlock::Create(C, "c", F));
 1546   BasicBlock *CBlock(BasicBlock::Create(C, "c", F));
 1547   BasicBlock *DBlock(BasicBlock::Create(C, "d", F));
 1547   BasicBlock *DBlock(BasicBlock::Create(C, "d", F));
 1548   BasicBlock *EBlock(BasicBlock::Create(C, "e", F));
 1548   BasicBlock *EBlock(BasicBlock::Create(C, "e", F));
 1549   BasicBlock *FBlock(BasicBlock::Create(C, "f", F));
 1549   BasicBlock *FBlock(BasicBlock::Create(C, "f", F));
unittests/Analysis/OrderedBasicBlockTest.cpp
   40   BasicBlock::iterator I = F->front().begin();
unittests/Analysis/OrderedInstructionsTest.cpp
   44   BasicBlock *BBX = BasicBlock::Create(Ctx, "bbx", F);
   44   BasicBlock *BBX = BasicBlock::Create(Ctx, "bbx", F);
   51   BasicBlock *BBY = BasicBlock::Create(Ctx, "bby", F);
   51   BasicBlock *BBY = BasicBlock::Create(Ctx, "bby", F);
unittests/Analysis/PhiValuesTest.cpp
   32   BasicBlock *Entry = BasicBlock::Create(C, "entry", F);
   32   BasicBlock *Entry = BasicBlock::Create(C, "entry", F);
   33   BasicBlock *If = BasicBlock::Create(C, "if", F);
   33   BasicBlock *If = BasicBlock::Create(C, "if", F);
   34   BasicBlock *Else = BasicBlock::Create(C, "else", F);
   34   BasicBlock *Else = BasicBlock::Create(C, "else", F);
   35   BasicBlock *Then = BasicBlock::Create(C, "then", F);
   35   BasicBlock *Then = BasicBlock::Create(C, "then", F);
   99   BasicBlock *Entry = BasicBlock::Create(C, "entry", F);
   99   BasicBlock *Entry = BasicBlock::Create(C, "entry", F);
  100   BasicBlock *If1 = BasicBlock::Create(C, "if1", F);
  100   BasicBlock *If1 = BasicBlock::Create(C, "if1", F);
  101   BasicBlock *Else1 = BasicBlock::Create(C, "else1", F);
  101   BasicBlock *Else1 = BasicBlock::Create(C, "else1", F);
  102   BasicBlock *Then = BasicBlock::Create(C, "then", F);
  102   BasicBlock *Then = BasicBlock::Create(C, "then", F);
  103   BasicBlock *If2 = BasicBlock::Create(C, "if2", F);
  103   BasicBlock *If2 = BasicBlock::Create(C, "if2", F);
  104   BasicBlock *Else2 = BasicBlock::Create(C, "else2", F);
  104   BasicBlock *Else2 = BasicBlock::Create(C, "else2", F);
  105   BasicBlock *End = BasicBlock::Create(C, "then", F);
  105   BasicBlock *End = BasicBlock::Create(C, "then", F);
unittests/Analysis/ProfileSummaryInfoTest.cpp
  116   BasicBlock &BB0 = F->getEntryBlock();
  117   BasicBlock *BB1 = BB0.getTerminator()->getSuccessor(0);
  164   BasicBlock &BB0 = F->getEntryBlock();
  165   BasicBlock *BB1 = BB0.getTerminator()->getSuccessor(0);
  166   BasicBlock *BB2 = BB0.getTerminator()->getSuccessor(1);
  167   BasicBlock *BB3 = BB1->getSingleSuccessor();
  211   BasicBlock &BB0 = F->getEntryBlock();
  212   BasicBlock *BB1 = BB0.getTerminator()->getSuccessor(0);
  213   BasicBlock *BB2 = BB0.getTerminator()->getSuccessor(1);
  214   BasicBlock *BB3 = BB1->getSingleSuccessor();
unittests/Analysis/ScalarEvolutionTest.cpp
   72   BasicBlock *BB = BasicBlock::Create(Context, "entry", F);
   72   BasicBlock *BB = BasicBlock::Create(Context, "entry", F);
  121   BasicBlock *EntryBB = BasicBlock::Create(Context, "entry", F);
  121   BasicBlock *EntryBB = BasicBlock::Create(Context, "entry", F);
  122   BasicBlock *LoopBB = BasicBlock::Create(Context, "loop", F);
  122   BasicBlock *LoopBB = BasicBlock::Create(Context, "loop", F);
  123   BasicBlock *ExitBB = BasicBlock::Create(Context, "exit", F);
  123   BasicBlock *ExitBB = BasicBlock::Create(Context, "exit", F);
  155   BasicBlock *EntryBB = BasicBlock::Create(Context, "entry", F);
  155   BasicBlock *EntryBB = BasicBlock::Create(Context, "entry", F);
  156   BasicBlock *LoopBB = BasicBlock::Create(Context, "loop", F);
  156   BasicBlock *LoopBB = BasicBlock::Create(Context, "loop", F);
  157   BasicBlock *ExitBB = BasicBlock::Create(Context, "exit", F);
  157   BasicBlock *ExitBB = BasicBlock::Create(Context, "exit", F);
  338   BasicBlock *EntryBB = BasicBlock::Create(Context, "entry", F);
  338   BasicBlock *EntryBB = BasicBlock::Create(Context, "entry", F);
  339   BasicBlock *LoopBB = BasicBlock::Create(Context, "bb1", F);
  339   BasicBlock *LoopBB = BasicBlock::Create(Context, "bb1", F);
  382   BasicBlock *ExitBB = BasicBlock::Create(Context, "bb2", F);
  382   BasicBlock *ExitBB = BasicBlock::Create(Context, "bb2", F);
  408   BasicBlock *EntryBB = BasicBlock::Create(Context, "entry", F);
  408   BasicBlock *EntryBB = BasicBlock::Create(Context, "entry", F);
  449   BasicBlock *EntryBB = BasicBlock::Create(Context, "entry", F);
  449   BasicBlock *EntryBB = BasicBlock::Create(Context, "entry", F);
  681   BasicBlock *EntryBB = BasicBlock::Create(Context, "entry", F);
  681   BasicBlock *EntryBB = BasicBlock::Create(Context, "entry", F);
  682   BasicBlock *CondBB = BasicBlock::Create(Context, "for.cond", F);
  682   BasicBlock *CondBB = BasicBlock::Create(Context, "for.cond", F);
  683   BasicBlock *EndBB = BasicBlock::Create(Context, "for.end", F);
  683   BasicBlock *EndBB = BasicBlock::Create(Context, "for.end", F);
  685   BasicBlock *PrevBB = EntryBB;
  693     BasicBlock *IncBB = BasicBlock::Create(Context, "for.inc", F, EndBB);
  693     BasicBlock *IncBB = BasicBlock::Create(Context, "for.inc", F, EndBB);
  699     BasicBlock *NextBB;
  701       NextBB = BasicBlock::Create(Context, "for.cond", F, EndBB);
  762   BasicBlock *Top = BasicBlock::Create(Context, "top", F);
  762   BasicBlock *Top = BasicBlock::Create(Context, "top", F);
  763   BasicBlock *LPh = BasicBlock::Create(Context, "L.ph", F);
  763   BasicBlock *LPh = BasicBlock::Create(Context, "L.ph", F);
  764   BasicBlock *L = BasicBlock::Create(Context, "L", F);
  764   BasicBlock *L = BasicBlock::Create(Context, "L", F);
  765   BasicBlock *Post = BasicBlock::Create(Context, "post", F);
  765   BasicBlock *Post = BasicBlock::Create(Context, "post", F);
  834   BasicBlock *Top = BasicBlock::Create(Context, "top", F);
  834   BasicBlock *Top = BasicBlock::Create(Context, "top", F);
  835   BasicBlock *LPh = BasicBlock::Create(Context, "L.ph", F);
  835   BasicBlock *LPh = BasicBlock::Create(Context, "L.ph", F);
  836   BasicBlock *L = BasicBlock::Create(Context, "L", F);
  836   BasicBlock *L = BasicBlock::Create(Context, "L", F);
  837   BasicBlock *Post = BasicBlock::Create(Context, "post", F);
  837   BasicBlock *Post = BasicBlock::Create(Context, "post", F);
  934   BasicBlock *Top = BasicBlock::Create(Context, "top", F);
  934   BasicBlock *Top = BasicBlock::Create(Context, "top", F);
  935   BasicBlock *LPh = BasicBlock::Create(Context, "L.ph", F);
  935   BasicBlock *LPh = BasicBlock::Create(Context, "L.ph", F);
  936   BasicBlock *L = BasicBlock::Create(Context, "L", F);
  936   BasicBlock *L = BasicBlock::Create(Context, "L", F);
  937   BasicBlock *Post = BasicBlock::Create(Context, "post", F);
  937   BasicBlock *Post = BasicBlock::Create(Context, "post", F);
 1006   BasicBlock *EntryBB = BasicBlock::Create(Context, "entry", F);
 1006   BasicBlock *EntryBB = BasicBlock::Create(Context, "entry", F);
 1007   BasicBlock *LoopBB = BasicBlock::Create(Context, "loop", F);
 1007   BasicBlock *LoopBB = BasicBlock::Create(Context, "loop", F);
 1008   BasicBlock *ExitBB = BasicBlock::Create(Context, "exit", F);
 1008   BasicBlock *ExitBB = BasicBlock::Create(Context, "exit", F);
 1064   BasicBlock *EntryBB = BasicBlock::Create(Context, "entry", F);
 1064   BasicBlock *EntryBB = BasicBlock::Create(Context, "entry", F);
 1065   BasicBlock *LoopBB = BasicBlock::Create(Context, "loop", F);
 1065   BasicBlock *LoopBB = BasicBlock::Create(Context, "loop", F);
 1066   BasicBlock *ExitBB = BasicBlock::Create(Context, "exit", F);
 1066   BasicBlock *ExitBB = BasicBlock::Create(Context, "exit", F);
 1103   BasicBlock *BB = BasicBlock::Create(Context, "entry", F);
 1103   BasicBlock *BB = BasicBlock::Create(Context, "entry", F);
 1160   BasicBlock *Top = BasicBlock::Create(Context, "top", F);
 1160   BasicBlock *Top = BasicBlock::Create(Context, "top", F);
 1161   BasicBlock *LPh = BasicBlock::Create(Context, "L.ph", F);
 1161   BasicBlock *LPh = BasicBlock::Create(Context, "L.ph", F);
 1162   BasicBlock *L = BasicBlock::Create(Context, "L", F);
 1162   BasicBlock *L = BasicBlock::Create(Context, "L", F);
 1163   BasicBlock *Post = BasicBlock::Create(Context, "post", F);
 1163   BasicBlock *Post = BasicBlock::Create(Context, "post", F);
 1223   BasicBlock *Entry = BasicBlock::Create(Context, "entry", F);
 1223   BasicBlock *Entry = BasicBlock::Create(Context, "entry", F);
 1224   BasicBlock *Body = BasicBlock::Create(Context, "body", F);
 1224   BasicBlock *Body = BasicBlock::Create(Context, "body", F);
 1225   BasicBlock *Exit = BasicBlock::Create(Context, "exit", F);
 1225   BasicBlock *Exit = BasicBlock::Create(Context, "exit", F);
 1275   BasicBlock *Entry = BasicBlock::Create(Context, "entry", F);
 1275   BasicBlock *Entry = BasicBlock::Create(Context, "entry", F);
 1276   BasicBlock *Body = BasicBlock::Create(Context, "body", F);
 1276   BasicBlock *Body = BasicBlock::Create(Context, "body", F);
 1277   BasicBlock *Exit = BasicBlock::Create(Context, "exit", F);
 1277   BasicBlock *Exit = BasicBlock::Create(Context, "exit", F);
 1325   BasicBlock *Entry = BasicBlock::Create(Context, "entry", F);
 1325   BasicBlock *Entry = BasicBlock::Create(Context, "entry", F);
 1326   BasicBlock *Exit = BasicBlock::Create(Context, "exit", F);
 1326   BasicBlock *Exit = BasicBlock::Create(Context, "exit", F);
 1376   BasicBlock *Entry = BasicBlock::Create(Context, "entry", F);
 1376   BasicBlock *Entry = BasicBlock::Create(Context, "entry", F);
 1377   BasicBlock *Exit = BasicBlock::Create(Context, "exit", F);
 1377   BasicBlock *Exit = BasicBlock::Create(Context, "exit", F);
 1427   BasicBlock *Entry = BasicBlock::Create(Context, "entry", F);
 1427   BasicBlock *Entry = BasicBlock::Create(Context, "entry", F);
 1428   BasicBlock *Exit = BasicBlock::Create(Context, "exit", F);
 1428   BasicBlock *Exit = BasicBlock::Create(Context, "exit", F);
 1523       auto *LoopHeaderBB = I.getParent();
 1541       for (BasicBlock::iterator i = LoopHeaderBB->begin(); isa<PHINode>(i);
 1552       BasicBlock *Incoming = nullptr, *Backedge = nullptr;
 1604       auto *LoopHeaderBB = I.getParent();
 1621       for (BasicBlock::iterator i = LoopHeaderBB->begin(); isa<PHINode>(i);
 1658     BasicBlock &Entry = F->getEntryBlock();
 1820       auto *LoopHeaderBB = I.getParent();
 1874       auto *LoopHeaderBB = I.getParent();
unittests/Analysis/SparsePropagation.cpp
  261   BasicBlock *FEntry = BasicBlock::Create(Context, "", F);
  261   BasicBlock *FEntry = BasicBlock::Create(Context, "", F);
  262   BasicBlock *GEntry = BasicBlock::Create(Context, "", G);
  262   BasicBlock *GEntry = BasicBlock::Create(Context, "", G);
  300   BasicBlock *FEntry = BasicBlock::Create(Context, "", F);
  300   BasicBlock *FEntry = BasicBlock::Create(Context, "", F);
  301   BasicBlock *GEntry = BasicBlock::Create(Context, "", G);
  301   BasicBlock *GEntry = BasicBlock::Create(Context, "", G);
  341   BasicBlock *FEntry = BasicBlock::Create(Context, "", F);
  341   BasicBlock *FEntry = BasicBlock::Create(Context, "", F);
  342   BasicBlock *GEntry = BasicBlock::Create(Context, "", G);
  342   BasicBlock *GEntry = BasicBlock::Create(Context, "", G);
  379   BasicBlock *If = BasicBlock::Create(Context, "if", F);
  379   BasicBlock *If = BasicBlock::Create(Context, "if", F);
  380   BasicBlock *Then = BasicBlock::Create(Context, "then", F);
  380   BasicBlock *Then = BasicBlock::Create(Context, "then", F);
  381   BasicBlock *Else = BasicBlock::Create(Context, "else", F);
  381   BasicBlock *Else = BasicBlock::Create(Context, "else", F);
  419   BasicBlock *If = BasicBlock::Create(Context, "if", F);
  419   BasicBlock *If = BasicBlock::Create(Context, "if", F);
  420   BasicBlock *Then = BasicBlock::Create(Context, "then", F);
  420   BasicBlock *Then = BasicBlock::Create(Context, "then", F);
  421   BasicBlock *Else = BasicBlock::Create(Context, "else", F);
  421   BasicBlock *Else = BasicBlock::Create(Context, "else", F);
  469   BasicBlock *FEntry = BasicBlock::Create(Context, "", F);
  469   BasicBlock *FEntry = BasicBlock::Create(Context, "", F);
  470   BasicBlock *GEntry = BasicBlock::Create(Context, "", G);
  470   BasicBlock *GEntry = BasicBlock::Create(Context, "", G);
  521   BasicBlock *Entry = BasicBlock::Create(Context, "entry", F);
  521   BasicBlock *Entry = BasicBlock::Create(Context, "entry", F);
  522   BasicBlock *Pad = BasicBlock::Create(Context, "catch.pad", F);
  522   BasicBlock *Pad = BasicBlock::Create(Context, "catch.pad", F);
  523   BasicBlock *Body = BasicBlock::Create(Context, "catch.body", F);
  523   BasicBlock *Body = BasicBlock::Create(Context, "catch.body", F);
  524   BasicBlock *Exit = BasicBlock::Create(Context, "exit", F);
  524   BasicBlock *Exit = BasicBlock::Create(Context, "exit", F);
unittests/Analysis/TBAATest.cpp
   37   auto *BB = BasicBlock::Create(C, "entry", F);
   37   auto *BB = BasicBlock::Create(C, "entry", F);
unittests/Analysis/UnrollAnalyzerTest.cpp
   32     BasicBlock *Header = &*FI++;
   34     BasicBlock *Exiting = L->getExitingBlock();
   41       for (auto *BB : L->getBlocks())
   98   BasicBlock *Header = &*FI++;
  100   BasicBlock::iterator BBI = Header->begin();
  160   BasicBlock *Header = &*FI++;
  161   BasicBlock *InnerBody = &*FI++;
  163   BasicBlock::iterator BBI = Header->begin();
  206   BasicBlock *Header = &*FI++;
  208   BasicBlock::iterator BBI = Header->begin();
  253   BasicBlock *Header = &*FI;
  255   BasicBlock::iterator BBI = Header->begin();
  299   BasicBlock *Header = &*FI++;
  301   BasicBlock::iterator BBI = Header->begin();
unittests/Analysis/ValueTrackingTest.cpp
  496   auto &BB = F->getEntryBlock();
unittests/Analysis/VectorUtilsTest.cpp
   65   BasicBlock *BB;
   73         BB(BasicBlock::Create(Ctx, "entry", F)), IRB(BB) {}
unittests/ExecutionEngine/MCJIT/MCJITTestBase.h
   51     BasicBlock *BB = BasicBlock::Create(Context, Name, Result);
   51     BasicBlock *BB = BasicBlock::Create(Context, Name, Result);
  163     BasicBlock *BaseCase = BasicBlock::Create(Context, "", Result);
  163     BasicBlock *BaseCase = BasicBlock::Create(Context, "", Result);
  164     BasicBlock *RecursiveCase = BasicBlock::Create(Context, "", Result);
  164     BasicBlock *RecursiveCase = BasicBlock::Create(Context, "", Result);
unittests/ExecutionEngine/Orc/LegacyRTDyldObjectLinkingLayerTest.cpp
  161     BasicBlock *BarEntry = BasicBlock::Create(Context, "entry", BarImpl);
  161     BasicBlock *BarEntry = BasicBlock::Create(Context, "entry", BarImpl);
  177     BasicBlock *FooEntry = BasicBlock::Create(Context, "entry", FooImpl);
  177     BasicBlock *FooEntry = BasicBlock::Create(Context, "entry", FooImpl);
  247     BasicBlock *BarEntry = BasicBlock::Create(Context, "entry", BarImpl);
  247     BasicBlock *BarEntry = BasicBlock::Create(Context, "entry", BarImpl);
  261     BasicBlock *BarEntry = BasicBlock::Create(Context, "entry", BarImpl);
  261     BasicBlock *BarEntry = BasicBlock::Create(Context, "entry", BarImpl);
unittests/ExecutionEngine/Orc/OrcCAPITest.cpp
   39     Main->getBasicBlockList().push_back(BasicBlock::Create(Context));
unittests/ExecutionEngine/Orc/RTDyldObjectLinkingLayerTest.cpp
  135     BasicBlock *FooEntry =
  136         BasicBlock::Create(*TSCtx.getContext(), "entry", FooImpl);
  143     BasicBlock *BarEntry =
  144         BasicBlock::Create(*TSCtx.getContext(), "entry", BarImpl);
  189       BasicBlock *BarEntry =
  190           BasicBlock::Create(M.getContext(), "entry", BarImpl);
  208     BasicBlock *FooEntry =
  209         BasicBlock::Create(*TSCtx.getContext(), "entry", FooImpl);
unittests/ExecutionEngine/Orc/RemoteObjectLayerTest.cpp
  103   Main->getBasicBlockList().push_back(BasicBlock::Create(Ctx));
unittests/FuzzMutate/OperationsTest.cpp
   28 void PrintTo(BasicBlock *BB, ::std::ostream *OS) {
  184   auto *BB = BasicBlock::Create(Ctx, "BB", F);
  184   auto *BB = BasicBlock::Create(Ctx, "BB", F);
  192   auto *BB1 = UncondBr->getSuccessor(0);
  206   auto *BB2 = CondBr->getSuccessor(1);
  234   BasicBlock &BB = *std::next(M->getFunction("test")->begin(), 2);
  254   auto *BB1 = BasicBlock::Create(Ctx, "BB1", F);
  254   auto *BB1 = BasicBlock::Create(Ctx, "BB1", F);
  255   auto *BB2 = BasicBlock::Create(Ctx, "BB2", F);
  255   auto *BB2 = BasicBlock::Create(Ctx, "BB2", F);
  256   auto *BB3 = BasicBlock::Create(Ctx, "BB3", F);
  256   auto *BB3 = BasicBlock::Create(Ctx, "BB3", F);
  289   auto *BB = BasicBlock::Create(Ctx, "BB", F);
  289   auto *BB = BasicBlock::Create(Ctx, "BB", F);
  320   BasicBlock &BB = *F.begin();
unittests/FuzzMutate/RandomIRBuilderTest.cpp
   65   BasicBlock &BB = *F.begin();
  107   BasicBlock &BB = *F.begin();
  151   BasicBlock &BB = *F.begin();
  186   BasicBlock &BB = *F.begin();
  227   BasicBlock &BB = *F.begin();
  256   BasicBlock &BB = *F.begin();
  287   BasicBlock &BB = *F.begin();
unittests/IR/BasicBlockTest.cpp
   27   std::unique_ptr<BasicBlock> BB(BasicBlock::Create(Context));
   27   std::unique_ptr<BasicBlock> BB(BasicBlock::Create(Context));
   30   std::unique_ptr<BasicBlock> BB1(BasicBlock::Create(Context));
   30   std::unique_ptr<BasicBlock> BB1(BasicBlock::Create(Context));
   32   std::unique_ptr<BasicBlock> BB2(BasicBlock::Create(Context));
   32   std::unique_ptr<BasicBlock> BB2(BasicBlock::Create(Context));
   67   BasicBlock::const_phi_iterator CI;
  109   BasicBlock *BB1 = BasicBlock::Create(Ctx, "", F);
  109   BasicBlock *BB1 = BasicBlock::Create(Ctx, "", F);
  110   const BasicBlock *BBConst = BB1;
unittests/IR/CFGBuilder.cpp
   37 static void ConnectBlocks(BasicBlock *From, BasicBlock *To) {
   37 static void ConnectBlocks(BasicBlock *From, BasicBlock *To) {
   58 static void DisconnectBlocks(BasicBlock *From, BasicBlock *To) {
   58 static void DisconnectBlocks(BasicBlock *From, BasicBlock *To) {
   85 BasicBlock *CFGBuilder::getOrAddBlock(StringRef BlockName) {
   90   auto *BB = BasicBlock::Create(F->getParent()->getContext(), BlockName, F);
   90   auto *BB = BasicBlock::Create(F->getParent()->getContext(), BlockName, F);
   98   BasicBlock *From = getOrAddBlock(A.From);
   99   BasicBlock *To = getOrAddBlock(A.To);
  114   BasicBlock *From = getOrAddBlock(A.From);
  115   BasicBlock *To = getOrAddBlock(A.To);
unittests/IR/CFGBuilder.h
   74   BasicBlock *getOrAddBlock(StringRef BlockName);
   86   StringMap<BasicBlock *> NameToBlock;
unittests/IR/DominatorTreeBatchUpdatesTest.cpp
   51   BasicBlock *A = Builder.getOrAddBlock("A");
   52   BasicBlock *B = Builder.getOrAddBlock("B");
   53   BasicBlock *C = Builder.getOrAddBlock("C");
   54   BasicBlock *D = Builder.getOrAddBlock("D");
   60   cfg::LegalizeUpdates<BasicBlock *>(Updates, Legalized, false);
   74   BasicBlock *A = Builder.getOrAddBlock("A");
   75   BasicBlock *B = Builder.getOrAddBlock("B");
   76   BasicBlock *C = Builder.getOrAddBlock("C");
   77   BasicBlock *D = Builder.getOrAddBlock("D");
   83   cfg::LegalizeUpdates<BasicBlock *>(Updates, Legalized, true);
  102   BasicBlock *B = Builder.getOrAddBlock("B");
  103   BasicBlock *C = Builder.getOrAddBlock("C");
  124   BasicBlock *B = Builder.getOrAddBlock("B");
  125   BasicBlock *C = Builder.getOrAddBlock("C");
  150   BasicBlock *B = Builder.getOrAddBlock("B");
  151   BasicBlock *C = Builder.getOrAddBlock("C");
  152   BasicBlock *D = Builder.getOrAddBlock("D");
  153   BasicBlock *E = Builder.getOrAddBlock("E");
unittests/IR/DominatorTreeTest.cpp
   79         BasicBlock *BB0 = &*FI++;
   80         BasicBlock::iterator BBI = BB0->begin();
   85         BasicBlock *BB1 = &*FI++;
   89         BasicBlock *BB2 = &*FI++;
   93         BasicBlock *BB3 = &*FI++;
   98         BasicBlock *BB4 = &*FI++;
  207         SmallVector<BasicBlock *, 8> DominatedBBs, PostDominatedBBs;
  266         BasicBlock *NewEntry =
  267             BasicBlock::Create(F.getContext(), "new_entry", &F, BB0);
  299         BasicBlock *BB0 = &*FI++;
  300         BasicBlock *BB1 = &*FI++;
  301         BasicBlock *BB2 = &*FI++;
  384         BasicBlock *B = &*FI++;
  385         BasicBlock *C = &*FI++;
  386         BasicBlock *D = &*FI++;
  478         BasicBlock *B = &*FI++;
  479         BasicBlock *C = &*FI++;
  480         BasicBlock *D = &*FI++;
  567         BasicBlock *B = &*FI++;
  568         BasicBlock *C = &*FI++;
  569         BasicBlock *C2 = &*FI++;
  570         BasicBlock *D = &*FI++;
  640         BasicBlock *A = &*FI++;
  641         BasicBlock *B = &*FI++;
  642         BasicBlock *C = &*FI++;
  643         BasicBlock *D = &*FI++;
  644         BasicBlock *E = &*FI++;
  649         SmallPtrSet<BasicBlock *, 1> DefBlocks;
  653         SmallVector<BasicBlock *, 32> IDFBlocks;
  654         SmallPtrSet<BasicBlock *, 32> LiveInBlocks;
  697     BasicBlock *From = B.getOrAddBlock(LastUpdate->Edge.From);
  698     BasicBlock *To = B.getOrAddBlock(LastUpdate->Edge.To);
  724   BasicBlock *From = B.getOrAddBlock(LastUpdate->Edge.From);
  725   BasicBlock *To = B.getOrAddBlock(LastUpdate->Edge.To);
  751     BasicBlock *From = B.getOrAddBlock(LastUpdate->Edge.From);
  752     BasicBlock *To = B.getOrAddBlock(LastUpdate->Edge.To);
  773   BasicBlock *From = B.getOrAddBlock(LastUpdate->Edge.From);
  774   BasicBlock *To = B.getOrAddBlock(LastUpdate->Edge.To);
  779   const BasicBlock *BB5 = B.getOrAddBlock("5");
  802     BasicBlock *From = B.getOrAddBlock(LastUpdate->Edge.From);
  803     BasicBlock *To = B.getOrAddBlock(LastUpdate->Edge.To);
  832       BasicBlock *From = B.getOrAddBlock(LastUpdate->Edge.From);
  833       BasicBlock *To = B.getOrAddBlock(LastUpdate->Edge.To);
  859     BasicBlock *From = B.getOrAddBlock(LastUpdate->Edge.From);
  860     BasicBlock *To = B.getOrAddBlock(LastUpdate->Edge.To);
  885     BasicBlock *From = B.getOrAddBlock(LastUpdate->Edge.From);
  886     BasicBlock *To = B.getOrAddBlock(LastUpdate->Edge.To);
  914     BasicBlock *From = B.getOrAddBlock(LastUpdate->Edge.From);
  915     BasicBlock *To = B.getOrAddBlock(LastUpdate->Edge.To);
  952       BasicBlock *From = B.getOrAddBlock(LastUpdate->Edge.From);
  953       BasicBlock *To = B.getOrAddBlock(LastUpdate->Edge.To);
  985   BasicBlock *From = B.getOrAddBlock("7");
  986   BasicBlock *To = B.getOrAddBlock("23");
unittests/IR/IRBuilderTest.cpp
   33     BB = BasicBlock::Create(Ctx, "", F);
   46   BasicBlock *BB;
  329   BasicBlock *TBB = BasicBlock::Create(Ctx, "", F);
  329   BasicBlock *TBB = BasicBlock::Create(Ctx, "", F);
  330   BasicBlock *FBB = BasicBlock::Create(Ctx, "", F);
  330   BasicBlock *FBB = BasicBlock::Create(Ctx, "", F);
  736   BasicBlock *GBB = BasicBlock::Create(Ctx, "", G);
  736   BasicBlock *GBB = BasicBlock::Create(Ctx, "", G);
  815   auto BB2 = BasicBlock::Create(Ctx, "bb2", F);
unittests/IR/InstructionsTest.cpp
   99   BasicBlock *BB1 = BasicBlock::Create(Ctx, "", F);
   99   BasicBlock *BB1 = BasicBlock::Create(Ctx, "", F);
  100   BasicBlock *BB2 = BasicBlock::Create(Ctx, "", F);
  100   BasicBlock *BB2 = BasicBlock::Create(Ctx, "", F);
  120   BasicBlock* bb0 = BasicBlock::Create(C);
  120   BasicBlock* bb0 = BasicBlock::Create(C);
  121   BasicBlock* bb1 = BasicBlock::Create(C);
  121   BasicBlock* bb1 = BasicBlock::Create(C);
  293   BasicBlock *BB = BasicBlock::Create(C);
  293   BasicBlock *BB = BasicBlock::Create(C);
  333   BasicBlock* BB0 = BasicBlock::Create(C);
  333   BasicBlock* BB0 = BasicBlock::Create(C);
  571   std::unique_ptr<BasicBlock> NormalDest(BasicBlock::Create(C));
  571   std::unique_ptr<BasicBlock> NormalDest(BasicBlock::Create(C));
  572   std::unique_ptr<BasicBlock> UnwindDest(BasicBlock::Create(C));
  572   std::unique_ptr<BasicBlock> UnwindDest(BasicBlock::Create(C));
  598   auto *OnlyBB = BasicBlock::Create(Ctx, "bb", F);
  598   auto *OnlyBB = BasicBlock::Create(Ctx, "bb", F);
  696   std::unique_ptr<BasicBlock> BB1, BB2, BB3;
  697   BB1.reset(BasicBlock::Create(C));
  698   BB2.reset(BasicBlock::Create(C));
  699   BB3.reset(BasicBlock::Create(C));
  703   std::unique_ptr<BasicBlock> BB0(BasicBlock::Create(C));
  703   std::unique_ptr<BasicBlock> BB0(BasicBlock::Create(C));
  759   std::unique_ptr<BasicBlock> BB1, BB2, BB3;
  760   BB1.reset(BasicBlock::Create(C));
  761   BB2.reset(BasicBlock::Create(C));
  762   BB3.reset(BasicBlock::Create(C));
  766   std::unique_ptr<BasicBlock> BB0(BasicBlock::Create(C));
  766   std::unique_ptr<BasicBlock> BB0(BasicBlock::Create(C));
 1026   BasicBlock &BB = F->front();
 1094   BasicBlock &BranchTestExit = *BBs;
 1096   BasicBlock &IfThen = *BBs;
unittests/IR/LegacyPassManagerTest.cpp
  245       bool runOnBasicBlock(BasicBlock &BB) override {
  533         BasicBlock *label_entry =
  534             BasicBlock::Create(Context, "entry", func_test1, nullptr);
  549         BasicBlock *label_entry_5 =
  550             BasicBlock::Create(Context, "entry", func_test2, nullptr);
  565         BasicBlock *label_entry_8 =
  566             BasicBlock::Create(Context, "entry", func_test3, nullptr);
  584         BasicBlock *label_entry_11 =
  585             BasicBlock::Create(Context, "entry", func_test4, nullptr);
  586         BasicBlock *label_bb =
  587             BasicBlock::Create(Context, "bb", func_test4, nullptr);
  588         BasicBlock *label_bb1 =
  589             BasicBlock::Create(Context, "bb1", func_test4, nullptr);
  590         BasicBlock *label_return =
  591             BasicBlock::Create(Context, "return", func_test4, nullptr);
unittests/IR/MetadataTest.cpp
  351   auto *BB0 = BasicBlock::Create(Context, "entry", F0);
  351   auto *BB0 = BasicBlock::Create(Context, "entry", F0);
  352   auto *BB1 = BasicBlock::Create(Context, "entry", F1);
  352   auto *BB1 = BasicBlock::Create(Context, "entry", F1);
  379   auto *BB0 = BasicBlock::Create(Context, "entry", F0);
  379   auto *BB0 = BasicBlock::Create(Context, "entry", F0);
  380   auto *BB1 = BasicBlock::Create(Context, "entry", F1);
  380   auto *BB1 = BasicBlock::Create(Context, "entry", F1);
  410   auto *BB0 = BasicBlock::Create(Context, "entry", F0);
  410   auto *BB0 = BasicBlock::Create(Context, "entry", F0);
 2741   (void)new UnreachableInst(Context, BasicBlock::Create(Context, "bb", F));
unittests/IR/PassManagerTest.cpp
   35       for (BasicBlock::iterator II = BBI->begin(), IE = BBI->end(); II != IE;
unittests/IR/PatternMatch.cpp
   37   BasicBlock *BB;
   45         BB(BasicBlock::Create(Ctx, "entry", F)), IRB(BB) {}
 1085   BasicBlock *TrueBB = BasicBlock::Create(Ctx, "TrueBB", F);
 1085   BasicBlock *TrueBB = BasicBlock::Create(Ctx, "TrueBB", F);
 1086   BasicBlock *FalseBB = BasicBlock::Create(Ctx, "FalseBB", F);
 1086   BasicBlock *FalseBB = BasicBlock::Create(Ctx, "FalseBB", F);
 1091   BasicBlock *A, *B;
unittests/IR/UserTest.cpp
   70   BasicBlock &ExitBB = F->back();
unittests/IR/ValueTest.cpp
  132   BasicBlock &BB = F->getEntryBlock();
  207   BasicBlock &EntryBB = F->getEntryBlock();
  209   BasicBlock *BB2 = &*++F->begin();
  242   BasicBlock *BB2 = &*++F->begin();
unittests/IR/VerifierTest.cpp
   30   BasicBlock *Entry = BasicBlock::Create(C, "entry", F);
   30   BasicBlock *Entry = BasicBlock::Create(C, "entry", F);
   31   BasicBlock *Exit = BasicBlock::Create(C, "exit", F);
   31   BasicBlock *Exit = BasicBlock::Create(C, "exit", F);
   74   BasicBlock *Entry1 = BasicBlock::Create(C, "entry", F1);
   74   BasicBlock *Entry1 = BasicBlock::Create(C, "entry", F1);
   75   BasicBlock *Entry3 = BasicBlock::Create(C, "entry", F3);
   75   BasicBlock *Entry3 = BasicBlock::Create(C, "entry", F3);
  178     IRBuilder<> Builder(BasicBlock::Create(C, "", F));
unittests/Linker/LinkModulesTest.cpp
   35     EntryBB = BasicBlock::Create(Ctx, "entry", F);
   36     SwitchCase1BB = BasicBlock::Create(Ctx, "switch.case.1", F);
   37     SwitchCase2BB = BasicBlock::Create(Ctx, "switch.case.2", F);
   38     ExitBB = BasicBlock::Create(Ctx, "exit", F);
   68   BasicBlock *EntryBB;
   69   BasicBlock *SwitchCase1BB;
   70   BasicBlock *SwitchCase2BB;
   71   BasicBlock *ExitBB;
  142   BasicBlock *BB = BasicBlock::Create(Ctx, "", F);
  142   BasicBlock *BB = BasicBlock::Create(Ctx, "", F);
  157   BasicBlock *BB = BasicBlock::Create(Ctx, "", F);
  157   BasicBlock *BB = BasicBlock::Create(Ctx, "", F);
  259   BasicBlock *BB = &F->getEntryBlock();
unittests/ProfileData/InstrProfTest.cpp
  293   BasicBlock *BB = BasicBlock::Create(Ctx, "", F);
  293   BasicBlock *BB = BasicBlock::Create(Ctx, "", F);
  296   BasicBlock *TBB = BasicBlock::Create(Ctx, "", F);
  296   BasicBlock *TBB = BasicBlock::Create(Ctx, "", F);
  297   BasicBlock *FBB = BasicBlock::Create(Ctx, "", F);
  297   BasicBlock *FBB = BasicBlock::Create(Ctx, "", F);
unittests/Transforms/Scalar/LoopPassManagerTest.cpp
  886   BasicBlock &EntryBB = *BBI++;
  888   BasicBlock &Loop0BB = *BBI++;
  890   BasicBlock &Loop00PHBB = *BBI++;
  892   BasicBlock &Loop00BB = *BBI++;
  894   BasicBlock &Loop01PHBB = *BBI++;
  896   BasicBlock &Loop01BB = *BBI++;
  898   BasicBlock &Loop02PHBB = *BBI++;
  900   BasicBlock &Loop02BB = *BBI++;
  902   BasicBlock &Loop0LatchBB = *BBI++;
  904   BasicBlock &EndBB = *BBI++;
  947   BasicBlock *NewLoop010BB, *NewLoop01LatchBB;
  954         auto *NewLoop010PHBB =
  955             BasicBlock::Create(Context, "loop.0.1.0.ph", &F, &Loop02PHBB);
  957             BasicBlock::Create(Context, "loop.0.1.0", &F, &Loop02PHBB);
  959             BasicBlock::Create(Context, "loop.0.1.latch", &F, &Loop02PHBB);
 1000         auto *NewLoop011PHBB = BasicBlock::Create(Context, "loop.0.1.1.ph", &F, NewLoop01LatchBB);
 1000         auto *NewLoop011PHBB = BasicBlock::Create(Context, "loop.0.1.1.ph", &F, NewLoop01LatchBB);
 1001         auto *NewLoop011BB = BasicBlock::Create(Context, "loop.0.1.1", &F, NewLoop01LatchBB);
 1001         auto *NewLoop011BB = BasicBlock::Create(Context, "loop.0.1.1", &F, NewLoop01LatchBB);
 1089   BasicBlock &EntryBB = *BBI++;
 1091   BasicBlock &Loop0BB = *BBI++;
 1093   BasicBlock &Loop00PHBB = *BBI++;
 1095   BasicBlock &Loop00BB = *BBI++;
 1097   BasicBlock &Loop02PHBB = *BBI++;
 1099   BasicBlock &Loop02BB = *BBI++;
 1101   BasicBlock &Loop0LatchBB = *BBI++;
 1103   BasicBlock &Loop2PHBB = *BBI++;
 1105   BasicBlock &Loop2BB = *BBI++;
 1107   BasicBlock &EndBB = *BBI++;
 1148         auto *NewLoop01PHBB = BasicBlock::Create(Context, "loop.0.1.ph", &F, &Loop02PHBB);
 1148         auto *NewLoop01PHBB = BasicBlock::Create(Context, "loop.0.1.ph", &F, &Loop02PHBB);
 1149         auto *NewLoop01BB = BasicBlock::Create(Context, "loop.0.1", &F, &Loop02PHBB);
 1149         auto *NewLoop01BB = BasicBlock::Create(Context, "loop.0.1", &F, &Loop02PHBB);
 1193         auto *NewLoop03PHBB =
 1194             BasicBlock::Create(Context, "loop.0.3.ph", &F, &Loop0LatchBB);
 1195         auto *NewLoop03BB =
 1196             BasicBlock::Create(Context, "loop.0.3", &F, &Loop0LatchBB);
 1197         auto *NewLoop04PHBB =
 1198             BasicBlock::Create(Context, "loop.0.4.ph", &F, &Loop0LatchBB);
 1199         auto *NewLoop04BB =
 1200             BasicBlock::Create(Context, "loop.0.4", &F, &Loop0LatchBB);
 1201         auto *NewLoop040PHBB =
 1202             BasicBlock::Create(Context, "loop.0.4.0.ph", &F, &Loop0LatchBB);
 1203         auto *NewLoop040BB =
 1204             BasicBlock::Create(Context, "loop.0.4.0", &F, &Loop0LatchBB);
 1205         auto *NewLoop04LatchBB =
 1206             BasicBlock::Create(Context, "loop.0.4.latch", &F, &Loop0LatchBB);
 1270         auto *NewLoop1PHBB = BasicBlock::Create(Context, "loop.1.ph", &F, &Loop2BB);
 1270         auto *NewLoop1PHBB = BasicBlock::Create(Context, "loop.1.ph", &F, &Loop2BB);
 1271         auto *NewLoop1BB = BasicBlock::Create(Context, "loop.1", &F, &Loop2BB);
 1271         auto *NewLoop1BB = BasicBlock::Create(Context, "loop.1", &F, &Loop2BB);
 1350   BasicBlock &EntryBB = *BBI++;
 1352   BasicBlock &Loop0BB = *BBI++;
 1354   BasicBlock &Loop00PHBB = *BBI++;
 1356   BasicBlock &Loop00BB = *BBI++;
 1358   BasicBlock &Loop01PHBB = *BBI++;
 1360   BasicBlock &Loop01BB = *BBI++;
 1362   BasicBlock &Loop02PHBB = *BBI++;
 1364   BasicBlock &Loop02BB = *BBI++;
 1366   BasicBlock &Loop020PHBB = *BBI++;
 1368   BasicBlock &Loop020BB = *BBI++;
 1370   BasicBlock &Loop02LatchBB = *BBI++;
 1372   BasicBlock &Loop0LatchBB = *BBI++;
 1374   BasicBlock &EndBB = *BBI++;
 1385     SmallVector<BasicBlock *, 4> LoopBBs(L.block_begin(), L.block_end());
 1389     for (BasicBlock *LoopBB : LoopBBs) {
 1398     for (BasicBlock *LoopBB : LoopBBs)
 1486   BasicBlock *NewLoop03PHBB;
 1502                 BasicBlock::Create(Context, "loop.0.3.ph", &F, &Loop0LatchBB);
 1503             auto *NewLoop03BB =
 1504                 BasicBlock::Create(Context, "loop.0.3", &F, &Loop0LatchBB);
unittests/Transforms/Utils/CloningTest.cpp
  166   BasicBlock *BB = BasicBlock::Create(context, "", F1);
  166   BasicBlock *BB = BasicBlock::Create(context, "", F1);
  192   BasicBlock *BB = BasicBlock::Create(context, "", F1);
  192   BasicBlock *BB = BasicBlock::Create(context, "", F1);
  216   BasicBlock *BB1 = BasicBlock::Create(context, "", F);
  216   BasicBlock *BB1 = BasicBlock::Create(context, "", F);
  219   BasicBlock *BB2 = BasicBlock::Create(context, "", F);
  219   BasicBlock *BB2 = BasicBlock::Create(context, "", F);
  265   BasicBlock *BB1 = BasicBlock::Create(context, "", F);
  265   BasicBlock *BB1 = BasicBlock::Create(context, "", F);
  268   BasicBlock *BB2 = BasicBlock::Create(context, "", F);
  268   BasicBlock *BB2 = BasicBlock::Create(context, "", F);
  318   BasicBlock *BB1 = BasicBlock::Create(context, "", F);
  318   BasicBlock *BB1 = BasicBlock::Create(context, "", F);
  321   BasicBlock *BB2 = BasicBlock::Create(context, "", F);
  321   BasicBlock *BB2 = BasicBlock::Create(context, "", F);
  422         BasicBlock *Preheader = &*(++FI);
  423         BasicBlock *Header = &*(++FI);
  431         SmallVector<BasicBlock *, 4> ClonedLoopBlocks;
  486     BasicBlock* Entry = BasicBlock::Create(C, "", OldFunc);
  486     BasicBlock* Entry = BasicBlock::Create(C, "", OldFunc);
  769     auto *Entry = BasicBlock::Create(C, "", F);
  769     auto *Entry = BasicBlock::Create(C, "", F);
unittests/Transforms/Utils/CodeExtractorTest.cpp
   25 BasicBlock *getBlockByName(Function *F, StringRef name) {
   26   for (auto &BB : *F)
   58   SmallVector<BasicBlock *, 3> Candidates{ getBlockByName(Func, "header"),
   68   BasicBlock *Exit = getBlockByName(Func, "notExtracted");
   69   BasicBlock *ExitSplit = getBlockByName(Outlined, "notExtracted.split");
  108   SmallVector<BasicBlock *, 2> ExtractedBlocks{
  119   BasicBlock *Exit1 = getBlockByName(Func, "exit1");
  120   BasicBlock *Exit2 = getBlockByName(Func, "exit2");
  181   SmallVector<BasicBlock *, 2> ExtractedBlocks{
  220   SmallVector<BasicBlock *, 1> Blocks{ getBlockByName(Func, "entry"),
  273   SmallVector<BasicBlock *, 1> Blocks{ getBlockByName(Func, "if.else") };
unittests/Transforms/Utils/FunctionComparatorTest.cpp
   21   BasicBlock *BB;
   31     BB = BasicBlock::Create(Ctx, "", F);
   66   int testCmpBasicBlocks(BasicBlock *BBL, BasicBlock *BBR) {
   66   int testCmpBasicBlocks(BasicBlock *BBL, BasicBlock *BBR) {
unittests/Transforms/Utils/IntegerDivisionTest.cpp
   33   BasicBlock *BB = BasicBlock::Create(C, "", F);
   33   BasicBlock *BB = BasicBlock::Create(C, "", F);
   63   BasicBlock *BB = BasicBlock::Create(C, "", F);
   63   BasicBlock *BB = BasicBlock::Create(C, "", F);
   93   BasicBlock *BB = BasicBlock::Create(C, "", F);
   93   BasicBlock *BB = BasicBlock::Create(C, "", F);
  123   BasicBlock *BB = BasicBlock::Create(C, "", F);
  123   BasicBlock *BB = BasicBlock::Create(C, "", F);
  154   BasicBlock *BB = BasicBlock::Create(C, "", F);
  154   BasicBlock *BB = BasicBlock::Create(C, "", F);
  184   BasicBlock *BB = BasicBlock::Create(C, "", F);
  184   BasicBlock *BB = BasicBlock::Create(C, "", F);
  214   BasicBlock *BB = BasicBlock::Create(C, "", F);
  214   BasicBlock *BB = BasicBlock::Create(C, "", F);
  244   BasicBlock *BB = BasicBlock::Create(C, "", F);
  244   BasicBlock *BB = BasicBlock::Create(C, "", F);
unittests/Transforms/Utils/LocalTest.cpp
   31   BasicBlock *bb0 = BasicBlock::Create(C);
   31   BasicBlock *bb0 = BasicBlock::Create(C);
   32   BasicBlock *bb1 = BasicBlock::Create(C);
   32   BasicBlock *bb1 = BasicBlock::Create(C);
   75   BasicBlock *Entry(BasicBlock::Create(C, "", F.get()));
   75   BasicBlock *Entry(BasicBlock::Create(C, "", F.get()));
   76   BasicBlock *BB(BasicBlock::Create(C, "", F.get()));
   76   BasicBlock *BB(BasicBlock::Create(C, "", F.get()));
  215       BasicBlock *BB = &*I++;
  216       BasicBlock *SinglePred = BB->getSinglePredecessor();
  439       BasicBlock *BB = &*I++;
  451       BasicBlock *BB = &*I++;
  577   BasicBlock *BB = &F->front();
  615   BasicBlock &BB = F.front();
  712   BasicBlock &BB = F.front();
unittests/Transforms/Utils/SSAUpdaterBulkTest.cpp
   47   BasicBlock *IfBB = BasicBlock::Create(C, "if", F);
   47   BasicBlock *IfBB = BasicBlock::Create(C, "if", F);
   48   BasicBlock *TrueBB = BasicBlock::Create(C, "true", F);
   48   BasicBlock *TrueBB = BasicBlock::Create(C, "true", F);
   49   BasicBlock *FalseBB = BasicBlock::Create(C, "false", F);
   49   BasicBlock *FalseBB = BasicBlock::Create(C, "false", F);
   50   BasicBlock *MergeBB = BasicBlock::Create(C, "merge", F);
   50   BasicBlock *MergeBB = BasicBlock::Create(C, "merge", F);
  134   BasicBlock *IfBB = BasicBlock::Create(C, "if", F);
  134   BasicBlock *IfBB = BasicBlock::Create(C, "if", F);
  135   BasicBlock *LoopStartBB = BasicBlock::Create(C, "loopstart", F);
  135   BasicBlock *LoopStartBB = BasicBlock::Create(C, "loopstart", F);
  136   BasicBlock *LoopMainBB = BasicBlock::Create(C, "loopmain", F);
  136   BasicBlock *LoopMainBB = BasicBlock::Create(C, "loopmain", F);
  137   BasicBlock *AfterLoopBB = BasicBlock::Create(C, "afterloop", F);
  137   BasicBlock *AfterLoopBB = BasicBlock::Create(C, "afterloop", F);
unittests/Transforms/Utils/SizeOptsTest.cpp
   65   BasicBlock &BB0 = F->getEntryBlock();
   66   BasicBlock *BB1 = BB0.getTerminator()->getSuccessor(0);
   67   BasicBlock *BB2 = BB0.getTerminator()->getSuccessor(1);
   68   BasicBlock *BB3 = BB1->getSingleSuccessor();
unittests/Transforms/Vectorize/VPlanDominatorTreeTest.cpp
   41   BasicBlock *LoopHeader = F->getEntryBlock().getSingleSuccessor();
unittests/Transforms/Vectorize/VPlanHCFGTest.cpp
   40   BasicBlock *LoopHeader = F->getEntryBlock().getSingleSuccessor();
  117   BasicBlock *LoopHeader = F->getEntryBlock().getSingleSuccessor();
unittests/Transforms/Vectorize/VPlanLoopInfoTest.cpp
   41   BasicBlock *LoopHeader = F->getEntryBlock().getSingleSuccessor();
unittests/Transforms/Vectorize/VPlanPredicatorTest.cpp
   66   BasicBlock *LoopHeader = F->getEntryBlock().getSingleSuccessor();
  160   BasicBlock *LoopHeader = F->getEntryBlock().getSingleSuccessor();
unittests/Transforms/Vectorize/VPlanSlpTest.cpp
   96   BasicBlock *LoopHeader = F->getEntryBlock().getSingleSuccessor();
  164   BasicBlock *LoopHeader = F->getEntryBlock().getSingleSuccessor();
  230   BasicBlock *LoopHeader = F->getEntryBlock().getSingleSuccessor();
  289   BasicBlock *LoopHeader = F->getEntryBlock().getSingleSuccessor();
  418   BasicBlock *LoopHeader = F->getEntryBlock().getSingleSuccessor();
  490   BasicBlock *LoopHeader = F->getEntryBlock().getSingleSuccessor();
  562   BasicBlock *LoopHeader = F->getEntryBlock().getSingleSuccessor();
  638   BasicBlock *LoopHeader = F->getEntryBlock().getSingleSuccessor();
  698   BasicBlock *LoopHeader = F->getEntryBlock().getSingleSuccessor();
  761   BasicBlock *LoopHeader = F->getEntryBlock().getSingleSuccessor();
  821   BasicBlock *LoopHeader = F->getEntryBlock().getSingleSuccessor();
  880   BasicBlock *LoopHeader = F->getEntryBlock().getSingleSuccessor();
unittests/Transforms/Vectorize/VPlanTestBase.h
   48   VPlanPtr buildHCFG(BasicBlock *LoopHeader) {
   58   VPlanPtr buildPlainCFG(BasicBlock *LoopHeader) {
usr/include/c++/7.4.0/bits/alloc_traits.h
  474 	construct(allocator_type& __a, _Up* __p, _Args&&... __args)
usr/include/c++/7.4.0/bits/move.h
   72     constexpr _Tp&&
   83     constexpr _Tp&&
usr/include/c++/7.4.0/bits/range_access.h
   48     begin(_Container& __cont) -> decltype(__cont.begin())
   58     begin(const _Container& __cont) -> decltype(__cont.begin())
   68     end(_Container& __cont) -> decltype(__cont.end())
   78     end(const _Container& __cont) -> decltype(__cont.end())
usr/include/c++/7.4.0/bits/stl_iterator_base_types.h
  123       typedef _Tp        value_type;
usr/include/c++/7.4.0/bits/stl_list.h
  570 	_M_create_node(_Args&&... __args)
 1131 	emplace_back(_Args&&... __args)
 1799        _M_insert(iterator __position, _Args&&... __args)
usr/include/c++/7.4.0/bits/unique_ptr.h
   68         default_delete(const default_delete<_Up>&) noexcept { }
   72       operator()(_Tp* __ptr) const
   74 	static_assert(!is_void<_Tp>::value,
   76 	static_assert(sizeof(_Tp)>0,
  122 	  using type = _Up*;
  137       using pointer = typename _Ptr<_Tp, _Dp>::type;
  161 	typename __uniq_ptr_impl<_Tp, _Up>::_DeleterConstraint::type;
  163       __uniq_ptr_impl<_Tp, _Dp> _M_t;
  166       using pointer	  = typename __uniq_ptr_impl<_Tp, _Dp>::pointer;
  167       using element_type  = _Tp;
  252 	unique_ptr(unique_ptr<_Up, _Ep>&& __u) noexcept
  297           __safe_conversion_up<_Up, _Ep>,
  301 	operator=(unique_ptr<_Up, _Ep>&& __u) noexcept
usr/include/c++/7.4.0/ext/new_allocator.h
  135 	construct(_Up* __p, _Args&&... __args)
usr/include/c++/7.4.0/type_traits
  215     : public __is_void_helper<typename remove_cv<_Tp>::type>::type
  581     : public __or_<is_lvalue_reference<_Tp>,
  582                    is_rvalue_reference<_Tp>>::type
  601     : public __not_<__or_<is_function<_Tp>, is_reference<_Tp>,
  601     : public __not_<__or_<is_function<_Tp>, is_reference<_Tp>,
  602                           is_void<_Tp>>>::type
  638     : public __or_<is_object<_Tp>, is_reference<_Tp>>::type
  638     : public __or_<is_object<_Tp>, is_reference<_Tp>>::type
 1554     { typedef _Tp     type; };
 1563     { typedef _Tp     type; };
 1574       remove_const<typename remove_volatile<_Tp>::type>::type     type;
 1633     { typedef _Tp   type; };
 1645     { typedef _Tp&   type; };
 1650     : public __add_lvalue_reference_helper<_Tp>
 1659     { typedef _Tp&&   type; };
 1983     { typedef _Up     type; };
 2171     { typedef _Iffalse type; };
utils/unittest/googlemock/include/gmock/gmock-matchers.h
 1844   AssertionResult operator()(const char* value_text, const T& x) const {
 1856     const Matcher<const T&> matcher = SafeMatcherCast<const T&>(matcher_);
 1856     const Matcher<const T&> matcher = SafeMatcherCast<const T&>(matcher_);
utils/unittest/googletest/include/gtest/gtest-printers.h
  366 void UniversalPrint(const T& value, ::std::ostream* os);
  373                     const C& container, ::std::ostream* os) {
  377   for (typename C::const_iterator it = container.begin();
  407                     T* p, ::std::ostream* os) {
  416     if (IsTrue(ImplicitlyConvertible<T*, const void*>::value)) {
  439                     const T& value, ::std::ostream* os) {
  455 void PrintTo(const T& value, ::std::ostream* os) {
  478   DefaultPrintTo(IsContainerTest<T>(0), is_pointer<T>(), value, os);
  699   static void Print(const T& value, ::std::ostream* os) {
  856   typedef T T1;
utils/unittest/googletest/include/gtest/internal/gtest-internal.h
  933                             typename C::iterator* /* it */ = NULL,
  934                             typename C::const_iterator* /* const_it */ = NULL) {