Files
clang-p2996/mlir/lib/Analysis/CFGLoopInfo.cpp
Christian Ulmann 1ef51e0452 [mlir][Analysis] Introduce LoopInfo in mlir
This commit introduces an instantiation of LLVM's LoopInfo for CFGs in
MLIR. To test the LoopInfo, a test pass is added the checks the analysis
results for a set of CFGs.

Reviewed By: ftynse

Differential Revision: https://reviews.llvm.org/D147323
2023-04-05 12:57:16 +00:00

20 lines
638 B
C++

//===- CFGLoopInfo.cpp - LoopInfo analysis for region bodies --------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
#include "mlir/Analysis/CFGLoopInfo.h"
using namespace mlir;
CFGLoop::CFGLoop(mlir::Block *block)
: llvm::LoopBase<mlir::Block, CFGLoop>(block) {}
CFGLoopInfo::CFGLoopInfo(
const llvm::DominatorTreeBase<mlir::Block, false> &domTree) {
analyze(domTree);
}