GTPin
Public Member Functions

Factory and container of HLI function arguments and return value representations. More...

#include <igt_iarg_factory.h>

Public Member Functions

virtual const IGtIargMakePrime (GtHliParamTraits paramTraits, GtIargImmValue value)=0
 Create an argument of GtIargType::PRIME type, passed by an immediate value.
virtual const IGtIargMakePrime (GtHliParamTraits paramTraits, const GtReg &reg)=0
 Create an argument of GtIargType::PRIME type, passed by a register value.
virtual const IGtIargMakeHostPtr (const void *hostPtr)=0
 Create an argument of GtIargType::HOST_PTR type.
virtual const IGtIargMakeDevicePtr (const GtReg &addrReg)=0
 Create an argument of GtIargType::DEVICE_PTR type, passed by a register value.
virtual const IGtIargMakeBufferOffset (uint32_t offset)=0
 Create an argument of GtIargType::BUFFER_OFFSET type, passed by a 32-bit immediate value.
virtual const IGtIargMakeBufferOffset (const GtReg &offsetReg)=0
 Create an argument of GtIargType::BUFFER_OFFSET type, passed by a register value.
virtual const IGtIargMakeTid ()=0
 Create an argument of GtIargType::TID type.
virtual const IGtIargMakeFfTid ()=0
 Create an argument of GtIargType::FFTID type.
virtual const IGtIargMakeGrfRange (uint32_t firstReg, uint32_t numRegs)=0
 Create an argument of GtIargType::GRF_RANGE type.
virtual const IGtIargMakeConstGrfRange (uint32_t firstReg, uint32_t numRegs)=0
 Create an argument of GtIargType::CONST_GRF_RANGE type.
virtual const IGtIargMakeSimdMask (bool ignoreCeMask, uint32_t execMask, const GtPredicate &predicate)=0
 Create an argument of GtIargType::SIMD_MASK type.
virtual const IGtIargMakeInsOpMask (const IGtIns &ins)=0
virtual const IGtIargMakeSlmPtr ()=0
 Create an argument of GtIargType::SLM_PTR type.
virtual const IGtIretMakeIret (GtHliParamTraits retTraits, const GtReg &reg)=0
virtual const IGtIretMakeIret ()=0

Detailed Description

Factory and container of HLI function arguments and return value representations.

Each instance of this factory is associated with a single instrumentation session. The factory methods create IGtIarg objects and store them in the internal container. All these objects are destroyed when the instrumentation session ends, so the methods for freeing individual IGtIarg instances are not provided.

Availability:

Member Function Documentation

virtual const IGtIarg& gtpin::IGtIargFactory::MakeBufferOffset ( uint32_t  offset) [pure virtual]

Create an argument of GtIargType::BUFFER_OFFSET type, passed by a 32-bit immediate value.

Parameters:
[in]offsetOffset in the GTPin profile buffer
Returns:
Reference to the new IGtIarg object
virtual const IGtIarg& gtpin::IGtIargFactory::MakeBufferOffset ( const GtReg offsetReg) [pure virtual]

Create an argument of GtIargType::BUFFER_OFFSET type, passed by a register value.

Parameters:
[in]offsetRegRegister that holds an offset in the GTPin profile buffer
Returns:
Reference to the new IGtIarg object
virtual const IGtIarg& gtpin::IGtIargFactory::MakeConstGrfRange ( uint32_t  firstReg,
uint32_t  numRegs 
) [pure virtual]

Create an argument of GtIargType::CONST_GRF_RANGE type.

Parameters:
[in]firstRegOrdinal number of the first GRF register in the range
[in]numRegsNumber of registers in the range
Returns:
Reference to the new IGtIarg object
virtual const IGtIarg& gtpin::IGtIargFactory::MakeDevicePtr ( const GtReg addrReg) [pure virtual]

Create an argument of GtIargType::DEVICE_PTR type, passed by a register value.

Parameters:
[in]addrRegRegister that holds an address in the device memory space
Returns:
Reference to the new IGtIarg object
virtual const IGtIarg& gtpin::IGtIargFactory::MakeFfTid ( ) [pure virtual]

Create an argument of GtIargType::FFTID type.

Returns:
Reference to the new IGtIarg object
virtual const IGtIarg& gtpin::IGtIargFactory::MakeGrfRange ( uint32_t  firstReg,
uint32_t  numRegs 
) [pure virtual]

Create an argument of GtIargType::GRF_RANGE type.

Parameters:
[in]firstRegOrdinal number of the first GRF register in the range
[in]numRegsNumber of registers in the range
Returns:
Reference to the new IGtIarg object
virtual const IGtIarg& gtpin::IGtIargFactory::MakeHostPtr ( const void *  hostPtr) [pure virtual]

Create an argument of GtIargType::HOST_PTR type.

Parameters:
[in]hostPtrPointer in the host memory space
Returns:
Reference to the new IGtIarg object
virtual const IGtIarg& gtpin::IGtIargFactory::MakeInsOpMask ( const IGtIns ins) [pure virtual]

Create an argument of GtIargType::INS_OP_MASK type

The new argument represents mask of scalar operations performed by the instruction on the vector of data elements ceMask = ins.IsWriteMaskEnabled() ? ChannelEnableReg() : 0xffffffff insOpMask = ceMask & DispatchMaskReg() & ins.ExecMask().Bits() & Mask(ins.Predicate())

Note:
The INS_OP_MASK argument is similar to the SIMD_MASK argument created by the MakeSimdMask function. However, there is one significant difference: the operation mask starts with the state of the GtExecMask::ChannelOffset() channel in the LSB position of the mask, while SIMD mask always holds state of the channel #0 in the LSB position. In other words, insOpMask = (simdMask >> GtExecMask::ChannelOffset())
Parameters:
[in]insInstruction, the operation mask is evaluated for
Returns:
Reference to the new IGtIarg object
virtual const IGtIret& gtpin::IGtIargFactory::MakeIret ( ) [pure virtual]

Create an IGtIret object that represents void / unused HLI function's return value

Returns:
Reference to the new IGtIret object
virtual const IGtIret& gtpin::IGtIargFactory::MakeIret ( GtHliParamTraits  retTraits,
const GtReg reg 
) [pure virtual]

Create an IGtIret object that represents HLI function's return value

Parameters:
[in]retTraitsTraits of the function's return value
[in]regRegister that holds the return value
Returns:
Reference to the new IGtIret object
virtual const IGtIarg& gtpin::IGtIargFactory::MakePrime ( GtHliParamTraits  paramTraits,
GtIargImmValue  value 
) [pure virtual]

Create an argument of GtIargType::PRIME type, passed by an immediate value.

Parameters:
[in]paramTraitsParameter traits
[in]valueImmediate argument value
Returns:
Reference to the new IGtIarg object
virtual const IGtIarg& gtpin::IGtIargFactory::MakePrime ( GtHliParamTraits  paramTraits,
const GtReg reg 
) [pure virtual]

Create an argument of GtIargType::PRIME type, passed by a register value.

Parameters:
[in]paramTraitsParameter traits
[in]regRegister that holds the argument value
Returns:
Reference to the new IGtIarg object
virtual const IGtIarg& gtpin::IGtIargFactory::MakeSimdMask ( bool  ignoreCeMask,
uint32_t  execMask,
const GtPredicate predicate 
) [pure virtual]

Create an argument of GtIargType::SIMD_MASK type.

The new argument evaluates the mask of effective SIMD channels at the instrumentation point ceMask = ignoreCeMask ? 0xffffffff : ChannelEnableReg() simdMask = ceMask & DispatchMaskReg() & execMask & Mask(predicate)

Parameters:
[in]ignoreCeMaskFlag that indicates whether the mask in ChannelEnableReg should be applied (false) or ignored (true) in the computation of effective SIMD channels
[in]execMaskExecution mask to be used in the computation of effective SIMD channels. Normally, this mask is produced by the GtExecMask::Bits() function.
[in]predicatePredicate to be used in the computation. Invalid predicate is ignored
Returns:
Reference to the new IGtIarg object
virtual const IGtIarg& gtpin::IGtIargFactory::MakeSlmPtr ( ) [pure virtual]

Create an argument of GtIargType::SLM_PTR type.

Returns:
Reference to the new IGtIarg object
virtual const IGtIarg& gtpin::IGtIargFactory::MakeTid ( ) [pure virtual]

Create an argument of GtIargType::TID type.

Returns:
Reference to the new IGtIarg object
 All Data Structures Functions Variables Typedefs Enumerations Enumerator


  Copyright (C) 2013-2025 Intel Corporation
SPDX-License-Identifier: MIT