LLVM  15.0.0git
Interval.cpp
Go to the documentation of this file.
1 //===- Interval.cpp - Interval class code ---------------------------------===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 //
9 // This file contains the definition of the Interval class, which represents a
10 // partition of a control flow graph of some kind.
11 //
12 //===----------------------------------------------------------------------===//
13 
14 #include "llvm/Analysis/Interval.h"
15 #include "llvm/IR/BasicBlock.h"
17 
18 using namespace llvm;
19 
20 //===----------------------------------------------------------------------===//
21 // Interval Implementation
22 //===----------------------------------------------------------------------===//
23 
24 void Interval::print(raw_ostream &OS) const {
25  OS << "-------------------------------------------------------------\n"
26  << "Interval Contents:\n";
27 
28  // Print out all of the basic blocks in the interval...
29  for (const BasicBlock *Node : Nodes)
30  OS << *Node << "\n";
31 
32  OS << "Interval Predecessors:\n";
33  for (const BasicBlock *Predecessor : Predecessors)
34  OS << *Predecessor << "\n";
35 
36  OS << "Interval Successors:\n";
37  for (const BasicBlock *Successor : Successors)
38  OS << *Successor << "\n";
39 }
llvm
This is an optimization pass for GlobalISel generic memory operations.
Definition: AddressRanges.h:17
llvm::Interval::print
void print(raw_ostream &O) const
print - Show contents in human readable format...
Definition: Interval.cpp:24
llvm::BasicBlock
LLVM Basic Block Representation.
Definition: BasicBlock.h:55
llvm::raw_ostream
This class implements an extremely fast bulk output stream that can only output to a stream.
Definition: raw_ostream.h:54
BasicBlock.h
llvm::Interval::Successors
std::vector< BasicBlock * > Successors
Successors - List of BasicBlocks that are reachable directly from nodes in this interval,...
Definition: Interval.h:59
llvm::Interval::Nodes
std::vector< BasicBlock * > Nodes
Nodes - The basic blocks in this interval.
Definition: Interval.h:54
llvm::Successor
@ Successor
Definition: SIMachineScheduler.h:35
raw_ostream.h
llvm::Interval::Predecessors
std::vector< BasicBlock * > Predecessors
Predecessors - List of BasicBlocks that have this Interval's header block as one of their successors.
Definition: Interval.h:63
Interval.h