LLVM 24.0.0git
X86TargetTransformInfo.cpp File Reference

This file implements a TargetTransformInfo analysis pass specific to the X86 target machine. More...

Go to the source code of this file.

Macros

#define DEBUG_TYPE   "x86tti"

Typedefs

using CostKindTblEntry = CostTblEntryT<CostKindCosts>
using TypeConversionCostKindTblEntry = TypeConversionCostTblEntryT<CostKindCosts>

Enumerations

enum  ClassIDEnum { GPRClass = 0 , VectorClass = 1 , ScalarFPClass = 2 }

Functions

static InstructionCost getPredicateFanoutCost (const X86TTIImpl &TTI, Type *DataVTy, Type *MaskVTy)
static bool isFoldedIntoRsqrtEstimate (const Value *V, const X86TargetLowering &TLI, MVT VT, TTI::TargetCostKind CostKind)
 Returns true if V is the square root, divided into with the reciprocal allowed, and the target replaces the pair with the rsqrt* based estimate, costed with the division.
static bool isLegalMaskedLoadStore (Type *ScalarTy, const X86Subtarget *ST)

Detailed Description

This file implements a TargetTransformInfo analysis pass specific to the X86 target machine.

It uses the target's detailed information to provide more precise answers to certain TTI queries, while letting the target independent and default TTI implementations handle the rest.

Definition in file X86TargetTransformInfo.cpp.

Macro Definition Documentation

◆ DEBUG_TYPE

#define DEBUG_TYPE   "x86tti"

Definition at line 64 of file X86TargetTransformInfo.cpp.

Typedef Documentation

◆ CostKindTblEntry

◆ TypeConversionCostKindTblEntry

Enumeration Type Documentation

◆ ClassIDEnum

Enumerator
GPRClass 
VectorClass 
ScalarFPClass 

Definition at line 135 of file X86TargetTransformInfo.cpp.

Function Documentation

◆ getPredicateFanoutCost()

◆ isFoldedIntoRsqrtEstimate()

bool isFoldedIntoRsqrtEstimate ( const Value * V,
const X86TargetLowering & TLI,
MVT VT,
TTI::TargetCostKind CostKind )
static

Returns true if V is the square root, divided into with the reciprocal allowed, and the target replaces the pair with the rsqrt* based estimate, costed with the division.

The estimate is formed for the legalized type VT.

Definition at line 4173 of file X86TargetTransformInfo.cpp.

References llvm::cast(), llvm::TargetLoweringBase::Disabled, llvm::dyn_cast_if_present(), II, llvm::PatternMatch::m_FDiv(), llvm::PatternMatch::m_Specific(), llvm::PatternMatch::m_Value(), llvm::PatternMatch::match(), llvm::TargetTransformInfo::TCK_Latency, llvm::TargetTransformInfo::TCK_RecipThroughput, TLI, and V.

Referenced by llvm::X86TTIImpl::getIntrinsicInstrCost(), and llvm::X86TTIImpl::getScalarizationOverhead().

◆ isLegalMaskedLoadStore()