| 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 | #include "llvm/Support/Compiler.h" |
| 23 | |
| 24 | namespace llvm { |
| 25 | |
| 26 | class Module; |
| 27 | |
| 28 | class HipStdParAcceleratorCodeSelectionPass |
| 29 | : public PassInfoMixin<HipStdParAcceleratorCodeSelectionPass> { |
| 30 | public: |
| 31 | LLVM_ABI PreservedAnalyses run(Module &M, ModuleAnalysisManager &MAM); |
| 32 | |
| 33 | static bool isRequired() { return true; } |
| 34 | }; |
| 35 | |
| 36 | class HipStdParAllocationInterpositionPass |
| 37 | : public PassInfoMixin<HipStdParAllocationInterpositionPass> { |
| 38 | public: |
| 39 | LLVM_ABI PreservedAnalyses run(Module &M, ModuleAnalysisManager &MAM); |
| 40 | |
| 41 | static bool isRequired() { return true; } |
| 42 | }; |
| 43 | |
| 44 | } // namespace llvm |
| 45 | |
| 46 | #endif // LLVM_TRANSFORMS_HIPSTDPAR_HIPSTDPAR_H |
| 47 | |