LLVM 22.0.0git
Scalarizer.cpp File Reference
#include "llvm/Transforms/Scalar/Scalarizer.h"
#include "llvm/ADT/PostOrderIterator.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/ADT/Twine.h"
#include "llvm/Analysis/TargetTransformInfo.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/Dominators.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/InitializePasses.h"
#include "llvm/Support/Casting.h"
#include "llvm/Transforms/Utils/Local.h"
#include <cassert>
#include <cstdint>
#include <iterator>
#include <map>
#include <utility>

Go to the source code of this file.

Macros

#define DEBUG_TYPE   "scalarizer"

Typedefs

using ValueVector = SmallVector<Value *, 8>
using ScatterMap = std::map<std::pair<Value *, Type *>, ValueVector>
using GatherList = SmallVector<std::pair<Instruction *, ValueVector *>, 16>

Functions

static BasicBlock::iterator skipPastPhiNodesAndDbg (BasicBlock::iterator Itr)
static bool isStructOfMatchingFixedVectors (Type *Ty)
static Valueconcatenate (IRBuilder<> &Builder, ArrayRef< Value * > Fragments, const VectorSplit &VS, Twine Name)
 Concatenate the given fragments to a single vector value of the type described in VS.
 INITIALIZE_PASS_BEGIN (ScalarizerLegacyPass, "scalarizer", "Scalarize vector operations", false, false) INITIALIZE_PASS_END(ScalarizerLegacyPass

Variables

 scalarizer
Scalarize vector operations
Scalarize vector false

Macro Definition Documentation

◆ DEBUG_TYPE

#define DEBUG_TYPE   "scalarizer"

Definition at line 51 of file Scalarizer.cpp.

Typedef Documentation

◆ GatherList

using GatherList = SmallVector<std::pair<Instruction *, ValueVector *>, 16>

Definition at line 75 of file Scalarizer.cpp.

◆ ScatterMap

using ScatterMap = std::map<std::pair<Value *, Type *>, ValueVector>

Definition at line 71 of file Scalarizer.cpp.

◆ ValueVector

using ValueVector = SmallVector<Value *, 8>

Definition at line 63 of file Scalarizer.cpp.

Function Documentation

◆ concatenate()

Value * concatenate ( IRBuilder<> & Builder,
ArrayRef< Value * > Fragments,
const VectorSplit & VS,
Twine Name )
static

Concatenate the given fragments to a single vector value of the type described in VS.

Definition at line 221 of file Scalarizer.cpp.

References llvm::dyn_cast(), llvm::PoisonValue::get(), I, and llvm::SmallVectorImpl< T >::resize().

◆ INITIALIZE_PASS_BEGIN()

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

◆ isStructOfMatchingFixedVectors()

bool isStructOfMatchingFixedVectors ( Type * Ty)
static

◆ skipPastPhiNodesAndDbg()

Variable Documentation

◆ false

Scalarize vector false

Definition at line 361 of file Scalarizer.cpp.

◆ operations

Scalarize vector operations

Definition at line 361 of file Scalarizer.cpp.

◆ scalarizer

scalarizer

Definition at line 360 of file Scalarizer.cpp.