LLVM 20.0.0git
Classes | Namespaces | Macros | Functions | Variables
AttributorAttributes.cpp File Reference
#include "llvm/Transforms/IPO/Attributor.h"
#include "llvm/ADT/APInt.h"
#include "llvm/ADT/ArrayRef.h"
#include "llvm/ADT/DenseMapInfo.h"
#include "llvm/ADT/MapVector.h"
#include "llvm/ADT/SCCIterator.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/SetOperations.h"
#include "llvm/ADT/SetVector.h"
#include "llvm/ADT/SmallPtrSet.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/ADT/Statistic.h"
#include "llvm/ADT/StringExtras.h"
#include "llvm/Analysis/AliasAnalysis.h"
#include "llvm/Analysis/AssumeBundleQueries.h"
#include "llvm/Analysis/AssumptionCache.h"
#include "llvm/Analysis/CaptureTracking.h"
#include "llvm/Analysis/CycleAnalysis.h"
#include "llvm/Analysis/InstructionSimplify.h"
#include "llvm/Analysis/LazyValueInfo.h"
#include "llvm/Analysis/MemoryBuiltins.h"
#include "llvm/Analysis/OptimizationRemarkEmitter.h"
#include "llvm/Analysis/ScalarEvolution.h"
#include "llvm/Analysis/TargetTransformInfo.h"
#include "llvm/Analysis/ValueTracking.h"
#include "llvm/IR/Argument.h"
#include "llvm/IR/Assumptions.h"
#include "llvm/IR/Attributes.h"
#include "llvm/IR/BasicBlock.h"
#include "llvm/IR/Constant.h"
#include "llvm/IR/Constants.h"
#include "llvm/IR/DataLayout.h"
#include "llvm/IR/DerivedTypes.h"
#include "llvm/IR/GlobalValue.h"
#include "llvm/IR/IRBuilder.h"
#include "llvm/IR/InlineAsm.h"
#include "llvm/IR/InstrTypes.h"
#include "llvm/IR/Instruction.h"
#include "llvm/IR/Instructions.h"
#include "llvm/IR/IntrinsicInst.h"
#include "llvm/IR/IntrinsicsAMDGPU.h"
#include "llvm/IR/IntrinsicsNVPTX.h"
#include "llvm/IR/LLVMContext.h"
#include "llvm/IR/MDBuilder.h"
#include "llvm/IR/NoFolder.h"
#include "llvm/IR/Value.h"
#include "llvm/IR/ValueHandle.h"
#include "llvm/Support/Alignment.h"
#include "llvm/Support/Casting.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/GraphWriter.h"
#include "llvm/Support/MathExtras.h"
#include "llvm/Support/TypeSize.h"
#include "llvm/Support/raw_ostream.h"
#include "llvm/Transforms/Utils/BasicBlockUtils.h"
#include "llvm/Transforms/Utils/CallPromotionUtils.h"
#include "llvm/Transforms/Utils/Local.h"
#include "llvm/Transforms/Utils/ValueMapper.h"
#include <cassert>
#include <numeric>
#include <optional>
#include <string>

Go to the source code of this file.

Classes

struct  llvm::DenseMapInfo< AAPointerInfo::Access >
 Helper for AA::PointerInfo::Access DenseMap/Set usage. More...
 
struct  llvm::DenseMapInfo< AA::RangeTy >
 Helper that allows RangeTy as a key in a DenseMap. More...
 
struct  llvm::AccessAsInstructionInfo
 Helper for AA::PointerInfo::Access DenseMap/Set usage ignoring everythign but the instruction. More...
 
struct  llvm::AA::PointerInfo::State
 A type to track pointer/struct usage and accesses for AAPointerInfo. More...
 
struct  ReachabilityQueryInfo< ToTy >
 ----------------—AAIntraFnReachability Attribute-----------------------— More...
 
struct  llvm::DenseMapInfo< ReachabilityQueryInfo< ToTy > * >
 

Namespaces

namespace  llvm
 This is an optimization pass for GlobalISel generic memory operations.
 
namespace  llvm::AA
 Abstract Attribute helper functions.
 
namespace  llvm::AA::PointerInfo
 

Macros

#define DEBUG_TYPE   "attributor"
 
#define BUILD_STAT_MSG_IR_ATTR(TYPE, NAME)    ("Number of " #TYPE " marked '" #NAME "'")
 
#define BUILD_STAT_NAME(NAME, TYPE)   NumIR##TYPE##_##NAME
 
#define STATS_DECL_(NAME, MSG)   STATISTIC(NAME, MSG);
 
#define STATS_DECL(NAME, TYPE, MSG)    STATS_DECL_(BUILD_STAT_NAME(NAME, TYPE), MSG);
 
#define STATS_TRACK(NAME, TYPE)   ++(BUILD_STAT_NAME(NAME, TYPE));
 
#define STATS_DECLTRACK(NAME, TYPE, MSG)
 
#define STATS_DECLTRACK_ARG_ATTR(NAME)    STATS_DECLTRACK(NAME, Arguments, BUILD_STAT_MSG_IR_ATTR(arguments, NAME))
 
#define STATS_DECLTRACK_CSARG_ATTR(NAME)
 
#define STATS_DECLTRACK_FN_ATTR(NAME)    STATS_DECLTRACK(NAME, Function, BUILD_STAT_MSG_IR_ATTR(functions, NAME))
 
#define STATS_DECLTRACK_CS_ATTR(NAME)    STATS_DECLTRACK(NAME, CS, BUILD_STAT_MSG_IR_ATTR(call site, NAME))
 
#define STATS_DECLTRACK_FNRET_ATTR(NAME)
 
#define STATS_DECLTRACK_CSRET_ATTR(NAME)
 
#define STATS_DECLTRACK_FLOATING_ATTR(NAME)
 
#define PIPE_OPERATOR(CLASS)
 
#define DefineKeys(ToTy)
 
#define SWITCH_PK_INV(CLASS, PK, POS_NAME)
 
#define SWITCH_PK_CREATE(CLASS, IRP, PK, SUFFIX)
 
#define CREATE_FUNCTION_ABSTRACT_ATTRIBUTE_FOR_POSITION(CLASS)
 
#define CREATE_VALUE_ABSTRACT_ATTRIBUTE_FOR_POSITION(CLASS)
 
#define CREATE_ABSTRACT_ATTRIBUTE_FOR_ONE_POSITION(POS, SUFFIX, CLASS)
 
#define CREATE_ALL_ABSTRACT_ATTRIBUTE_FOR_POSITION(CLASS)
 
#define CREATE_FUNCTION_ONLY_ABSTRACT_ATTRIBUTE_FOR_POSITION(CLASS)
 
#define CREATE_NON_RET_ABSTRACT_ATTRIBUTE_FOR_POSITION(CLASS)
 

Functions

 STATISTIC (NumAAs, "Number of abstract attributes created")
 
template<>
ChangeStatus llvm::clampStateAndIndicateChange< DerefState > (DerefState &S, const DerefState &R)
 
static bool mayBeInCycle (const CycleInfo *CI, const Instruction *I, bool HeaderOnly, Cycle **CPtr=nullptr)
 
static bool isDenselyPacked (Type *Ty, const DataLayout &DL)
 Checks if a type could have padding bytes.
 
static const ValuegetPointerOperand (const Instruction *I, bool AllowVolatile)
 Get pointer operand of memory accessing instruction.
 
static ValueconstructPointer (Value *Ptr, int64_t Offset, IRBuilder< NoFolder > &IRB)
 Helper function to create a pointer based on Ptr, and advanced by Offset bytes.
 
static const ValuestripAndAccumulateOffsets (Attributor &A, const AbstractAttribute &QueryingAA, const Value *Val, const DataLayout &DL, APInt &Offset, bool GetMinOffset, bool AllowNonInbounds, bool UseAssumed=false)
 
static const ValuegetMinimalBaseOfPointer (Attributor &A, const AbstractAttribute &QueryingAA, const Value *Ptr, int64_t &BytesOffset, const DataLayout &DL, bool AllowNonInbounds=false)
 
template<typename AAType , typename StateType = typename AAType::StateType, Attribute::AttrKind IRAttributeKind = AAType::IRAttributeKind, bool RecurseForSelectAndPHI = true>
static void clampReturnedValueStates (Attributor &A, const AAType &QueryingAA, StateType &S, const IRPosition::CallBaseContext *CBContext=nullptr)
 Clamp the information known for all returned values of a function (identified by QueryingAA) into S.
 
template<typename AAType >
static std::optional< Constant * > askForAssumedConstant (Attributor &A, const AbstractAttribute &QueryingAA, const IRPosition &IRP, Type &Ty)
 
 CREATE_ABSTRACT_ATTRIBUTE_FOR_ONE_POSITION (IRP_CALL_SITE, CallSite, AAIndirectCallInfo) CREATE_ABSTRACT_ATTRIBUTE_FOR_ONE_POSITION(IRP_FLOAT
 

Variables

static cl::opt< boolManifestInternal ("attributor-manifest-internal", cl::Hidden, cl::desc("Manifest Attributor internal string attributes."), cl::init(false))
 
static cl::opt< int > MaxHeapToStackSize ("max-heap-to-stack-size", cl::init(128), cl::Hidden)
 
static cl::opt< unsigned, trueMaxPotentialValues ("attributor-max-potential-values", cl::Hidden, cl::desc("Maximum number of potential values to be " "tracked for each position."), cl::location(llvm::PotentialConstantIntValuesState::MaxPotentialValues), cl::init(7))
 
static cl::opt< int > MaxPotentialValuesIterations ("attributor-max-potential-values-iterations", cl::Hidden, cl::desc("Maximum number of iterations we keep dismantling potential values."), cl::init(64))
 
 Floating
 

Macro Definition Documentation

◆ BUILD_STAT_MSG_IR_ATTR

#define BUILD_STAT_MSG_IR_ATTR (   TYPE,
  NAME 
)     ("Number of " #TYPE " marked '" #NAME "'")

Definition at line 124 of file AttributorAttributes.cpp.

◆ BUILD_STAT_NAME

#define BUILD_STAT_NAME (   NAME,
  TYPE 
)    NumIR##TYPE##_##NAME

Definition at line 126 of file AttributorAttributes.cpp.

◆ CREATE_ABSTRACT_ATTRIBUTE_FOR_ONE_POSITION

#define CREATE_ABSTRACT_ATTRIBUTE_FOR_ONE_POSITION (   POS,
  SUFFIX,
  CLASS 
)
Value:
CLASS &CLASS::createForPosition(const IRPosition &IRP, Attributor &A) { \
CLASS *AA = nullptr; \
switch (IRP.getPositionKind()) { \
SWITCH_PK_CREATE(CLASS, IRP, POS, SUFFIX) \
default: \
llvm_unreachable("Cannot create " #CLASS " for position otherthan " #POS \
" position!"); \
} \
return *AA; \
}
static GCRegistry::Add< ErlangGC > A("erlang", "erlang-compatible garbage collector")
The fixpoint analysis framework that orchestrates the attribute deduction.
Definition: Attributor.h:1508
Helper to describe and deal with positions in the LLVM-IR.
Definition: Attributor.h:581
Kind getPositionKind() const
Return the associated position kind.
Definition: Attributor.h:877

Definition at line 12992 of file AttributorAttributes.cpp.

◆ CREATE_ALL_ABSTRACT_ATTRIBUTE_FOR_POSITION

#define CREATE_ALL_ABSTRACT_ATTRIBUTE_FOR_POSITION (   CLASS)
Value:
CLASS &CLASS::createForPosition(const IRPosition &IRP, Attributor &A) { \
CLASS *AA = nullptr; \
switch (IRP.getPositionKind()) { \
SWITCH_PK_INV(CLASS, IRP_INVALID, "invalid") \
SWITCH_PK_CREATE(CLASS, IRP, IRP_FUNCTION, Function) \
SWITCH_PK_CREATE(CLASS, IRP, IRP_CALL_SITE, CallSite) \
SWITCH_PK_CREATE(CLASS, IRP, IRP_FLOAT, Floating) \
SWITCH_PK_CREATE(CLASS, IRP, IRP_ARGUMENT, Argument) \
SWITCH_PK_CREATE(CLASS, IRP, IRP_RETURNED, Returned) \
SWITCH_PK_CREATE(CLASS, IRP, IRP_CALL_SITE_RETURNED, CallSiteReturned) \
SWITCH_PK_CREATE(CLASS, IRP, IRP_CALL_SITE_ARGUMENT, CallSiteArgument) \
} \
return *AA; \
}
This class represents an incoming formal argument to a Function.
Definition: Argument.h:31

Definition at line 13004 of file AttributorAttributes.cpp.

◆ CREATE_FUNCTION_ABSTRACT_ATTRIBUTE_FOR_POSITION

#define CREATE_FUNCTION_ABSTRACT_ATTRIBUTE_FOR_POSITION (   CLASS)
Value:
CLASS &CLASS::createForPosition(const IRPosition &IRP, Attributor &A) { \
CLASS *AA = nullptr; \
switch (IRP.getPositionKind()) { \
SWITCH_PK_INV(CLASS, IRP_INVALID, "invalid") \
SWITCH_PK_INV(CLASS, IRP_FLOAT, "floating") \
SWITCH_PK_INV(CLASS, IRP_ARGUMENT, "argument") \
SWITCH_PK_INV(CLASS, IRP_RETURNED, "returned") \
SWITCH_PK_INV(CLASS, IRP_CALL_SITE_RETURNED, "call site returned") \
SWITCH_PK_INV(CLASS, IRP_CALL_SITE_ARGUMENT, "call site argument") \
SWITCH_PK_CREATE(CLASS, IRP, IRP_FUNCTION, Function) \
SWITCH_PK_CREATE(CLASS, IRP, IRP_CALL_SITE, CallSite) \
} \
return *AA; \
}

Definition at line 12960 of file AttributorAttributes.cpp.

◆ CREATE_FUNCTION_ONLY_ABSTRACT_ATTRIBUTE_FOR_POSITION

#define CREATE_FUNCTION_ONLY_ABSTRACT_ATTRIBUTE_FOR_POSITION (   CLASS)
Value:
CLASS &CLASS::createForPosition(const IRPosition &IRP, Attributor &A) { \
CLASS *AA = nullptr; \
switch (IRP.getPositionKind()) { \
SWITCH_PK_INV(CLASS, IRP_INVALID, "invalid") \
SWITCH_PK_INV(CLASS, IRP_ARGUMENT, "argument") \
SWITCH_PK_INV(CLASS, IRP_FLOAT, "floating") \
SWITCH_PK_INV(CLASS, IRP_RETURNED, "returned") \
SWITCH_PK_INV(CLASS, IRP_CALL_SITE_RETURNED, "call site returned") \
SWITCH_PK_INV(CLASS, IRP_CALL_SITE_ARGUMENT, "call site argument") \
SWITCH_PK_INV(CLASS, IRP_CALL_SITE, "call site") \
SWITCH_PK_CREATE(CLASS, IRP, IRP_FUNCTION, Function) \
} \
return *AA; \
}

Definition at line 13020 of file AttributorAttributes.cpp.

◆ CREATE_NON_RET_ABSTRACT_ATTRIBUTE_FOR_POSITION

#define CREATE_NON_RET_ABSTRACT_ATTRIBUTE_FOR_POSITION (   CLASS)
Value:
CLASS &CLASS::createForPosition(const IRPosition &IRP, Attributor &A) { \
CLASS *AA = nullptr; \
switch (IRP.getPositionKind()) { \
SWITCH_PK_INV(CLASS, IRP_INVALID, "invalid") \
SWITCH_PK_INV(CLASS, IRP_RETURNED, "returned") \
SWITCH_PK_CREATE(CLASS, IRP, IRP_FUNCTION, Function) \
SWITCH_PK_CREATE(CLASS, IRP, IRP_CALL_SITE, CallSite) \
SWITCH_PK_CREATE(CLASS, IRP, IRP_FLOAT, Floating) \
SWITCH_PK_CREATE(CLASS, IRP, IRP_ARGUMENT, Argument) \
SWITCH_PK_CREATE(CLASS, IRP, IRP_CALL_SITE_RETURNED, CallSiteReturned) \
SWITCH_PK_CREATE(CLASS, IRP, IRP_CALL_SITE_ARGUMENT, CallSiteArgument) \
} \
return *AA; \
}

Definition at line 13036 of file AttributorAttributes.cpp.

◆ CREATE_VALUE_ABSTRACT_ATTRIBUTE_FOR_POSITION

#define CREATE_VALUE_ABSTRACT_ATTRIBUTE_FOR_POSITION (   CLASS)
Value:
CLASS &CLASS::createForPosition(const IRPosition &IRP, Attributor &A) { \
CLASS *AA = nullptr; \
switch (IRP.getPositionKind()) { \
SWITCH_PK_INV(CLASS, IRP_INVALID, "invalid") \
SWITCH_PK_INV(CLASS, IRP_FUNCTION, "function") \
SWITCH_PK_INV(CLASS, IRP_CALL_SITE, "call site") \
SWITCH_PK_CREATE(CLASS, IRP, IRP_FLOAT, Floating) \
SWITCH_PK_CREATE(CLASS, IRP, IRP_ARGUMENT, Argument) \
SWITCH_PK_CREATE(CLASS, IRP, IRP_RETURNED, Returned) \
SWITCH_PK_CREATE(CLASS, IRP, IRP_CALL_SITE_RETURNED, CallSiteReturned) \
SWITCH_PK_CREATE(CLASS, IRP, IRP_CALL_SITE_ARGUMENT, CallSiteArgument) \
} \
return *AA; \
}

Definition at line 12976 of file AttributorAttributes.cpp.

◆ DEBUG_TYPE

#define DEBUG_TYPE   "attributor"

Definition at line 81 of file AttributorAttributes.cpp.

◆ DefineKeys

#define DefineKeys (   ToTy)
Value:
template <> \
ReachabilityQueryInfo<ToTy>( \
template <> \
ReachabilityQueryInfo<ToTy>( \
----------------—AAIntraFnReachability Attribute-----------------------—
An information struct used to provide DenseMap with the various necessary components for a given valu...
Definition: DenseMapInfo.h:52

Definition at line 3445 of file AttributorAttributes.cpp.

◆ PIPE_OPERATOR

#define PIPE_OPERATOR (   CLASS)
Value:
raw_ostream &operator<<(raw_ostream &OS, const CLASS &AA) { \
return OS << static_cast<const AbstractAttribute &>(AA); \
}
raw_pwrite_stream & OS
This class implements an extremely fast bulk output stream that can only output to a stream.
Definition: raw_ostream.h:52
raw_ostream & operator<<(raw_ostream &OS, const APFixedPoint &FX)
Definition: APFixedPoint.h:292

Definition at line 158 of file AttributorAttributes.cpp.

◆ STATS_DECL

#define STATS_DECL (   NAME,
  TYPE,
  MSG 
)     STATS_DECL_(BUILD_STAT_NAME(NAME, TYPE), MSG);

Definition at line 128 of file AttributorAttributes.cpp.

◆ STATS_DECL_

#define STATS_DECL_ (   NAME,
  MSG 
)    STATISTIC(NAME, MSG);

Definition at line 127 of file AttributorAttributes.cpp.

◆ STATS_DECLTRACK

#define STATS_DECLTRACK (   NAME,
  TYPE,
  MSG 
)
Value:
{ \
STATS_DECL(NAME, TYPE, MSG) \
STATS_TRACK(NAME, TYPE) \
}

Definition at line 131 of file AttributorAttributes.cpp.

◆ STATS_DECLTRACK_ARG_ATTR

#define STATS_DECLTRACK_ARG_ATTR (   NAME)     STATS_DECLTRACK(NAME, Arguments, BUILD_STAT_MSG_IR_ATTR(arguments, NAME))

Definition at line 136 of file AttributorAttributes.cpp.

◆ STATS_DECLTRACK_CS_ATTR

#define STATS_DECLTRACK_CS_ATTR (   NAME)     STATS_DECLTRACK(NAME, CS, BUILD_STAT_MSG_IR_ATTR(call site, NAME))

Definition at line 143 of file AttributorAttributes.cpp.

◆ STATS_DECLTRACK_CSARG_ATTR

#define STATS_DECLTRACK_CSARG_ATTR (   NAME)
Value:
STATS_DECLTRACK(NAME, CSArguments, \
#define STATS_DECLTRACK(NAME, TYPE, MSG)
#define BUILD_STAT_MSG_IR_ATTR(TYPE, NAME)
nvptx lower Lower arguments(NVPTX)"

Definition at line 138 of file AttributorAttributes.cpp.

◆ STATS_DECLTRACK_CSRET_ATTR

#define STATS_DECLTRACK_CSRET_ATTR (   NAME)
Value:
STATS_DECLTRACK(NAME, CSReturn, \
BUILD_STAT_MSG_IR_ATTR(call site returns, NAME))

Definition at line 148 of file AttributorAttributes.cpp.

◆ STATS_DECLTRACK_FLOATING_ATTR

#define STATS_DECLTRACK_FLOATING_ATTR (   NAME)
Value:
("Number of floating values known to be '" #NAME "'"))

Definition at line 151 of file AttributorAttributes.cpp.

◆ STATS_DECLTRACK_FN_ATTR

#define STATS_DECLTRACK_FN_ATTR (   NAME)     STATS_DECLTRACK(NAME, Function, BUILD_STAT_MSG_IR_ATTR(functions, NAME))

Definition at line 141 of file AttributorAttributes.cpp.

◆ STATS_DECLTRACK_FNRET_ATTR

#define STATS_DECLTRACK_FNRET_ATTR (   NAME)
Value:
STATS_DECLTRACK(NAME, FunctionReturn, \
Performs the initial survey of the specified function

Definition at line 145 of file AttributorAttributes.cpp.

◆ STATS_TRACK

#define STATS_TRACK (   NAME,
  TYPE 
)    ++(BUILD_STAT_NAME(NAME, TYPE));

Definition at line 130 of file AttributorAttributes.cpp.

◆ SWITCH_PK_CREATE

#define SWITCH_PK_CREATE (   CLASS,
  IRP,
  PK,
  SUFFIX 
)
Value:
case IRPosition::PK: \
AA = new (A.Allocator) CLASS##SUFFIX(IRP, A); \
++NumAAs; \
break;

Definition at line 12954 of file AttributorAttributes.cpp.

◆ SWITCH_PK_INV

#define SWITCH_PK_INV (   CLASS,
  PK,
  POS_NAME 
)
Value:
case IRPosition::PK: \
llvm_unreachable("Cannot create " #CLASS " for a " POS_NAME " position!");

Definition at line 12950 of file AttributorAttributes.cpp.

Function Documentation

◆ askForAssumedConstant()

template<typename AAType >
static std::optional< Constant * > askForAssumedConstant ( Attributor A,
const AbstractAttribute QueryingAA,
const IRPosition IRP,
Type Ty 
)
static

◆ clampReturnedValueStates()

template<typename AAType , typename StateType = typename AAType::StateType, Attribute::AttrKind IRAttributeKind = AAType::IRAttributeKind, bool RecurseForSelectAndPHI = true>
static void clampReturnedValueStates ( Attributor A,
const AAType &  QueryingAA,
StateType &  S,
const IRPosition::CallBaseContext CBContext = nullptr 
)
static

Clamp the information known for all returned values of a function (identified by QueryingAA) into S.

Definition at line 358 of file AttributorAttributes.cpp.

References A, assert(), llvm::dbgs(), llvm::IRPosition::IRP_CALL_SITE_RETURNED, llvm::IRPosition::IRP_RETURNED, llvm::Attribute::isEnumAttrKind(), LLVM_DEBUG, and llvm::IRPosition::value().

◆ constructPointer()

static Value * constructPointer ( Value Ptr,
int64_t  Offset,
IRBuilder< NoFolder > &  IRB 
)
static

Helper function to create a pointer based on Ptr, and advanced by Offset bytes.

Definition at line 295 of file AttributorAttributes.cpp.

References llvm::IRBuilderBase::CreatePtrAdd(), llvm::dbgs(), llvm::IRBuilderBase::getInt64(), LLVM_DEBUG, llvm::Offset, and Ptr.

◆ CREATE_ABSTRACT_ATTRIBUTE_FOR_ONE_POSITION()

CREATE_ABSTRACT_ATTRIBUTE_FOR_ONE_POSITION ( IRP_CALL_SITE  ,
CallSite  ,
AAIndirectCallInfo   
)

◆ getMinimalBaseOfPointer()

static const Value * getMinimalBaseOfPointer ( Attributor A,
const AbstractAttribute QueryingAA,
const Value Ptr,
int64_t &  BytesOffset,
const DataLayout DL,
bool  AllowNonInbounds = false 
)
static

◆ getPointerOperand()

static const Value * getPointerOperand ( const Instruction I,
bool  AllowVolatile 
)
static

Get pointer operand of memory accessing instruction.

If I is not a memory accessing instruction, return nullptr. If AllowVolatile, is set to false and the instruction is volatile, return nullptr.

Definition at line 269 of file AttributorAttributes.cpp.

References I.

◆ isDenselyPacked()

static bool isDenselyPacked ( Type Ty,
const DataLayout DL 
)
static

◆ mayBeInCycle()

static bool mayBeInCycle ( const CycleInfo CI,
const Instruction I,
bool  HeaderOnly,
Cycle **  CPtr = nullptr 
)
static

◆ STATISTIC()

STATISTIC ( NumAAs  ,
"Number of abstract attributes created"   
)

◆ stripAndAccumulateOffsets()

static const Value * stripAndAccumulateOffsets ( Attributor A,
const AbstractAttribute QueryingAA,
const Value Val,
const DataLayout DL,
APInt Offset,
bool  GetMinOffset,
bool  AllowNonInbounds,
bool  UseAssumed = false 
)
static

Variable Documentation

◆ Floating

Floating

Definition at line 13085 of file AttributorAttributes.cpp.

◆ ManifestInternal

cl::opt< bool > ManifestInternal("attributor-manifest-internal", cl::Hidden, cl::desc("Manifest Attributor internal string attributes."), cl::init(false)) ( "attributor-manifest-internal"  ,
cl::Hidden  ,
cl::desc("Manifest Attributor internal string attributes.")  ,
cl::init(false)   
)
static

◆ MaxHeapToStackSize

cl::opt< int > MaxHeapToStackSize("max-heap-to-stack-size", cl::init(128), cl::Hidden) ( "max-heap-to-stack-size"  ,
cl::init(128)  ,
cl::Hidden   
)
static

◆ MaxPotentialValues

cl::opt< unsigned, true > MaxPotentialValues("attributor-max-potential-values", cl::Hidden, cl::desc("Maximum number of potential values to be " "tracked for each position."), cl::location(llvm::PotentialConstantIntValuesState::MaxPotentialValues), cl::init(7)) ( "attributor-max-potential-values"  ,
cl::Hidden  ,
cl::desc("Maximum number of potential values to be " "tracked for each position.")  ,
cl::location(llvm::PotentialConstantIntValuesState::MaxPotentialValues)  ,
cl::init(7)   
)
static

◆ MaxPotentialValuesIterations

cl::opt< int > MaxPotentialValuesIterations("attributor-max-potential-values-iterations", cl::Hidden, cl::desc( "Maximum number of iterations we keep dismantling potential values."), cl::init(64)) ( "attributor-max-potential-values-iterations"  ,
cl::Hidden  ,
cl::desc( "Maximum number of iterations we keep dismantling potential values.")  ,
cl::init(64)   
)
static