CIRCT  19.0.0git
SchedulingAnalysis.h
Go to the documentation of this file.
1 //===- SchedulingAnalysis.h - scheduling analyses -------------------------===//
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 header file defines prototypes for methods that perform analysis
10 // involving scheduling.
11 //
12 //===----------------------------------------------------------------------===//
13 
14 #ifndef CIRCT_ANALYSIS_SCHEDULING_ANALYSIS_H
15 #define CIRCT_ANALYSIS_SCHEDULING_ANALYSIS_H
16 
19 #include "circt/Support/LLVM.h"
20 #include "mlir/Dialect/Affine/IR/AffineOps.h"
21 
22 namespace mlir {
23 class AnalysisManager;
24 namespace func {
25 class FuncOp;
26 } // namespace func
27 } // namespace mlir
28 namespace circt {
29 namespace analysis {
30 
31 /// CyclicSchedulingAnalysis constructs a CyclicProblem for each AffineForOp by
32 /// performing a memory dependence analysis and inserting dependences into the
33 /// problem. The client should retrieve the partially complete problem to add
34 /// and associate operator types.
36  CyclicSchedulingAnalysis(Operation *funcOp, mlir::AnalysisManager &am);
37 
38  scheduling::CyclicProblem &getProblem(mlir::affine::AffineForOp forOp);
39 
40 private:
41  void analyzeForOp(mlir::affine::AffineForOp forOp,
42  MemoryDependenceAnalysis memoryAnalysis);
43 
44  DenseMap<Operation *, scheduling::CyclicProblem> problems;
45 };
46 
47 } // namespace analysis
48 } // namespace circt
49 
50 #endif // CIRCT_ANALYSIS_SCHEDULING_ANALYSIS_H
This class models a cyclic scheduling problem.
Definition: Problems.h:292
The InstanceGraph op interface, see InstanceGraphInterface.td for more details.
Definition: DebugAnalysis.h:21
CyclicSchedulingAnalysis constructs a CyclicProblem for each AffineForOp by performing a memory depen...
DenseMap< Operation *, scheduling::CyclicProblem > problems
CyclicSchedulingAnalysis(Operation *funcOp, mlir::AnalysisManager &am)
CyclicSchedulingAnalysis constructs a CyclicProblem for each AffineForOp by performing a memory depen...
void analyzeForOp(mlir::affine::AffineForOp forOp, MemoryDependenceAnalysis memoryAnalysis)
scheduling::CyclicProblem & getProblem(mlir::affine::AffineForOp forOp)
MemoryDependenceAnalysis traverses any AffineForOps in the FuncOp body and checks for affine memory a...