]> CyberLeo.Net >> Repos - FreeBSD/releng/9.2.git/blob - contrib/llvm/lib/Transforms/Utils/Utils.cpp
- Copy stable/9 to releng/9.2 as part of the 9.2-RELEASE cycle.
[FreeBSD/releng/9.2.git] / contrib / 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/PassRegistry.h"
17 #include "llvm-c/Initialization.h"
18
19 using namespace llvm;
20
21 /// initializeTransformUtils - Initialize all passes in the TransformUtils
22 /// library.
23 void llvm::initializeTransformUtils(PassRegistry &Registry) {
24   initializeBreakCriticalEdgesPass(Registry);
25   initializeInstNamerPass(Registry);
26   initializeLCSSAPass(Registry);
27   initializeLoopSimplifyPass(Registry);
28   initializeLowerInvokePass(Registry);
29   initializeLowerSwitchPass(Registry);
30   initializePromotePassPass(Registry);
31   initializeUnifyFunctionExitNodesPass(Registry);
32   initializeInstSimplifierPass(Registry);
33   initializeMetaRenamerPass(Registry);
34 }
35
36 /// LLVMInitializeTransformUtils - C binding for initializeTransformUtilsPasses.
37 void LLVMInitializeTransformUtils(LLVMPassRegistryRef R) {
38   initializeTransformUtils(*unwrap(R));
39 }