Recommit r373598 "[yaml2obj/obj2yaml] - Add support for SHT_LLVM_ADDRSIG sections."
[llvm-complete.git] / lib / Transforms / Vectorize / Vectorize.cpp
blob6a4f9169c2af0622cf3ac52a725688e5c4049213
1 //===-- Vectorize.cpp -----------------------------------------------------===//
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 implements common infrastructure for libLLVMVectorizeOpts.a, which
10 // implements several vectorization transformations over the LLVM intermediate
11 // representation, including the C bindings for that library.
13 //===----------------------------------------------------------------------===//
15 #include "llvm/Transforms/Vectorize.h"
16 #include "llvm-c/Initialization.h"
17 #include "llvm-c/Transforms/Vectorize.h"
18 #include "llvm/Analysis/Passes.h"
19 #include "llvm/IR/LegacyPassManager.h"
20 #include "llvm/InitializePasses.h"
22 using namespace llvm;
24 /// initializeVectorizationPasses - Initialize all passes linked into the
25 /// Vectorization library.
26 void llvm::initializeVectorization(PassRegistry &Registry) {
27 initializeLoopVectorizePass(Registry);
28 initializeSLPVectorizerPass(Registry);
29 initializeLoadStoreVectorizerLegacyPassPass(Registry);
32 void LLVMInitializeVectorization(LLVMPassRegistryRef R) {
33 initializeVectorization(*unwrap(R));
36 void LLVMAddLoopVectorizePass(LLVMPassManagerRef PM) {
37 unwrap(PM)->add(createLoopVectorizePass());
40 void LLVMAddSLPVectorizePass(LLVMPassManagerRef PM) {
41 unwrap(PM)->add(createSLPVectorizerPass());