LLVM 22.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.
References DL.
Referenced by scalarizeMaskedCompressStore(), scalarizeMaskedExpandLoad(), scalarizeMaskedGather(), scalarizeMaskedLoad(), scalarizeMaskedScatter(), and scalarizeMaskedStore().
INITIALIZE_PASS_BEGIN | ( | ScalarizeMaskedMemIntrinLegacyPass | , |
DEBUG_TYPE | , | ||
"Scalarize unsupported masked memory intrinsics" | , | ||
false | , | ||
false | ) |
References DEBUG_TYPE, and INITIALIZE_PASS_DEPENDENCY.
Definition at line 93 of file ScalarizeMaskedMemIntrin.cpp.
References llvm::CallingConv::C, llvm::cast(), llvm::dyn_cast(), and llvm::isa().
Referenced by scalarizeMaskedCompressStore(), scalarizeMaskedExpandLoad(), scalarizeMaskedGather(), scalarizeMaskedLoad(), scalarizeMaskedScatter(), scalarizeMaskedStore(), and scalarizeMaskedVectorHistogram().
|
static |
Definition at line 1085 of file ScalarizeMaskedMemIntrin.cpp.
References llvm::BasicBlock::begin(), DL, llvm::dyn_cast(), llvm::BasicBlock::end(), and optimizeCallInst().
Referenced by runImpl().
|
static |
Definition at line 1102 of file ScalarizeMaskedMemIntrin.cpp.
References llvm::any_of(), llvm::cast(), DL, llvm::dyn_cast(), llvm::CallBase::getArgOperand(), llvm::CallBase::getAttributes(), llvm::Type::getScalarType(), llvm::Value::getType(), II, llvm::isa(), scalarizeMaskedCompressStore(), scalarizeMaskedExpandLoad(), scalarizeMaskedGather(), scalarizeMaskedLoad(), scalarizeMaskedScatter(), scalarizeMaskedStore(), and scalarizeMaskedVectorHistogram().
Referenced by optimizeBlock().
|
static |
Definition at line 1038 of file ScalarizeMaskedMemIntrin.cpp.
References DL, F, 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::cast(), llvm::commonAlignment(), DL, llvm::Instruction::eraseFromParent(), llvm::CallBase::getArgOperand(), llvm::Value::getContext(), llvm::Instruction::getDebugLoc(), llvm::Type::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(), isConstantIntVector(), Ptr, 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::cast(), llvm::commonAlignment(), DL, llvm::Instruction::eraseFromParent(), llvm::PoisonValue::get(), llvm::CallBase::getArgOperand(), llvm::Value::getContext(), llvm::Instruction::getDebugLoc(), llvm::Type::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(), isConstantIntVector(), llvm::PoisonMaskElem, Ptr, llvm::Value::replaceAllUsesWith(), 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::cast(), DL, llvm::Instruction::eraseFromParent(), llvm::CallBase::getArgOperand(), llvm::Value::getContext(), llvm::Instruction::getDebugLoc(), llvm::Type::getIntNTy(), llvm::APInt::getOneBitSet(), llvm::ilist_detail::node_parent_access< NodeTy, ParentTy >::getParent(), llvm::Instruction::getSuccessor(), llvm::BasicBlock::getTerminator(), llvm::Value::getType(), isConstantIntVector(), Ptr, llvm::Value::replaceAllUsesWith(), llvm::Value::setName(), and llvm::SplitBlockAndInsertIfThen().
Referenced by optimizeCallInst().
|
static |
Definition at line 145 of file ScalarizeMaskedMemIntrin.cpp.
References adjustForEndian(), llvm::BasicBlock::begin(), llvm::cast(), llvm::commonAlignment(), llvm::Instruction::copyMetadata(), DL, llvm::Instruction::eraseFromParent(), llvm::CallBase::getArgOperand(), llvm::Value::getContext(), llvm::Instruction::getDebugLoc(), llvm::Type::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(), llvm::isa(), isConstantIntVector(), llvm::isSplatValue(), Ptr, llvm::Value::replaceAllUsesWith(), 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::cast(), DL, llvm::Instruction::eraseFromParent(), llvm::CallBase::getArgOperand(), llvm::Value::getContext(), llvm::Instruction::getDebugLoc(), llvm::Type::getIntNTy(), llvm::APInt::getOneBitSet(), llvm::ilist_detail::node_parent_access< NodeTy, ParentTy >::getParent(), llvm::Instruction::getSuccessor(), llvm::BasicBlock::getTerminator(), llvm::Value::getType(), llvm::isa(), isConstantIntVector(), Ptr, llvm::Value::setName(), and llvm::SplitBlockAndInsertIfThen().
Referenced by optimizeCallInst().
|
static |
Definition at line 318 of file ScalarizeMaskedMemIntrin.cpp.
References adjustForEndian(), llvm::BasicBlock::begin(), llvm::cast(), llvm::commonAlignment(), DL, llvm::Instruction::eraseFromParent(), llvm::CallBase::getArgOperand(), llvm::Value::getContext(), llvm::Instruction::getDebugLoc(), llvm::Type::getIntNTy(), llvm::APInt::getOneBitSet(), llvm::ilist_detail::node_parent_access< NodeTy, ParentTy >::getParent(), llvm::Type::getPrimitiveSizeInBits(), llvm::Instruction::getSuccessor(), llvm::BasicBlock::getTerminator(), llvm::isa(), isConstantIntVector(), llvm::isSplatValue(), Ptr, llvm::Value::setName(), and llvm::SplitBlockAndInsertIfThen().
Referenced by optimizeCallInst().
|
static |
Definition at line 950 of file ScalarizeMaskedMemIntrin.cpp.
References assert(), llvm::BasicBlock::begin(), llvm::cast(), DL, llvm::Instruction::eraseFromParent(), llvm::CallBase::getArgOperand(), llvm::Value::getContext(), llvm::Instruction::getDebugLoc(), llvm::CallBase::getIntrinsicID(), llvm::ilist_detail::node_parent_access< NodeTy, ParentTy >::getParent(), llvm::Instruction::getSuccessor(), llvm::BasicBlock::getTerminator(), llvm::Value::getType(), isConstantIntVector(), llvm::Type::isVoidTy(), llvm_unreachable, Ptr, 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.