LLVM 20.0.0git
DXILFinalizeLinkage.h
Go to the documentation of this file.
1//===- DXILFinalizeLinkage.h - Finalize linkage of functions --------------===//
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/// DXILFinalizeLinkage pass updates the linkage of functions to make sure only
10/// shader entry points and exported functions are visible from the module (have
11/// program linkage). All other functions will be updated to have internal
12/// linkage.
13///
14//===----------------------------------------------------------------------===//
15
16#ifndef LLVM_TARGET_DIRECTX_DXILFINALIZELINKAGE_H
17#define LLVM_TARGET_DIRECTX_DXILFINALIZELINKAGE_H
18
19#include "llvm/IR/PassManager.h"
20#include "llvm/Pass.h"
21
22namespace llvm {
23
24class DXILFinalizeLinkage : public PassInfoMixin<DXILFinalizeLinkage> {
25public:
27 static bool isRequired() { return true; }
28};
29
31public:
33 bool runOnModule(Module &M) override;
34
35 static char ID; // Pass identification.
36};
37} // namespace llvm
38
39#endif // LLVM_TARGET_DIRECTX_DXILFINALIZELINKAGE_H
This header defines various interfaces for pass management in LLVM.
A container for analyses that lazily runs them and caches their results.
Definition: PassManager.h:253
bool runOnModule(Module &M) override
runOnModule - Virtual method overriden by subclasses to process the module being operated on.
PreservedAnalyses run(Module &M, ModuleAnalysisManager &)
ModulePass class - This class is used to implement unstructured interprocedural optimizations and ana...
Definition: Pass.h:251
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
A CRTP mix-in to automatically provide informational APIs needed for passes.
Definition: PassManager.h:69