[Alignment][NFC] Use Align with TargetLowering::setMinFunctionAlignment
[llvm-core.git] / bindings / go / llvm / transforms_ipo.go
blob1dcb2af8bf243b00469cfef13fa2ad87fa5dbab8
1 //===- transforms_ipo.go - Bindings for ipo -------------------------------===//
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 bindings for the ipo component.
11 //===----------------------------------------------------------------------===//
13 package llvm
16 #include "llvm-c/Transforms/IPO.h"
18 import "C"
20 // helpers
21 func boolToUnsigned(b bool) C.unsigned {
22 if b {
23 return 1
25 return 0
28 func (pm PassManager) AddArgumentPromotionPass() { C.LLVMAddArgumentPromotionPass(pm.C) }
29 func (pm PassManager) AddConstantMergePass() { C.LLVMAddConstantMergePass(pm.C) }
30 func (pm PassManager) AddDeadArgEliminationPass() { C.LLVMAddDeadArgEliminationPass(pm.C) }
31 func (pm PassManager) AddFunctionAttrsPass() { C.LLVMAddFunctionAttrsPass(pm.C) }
32 func (pm PassManager) AddFunctionInliningPass() { C.LLVMAddFunctionInliningPass(pm.C) }
33 func (pm PassManager) AddGlobalDCEPass() { C.LLVMAddGlobalDCEPass(pm.C) }
34 func (pm PassManager) AddGlobalOptimizerPass() { C.LLVMAddGlobalOptimizerPass(pm.C) }
35 func (pm PassManager) AddIPConstantPropagationPass() { C.LLVMAddIPConstantPropagationPass(pm.C) }
36 func (pm PassManager) AddPruneEHPass() { C.LLVMAddPruneEHPass(pm.C) }
37 func (pm PassManager) AddIPSCCPPass() { C.LLVMAddIPSCCPPass(pm.C) }
38 func (pm PassManager) AddInternalizePass(allButMain bool) {
39 C.LLVMAddInternalizePass(pm.C, boolToUnsigned(allButMain))
41 func (pm PassManager) AddStripDeadPrototypesPass() { C.LLVMAddStripDeadPrototypesPass(pm.C) }