LLVM 20.0.0git
|
#include "llvm/Transforms/Scalar/ScalarizeMaskedMemIntrin.h"
#include "llvm/ADT/Twine.h"
#include "llvm/Analysis/DomTreeUpdater.h"
#include "llvm/Analysis/TargetTransformInfo.h"
#include "llvm/Analysis/VectorUtils.h"
#include "llvm/IR/BasicBlock.h"
#include "llvm/IR/Constant.h"
#include "llvm/IR/Constants.h"
#include "llvm/IR/DerivedTypes.h"
#include "llvm/IR/Dominators.h"
#include "llvm/IR/Function.h"
#include "llvm/IR/IRBuilder.h"
#include "llvm/IR/Instruction.h"
#include "llvm/IR/Instructions.h"
#include "llvm/IR/IntrinsicInst.h"
#include "llvm/IR/Type.h"
#include "llvm/IR/Value.h"
#include "llvm/InitializePasses.h"
#include "llvm/Pass.h"
#include "llvm/Support/Casting.h"
#include "llvm/Transforms/Scalar.h"
#include "llvm/Transforms/Utils/BasicBlockUtils.h"
#include <cassert>
#include <optional>
Go to the source code of this file.
Macros | |
#define | DEBUG_TYPE "scalarize-masked-mem-intrin" |
Variables | |
DEBUG_TYPE | |
Scalarize unsupported masked memory | intrinsics |
Scalarize unsupported masked memory | false |
#define DEBUG_TYPE "scalarize-masked-mem-intrin" |
Definition at line 43 of file ScalarizeMaskedMemIntrin.cpp.
|
static |
Definition at line 108 of file ScalarizeMaskedMemIntrin.cpp.
Referenced by scalarizeMaskedCompressStore(), scalarizeMaskedExpandLoad(), scalarizeMaskedGather(), scalarizeMaskedLoad(), scalarizeMaskedScatter(), and scalarizeMaskedStore().
INITIALIZE_PASS_BEGIN | ( | ScalarizeMaskedMemIntrinLegacyPass | , |
DEBUG_TYPE | , | ||
"Scalarize unsupported masked memory intrinsics" | , | ||
false | , | ||
false | |||
) |
Definition at line 93 of file ScalarizeMaskedMemIntrin.cpp.
References llvm::CallingConv::C.
Referenced by scalarizeMaskedCompressStore(), scalarizeMaskedExpandLoad(), scalarizeMaskedGather(), scalarizeMaskedLoad(), scalarizeMaskedScatter(), scalarizeMaskedStore(), and scalarizeMaskedVectorHistogram().
|
static |
Definition at line 1060 of file ScalarizeMaskedMemIntrin.cpp.
References llvm::BasicBlock::begin(), DL, llvm::BasicBlock::end(), and optimizeCallInst().
Referenced by runImpl().
|
static |
Definition at line 1077 of file ScalarizeMaskedMemIntrin.cpp.
References llvm::any_of(), DL, llvm::TargetTransformInfo::forceScalarizeMaskedGather(), llvm::TargetTransformInfo::forceScalarizeMaskedScatter(), llvm::AttributeSet::getAlignment(), llvm::CallBase::getArgOperand(), llvm::CallBase::getAttributes(), llvm::AttributeList::getParamAttrs(), llvm::Type::getScalarType(), llvm::Value::getType(), II, llvm::TargetTransformInfo::isLegalMaskedCompressStore(), llvm::TargetTransformInfo::isLegalMaskedExpandLoad(), llvm::TargetTransformInfo::isLegalMaskedGather(), llvm::TargetTransformInfo::isLegalMaskedLoad(), llvm::TargetTransformInfo::isLegalMaskedScatter(), llvm::TargetTransformInfo::isLegalMaskedStore(), llvm::TargetTransformInfo::isLegalMaskedVectorHistogram(), scalarizeMaskedCompressStore(), scalarizeMaskedExpandLoad(), scalarizeMaskedGather(), scalarizeMaskedLoad(), scalarizeMaskedScatter(), scalarizeMaskedStore(), scalarizeMaskedVectorHistogram(), and llvm::MaybeAlign::valueOrOne().
Referenced by optimizeBlock().
|
static |
Definition at line 1013 of file ScalarizeMaskedMemIntrin.cpp.
References DL, F, llvm::TargetTransformInfo::hasBranchDivergence(), llvm::make_early_inc_range(), and optimizeBlock().
|
static |
Definition at line 837 of file ScalarizeMaskedMemIntrin.cpp.
References llvm::PHINode::addIncoming(), adjustForEndian(), llvm::BasicBlock::begin(), llvm::commonAlignment(), llvm::IRBuilderBase::CreateAlignedStore(), llvm::IRBuilderBase::CreateAnd(), llvm::IRBuilderBase::CreateBitCast(), llvm::IRBuilderBase::CreateConstInBoundsGEP1_32(), llvm::IRBuilderBase::CreateExtractElement(), llvm::IRBuilderBase::CreateICmpNE(), llvm::IRBuilderBase::CreatePHI(), DL, llvm::Instruction::eraseFromParent(), llvm::CallBase::getArgOperand(), llvm::Value::getContext(), llvm::Instruction::getDebugLoc(), llvm::IRBuilderBase::getInt(), llvm::IRBuilderBase::getIntN(), llvm::IRBuilderBase::getIntNTy(), llvm::APInt::getOneBitSet(), llvm::CallBase::getParamAlign(), llvm::ilist_detail::node_parent_access< NodeTy, ParentTy >::getParent(), llvm::Type::getPrimitiveSizeInBits(), llvm::Instruction::getSuccessor(), llvm::BasicBlock::getTerminator(), Idx, isConstantIntVector(), Ptr, llvm::IRBuilderBase::SetCurrentDebugLocation(), llvm::IRBuilderBase::SetInsertPoint(), llvm::Value::setName(), llvm::SplitBlockAndInsertIfThen(), and llvm::MaybeAlign::valueOrOne().
Referenced by optimizeCallInst().
|
static |
Definition at line 700 of file ScalarizeMaskedMemIntrin.cpp.
References llvm::PHINode::addIncoming(), adjustForEndian(), llvm::BasicBlock::begin(), llvm::commonAlignment(), llvm::IRBuilderBase::CreateAlignedLoad(), llvm::IRBuilderBase::CreateAnd(), llvm::IRBuilderBase::CreateBitCast(), llvm::IRBuilderBase::CreateConstInBoundsGEP1_32(), llvm::IRBuilderBase::CreateExtractElement(), llvm::IRBuilderBase::CreateICmpNE(), llvm::IRBuilderBase::CreateInsertElement(), llvm::IRBuilderBase::CreatePHI(), llvm::IRBuilderBase::CreateShuffleVector(), DL, llvm::Instruction::eraseFromParent(), llvm::PoisonValue::get(), llvm::CallBase::getArgOperand(), llvm::Value::getContext(), llvm::Instruction::getDebugLoc(), llvm::IRBuilderBase::getInt(), llvm::IRBuilderBase::getIntN(), llvm::IRBuilderBase::getIntNTy(), llvm::APInt::getOneBitSet(), llvm::CallBase::getParamAlign(), llvm::ilist_detail::node_parent_access< NodeTy, ParentTy >::getParent(), llvm::Type::getPrimitiveSizeInBits(), llvm::Instruction::getSuccessor(), llvm::BasicBlock::getTerminator(), llvm::Value::getType(), Idx, isConstantIntVector(), llvm::PoisonMaskElem, Ptr, llvm::Value::replaceAllUsesWith(), llvm::IRBuilderBase::SetCurrentDebugLocation(), llvm::IRBuilderBase::SetInsertPoint(), llvm::Value::setName(), llvm::SplitBlockAndInsertIfThen(), and llvm::MaybeAlign::valueOrOne().
Referenced by optimizeCallInst().
|
static |
Definition at line 471 of file ScalarizeMaskedMemIntrin.cpp.
References adjustForEndian(), llvm::BasicBlock::begin(), llvm::IRBuilderBase::CreateAlignedLoad(), llvm::IRBuilderBase::CreateAnd(), llvm::IRBuilderBase::CreateBitCast(), llvm::IRBuilderBase::CreateExtractElement(), llvm::IRBuilderBase::CreateICmpNE(), llvm::IRBuilderBase::CreateInsertElement(), llvm::IRBuilderBase::CreatePHI(), DL, llvm::Instruction::eraseFromParent(), llvm::CallBase::getArgOperand(), llvm::Value::getContext(), llvm::Instruction::getDebugLoc(), llvm::IRBuilderBase::getInt(), llvm::IRBuilderBase::getIntN(), llvm::IRBuilderBase::getIntNTy(), llvm::APInt::getOneBitSet(), llvm::ilist_detail::node_parent_access< NodeTy, ParentTy >::getParent(), llvm::Instruction::getSuccessor(), llvm::BasicBlock::getTerminator(), llvm::Value::getType(), Idx, isConstantIntVector(), Ptr, llvm::Value::replaceAllUsesWith(), llvm::IRBuilderBase::SetCurrentDebugLocation(), llvm::IRBuilderBase::SetInsertPoint(), llvm::Value::setName(), and llvm::SplitBlockAndInsertIfThen().
Referenced by optimizeCallInst().
|
static |
Definition at line 145 of file ScalarizeMaskedMemIntrin.cpp.
References adjustForEndian(), llvm::BasicBlock::begin(), llvm::commonAlignment(), llvm::Instruction::copyMetadata(), llvm::IRBuilderBase::CreateAlignedLoad(), llvm::IRBuilderBase::CreateAnd(), llvm::IRBuilderBase::CreateBitCast(), llvm::IRBuilderBase::CreateConstInBoundsGEP1_32(), llvm::IRBuilderBase::CreateExtractElement(), llvm::IRBuilderBase::CreateICmpNE(), llvm::IRBuilderBase::CreateInsertElement(), llvm::IRBuilderBase::CreatePHI(), DL, llvm::Instruction::eraseFromParent(), llvm::CallBase::getArgOperand(), llvm::Value::getContext(), llvm::Instruction::getDebugLoc(), llvm::IRBuilderBase::getInt(), llvm::IRBuilderBase::getIntN(), llvm::IRBuilderBase::getIntNTy(), llvm::Value::getName(), llvm::APInt::getOneBitSet(), llvm::ilist_detail::node_parent_access< NodeTy, ParentTy >::getParent(), llvm::Type::getPrimitiveSizeInBits(), llvm::Instruction::getSuccessor(), llvm::BasicBlock::getTerminator(), llvm::Value::getType(), Idx, isConstantIntVector(), llvm::isSplatValue(), Ptr, llvm::Value::replaceAllUsesWith(), llvm::IRBuilderBase::SetCurrentDebugLocation(), llvm::IRBuilderBase::SetInsertPoint(), llvm::Value::setName(), llvm::SplitBlockAndInsertIfThen(), and llvm::Value::takeName().
Referenced by optimizeCallInst().
|
static |
Definition at line 606 of file ScalarizeMaskedMemIntrin.cpp.
References adjustForEndian(), assert(), llvm::BasicBlock::begin(), llvm::IRBuilderBase::CreateAlignedStore(), llvm::IRBuilderBase::CreateAnd(), llvm::IRBuilderBase::CreateBitCast(), llvm::IRBuilderBase::CreateExtractElement(), llvm::IRBuilderBase::CreateICmpNE(), DL, llvm::Instruction::eraseFromParent(), llvm::CallBase::getArgOperand(), llvm::Value::getContext(), llvm::Instruction::getDebugLoc(), llvm::IRBuilderBase::getInt(), llvm::IRBuilderBase::getIntN(), llvm::IRBuilderBase::getIntNTy(), llvm::APInt::getOneBitSet(), llvm::ilist_detail::node_parent_access< NodeTy, ParentTy >::getParent(), llvm::Instruction::getSuccessor(), llvm::BasicBlock::getTerminator(), llvm::Value::getType(), Idx, isConstantIntVector(), Ptr, llvm::IRBuilderBase::SetCurrentDebugLocation(), llvm::IRBuilderBase::SetInsertPoint(), llvm::Value::setName(), and llvm::SplitBlockAndInsertIfThen().
Referenced by optimizeCallInst().
|
static |
Definition at line 318 of file ScalarizeMaskedMemIntrin.cpp.
References adjustForEndian(), llvm::BasicBlock::begin(), llvm::commonAlignment(), llvm::IRBuilderBase::CreateAlignedStore(), llvm::IRBuilderBase::CreateAnd(), llvm::IRBuilderBase::CreateBitCast(), llvm::IRBuilderBase::CreateConstInBoundsGEP1_32(), llvm::IRBuilderBase::CreateExtractElement(), llvm::IRBuilderBase::CreateICmpNE(), DL, llvm::Instruction::eraseFromParent(), llvm::CallBase::getArgOperand(), llvm::Value::getContext(), llvm::Instruction::getDebugLoc(), llvm::IRBuilderBase::getInt(), llvm::IRBuilderBase::getIntN(), llvm::IRBuilderBase::getIntNTy(), llvm::APInt::getOneBitSet(), llvm::ilist_detail::node_parent_access< NodeTy, ParentTy >::getParent(), llvm::Type::getPrimitiveSizeInBits(), llvm::Instruction::getSuccessor(), llvm::BasicBlock::getTerminator(), Idx, isConstantIntVector(), llvm::isSplatValue(), Ptr, llvm::IRBuilderBase::SetCurrentDebugLocation(), llvm::IRBuilderBase::SetInsertPoint(), llvm::Value::setName(), and llvm::SplitBlockAndInsertIfThen().
Referenced by optimizeCallInst().
|
static |
Definition at line 950 of file ScalarizeMaskedMemIntrin.cpp.
References llvm::Add, assert(), llvm::BasicBlock::begin(), llvm::IRBuilderBase::CreateAdd(), llvm::IRBuilderBase::CreateExtractElement(), llvm::IRBuilderBase::CreateLoad(), llvm::IRBuilderBase::CreateStore(), llvm::Instruction::eraseFromParent(), llvm::CallBase::getArgOperand(), llvm::Value::getContext(), llvm::Instruction::getDebugLoc(), llvm::ilist_detail::node_parent_access< NodeTy, ParentTy >::getParent(), llvm::Instruction::getSuccessor(), llvm::BasicBlock::getTerminator(), llvm::Value::getType(), Idx, isConstantIntVector(), llvm::Type::isVoidTy(), Ptr, llvm::IRBuilderBase::SetCurrentDebugLocation(), llvm::IRBuilderBase::SetInsertPoint(), llvm::Value::setName(), and llvm::SplitBlockAndInsertIfThen().
Referenced by optimizeCallInst().
DEBUG_TYPE |
Definition at line 85 of file ScalarizeMaskedMemIntrin.cpp.
Scalarize unsupported masked memory false |
Definition at line 86 of file ScalarizeMaskedMemIntrin.cpp.
Scalarize unsupported masked memory intrinsics |
Definition at line 86 of file ScalarizeMaskedMemIntrin.cpp.