LLVM 20.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.
22class AMDGPUSplitModulePass : public PassInfoMixin<AMDGPUSplitModulePass> {
23public:
25 function_ref<void(std::unique_ptr<Module> MPart)>;
26
28 : N(N), ModuleCallback(ModuleCallback) {}
29
31
32private:
33 unsigned N;
34 ModuleCreationCallback ModuleCallback;
35};
36
37} // end namespace llvm
38
39#endif // LLVM_TARGET_AMDGPUSPLITMODULE_H
ModuleAnalysisManager MAM
This header defines various interfaces for pass management in LLVM.
Splits the module M into N linkable partitions.
AMDGPUSplitModulePass(unsigned N, ModuleCreationCallback ModuleCallback)
PreservedAnalyses run(Module &M, ModuleAnalysisManager &MAM)
function_ref< void(std::unique_ptr< Module > MPart)> ModuleCreationCallback
A container for analyses that lazily runs them and caches their results.
Definition: PassManager.h:253
A Module instance is used to store all the information related to an LLVM module.
Definition: Module.h:65
A set of analyses that are preserved following a run of a transformation pass.
Definition: Analysis.h:111
This is an optimization pass for GlobalISel generic memory operations.
Definition: AddressRanges.h:18
#define N
A CRTP mix-in to automatically provide informational APIs needed for passes.
Definition: PassManager.h:69