LLVM 20.0.0git
|
#include "llvm/CodeGen/ExpandVectorPredication.h"
#include "llvm/ADT/Statistic.h"
#include "llvm/Analysis/TargetTransformInfo.h"
#include "llvm/Analysis/ValueTracking.h"
#include "llvm/Analysis/VectorUtils.h"
#include "llvm/IR/Constants.h"
#include "llvm/IR/Function.h"
#include "llvm/IR/IRBuilder.h"
#include "llvm/IR/Instructions.h"
#include "llvm/IR/IntrinsicInst.h"
#include "llvm/IR/Intrinsics.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/Compiler.h"
#include "llvm/Support/Debug.h"
#include "llvm/Transforms/Utils/LoopUtils.h"
#include <optional>
Go to the source code of this file.
Macros | |
#define | VPINTERNAL_VPLEGAL_CASES |
#define | VPINTERNAL_CASE(X) "|" #X |
#define | VPINTERNAL_CASE(X) .Case(#X, VPLegalization::X) |
#define | DEBUG_TYPE "expandvp" |
Typedefs | |
using | VPLegalization = TargetTransformInfo::VPLegalization |
using | VPTransform = TargetTransformInfo::VPLegalization::VPTransform |
Functions | |
static VPTransform | parseOverrideOption (const std::string &TextOpt) |
static bool | anyExpandVPOverridesSet () |
STATISTIC (NumFoldedVL, "Number of folded vector length params") | |
STATISTIC (NumLoweredVPOps, "Number of folded vector predication operations") | |
static bool | isAllTrueMask (Value *MaskVal) |
static Constant * | getSafeDivisor (Type *DivTy) |
static void | transferDecorations (Value &NewVal, VPIntrinsic &VPI) |
Transfer operation properties from OldVPI to NewVal . | |
static void | replaceOperation (Value &NewOp, VPIntrinsic &OldOp) |
Transfer all properties from OldOp to NewOp and replace all uses. | |
static bool | maySpeculateLanes (VPIntrinsic &VPI) |
Variables | |
static cl::opt< std::string > | EVLTransformOverride ("expandvp-override-evl-transform", cl::init(""), cl::Hidden, cl::desc("Options: <empty>" VPINTERNAL_VPLEGAL_CASES ". If non-empty, ignore " "TargetTransformInfo and " "always use this transformation for the %evl parameter (Used in " "testing).")) |
static cl::opt< std::string > | MaskTransformOverride ("expandvp-override-mask-transform", cl::init(""), cl::Hidden, cl::desc("Options: <empty>" VPINTERNAL_VPLEGAL_CASES ". If non-empty, Ignore " "TargetTransformInfo and " "always use this transformation for the %mask parameter (Used in " "testing).")) |
#define DEBUG_TYPE "expandvp" |
Definition at line 75 of file ExpandVectorPredication.cpp.
Definition at line 62 of file ExpandVectorPredication.cpp.
#define VPINTERNAL_CASE | ( | X | ) | .Case(#X, VPLegalization::X) |
Definition at line 62 of file ExpandVectorPredication.cpp.
#define VPINTERNAL_VPLEGAL_CASES |
Definition at line 37 of file ExpandVectorPredication.cpp.
Definition at line 33 of file ExpandVectorPredication.cpp.
Definition at line 34 of file ExpandVectorPredication.cpp.
|
static |
Definition at line 71 of file ExpandVectorPredication.cpp.
References EVLTransformOverride, and MaskTransformOverride.
Definition at line 92 of file ExpandVectorPredication.cpp.
References assert(), and llvm::Type::isIntOrIntVectorTy().
MaskVal
has all lane bits set. Definition at line 83 of file ExpandVectorPredication.cpp.
References llvm::getSplatValue().
|
static |
Definition at line 118 of file ExpandVectorPredication.cpp.
References llvm::Intrinsic::getAttributes(), llvm::Value::getContext(), llvm::VPIntrinsic::getFunctionalIntrinsicID(), llvm::VPIntrinsic::getFunctionalOpcode(), llvm::AttributeList::hasFnAttr(), and llvm::isSafeToSpeculativelyExecuteWithOpcode().
|
static |
Definition at line 64 of file ExpandVectorPredication.cpp.
References VPINTERNAL_VPLEGAL_CASES.
|
static |
Transfer all properties from OldOp
to NewOp
and replace all uses.
OldVP gets erased.
Definition at line 112 of file ExpandVectorPredication.cpp.
References llvm::Instruction::eraseFromParent(), llvm::Value::replaceAllUsesWith(), and transferDecorations().
STATISTIC | ( | NumFoldedVL | , |
"Number of folded vector length params" | |||
) |
STATISTIC | ( | NumLoweredVPOps | , |
"Number of folded vector predication operations" | |||
) |
|
static |
Transfer operation properties from OldVPI
to NewVal
.
Definition at line 98 of file ExpandVectorPredication.cpp.
Referenced by replaceOperation().
|
static |
Referenced by anyExpandVPOverridesSet().
|
static |
Referenced by anyExpandVPOverridesSet().