1 | #ifndef TRITON_INCLUDE_TRITON_CODEGEN_TRANSFORM_PREFETCH_H |
2 | #define TRITON_INCLUDE_TRITON_CODEGEN_TRANSFORM_PREFETCH_H |
3 | |
4 | #include <set> |
5 | |
6 | // forward dclaration |
7 | namespace triton::ir{ |
8 | class module; |
9 | class value; |
10 | } |
11 | |
12 | namespace triton::codegen { |
13 | class target; |
14 | } |
15 | |
16 | namespace triton::codegen::transform { |
17 | class prefetch { |
18 | target* tgt_; |
19 | std::set<ir::value*> prefetched_vals_; |
20 | public: |
21 | prefetch(target *tgt) : tgt_(tgt) {} |
22 | void run(ir::module &module); |
23 | bool is_prefetched(ir::value* v) { return prefetched_vals_.find(v) != prefetched_vals_.end(); } |
24 | }; |
25 | } |
26 | |
27 | #endif |