MLIR  19.0.0git
CFGLoopInfo.cpp
Go to the documentation of this file.
1 //===- CFGLoopInfo.cpp - LoopInfo analysis for region bodies --------------===//
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 
10 #include "llvm/Support/GenericLoopInfoImpl.h"
11 
12 // Explicitly instantiate the LoopBase and LoopInfoBase classes defined in
13 // LoopInfoImpl.h for CFGLoops
14 template class llvm::LoopBase<mlir::Block, mlir::CFGLoop>;
15 template class llvm::LoopInfoBase<mlir::Block, mlir::CFGLoop>;
16 
17 using namespace mlir;
18 
19 CFGLoop::CFGLoop(mlir::Block *block)
20  : llvm::LoopBase<mlir::Block, CFGLoop>(block) {}
21 
22 CFGLoopInfo::CFGLoopInfo(
23  const llvm::DominatorTreeBase<mlir::Block, false> &domTree) {
24  analyze(domTree);
25 }
26 
27 raw_ostream &mlir::operator<<(raw_ostream &os, mlir::Block &block) {
28  block.print(os);
29  return os;
30 }
Block represents an ordered list of Operations.
Definition: Block.h:30
void print(raw_ostream &os)
Representation of a single loop formed by blocks.
Definition: CFGLoopInfo.h:37
Include the generated interface declarations.
Definition: CallGraph.h:229
Include the generated interface declarations.
raw_ostream & operator<<(raw_ostream &os, const AliasResult &result)
Definition: AliasAnalysis.h:78