ILGPU  0.9.0
ILGPU.Backends.PTX.PTXRegisterAllocator Class Reference

Represents a specialized PTX register allocator. More...

Inheritance diagram for ILGPU.Backends.PTX.PTXRegisterAllocator:
ILGPU.Backends.RegisterAllocator< PTXRegisterKind > ILGPU.Backends.PTX.PTXCodeGenerator ILGPU.Backends.PTX.PTXFunctionGenerator ILGPU.Backends.PTX.PTXKernelFunctionGenerator

Public Member Functions

 PTXRegisterAllocator (PTXBackend backend)
 Constructs a new register allocator. More...
 
HardwareRegister AllocatePlatformRegister (out RegisterDescription description)
 Allocates a platform-specific register and returns the resulting PTX type for the current platform. More...
 
HardwareRegister AllocatePlatformRegister (Value node, out RegisterDescription description)
 Allocates a platform-specific register for the given node and returns the resulting PTX type for the current platform. More...
 
sealed override void FreeRegister (HardwareRegister hardwareRegister)
 Frees the given hardware register. More...
 
HardwareRegister AllocateInt32Register ()
 Allocates a new 32bit integer register. More...
 
sealed override HardwareRegister AllocateRegister (RegisterDescription description)
 Allocates a register that is compatible with the given description. More...
 
- Public Member Functions inherited from ILGPU.Backends.RegisterAllocator< PTXRegisterKind >
HardwareRegister Allocate (Value node, RegisterDescription description)
 Allocates a specific register kind for the given node. More...
 
Register Allocate (Value node)
 Allocates a specific register kind for the given node. More...
 
HardwareRegister AllocateHardware (Value node)
 Allocates a specific register kind for the given node. More...
 
void Bind (Value node, Register targetRegister)
 Binds the given value to the target register. More...
 
Register AllocateType (TypeNode typeNode)
 Allocates a new register recursively More...
 
void Alias (Value node, Value aliasNode)
 Registers a register alias. More...
 
LoadAs< T > (Value node)
 Loads the allocated register of the given node. More...
 
Register Load (Value node)
 Loads the allocated register of the given node. More...
 
PrimitiveRegister LoadPrimitive (Value node)
 Loads the allocated primitive register of the given node. More...
 
HardwareRegister LoadHardware (Value node)
 Loads the allocated primitive register of the given node. More...
 
void Free (Value node)
 Frees the given node. More...
 

Static Public Member Functions

static PTXRegisterKind GetRegisterKind (BasicValueType basicValueType)
 Returns the associated register kind. More...
 
static BasicValueType ResolveParameterBasicValueType (BasicValueType basicValueType)
 Returns the associated register kind. More...
 
static string GetStringRepresentation (HardwareRegister register)
 Returns the string representation of the given hardware register. More...
 

Protected Member Functions

RegisterDescription ResolveParameterRegisterDescription (TypeNode type)
 Resolves a register description for the given parameter type. More...
 
sealed override RegisterDescription ResolveRegisterDescription (TypeNode type)
 Resolves a new PTX compatible register description. More...
 
- Protected Member Functions inherited from ILGPU.Backends.RegisterAllocator< PTXRegisterKind >
 RegisterAllocator (Backend backend)
 Constructs a new register allocator. More...
 
abstract RegisterDescription ResolveRegisterDescription (TypeNode type)
 Resolves a register description for the given type. More...
 

Static Protected Member Functions

static RegisterDescription ResolveRegisterDescription (BasicValueType basicValueType)
 Resolves a register description for the basic value type. More...
 

Additional Inherited Members

- Properties inherited from ILGPU.Backends.RegisterAllocator< PTXRegisterKind >
Backend Backend [get]
 Returns the underlying ABI. More...
 

Detailed Description

Represents a specialized PTX register allocator.

Constructor & Destructor Documentation

ILGPU.Backends.PTX.PTXRegisterAllocator.PTXRegisterAllocator ( PTXBackend  backend)

Constructs a new register allocator.

Parameters
backendThe associated backend.

Member Function Documentation

HardwareRegister ILGPU.Backends.PTX.PTXRegisterAllocator.AllocateInt32Register ( )

Allocates a new 32bit integer register.

Returns
The allocated primitive 32bit integer register.
HardwareRegister ILGPU.Backends.PTX.PTXRegisterAllocator.AllocatePlatformRegister ( out RegisterDescription  description)

Allocates a platform-specific register and returns the resulting PTX type for the current platform.

Parameters
descriptionThe resolved register.
Returns
The allocated register.
HardwareRegister ILGPU.Backends.PTX.PTXRegisterAllocator.AllocatePlatformRegister ( Value  node,
out RegisterDescription  description 
)

Allocates a platform-specific register for the given node and returns the resulting PTX type for the current platform.

Parameters
nodeThe node to allocate.
descriptionThe resolved register description.
Returns
The allocated register.
sealed override HardwareRegister ILGPU.Backends.PTX.PTXRegisterAllocator.AllocateRegister ( RegisterDescription  description)
virtual

Allocates a register that is compatible with the given description.

Implements ILGPU.Backends.RegisterAllocator< PTXRegisterKind >.

sealed override void ILGPU.Backends.PTX.PTXRegisterAllocator.FreeRegister ( HardwareRegister  hardwareRegister)
virtual

Frees the given hardware register.

Implements ILGPU.Backends.RegisterAllocator< PTXRegisterKind >.

static PTXRegisterKind ILGPU.Backends.PTX.PTXRegisterAllocator.GetRegisterKind ( BasicValueType  basicValueType)
static

Returns the associated register kind.

Parameters
basicValueTypeThe basic value type.
Returns
The resolved register kind.
static string ILGPU.Backends.PTX.PTXRegisterAllocator.GetStringRepresentation ( HardwareRegister  register)
static

Returns the string representation of the given hardware register.

Parameters
registerThe register.
Returns
The string representation.
static BasicValueType ILGPU.Backends.PTX.PTXRegisterAllocator.ResolveParameterBasicValueType ( BasicValueType  basicValueType)
static

Returns the associated register kind.

Parameters
basicValueTypeThe basic value type.
Returns
The resolved register kind.
RegisterDescription ILGPU.Backends.PTX.PTXRegisterAllocator.ResolveParameterRegisterDescription ( TypeNode  type)
protected

Resolves a register description for the given parameter type.

Parameters
typeThe parameter type to resolve.
Returns
The resolved register description.
static RegisterDescription ILGPU.Backends.PTX.PTXRegisterAllocator.ResolveRegisterDescription ( BasicValueType  basicValueType)
staticprotected

Resolves a register description for the basic value type.

Parameters
basicValueTypeThe basic value type to resolve.
Returns
The resolved register description.
sealed override RegisterDescription ILGPU.Backends.PTX.PTXRegisterAllocator.ResolveRegisterDescription ( TypeNode  type)
protected

Resolves a new PTX compatible register description.


The documentation for this class was generated from the following file: