LLVM
4.0.0
Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
llvm.src
include
llvm
Transforms
Utils
SplitModule.h
Go to the documentation of this file.
1
//===- SplitModule.h - Split a module into partitions -----------*- C++ -*-===//
2
//
3
// The LLVM Compiler Infrastructure
4
//
5
// This file is distributed under the University of Illinois Open Source
6
// License. See LICENSE.TXT for details.
7
//
8
//===----------------------------------------------------------------------===//
9
//
10
// This file defines the function llvm::SplitModule, which splits a module
11
// into multiple linkable partitions. It can be used to implement parallel code
12
// generation for link-time optimization.
13
//
14
//===----------------------------------------------------------------------===//
15
16
#ifndef LLVM_TRANSFORMS_UTILS_SPLITMODULE_H
17
#define LLVM_TRANSFORMS_UTILS_SPLITMODULE_H
18
19
#include "
llvm/ADT/STLExtras.h
"
20
#include <memory>
21
22
namespace
llvm {
23
24
class
Module;
25
class
StringRef;
26
27
/// Splits the module M into N linkable partitions. The function ModuleCallback
28
/// is called N times passing each individual partition as the MPart argument.
29
///
30
/// FIXME: This function does not deal with the somewhat subtle symbol
31
/// visibility issues around module splitting, including (but not limited to):
32
///
33
/// - Internal symbols should not collide with symbols defined outside the
34
/// module.
35
/// - Internal symbols defined in module-level inline asm should be visible to
36
/// each partition.
37
void
SplitModule
(
38
std::unique_ptr<Module> M,
unsigned
N
,
39
function_ref<
void
(std::unique_ptr<Module> MPart)> ModuleCallback,
40
bool
PreserveLocals =
false
);
41
42
}
// End llvm namespace
43
44
#endif
llvm::SplitModule
void SplitModule(std::unique_ptr< Module > M, unsigned N, function_ref< void(std::unique_ptr< Module > MPart)> ModuleCallback, bool PreserveLocals=false)
Splits the module M into N linkable partitions.
Definition:
SplitModule.cpp:228
STLExtras.h
N
#define N
Generated on Wed Mar 8 2017 17:27:45 for LLVM by
1.8.6