LLVM API Documentation

Scalar.cpp

Go to the documentation of this file.
00001 //===-- Scalar.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 the C bindings for libLLVMScalarOpts.a, which implements
00011 // several scalar transformations over the LLVM intermediate representation.
00012 //
00013 //===----------------------------------------------------------------------===//
00014 
00015 #include "llvm-c/Transforms/Scalar.h"
00016 #include "llvm/PassManager.h"
00017 #include "llvm/Transforms/Scalar.h"
00018 
00019 using namespace llvm;
00020 
00021 void LLVMAddConstantPropagationPass(LLVMPassManagerRef PM) {
00022   unwrap(PM)->add(createConstantPropagationPass());
00023 }
00024 
00025 void LLVMAddInstructionCombiningPass(LLVMPassManagerRef PM) {
00026   unwrap(PM)->add(createInstructionCombiningPass());
00027 }
00028 
00029 void LLVMAddPromoteMemoryToRegisterPass(LLVMPassManagerRef PM) {
00030   unwrap(PM)->add(createPromoteMemoryToRegisterPass());
00031 }
00032 
00033 void LLVMAddDemoteMemoryToRegisterPass(LLVMPassManagerRef PM) {
00034   unwrap(PM)->add(createDemoteRegisterToMemoryPass());
00035 }
00036 
00037 void LLVMAddReassociatePass(LLVMPassManagerRef PM) {
00038   unwrap(PM)->add(createReassociatePass());
00039 }
00040 
00041 void LLVMAddGVNPass(LLVMPassManagerRef PM) {
00042   unwrap(PM)->add(createGVNPass());
00043 }
00044 
00045 void LLVMAddCFGSimplificationPass(LLVMPassManagerRef PM) {
00046   unwrap(PM)->add(createCFGSimplificationPass());
00047 }



This web site is hosted by the Computer Science Department at the University of Illinois at Urbana-Champaign.