|
LLVM 24.0.0git
|
Manage IR per-argument and return attributes for call recipes. More...
#include "Transforms/Vectorize/VPlan.h"
Public Member Functions | |
| VPIRAttributes ()=default | |
| VPIRAttributes (const CallInst &CI, FunctionType *WideTy, bool IsMaskedCall) | |
Stores the return and per-arg attributes of CI 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. | |
| 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. | |
Manage IR per-argument and return attributes for call recipes.
Only attributes that are valid to propagate to the widened call are stored.
|
default |
References llvm::Other, and VPIRAttributes().
Referenced by intersectAttrs(), and VPIRAttributes().
| VPIRAttributes::VPIRAttributes | ( | const CallInst & | CI, |
| FunctionType * | WideTy, | ||
| bool | IsMaskedCall ) |
Stores the return and per-arg attributes of CI that are valid for a widened call with type WideTy.
If IsMaskedCall is true, 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 2258 of file VPlanRecipes.cpp.
References llvm::CallBase::arg_size(), assert(), llvm::AttributeMask::contains(), llvm::Filter, llvm::AttributeSet::get(), llvm::CallBase::getArgOperand(), llvm::CallBase::getAttributes(), llvm::Value::getContext(), llvm::FunctionType::getNumParams(), llvm::FunctionType::getParamType(), llvm::FunctionType::getReturnType(), llvm::Value::getType(), 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().
| void VPIRAttributes::intersectAttrs | ( | const VPIRAttributes & | Other, |
| LLVMContext & | Ctx ) |
Keep only the attributes valid for both this and Other.
Definition at line 2304 of file VPlanRecipes.cpp.
References llvm::Other, and VPIRAttributes().
| void VPIRAttributes::printParamAttrs | ( | raw_ostream & | O, |
| unsigned | ArgIdx ) const |
Print per-arg attributes for argument ArgIdx.
Definition at line 2318 of file VPlanRecipes.cpp.
References llvm::AttributeSet::getAsString(), and llvm::AttributeSet::hasAttributes().
Referenced by llvm::VPWidenCallRecipe::printRecipe().
| void VPIRAttributes::printRetAttrs | ( | raw_ostream & | O | ) | const |
Print return-value attributes carried with this object.
Definition at line 2312 of file VPlanRecipes.cpp.
References llvm::AttributeSet::getAsString(), and llvm::AttributeSet::hasAttributes().
Referenced by llvm::VPWidenCallRecipe::printRecipe().