Remove the #include of Pass.h from PassManager.h. This breaks a significant
[oota-llvm.git] / lib / Transforms / IPO / IPO.cpp
1 //===-- Scalar.cpp --------------------------------------------------------===//
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 implements the C bindings for libLLVMIPO.a, which implements
11 // several transformations over the LLVM intermediate representation.
12 //
13 //===----------------------------------------------------------------------===//
14
15 #include "llvm-c/Transforms/IPO.h"
16 #include "llvm/PassManager.h"
17 #include "llvm/Pass.h"
18 #include "llvm/Transforms/IPO.h"
19
20 using namespace llvm;
21
22 void LLVMAddArgumentPromotionPass(LLVMPassManagerRef PM) {
23   unwrap(PM)->add(createArgumentPromotionPass());
24 }
25
26 void LLVMAddConstantMergePass(LLVMPassManagerRef PM) {
27   unwrap(PM)->add(createConstantMergePass());
28 }
29
30 void LLVMAddDeadArgEliminationPass(LLVMPassManagerRef PM) {
31   unwrap(PM)->add(createDeadArgEliminationPass());
32 }
33
34 void LLVMAddDeadTypeEliminationPass(LLVMPassManagerRef PM) {
35   unwrap(PM)->add(createDeadTypeEliminationPass());
36 }
37
38 void LLVMAddFunctionAttrsPass(LLVMPassManagerRef PM) {
39   unwrap(PM)->add(createFunctionAttrsPass());
40 }
41
42 void LLVMAddFunctionInliningPass(LLVMPassManagerRef PM) {
43   unwrap(PM)->add(createFunctionInliningPass());
44 }
45
46 void LLVMAddGlobalDCEPass(LLVMPassManagerRef PM) {
47   unwrap(PM)->add(createGlobalDCEPass());
48 }
49
50 void LLVMAddGlobalOptimizerPass(LLVMPassManagerRef PM) {
51   unwrap(PM)->add(createGlobalOptimizerPass());
52 }
53
54 void LLVMAddIPConstantPropagationPass(LLVMPassManagerRef PM) {
55   unwrap(PM)->add(createIPConstantPropagationPass());
56 }
57
58 void LLVMAddLowerSetJmpPass(LLVMPassManagerRef PM) {
59   unwrap(PM)->add(createLowerSetJmpPass());
60 }
61
62 void LLVMAddPruneEHPass(LLVMPassManagerRef PM) {
63   unwrap(PM)->add(createPruneEHPass());
64 }
65
66 void LLVMAddRaiseAllocationsPass(LLVMPassManagerRef PM) {
67   // FIXME: Remove in LLVM 3.0.
68 }
69
70 void LLVMAddStripDeadPrototypesPass(LLVMPassManagerRef PM) {
71   unwrap(PM)->add(createStripDeadPrototypesPass());
72 }
73
74 void LLVMAddStripSymbolsPass(LLVMPassManagerRef PM) {
75   unwrap(PM)->add(createStripSymbolsPass());
76 }