LLVM  9.0.0svn
Utils.cpp
Go to the documentation of this file.
1 //===-- Utils.cpp - TransformUtils Infrastructure -------------------------===//
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 common initialization infrastructure for the
10 // TransformUtils library.
11 //
12 //===----------------------------------------------------------------------===//
13 
14 #include "llvm/Transforms/Utils.h"
15 #include "llvm-c/Initialization.h"
18 #include "llvm/InitializePasses.h"
19 #include "llvm/PassRegistry.h"
20 
21 using namespace llvm;
22 
23 /// initializeTransformUtils - Initialize all passes in the TransformUtils
24 /// library.
29  initializeInstNamerPass(Registry);
34  initializeLowerSwitchPass(Registry);
39  initializeMetaRenamerPass(Registry);
42 }
43 
44 /// LLVMInitializeTransformUtils - C binding for initializeTransformUtilsPasses.
47 }
48 
50  unwrap(PM)->add(createLowerSwitchPass());
51 }
52 
55 }
56 
59 }
void initializeLCSSAWrapperPassPass(PassRegistry &)
This class represents lattice values for constants.
Definition: AllocatorList.h:23
A global registry used in conjunction with static constructors to make pluggable components (like tar...
Definition: Registry.h:44
FunctionPass * createLowerSwitchPass()
struct LLVMOpaquePassRegistry * LLVMPassRegistryRef
Definition: Types.h:131
void initializeBreakCriticalEdgesPass(PassRegistry &)
void initializeAddDiscriminatorsLegacyPassPass(PassRegistry &)
Attribute unwrap(LLVMAttributeRef Attr)
Definition: Attributes.h:194
void LLVMAddPromoteMemoryToRegisterPass(LLVMPassManagerRef PM)
See llvm::createPromoteMemoryToRegisterPass function.
Definition: Utils.cpp:53
void initializeLowerInvokeLegacyPassPass(PassRegistry &)
void initializePredicateInfoPrinterLegacyPassPass(PassRegistry &)
void initializeUnifyFunctionExitNodesPass(PassRegistry &)
void initializeLibCallsShrinkWrapLegacyPassPass(PassRegistry &)
FunctionPass * createPromoteMemoryToRegisterPass()
Definition: Mem2Reg.cpp:113
void initializeNameAnonGlobalLegacyPassPass(PassRegistry &)
void initializeStripGCRelocatesPass(PassRegistry &)
void LLVMInitializeTransformUtils(LLVMPassRegistryRef R)
LLVMInitializeTransformUtils - C binding for initializeTransformUtilsPasses.
Definition: Utils.cpp:45
void LLVMAddAddDiscriminatorsPass(LLVMPassManagerRef PM)
See llvm::createAddDiscriminatorsPass function.
Definition: Utils.cpp:57
void initializeTransformUtils(PassRegistry &)
Initialize all passes linked into the TransformUtils library.
Definition: Utils.cpp:25
void initializeCanonicalizeAliasesLegacyPassPass(PassRegistry &)
struct LLVMOpaquePassManager * LLVMPassManagerRef
Definition: Types.h:128
void initializePromoteLegacyPassPass(PassRegistry &)
void initializeInstNamerPass(PassRegistry &)
void LLVMAddLowerSwitchPass(LLVMPassManagerRef PM)
See llvm::createLowerSwitchPass function.
Definition: Utils.cpp:49
void initializeLoopSimplifyPass(PassRegistry &)
void initializeLowerSwitchPass(PassRegistry &)
PassRegistry - This class manages the registration and intitialization of the pass subsystem as appli...
Definition: PassRegistry.h:38
void initializeMetaRenamerPass(PassRegistry &)
void initializeStripNonLineTableDebugInfoPass(PassRegistry &)
FunctionPass * createAddDiscriminatorsPass()