LLVM  14.0.0git
ParallelCG.h
Go to the documentation of this file.
1 //===-- llvm/CodeGen/ParallelCG.h - Parallel code generation ----*- 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 header declares functions that can be used for parallel code generation.
10 //
11 //===----------------------------------------------------------------------===//
12 
13 #ifndef LLVM_CODEGEN_PARALLELCG_H
14 #define LLVM_CODEGEN_PARALLELCG_H
15 
16 #include "llvm/Support/CodeGen.h"
17 #include <functional>
18 #include <memory>
19 
20 namespace llvm {
21 
22 template <typename T> class ArrayRef;
23 class Module;
24 class TargetMachine;
25 class raw_pwrite_stream;
26 
27 /// Split M into OSs.size() partitions, and generate code for each. Takes a
28 /// factory function for the TargetMachine TMFactory. Writes OSs.size() output
29 /// files to the output streams in OSs. The resulting output files if linked
30 /// together are intended to be equivalent to the single output file that would
31 /// have been code generated from M.
32 ///
33 /// Writes bitcode for individual partitions into output streams in BCOSs, if
34 /// BCOSs is not empty.
35 void splitCodeGen(
36  Module &M, ArrayRef<raw_pwrite_stream *> OSs,
37  ArrayRef<llvm::raw_pwrite_stream *> BCOSs,
38  const std::function<std::unique_ptr<TargetMachine>()> &TMFactory,
39  CodeGenFileType FileType = CGFT_ObjectFile, bool PreserveLocals = false);
40 
41 } // namespace llvm
42 
43 #endif
llvm
This is an optimization pass for GlobalISel generic memory operations.
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
llvm::CGFT_ObjectFile
@ CGFT_ObjectFile
Definition: CodeGen.h:65
llvm::MachO::FileType
FileType
Defines the file type this file represents.
Definition: InterfaceFile.h:57
function
print Print MemDeps of function
Definition: MemDepPrinter.cpp:83
llvm::CodeGenFileType
CodeGenFileType
These enums are meant to be passed into addPassesToEmitFile to indicate what type of file to emit,...
Definition: CodeGen.h:63
Module
Machine Check Debug Module
Definition: MachineCheckDebugify.cpp:122
CodeGen.h
llvm::splitCodeGen
void splitCodeGen(Module &M, ArrayRef< raw_pwrite_stream * > OSs, ArrayRef< llvm::raw_pwrite_stream * > BCOSs, const std::function< std::unique_ptr< TargetMachine >()> &TMFactory, CodeGenFileType FileType=CGFT_ObjectFile, bool PreserveLocals=false)
Split M into OSs.size() partitions, and generate code for each.
Definition: ParallelCG.cpp:39