LLVM 24.0.0git
SplitModuleCommon.h
Go to the documentation of this file.
1//===----- SplitModuleCommon.h - shared module splitting helpers ---------===//
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// Common utilities shared by the module splitting implementations
9// (SplitModule, AMDGPUSplitModule, ...).
10//===----------------------------------------------------------------------===//
11
12#ifndef LLVM_TRANSFORMS_UTILS_SPLITMODULECOMMON_H
13#define LLVM_TRANSFORMS_UTILS_SPLITMODULECOMMON_H
14
16
17namespace llvm {
18
19class GlobalValue;
20
21/// Assign a stable name to \p GV if it is unnamed, so that it is named
22/// consistently across the split partitions. setName will give a distinct
23/// name (e.g. __llvmsplit_externalize_unnamed.1) to each such entity.
25
26/// If \p GV has local linkage, promote it to external + hidden visibility so
27/// it can be referenced across module partitions, and assign a stable name
28/// to unnamed entities (see nameUnnamedGlobalValue).
30
31} // end namespace llvm
32
33#endif // LLVM_TRANSFORMS_UTILS_SPLITMODULECOMMON_H
#define LLVM_ABI
Definition Compiler.h:215
This is an optimization pass for GlobalISel generic memory operations.
LLVM_ABI void nameUnnamedGlobalValue(GlobalValue &GV)
Assign a stable name to GV if it is unnamed, so that it is named consistently across the split partit...
LLVM_ABI void externalizeGlobal(GlobalValue &GV)
If GV has local linkage, promote it to external + hidden visibility so it can be referenced across mo...