LLVM  13.0.0git
SplitModule.h
Go to the documentation of this file.
1 //===- SplitModule.h - Split a module into partitions -----------*- 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 // This file defines the function llvm::SplitModule, which splits a module
10 // into multiple linkable partitions. It can be used to implement parallel code
11 // generation for link-time optimization.
12 //
13 //===----------------------------------------------------------------------===//
14 
15 #ifndef LLVM_TRANSFORMS_UTILS_SPLITMODULE_H
16 #define LLVM_TRANSFORMS_UTILS_SPLITMODULE_H
17 
18 #include "llvm/ADT/STLExtras.h"
19 #include <memory>
20 
21 namespace llvm {
22 
23 class Module;
24 
25 /// Splits the module M into N linkable partitions. The function ModuleCallback
26 /// is called N times passing each individual partition as the MPart argument.
27 ///
28 /// FIXME: This function does not deal with the somewhat subtle symbol
29 /// visibility issues around module splitting, including (but not limited to):
30 ///
31 /// - Internal symbols should not collide with symbols defined outside the
32 /// module.
33 /// - Internal symbols defined in module-level inline asm should be visible to
34 /// each partition.
35 void SplitModule(
36  Module &M, unsigned N,
37  function_ref<void(std::unique_ptr<Module> MPart)> ModuleCallback,
38  bool PreserveLocals = false);
39 
40 } // end namespace llvm
41 
42 #endif // LLVM_TRANSFORMS_UTILS_SPLITMODULE_H
llvm
Definition: AllocatorList.h:23
M
We currently emits eax Perhaps this is what we really should generate is Is imull three or four cycles eax eax The current instruction priority is based on pattern complexity The former is more complex because it folds a load so the latter will not be emitted Perhaps we should use AddedComplexity to give LEA32r a higher priority We should always try to match LEA first since the LEA matching code does some estimate to determine whether the match is profitable if we care more about code then imull is better It s two bytes shorter than movl leal On a Pentium M
Definition: README.txt:252
STLExtras.h
Module
Machine Check Debug Module
Definition: MachineCheckDebugify.cpp:122
N
#define N
llvm::SplitModule
void SplitModule(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:248