LLVM API Documentation

Vectorize.cpp
Go to the documentation of this file.
00001 //===-- Vectorize.cpp -----------------------------------------------------===//
00002 //
00003 //                     The LLVM Compiler Infrastructure
00004 //
00005 // This file is distributed under the University of Illinois Open Source
00006 // License. See LICENSE.TXT for details.
00007 //
00008 //===----------------------------------------------------------------------===//
00009 //
00010 // This file implements common infrastructure for libLLVMVectorizeOpts.a, which
00011 // implements several vectorization transformations over the LLVM intermediate
00012 // representation, including the C bindings for that library.
00013 //
00014 //===----------------------------------------------------------------------===//
00015 
00016 #include "llvm/Transforms/Vectorize.h"
00017 #include "llvm-c/Initialization.h"
00018 #include "llvm-c/Transforms/Vectorize.h"
00019 #include "llvm/Analysis/Passes.h"
00020 #include "llvm/IR/Verifier.h"
00021 #include "llvm/InitializePasses.h"
00022 #include "llvm/PassManager.h"
00023 
00024 using namespace llvm;
00025 
00026 /// initializeVectorizationPasses - Initialize all passes linked into the
00027 /// Vectorization library.
00028 void llvm::initializeVectorization(PassRegistry &Registry) {
00029   initializeBBVectorizePass(Registry);
00030   initializeLoopVectorizePass(Registry);
00031   initializeSLPVectorizerPass(Registry);
00032 }
00033 
00034 void LLVMInitializeVectorization(LLVMPassRegistryRef R) {
00035   initializeVectorization(*unwrap(R));
00036 }
00037 
00038 void LLVMAddBBVectorizePass(LLVMPassManagerRef PM) {
00039   unwrap(PM)->add(createBBVectorizePass());
00040 }
00041 
00042 void LLVMAddLoopVectorizePass(LLVMPassManagerRef PM) {
00043   unwrap(PM)->add(createLoopVectorizePass());
00044 }
00045 
00046 void LLVMAddSLPVectorizePass(LLVMPassManagerRef PM) {
00047   unwrap(PM)->add(createSLPVectorizerPass());
00048 }