CIRCT  18.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 
29 using namespace mlir;
30 using namespace circt::scheduling;
31 
32 namespace circt {
33 namespace analysis {
34 
35 /// CyclicSchedulingAnalysis constructs a CyclicProblem for each AffineForOp by
36 /// performing a memory dependence analysis and inserting dependences into the
37 /// problem. The client should retrieve the partially complete problem to add
38 /// and associate operator types.
40  CyclicSchedulingAnalysis(Operation *funcOp, AnalysisManager &am);
41 
42  CyclicProblem &getProblem(affine::AffineForOp forOp);
43 
44 private:
45  void analyzeForOp(affine::AffineForOp forOp,
46  MemoryDependenceAnalysis memoryAnalysis);
47 
48  DenseMap<Operation *, CyclicProblem> problems;
49 };
50 
51 } // namespace analysis
52 } // namespace circt
53 
54 #endif // CIRCT_ANALYSIS_SCHEDULING_ANALYSIS_H
This class models a cyclic scheduling problem.
Definition: Problems.h:292
This file defines an intermediate representation for circuits acting as an abstraction for constraint...
Definition: DebugAnalysis.h:21
CyclicSchedulingAnalysis constructs a CyclicProblem for each AffineForOp by performing a memory depen...
DenseMap< Operation *, CyclicProblem > problems
MemoryDependenceAnalysis traverses any AffineForOps in the FuncOp body and checks for affine memory a...