/builds/2mk6rsew/0/parcoach/parcoach/src/include/parcoach/CollListFunctionAnalysis.h
Line | Count | Source |
1 | | #pragma once |
2 | | #include "parcoach/CollListLoopAnalysis.h" |
3 | | |
4 | | #include "parcoach/CollectiveList.h" |
5 | | #include "parcoach/Warning.h" |
6 | | |
7 | | #include "llvm/ADT/DenseMap.h" |
8 | | #include "llvm/Passes/PassBuilder.h" |
9 | | #include "llvm/Support/raw_ostream.h" |
10 | | |
11 | | namespace llvm { |
12 | | class Function; |
13 | | } |
14 | | |
15 | | namespace parcoach { |
16 | | |
17 | | class CollListFunctionAnalysis |
18 | | : public llvm::AnalysisInfoMixin<CollListFunctionAnalysis> { |
19 | | friend llvm::AnalysisInfoMixin<CollListFunctionAnalysis>; |
20 | | static llvm::AnalysisKey Key; |
21 | | |
22 | | public: |
23 | | // We return a unique_ptr to ensure stability of the analysis' internal state. |
24 | | using Result = std::unique_ptr<CollectiveList::CommToBBToCollListMap>; |
25 | | static Result run(llvm::Module &M, llvm::ModuleAnalysisManager &); |
26 | | }; |
27 | | |
28 | | class CollectiveAnalysis : public llvm::AnalysisInfoMixin<CollectiveAnalysis> { |
29 | | friend llvm::AnalysisInfoMixin<CollectiveAnalysis>; |
30 | | static llvm::AnalysisKey Key; |
31 | | bool EmitDotDG_; |
32 | | |
33 | | public: |
34 | 1.82k | CollectiveAnalysis(bool EmitDotDG) : EmitDotDG_(EmitDotDG) {} |
35 | | // We return a unique_ptr to ensure stability of the analysis' internal state. |
36 | | using Result = std::unique_ptr<WarningCollection>; |
37 | | Result run(llvm::Module &M, llvm::ModuleAnalysisManager &) const; |
38 | | }; |
39 | | |
40 | | } // namespace parcoach |