Lines Matching defs:MachineBasicBlock

1 //===-- llvm/CodeGen/MachineBasicBlock.h ------------------------*- C++ -*-===//
38 // this is only set by the MachineBasicBlock owning the LiveList
39 friend class MachineBasicBlock;
40 MachineBasicBlock* Parent;
62 class MachineBasicBlock : public ilist_node<MachineBasicBlock> {
71 std::vector<MachineBasicBlock *> Predecessors;
72 std::vector<MachineBasicBlock *> Successors;
103 MachineBasicBlock() {}
105 explicit MachineBasicBlock(MachineFunction &mf, const BasicBlock *bb);
107 ~MachineBasicBlock();
141 /// bundle_iterator - MachineBasicBlock iterator that automatically skips over
258 typedef std::vector<MachineBasicBlock *>::iterator pred_iterator;
259 typedef std::vector<MachineBasicBlock *>::const_iterator const_pred_iterator;
260 typedef std::vector<MachineBasicBlock *>::iterator succ_iterator;
261 typedef std::vector<MachineBasicBlock *>::const_iterator const_succ_iterator;
262 typedef std::vector<MachineBasicBlock *>::reverse_iterator
264 typedef std::vector<MachineBasicBlock *>::const_reverse_iterator
266 typedef std::vector<MachineBasicBlock *>::reverse_iterator
268 typedef std::vector<MachineBasicBlock *>::const_reverse_iterator
362 const MachineBasicBlock *getLandingPadSuccessor() const;
369 void moveBefore(MachineBasicBlock *NewAfter);
370 void moveAfter(MachineBasicBlock *NewBefore);
380 /// addSuccessor - Add succ as a successor of this MachineBasicBlock.
387 void addSuccessor(MachineBasicBlock *succ, uint32_t weight = 0);
393 /// MachineBasicBlock. The Predecessors list of succ is automatically updated.
395 void removeSuccessor(MachineBasicBlock *succ);
398 /// this MachineBasicBlock. The Predecessors list of succ is automatically
405 void replaceSuccessor(MachineBasicBlock *Old, MachineBasicBlock *New);
411 void transferSuccessors(MachineBasicBlock *fromMBB);
416 void transferSuccessorsAndUpdatePHIs(MachineBasicBlock *fromMBB);
420 bool isPredecessor(const MachineBasicBlock *MBB) const;
424 bool isSuccessor(const MachineBasicBlock *MBB) const;
431 bool isLayoutSuccessor(const MachineBasicBlock *MBB) const;
472 MachineBasicBlock *SplitCriticalEdge(MachineBasicBlock *Succ, Pass *P);
565 void splice(iterator Where, MachineBasicBlock *Other, iterator From) {
576 void splice(iterator Where, MachineBasicBlock *Other,
584 MachineBasicBlock *removeFromParent();
592 void ReplaceUsesOfBlockWith(MachineBasicBlock *Old, MachineBasicBlock *New);
600 bool CorrectExtraCFGEdges(MachineBasicBlock *DestA,
601 MachineBasicBlock *DestB,
667 friend struct ilist_traits<MachineBasicBlock>;
671 /// addPredecessor - Remove pred as a predecessor of this MachineBasicBlock.
675 void addPredecessor(MachineBasicBlock *pred);
678 /// MachineBasicBlock. Don't do this unless you know what you're
682 void removePredecessor(MachineBasicBlock *pred);
685 raw_ostream& operator<<(raw_ostream &OS, const MachineBasicBlock &MBB);
689 public std::unary_function<const MachineBasicBlock*, unsigned> {
690 unsigned operator()(const MachineBasicBlock *MBB) const {
703 template <> struct GraphTraits<MachineBasicBlock *> {
704 typedef MachineBasicBlock NodeType;
705 typedef MachineBasicBlock::succ_iterator ChildIteratorType;
707 static NodeType *getEntryNode(MachineBasicBlock *BB) { return BB; }
716 template <> struct GraphTraits<const MachineBasicBlock *> {
717 typedef const MachineBasicBlock NodeType;
718 typedef MachineBasicBlock::const_succ_iterator ChildIteratorType;
720 static NodeType *getEntryNode(const MachineBasicBlock *BB) { return BB; }
735 template <> struct GraphTraits<Inverse<MachineBasicBlock*> > {
736 typedef MachineBasicBlock NodeType;
737 typedef MachineBasicBlock::pred_iterator ChildIteratorType;
738 static NodeType *getEntryNode(Inverse<MachineBasicBlock *> G) {
749 template <> struct GraphTraits<Inverse<const MachineBasicBlock*> > {
750 typedef const MachineBasicBlock NodeType;
751 typedef MachineBasicBlock::const_pred_iterator ChildIteratorType;
752 static NodeType *getEntryNode(Inverse<const MachineBasicBlock*> G) {
770 MachineBasicBlock &MBB;
771 MachineBasicBlock::iterator I, B, E;
773 MachineInstrSpan(MachineBasicBlock::iterator I)
779 MachineBasicBlock::iterator begin() {
782 MachineBasicBlock::iterator end() { return E; }
785 MachineBasicBlock::iterator getInitial() { return I; }