LLVM 23.0.0git
AMDGPUSplitModule.h
Go to the documentation of this file.
1//===- AMDGPUSplitModule.h -------------------------------------*- 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//
9//===----------------------------------------------------------------------===//
10
11#ifndef LLVM_TARGET_AMDGPUSPLITMODULE_H
12#define LLVM_TARGET_AMDGPUSPLITMODULE_H
13
15#include "llvm/IR/PassManager.h"
16#include <memory>
17
18namespace llvm {
19
20/// Splits the module M into N linkable partitions. The function ModuleCallback
21/// is called N times passing each individual partition as the MPart argument.
23 : public OptionalPassInfoMixin<AMDGPUSplitModulePass> {
24public:
26 function_ref<void(std::unique_ptr<Module> MPart)>;
27
29 : N(N), ModuleCallback(ModuleCallback) {}
30
32
33private:
34 unsigned N;
35 ModuleCreationCallback ModuleCallback;
36};
37
38} // end namespace llvm
39
40#endif // LLVM_TARGET_AMDGPUSPLITMODULE_H
This header defines various interfaces for pass management in LLVM.
ModuleAnalysisManager MAM
PreservedAnalyses run(Module &M, ModuleAnalysisManager &MAM)
function_ref< void(std::unique_ptr< Module > MPart)> ModuleCreationCallback
AMDGPUSplitModulePass(unsigned N, ModuleCreationCallback ModuleCallback)
A Module instance is used to store all the information related to an LLVM module.
Definition Module.h:67
A set of analyses that are preserved following a run of a transformation pass.
Definition Analysis.h:112
An efficient, type-erasing, non-owning reference to a callable.
This is an optimization pass for GlobalISel generic memory operations.
AnalysisManager< Module > ModuleAnalysisManager
Convenience typedef for the Module analysis manager.
Definition MIRParser.h:39
#define N
A CRTP mix-in for passes that can be skipped.