|
LLVM 24.0.0git
|
Manage IR attributes for call recipes. More...
#include "Transforms/Vectorize/VPlan.h"
Public Member Functions | |
| VPIRAttributes ()=default | |
| VPIRAttributes (AttributeList CallAttrs) | |
| VPIRAttributes (const VPInstruction &Call, FunctionType *WideTy) | |
Stores the return and per-arg attributes of the call VPInstruction Call that are valid for a widened call with type WideTy. | |
| void | intersectAttrs (const VPIRAttributes &Other, LLVMContext &Ctx) |
Keep only the attributes valid for both this and Other. | |
| void | applyAttrs (CallInst &WideCall) const |
Apply the stored attributes to the widened call WideCall. | |
| MemoryEffects | getMemoryEffects (AttributeSet CalleeFnAttrs) const |
Returns the memory effects of a call with these attributes to a callee with function attributes CalleeFnAttrs. | |
| bool | hasFnAttr (Attribute::AttrKind Kind, AttributeSet CalleeFnAttrs) const |
Returns true if the call site or CalleeFnAttrs has Kind. | |
| void | printRetAttrs (raw_ostream &O) const |
| Print return-value attributes carried with this object. | |
| void | printParamAttrs (raw_ostream &O, unsigned ArgIdx) const |
Print per-arg attributes for argument ArgIdx. | |
| void | printFnAttrs (raw_ostream &O) const |
| Print function attributes carried with this object. | |
Manage IR attributes for call recipes.
Call VPInstructions store all call-site attributes. Widened calls only store return and per-argument attributes that are valid to propagate to the widened call.
|
default |
Referenced by intersectAttrs(), and llvm::VPInstruction::VPInstruction().
|
inlineexplicit |
| VPIRAttributes::VPIRAttributes | ( | const VPInstruction & | Call, |
| FunctionType * | WideTy ) |
Stores the return and per-arg attributes of the call VPInstruction Call that are valid for a widened call with type WideTy.
If Call is masked, the scalar call only executes for some lanes, so argument attributes are only kept for widened arguments passed to a masked variant.
Definition at line 2276 of file VPlanRecipes.cpp.
References assert(), Call, llvm::AttributeMask::contains(), llvm::Filter, llvm::AttributeSet::get(), getCalledFnOperandIndex(), llvm::Type::getContext(), llvm::FunctionType::getNumParams(), llvm::FunctionType::getParamType(), llvm::FunctionType::getReturnType(), and I.
|
inline |
Apply the stored attributes to the widened call WideCall.
Definition at line 1294 of file VPlan.h.
References llvm::CallBase::setAttributes().
Referenced by llvm::VPWidenCallRecipe::execute().
|
inline |
Returns the memory effects of a call with these attributes to a callee with function attributes CalleeFnAttrs.
Definition at line 1300 of file VPlan.h.
References llvm::AttributeSet::getMemoryEffects().
Referenced by llvm::VPInstruction::opcodeMayReadOrWriteFromMemory().
|
inline |
Returns true if the call site or CalleeFnAttrs has Kind.
Definition at line 1305 of file VPlan.h.
References llvm::AttributeSet::hasAttribute().
| void VPIRAttributes::intersectAttrs | ( | const VPIRAttributes & | Other, |
| LLVMContext & | Ctx ) |
Keep only the attributes valid for both this and Other.
Definition at line 2324 of file VPlanRecipes.cpp.
References llvm::Other, and VPIRAttributes().
| void VPIRAttributes::printFnAttrs | ( | raw_ostream & | O | ) | const |
Print function attributes carried with this object.
Definition at line 2343 of file VPlanRecipes.cpp.
References llvm::AttributeSet::getAsString(), and llvm::AttributeSet::hasAttributes().
Referenced by llvm::VPInstruction::printRecipe().
| void VPIRAttributes::printParamAttrs | ( | raw_ostream & | O, |
| unsigned | ArgIdx ) const |
Print per-arg attributes for argument ArgIdx.
Definition at line 2337 of file VPlanRecipes.cpp.
References llvm::AttributeSet::getAsString(), and llvm::AttributeSet::hasAttributes().
Referenced by llvm::VPInstruction::printRecipe(), and llvm::VPWidenCallRecipe::printRecipe().
| void VPIRAttributes::printRetAttrs | ( | raw_ostream & | O | ) | const |
Print return-value attributes carried with this object.
Definition at line 2331 of file VPlanRecipes.cpp.
References llvm::AttributeSet::getAsString(), and llvm::AttributeSet::hasAttributes().
Referenced by llvm::VPInstruction::printRecipe(), and llvm::VPWidenCallRecipe::printRecipe().