1 | //===--------- HipStdPar.h - Standard Parallelism passes --------*- C++ -*-===// |
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 | /// \file |
9 | /// |
10 | /// AcceleratorCodeSelection - Identify all functions reachable from a kernel, |
11 | /// removing those that are unreachable. |
12 | /// |
13 | /// AllocationInterposition - Forward calls to allocation / deallocation |
14 | // functions to runtime provided equivalents that allocate memory that is |
15 | // accessible for an accelerator |
16 | //===----------------------------------------------------------------------===// |
17 | |
18 | #ifndef LLVM_TRANSFORMS_HIPSTDPAR_HIPSTDPAR_H |
19 | #define LLVM_TRANSFORMS_HIPSTDPAR_HIPSTDPAR_H |
20 | |
21 | #include "llvm/IR/PassManager.h" |
22 | |
23 | namespace llvm { |
24 | |
25 | class Module; |
26 | |
27 | class HipStdParAcceleratorCodeSelectionPass |
28 | : public PassInfoMixin<HipStdParAcceleratorCodeSelectionPass> { |
29 | public: |
30 | PreservedAnalyses run(Module &M, ModuleAnalysisManager &MAM); |
31 | |
32 | static bool isRequired() { return true; } |
33 | }; |
34 | |
35 | class HipStdParAllocationInterpositionPass |
36 | : public PassInfoMixin<HipStdParAllocationInterpositionPass> { |
37 | public: |
38 | PreservedAnalyses run(Module &M, ModuleAnalysisManager &MAM); |
39 | |
40 | static bool isRequired() { return true; } |
41 | }; |
42 | |
43 | } // namespace llvm |
44 | |
45 | #endif // LLVM_TRANSFORMS_HIPSTDPAR_HIPSTDPAR_H |
46 | |