LLVM  14.0.0git
LinkAllCodegenComponents.h
Go to the documentation of this file.
1 //===- llvm/Codegen/LinkAllCodegenComponents.h ------------------*- 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 file pulls in all codegen related passes for tools like lli and
10 // llc that need this functionality.
11 //
12 //===----------------------------------------------------------------------===//
13 
14 #ifndef LLVM_CODEGEN_LINKALLCODEGENCOMPONENTS_H
15 #define LLVM_CODEGEN_LINKALLCODEGENCOMPONENTS_H
16 
17 #include "llvm/IR/BuiltinGCs.h"
18 #include "llvm/CodeGen/Passes.h"
21 #include <cstdlib>
22 
23 namespace {
24  struct ForceCodegenLinking {
25  ForceCodegenLinking() {
26  // We must reference the passes in such a way that compilers will not
27  // delete it all as dead code, even with whole program optimization,
28  // yet is effectively a NO-OP. As the compiler isn't smart enough
29  // to know that getenv() never returns -1, this will do the job.
30  // This is so that globals in the translation units where these functions
31  // are defined are forced to be initialized, populating various
32  // registries.
33  if (std::getenv("bar") != (char*) -1)
34  return;
35 
40 
42 
43  (void) llvm::createBURRListDAGScheduler(nullptr,
52 
53  }
54  } ForceCodegenLinking; // Force link by creating a global definition.
55 }
56 
57 #endif
llvm::createFastRegisterAllocator
FunctionPass * createFastRegisterAllocator()
FastRegisterAllocation Pass - This pass register allocates as fast as possible.
Definition: RegAllocFast.cpp:1568
llvm::createGreedyRegisterAllocator
FunctionPass * createGreedyRegisterAllocator()
Greedy register allocation pass - This pass implements a global register allocator for optimized buil...
Definition: RegAllocGreedy.cpp:577
llvm::createDefaultPBQPRegisterAllocator
FunctionPass * createDefaultPBQPRegisterAllocator()
PBQPRegisterAllocation Pass - This pass implements the Partitioned Boolean Quadratic Prograaming (PBQ...
Definition: RegAllocPBQP.cpp:951
SchedulerRegistry.h
llvm::createDefaultScheduler
ScheduleDAGSDNodes * createDefaultScheduler(SelectionDAGISel *IS, CodeGenOpt::Level OptLevel)
createDefaultScheduler - This creates an instruction scheduler appropriate for the target.
Definition: SelectionDAGISel.cpp:254
llvm::createFastDAGScheduler
ScheduleDAGSDNodes * createFastDAGScheduler(SelectionDAGISel *IS, CodeGenOpt::Level OptLevel)
createFastDAGScheduler - This creates a "fast" scheduler.
Definition: ScheduleDAGFast.cpp:795
TargetMachine.h
llvm::createSourceListDAGScheduler
ScheduleDAGSDNodes * createSourceListDAGScheduler(SelectionDAGISel *IS, CodeGenOpt::Level OptLevel)
createBURRListDAGScheduler - This creates a bottom up list scheduler that schedules nodes in source c...
Definition: ScheduleDAGRRList.cpp:3149
Passes.h
llvm::CodeGenOpt::Default
@ Default
Definition: CodeGen.h:55
BuiltinGCs.h
llvm::createVLIWDAGScheduler
ScheduleDAGSDNodes * createVLIWDAGScheduler(SelectionDAGISel *IS, CodeGenOpt::Level OptLevel)
createVLIWDAGScheduler - Scheduler for VLIW targets.
Definition: ScheduleDAGVLIW.cpp:273
llvm::createHybridListDAGScheduler
ScheduleDAGSDNodes * createHybridListDAGScheduler(SelectionDAGISel *IS, CodeGenOpt::Level)
createHybridListDAGScheduler - This creates a bottom up register pressure aware list scheduler that m...
Definition: ScheduleDAGRRList.cpp:3163
llvm::linkAllBuiltinGCs
void linkAllBuiltinGCs()
FIXME: Collector instances are not useful on their own.
Definition: BuiltinGCs.cpp:130
llvm::createBasicRegisterAllocator
FunctionPass * createBasicRegisterAllocator()
BasicRegisterAllocation Pass - This pass implements a degenerate global register allocator using the ...
Definition: RegAllocBasic.cpp:335
llvm::createBURRListDAGScheduler
ScheduleDAGSDNodes * createBURRListDAGScheduler(SelectionDAGISel *IS, CodeGenOpt::Level OptLevel)
createBURRListDAGScheduler - This creates a bottom up register usage reduction list scheduler.
Definition: ScheduleDAGRRList.cpp:3135