Class RuleBasedPrototypeMemorySpecs
Assigns memory specifications to prototypes based on a set of user-configurable rules.
Inherited Members
Namespace: Flame.Compiler.Analysis
Assembly: Flame.Compiler.dll
Syntax
public sealed class RuleBasedPrototypeMemorySpecs : PrototypeMemorySpecs
Constructors
| Improve this Doc View SourceRuleBasedPrototypeMemorySpecs()
Creates an empty set of prototype exception spec rules.
Declaration
public RuleBasedPrototypeMemorySpecs()
RuleBasedPrototypeMemorySpecs(RuleBasedPrototypeMemorySpecs)
Creates a copy of another set of prototype exception spec rules.
Declaration
public RuleBasedPrototypeMemorySpecs(RuleBasedPrototypeMemorySpecs other)
Parameters
Type | Name | Description |
---|---|---|
RuleBasedPrototypeMemorySpecs | other |
Fields
| Improve this Doc View SourceDefault
Gets the default prototype memory spec rules.
Declaration
public static readonly RuleBasedPrototypeMemorySpecs Default
Field Value
Type | Description |
---|---|
RuleBasedPrototypeMemorySpecs | The default prototype memory spec rules. |
Methods
| Improve this Doc View SourceGetMemorySpecification(InstructionPrototype)
Gets the memory access specification for a particular instruction prototype.
Declaration
public override MemorySpecification GetMemorySpecification(InstructionPrototype prototype)
Parameters
Type | Name | Description |
---|---|---|
InstructionPrototype | prototype | The prototype to examine. |
Returns
Type | Description |
---|---|
MemorySpecification | A memory specification for |
Overrides
| Improve this Doc View SourceRegister(String, MemorySpecification)
Registers a function that assigns a fixed memory specification to a particular type of intrinsic.
Declaration
public void Register(string intrinsicName, MemorySpecification memorySpec)
Parameters
Type | Name | Description |
---|---|---|
System.String | intrinsicName | The name of the intrinsic to assign the memory specifications to. |
MemorySpecification | memorySpec | The memory specification for all intrinsic prototypes with
name |
Register(String, Func<IntrinsicPrototype, MemorySpecification>)
Registers a function that computes memory specifications for a particular type of intrinsic.
Declaration
public void Register(string intrinsicName, Func<IntrinsicPrototype, MemorySpecification> getMemorySpec)
Parameters
Type | Name | Description |
---|---|---|
System.String | intrinsicName | The name of the intrinsic to compute memory specifications for. |
System.Func<IntrinsicPrototype, MemorySpecification> | getMemorySpec | A function that takes an intrinsic prototype with
name |
Register<T>(MemorySpecification)
Maps a particular type of instruction prototype to a memory specification.
Declaration
public void Register<T>(MemorySpecification memorySpec)
where T : InstructionPrototype
Parameters
Type | Name | Description |
---|---|---|
MemorySpecification | memorySpec | The memory specification to register. |
Type Parameters
Name | Description |
---|---|
T | The type of instruction prototypes to which
|
Register<T>(Func<T, MemorySpecification>)
Registers a function that computes memory specifications for a particular type of instruction prototype.
Declaration
public void Register<T>(Func<T, MemorySpecification> getMemorySpec)
where T : InstructionPrototype
Parameters
Type | Name | Description |
---|---|---|
System.Func<T, MemorySpecification> | getMemorySpec | A function that computes memory specifications for all instruction prototypes of type T. |
Type Parameters
Name | Description |
---|---|
T | The type of instruction prototypes to which
|