LLVM  10.0.0svn
Macros | Functions | Variables
Scalarizer.cpp File Reference
#include "llvm/ADT/PostOrderIterator.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/ADT/Twine.h"
#include "llvm/Analysis/VectorUtils.h"
#include "llvm/IR/Argument.h"
#include "llvm/IR/BasicBlock.h"
#include "llvm/IR/Constants.h"
#include "llvm/IR/DataLayout.h"
#include "llvm/IR/DerivedTypes.h"
#include "llvm/IR/Function.h"
#include "llvm/IR/IRBuilder.h"
#include "llvm/IR/InstVisitor.h"
#include "llvm/IR/InstrTypes.h"
#include "llvm/IR/Instruction.h"
#include "llvm/IR/Instructions.h"
#include "llvm/IR/Intrinsics.h"
#include "llvm/IR/LLVMContext.h"
#include "llvm/IR/Module.h"
#include "llvm/IR/Type.h"
#include "llvm/IR/Value.h"
#include "llvm/Pass.h"
#include "llvm/Support/Casting.h"
#include "llvm/Support/MathExtras.h"
#include "llvm/Support/Options.h"
#include "llvm/Transforms/Scalar.h"
#include "llvm/Transforms/Scalar/Scalarizer.h"
#include <cassert>
#include <cstdint>
#include <iterator>
#include <map>
#include <utility>
Include dependency graph for Scalarizer.cpp:

Go to the source code of this file.

Macros

#define DEBUG_TYPE   "scalarizer"
 

Functions

 INITIALIZE_PASS_BEGIN (ScalarizerLegacyPass, "scalarizer", "Scalarize vector operations", false, false) INITIALIZE_PASS_END(ScalarizerLegacyPass
 
static bool isTriviallyScalariable (Intrinsic::ID ID)
 
static FunctiongetScalarIntrinsicDeclaration (Module *M, Intrinsic::ID ID, VectorType *Ty)
 

Variables

static cl::opt< boolScalarizeLoadStore ("scalarize-load-store", cl::init(false), cl::Hidden, cl::desc("Allow the scalarizer pass to scalarize loads and store"))
 
 scalarizer
 
Scalarize vector operations
 
Scalarize vector false
 

Macro Definition Documentation

◆ DEBUG_TYPE

#define DEBUG_TYPE   "scalarizer"

Definition at line 50 of file Scalarizer.cpp.

Function Documentation

◆ getScalarIntrinsicDeclaration()

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

Definition at line 486 of file Scalarizer.cpp.

References 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::CallBase::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::CallBase::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(), ScalarizeLoadStore, llvm::IRBuilderBase::SetInsertPoint(), SI, llvm::size(), llvm::Value::takeName(), llvm::Value::use_empty(), and VI.

◆ INITIALIZE_PASS_BEGIN()

INITIALIZE_PASS_BEGIN ( ScalarizerLegacyPass  ,
"scalarizer"  ,
"Scalarize vector operations ,
false  ,
false   
)

◆ isTriviallyScalariable()

static bool isTriviallyScalariable ( Intrinsic::ID  ID)
static

Definition at line 481 of file Scalarizer.cpp.

References llvm::isTriviallyVectorizable().

Referenced by getScalarIntrinsicDeclaration().

Variable Documentation

◆ false

Scalarize vector false

Definition at line 235 of file Scalarizer.cpp.

◆ operations

Scalarize vector operations

Definition at line 235 of file Scalarizer.cpp.

◆ ScalarizeLoadStore

cl::opt<bool> ScalarizeLoadStore("scalarize-load-store", cl::init(false), cl::Hidden, cl::desc("Allow the scalarizer pass to scalarize loads and store"))
static

◆ scalarizer

scalarizer

Definition at line 235 of file Scalarizer.cpp.