1 //===- transforms_ipo.go - Bindings for ipo -------------------------------===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 // This file defines bindings for the ipo component.
12 //===----------------------------------------------------------------------===//
17 #include "llvm-c/Transforms/IPO.h"
22 func boolToUnsigned(b bool) C.unsigned {
29 func (pm PassManager) AddArgumentPromotionPass() { C.LLVMAddArgumentPromotionPass(pm.C) }
30 func (pm PassManager) AddConstantMergePass() { C.LLVMAddConstantMergePass(pm.C) }
31 func (pm PassManager) AddDeadArgEliminationPass() { C.LLVMAddDeadArgEliminationPass(pm.C) }
32 func (pm PassManager) AddFunctionAttrsPass() { C.LLVMAddFunctionAttrsPass(pm.C) }
33 func (pm PassManager) AddFunctionInliningPass() { C.LLVMAddFunctionInliningPass(pm.C) }
34 func (pm PassManager) AddGlobalDCEPass() { C.LLVMAddGlobalDCEPass(pm.C) }
35 func (pm PassManager) AddGlobalOptimizerPass() { C.LLVMAddGlobalOptimizerPass(pm.C) }
36 func (pm PassManager) AddIPConstantPropagationPass() { C.LLVMAddIPConstantPropagationPass(pm.C) }
37 func (pm PassManager) AddPruneEHPass() { C.LLVMAddPruneEHPass(pm.C) }
38 func (pm PassManager) AddIPSCCPPass() { C.LLVMAddIPSCCPPass(pm.C) }
39 func (pm PassManager) AddInternalizePass(allButMain bool) {
40 C.LLVMAddInternalizePass(pm.C, boolToUnsigned(allButMain))
42 func (pm PassManager) AddStripDeadPrototypesPass() { C.LLVMAddStripDeadPrototypesPass(pm.C) }