LLVM 24.0.0git
IntrinsicInst.cpp File Reference
#include "llvm/IR/IntrinsicInst.h"
#include "llvm/ADT/StringSwitch.h"
#include "llvm/IR/Constants.h"
#include "llvm/IR/DebugInfoMetadata.h"
#include "llvm/IR/Metadata.h"
#include "llvm/IR/Module.h"
#include "llvm/IR/Operator.h"
#include "llvm/IR/PatternMatch.h"
#include "llvm/IR/Statepoint.h"
#include <optional>
#include "llvm/IR/VPIntrinsics.def"

Go to the source code of this file.

Macros

#define BEGIN_REGISTER_VP_INTRINSIC(VPID, MASKPOS, VLENPOS)
#define BEGIN_REGISTER_VP_INTRINSIC(VPID, MASKPOS, VLENPOS)
#define BEGIN_REGISTER_VP_INTRINSIC(VPID, MASKPOS, VLENPOS)
#define BEGIN_REGISTER_VP_INTRINSIC(VPID, ...)
#define VP_PROPERTY_FUNCTIONAL_OPC(OPC)
#define END_REGISTER_VP_INTRINSIC(VPID)
#define BEGIN_REGISTER_VP_INTRINSIC(VPID, ...)
#define VP_PROPERTY_FUNCTIONAL_INTRINSIC(INTRIN)
#define END_REGISTER_VP_INTRINSIC(VPID)
#define BEGIN_REGISTER_VP_INTRINSIC(VPID, ...)
#define VP_PROPERTY_NO_FUNCTIONAL   return true;
#define END_REGISTER_VP_INTRINSIC(VPID)
#define BEGIN_REGISTER_VP_INTRINSIC(VPID, ...)

Functions

static ValueAsMetadatagetAsMetadata (Value *V)
static FCmpInst::Predicate getFPPredicateFromMD (const Value *Op)
constexpr bool isVPIntrinsic (Intrinsic::ID ID)
static constexpr std::optional< unsignedgetFunctionalOpcodeForVP (Intrinsic::ID ID)
static constexpr std::optional< Intrinsic::IDgetFunctionalIntrinsicIDForVP (Intrinsic::ID ID)
static constexpr bool doesVPHaveNoFunctionalEquivalent (Intrinsic::ID ID)

Macro Definition Documentation

◆ BEGIN_REGISTER_VP_INTRINSIC [1/7]

#define BEGIN_REGISTER_VP_INTRINSIC ( VPID,
MASKPOS,
VLENPOS )
Value:
case Intrinsic::VPID: \
return MASKPOS;

Definition at line 541 of file IntrinsicInst.cpp.

◆ BEGIN_REGISTER_VP_INTRINSIC [2/7]

#define BEGIN_REGISTER_VP_INTRINSIC ( VPID,
MASKPOS,
VLENPOS )
Value:
case Intrinsic::VPID: \
return VLENPOS;

Definition at line 541 of file IntrinsicInst.cpp.

◆ BEGIN_REGISTER_VP_INTRINSIC [3/7]

#define BEGIN_REGISTER_VP_INTRINSIC ( VPID,
MASKPOS,
VLENPOS )
Value:
case Intrinsic::VPID: \
return true;

Definition at line 541 of file IntrinsicInst.cpp.

◆ BEGIN_REGISTER_VP_INTRINSIC [4/7]

#define BEGIN_REGISTER_VP_INTRINSIC ( VPID,
... )
Value:
case Intrinsic::VPID:

Definition at line 541 of file IntrinsicInst.cpp.

◆ BEGIN_REGISTER_VP_INTRINSIC [5/7]

#define BEGIN_REGISTER_VP_INTRINSIC ( VPID,
... )
Value:
case Intrinsic::VPID:

Definition at line 541 of file IntrinsicInst.cpp.

◆ BEGIN_REGISTER_VP_INTRINSIC [6/7]

#define BEGIN_REGISTER_VP_INTRINSIC ( VPID,
... )
Value:
case Intrinsic::VPID:

Definition at line 541 of file IntrinsicInst.cpp.

◆ BEGIN_REGISTER_VP_INTRINSIC [7/7]

#define BEGIN_REGISTER_VP_INTRINSIC ( VPID,
... )
Value:
static_assert(doesVPHaveNoFunctionalEquivalent(Intrinsic::VPID) || \
getFunctionalOpcodeForVP(Intrinsic::VPID) || \
getFunctionalIntrinsicIDForVP(Intrinsic::VPID));
static constexpr bool doesVPHaveNoFunctionalEquivalent(Intrinsic::ID ID)

Definition at line 541 of file IntrinsicInst.cpp.

◆ END_REGISTER_VP_INTRINSIC [1/3]

#define END_REGISTER_VP_INTRINSIC ( VPID)
Value:
break;

◆ END_REGISTER_VP_INTRINSIC [2/3]

#define END_REGISTER_VP_INTRINSIC ( VPID)
Value:
break;

◆ END_REGISTER_VP_INTRINSIC [3/3]

#define END_REGISTER_VP_INTRINSIC ( VPID)
Value:
break;

◆ VP_PROPERTY_FUNCTIONAL_INTRINSIC

#define VP_PROPERTY_FUNCTIONAL_INTRINSIC ( INTRIN)
Value:
return Intrinsic::INTRIN;

◆ VP_PROPERTY_FUNCTIONAL_OPC

#define VP_PROPERTY_FUNCTIONAL_OPC ( OPC)
Value:
return Instruction::OPC;

◆ VP_PROPERTY_NO_FUNCTIONAL

#define VP_PROPERTY_NO_FUNCTIONAL   return true;

Function Documentation

◆ doesVPHaveNoFunctionalEquivalent()

constexpr bool doesVPHaveNoFunctionalEquivalent ( Intrinsic::ID ID)
staticconstexpr

Definition at line 527 of file IntrinsicInst.cpp.

◆ getAsMetadata()

ValueAsMetadata * getAsMetadata ( Value * V)
static

◆ getFPPredicateFromMD()

◆ getFunctionalIntrinsicIDForVP()

constexpr std::optional< Intrinsic::ID > getFunctionalIntrinsicIDForVP ( Intrinsic::ID ID)
staticconstexpr

Definition at line 510 of file IntrinsicInst.cpp.

◆ getFunctionalOpcodeForVP()

constexpr std::optional< unsigned > getFunctionalOpcodeForVP ( Intrinsic::ID ID)
staticconstexpr

Definition at line 491 of file IntrinsicInst.cpp.

◆ isVPIntrinsic()

bool isVPIntrinsic ( Intrinsic::ID ID)
constexpr

Definition at line 473 of file IntrinsicInst.cpp.