1 //===- transforms_scalar.go - Bindings for scalaropts ---------------------===//
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
7 //===----------------------------------------------------------------------===//
9 // This file defines bindings for the scalaropts component.
11 //===----------------------------------------------------------------------===//
16 #include "llvm-c/Transforms/Scalar.h"
17 #include "llvm-c/Transforms/Utils.h"
21 func (pm PassManager
) AddAggressiveDCEPass() { C
.LLVMAddAggressiveDCEPass(pm
.C
) }
22 func (pm PassManager
) AddCFGSimplificationPass() { C
.LLVMAddCFGSimplificationPass(pm
.C
) }
23 func (pm PassManager
) AddDeadStoreEliminationPass() { C
.LLVMAddDeadStoreEliminationPass(pm
.C
) }
24 func (pm PassManager
) AddGVNPass() { C
.LLVMAddGVNPass(pm
.C
) }
25 func (pm PassManager
) AddIndVarSimplifyPass() { C
.LLVMAddIndVarSimplifyPass(pm
.C
) }
26 func (pm PassManager
) AddInstructionCombiningPass() { C
.LLVMAddInstructionCombiningPass(pm
.C
) }
27 func (pm PassManager
) AddJumpThreadingPass() { C
.LLVMAddJumpThreadingPass(pm
.C
) }
28 func (pm PassManager
) AddLICMPass() { C
.LLVMAddLICMPass(pm
.C
) }
29 func (pm PassManager
) AddLoopDeletionPass() { C
.LLVMAddLoopDeletionPass(pm
.C
) }
30 func (pm PassManager
) AddLoopRotatePass() { C
.LLVMAddLoopRotatePass(pm
.C
) }
31 func (pm PassManager
) AddLoopUnrollPass() { C
.LLVMAddLoopUnrollPass(pm
.C
) }
32 func (pm PassManager
) AddLoopUnswitchPass() { C
.LLVMAddLoopUnswitchPass(pm
.C
) }
33 func (pm PassManager
) AddMemCpyOptPass() { C
.LLVMAddMemCpyOptPass(pm
.C
) }
34 func (pm PassManager
) AddPromoteMemoryToRegisterPass() { C
.LLVMAddPromoteMemoryToRegisterPass(pm
.C
) }
35 func (pm PassManager
) AddReassociatePass() { C
.LLVMAddReassociatePass(pm
.C
) }
36 func (pm PassManager
) AddSCCPPass() { C
.LLVMAddSCCPPass(pm
.C
) }
37 func (pm PassManager
) AddScalarReplAggregatesPass() { C
.LLVMAddScalarReplAggregatesPass(pm
.C
) }
38 func (pm PassManager
) AddScalarReplAggregatesPassWithThreshold(threshold
int) {
39 C
.LLVMAddScalarReplAggregatesPassWithThreshold(pm
.C
, C
.int(threshold
))
41 func (pm PassManager
) AddSimplifyLibCallsPass() { C
.LLVMAddSimplifyLibCallsPass(pm
.C
) }
42 func (pm PassManager
) AddTailCallEliminationPass() { C
.LLVMAddTailCallEliminationPass(pm
.C
) }
43 func (pm PassManager
) AddConstantPropagationPass() { C
.LLVMAddConstantPropagationPass(pm
.C
) }
44 func (pm PassManager
) AddDemoteMemoryToRegisterPass() { C
.LLVMAddDemoteMemoryToRegisterPass(pm
.C
) }
45 func (pm PassManager
) AddVerifierPass() { C
.LLVMAddVerifierPass(pm
.C
) }