[StripGCRelocates] New pass to remove gc.relocates added by RS4GC
[lldb.git] / llvm / lib / Transforms / Utils / Utils.cpp
1 //===-- Utils.cpp - TransformUtils Infrastructure -------------------------===//
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 common initialization infrastructure for the
11 // TransformUtils library.
12 //
13 //===----------------------------------------------------------------------===//
14
15 #include "llvm/InitializePasses.h"
16 #include "llvm-c/Initialization.h"
17 #include "llvm/PassRegistry.h"
18
19 using namespace llvm;
20
21 /// initializeTransformUtils - Initialize all passes in the TransformUtils
22 /// library.
23 void llvm::initializeTransformUtils(PassRegistry &Registry) {
24   initializeAddDiscriminatorsLegacyPassPass(Registry);
25   initializeBreakCriticalEdgesPass(Registry);
26   initializeInstNamerPass(Registry);
27   initializeLCSSAWrapperPassPass(Registry);
28   initializeLibCallsShrinkWrapLegacyPassPass(Registry);
29   initializeLoopSimplifyPass(Registry);
30   initializeLowerInvokeLegacyPassPass(Registry);
31   initializeLowerSwitchPass(Registry);
32   initializeNameAnonGlobalLegacyPassPass(Registry);
33   initializePromoteLegacyPassPass(Registry);
34   initializeUnifyFunctionExitNodesPass(Registry);
35   initializeInstSimplifierPass(Registry);
36   initializeMetaRenamerPass(Registry);
37   initializeMemorySSAWrapperPassPass(Registry);
38   initializeMemorySSAPrinterLegacyPassPass(Registry);
39   initializeStripGCRelocatesPass(Registry);
40 }
41
42 /// LLVMInitializeTransformUtils - C binding for initializeTransformUtilsPasses.
43 void LLVMInitializeTransformUtils(LLVMPassRegistryRef R) {
44   initializeTransformUtils(*unwrap(R));
45 }