LLVM  6.0.0svn
Macros | Functions
Scalarizer.cpp File Reference
#include "llvm/ADT/STLExtras.h"
#include "llvm/Analysis/VectorUtils.h"
#include "llvm/IR/IRBuilder.h"
#include "llvm/IR/InstVisitor.h"
#include "llvm/Pass.h"
#include "llvm/Transforms/Scalar.h"
#include "llvm/Transforms/Utils/BasicBlockUtils.h"
Include dependency graph for Scalarizer.cpp:

Go to the source code of this file.

Macros

#define DEBUG_TYPE   "scalarizer"
 

Functions

 INITIALIZE_PASS_WITH_OPTIONS (Scalarizer, "scalarizer", "Scalarize vector operations", false, false) Scatterer
 
static bool isTriviallyScalariable (Intrinsic::ID ID)
 
static FunctiongetScalarIntrinsicDeclaration (Module *M, Intrinsic::ID ID, VectorType *Ty)
 

Macro Definition Documentation

◆ DEBUG_TYPE

#define DEBUG_TYPE   "scalarizer"

Definition at line 27 of file Scalarizer.cpp.

Function Documentation

◆ getScalarIntrinsicDeclaration()

static Function* getScalarIntrinsicDeclaration ( Module M,
Intrinsic::ID  ID,
VectorType Ty 
)
static

Definition at line 406 of file Scalarizer.cpp.

References llvm::AMDGPU::HSAMD::Kernel::Arg::Key::Align, assert(), llvm::iplist_impl< IntrusiveListT, TraitsT >::clear(), llvm::IRBuilder< T, Inserter >::CreateAlignedLoad(), llvm::IRBuilder< T, Inserter >::CreateAlignedStore(), llvm::IRBuilder< T, Inserter >::CreateBitCast(), llvm::IRBuilder< T, Inserter >::CreateCast(), llvm::IRBuilder< T, Inserter >::CreateGEP(), llvm::IRBuilder< T, Inserter >::CreateInsertElement(), llvm::IRBuilder< T, Inserter >::CreatePHI(), llvm::IRBuilder< T, Inserter >::CreateSelect(), llvm::IRBuilder< T, Inserter >::CreateVectorSplat(), llvm::dyn_cast(), llvm::Instruction::eraseFromParent(), llvm::VectorType::get(), llvm::UndefValue::get(), llvm::LoadInst::getAlignment(), llvm::StoreInst::getAlignment(), llvm::CallInst::getCalledFunction(), llvm::Module::getDataLayout(), llvm::Intrinsic::getDeclaration(), llvm::CastInst::getDestTy(), llvm::SequentialType::getElementType(), llvm::BasicBlock::getFirstInsertionPt(), llvm::PHINode::getIncomingBlock(), llvm::PHINode::getIncomingValue(), llvm::IRBuilderBase::getInt32(), llvm::Function::getIntrinsicID(), llvm::ShuffleVectorInst::getMaskValue(), llvm::Instruction::getModule(), llvm::Value::getName(), llvm::CallInst::getNumArgOperands(), llvm::SequentialType::getNumElements(), llvm::GetElementPtrInst::getNumIndices(), llvm::User::getNumOperands(), llvm::Instruction::getOpcode(), llvm::CastInst::getOpcode(), llvm::User::getOperand(), llvm::Instruction::getParent(), llvm::GlobalValue::getParent(), llvm::LoadInst::getPointerOperand(), llvm::StoreInst::getPointerOperand(), llvm::Type::getScalarType(), llvm::GetElementPtrInst::getSourceElementType(), llvm::CastInst::getSrcTy(), llvm::Value::getType(), llvm::ShuffleVectorInst::getType(), llvm::StoreInst::getValueOperand(), llvm::Type::getVectorNumElements(), llvm::hasVectorInstrinsicScalarOpd(), I, llvm::GetElementPtrInst::isInBounds(), llvm::LoadInst::isSimple(), llvm::StoreInst::isSimple(), isTriviallyScalariable(), llvm::Type::isVectorTy(), llvm::Intrinsic::not_intrinsic, llvm::Value::replaceAllUsesWith(), llvm::SmallVectorImpl< T >::resize(), llvm::IRBuilderBase::SetInsertPoint(), SI, llvm::Value::takeName(), llvm::Value::use_empty(), and VI.

◆ INITIALIZE_PASS_WITH_OPTIONS()

INITIALIZE_PASS_WITH_OPTIONS ( Scalarizer  ,
"scalarizer"  ,
"Scalarize vector operations ,
false  ,
false   
)

Definition at line 185 of file Scalarizer.cpp.

References assert(), llvm::BasicBlock::begin(), llvm::IRBuilder< T, Inserter >::CreateBitCast(), llvm::IRBuilder< T, Inserter >::CreateConstGEP1_32(), llvm::IRBuilder< T, Inserter >::CreateExtractElement(), llvm::dyn_cast(), E, llvm::Instruction::eraseFromParent(), F(), llvm::PointerType::get(), llvm::UndefValue::get(), llvm::DataLayout::getABITypeAlignment(), llvm::Instruction::getAllMetadataOtherThanDebugLoc(), llvm::Module::getContext(), llvm::Instruction::getDebugLoc(), llvm::Function::getEntryBlock(), llvm::IRBuilderBase::getInt32(), llvm::ilist_node_impl< OptionsT >::getIterator(), llvm::LLVMContext::getMDKindID(), llvm::Value::getName(), llvm::SequentialType::getNumElements(), llvm::User::getNumOperands(), llvm::User::getOperand(), llvm::LLVMContext::getOption(), llvm::Instruction::getParent(), llvm::BasicBlock::getParent(), llvm::GlobalValue::getParent(), llvm::Value::getType(), llvm::DataLayout::getTypeSizeInBits(), llvm::DataLayout::getTypeStoreSize(), llvm::DataLayout::getTypeStoreSizeInBits(), llvm::Type::getVectorNumElements(), llvm::ConstantInt::getZExtValue(), I, llvm::ARM_PROC::IE, llvm::Type::isVoidTy(), llvm::LLVMContext::MD_alias_scope, llvm::LLVMContext::MD_fpmath, llvm::LLVMContext::MD_invariant_load, llvm::LLVMContext::MD_noalias, llvm::LLVMContext::MD_tbaa, llvm::LLVMContext::MD_tbaa_struct, llvm::iplist_impl< IntrusiveListT, TraitsT >::push_back(), llvm::Value::replaceAllUsesWith(), llvm::User::setOperand(), llvm::AMDGPU::HSAMD::Kernel::Arg::Key::Size, Split(), and llvm::Value::takeName().

◆ isTriviallyScalariable()

static bool isTriviallyScalariable ( Intrinsic::ID  ID)
static

Definition at line 401 of file Scalarizer.cpp.

References llvm::isTriviallyVectorizable().

Referenced by getScalarIntrinsicDeclaration().