LLDB mainline
|
HTR layer interface See lldb/docs/htr.rst for comprehensive HTR documentation. More...
#include <TraceHTR.h>
Public Member Functions | |
IHTRLayer (size_t id) | |
Construct new HTR layer. | |
size_t | GetLayerId () const |
Get the ID of the layer. | |
virtual HTRBlockMetadata | GetMetadataByIndex (size_t index) const =0 |
Get the metadata of a unit (instruction or block) in the layer. | |
virtual size_t | GetNumUnits () const =0 |
Get the total number of units (instruction or block) in this layer. | |
HTRBlock | MergeUnits (size_t start_unit_index, size_t num_units) |
Creates a new block from the result of merging a contiguous sequence of "units" (instructions or blocks depending on layer type) in this layer This allows the implementation class to decide how to store/generate this metadata. | |
virtual | ~IHTRLayer ()=default |
Protected Attributes | |
size_t | m_layer_id |
ID of the layer. | |
HTR layer interface See lldb/docs/htr.rst for comprehensive HTR documentation.
Definition at line 138 of file TraceHTR.h.
|
inline |
Construct new HTR layer.
[in] | id | The layer's id. |
Definition at line 144 of file TraceHTR.h.
|
virtualdefault |
size_t IHTRLayer::GetLayerId | ( | ) | const |
Get the ID of the layer.
Definition at line 68 of file TraceHTR.cpp.
References m_layer_id.
Referenced by lldb_private::BasicSuperBlockMerge(), and lldb_private::toJSON().
|
pure virtual |
Get the metadata of a unit (instruction or block) in the layer.
[in] | index | The position of the unit in the layer. |
Implemented in lldb_private::HTRInstructionLayer, and lldb_private::HTRBlockLayer.
Referenced by lldb_private::BasicSuperBlockMerge(), and MergeUnits().
|
pure virtual |
Get the total number of units (instruction or block) in this layer.
Implemented in lldb_private::HTRInstructionLayer, and lldb_private::HTRBlockLayer.
Referenced by lldb_private::BasicSuperBlockMerge(), and lldb_private::TraceHTR::ExecutePasses().
HTRBlock IHTRLayer::MergeUnits | ( | size_t | start_unit_index, |
size_t | num_units | ||
) |
Creates a new block from the result of merging a contiguous sequence of "units" (instructions or blocks depending on layer type) in this layer This allows the implementation class to decide how to store/generate this metadata.
For example, in the case of the instruction layer we want to lazily generate this metadata instead of storing it for each instruction.
[in] | start_unit_index | The index of the first unit to be merged. |
[in] | num_units | The number of units to be merged. Must be >= 1, since merging 0 blocks does not make sense. |
Definition at line 200 of file TraceHTR.cpp.
References GetMetadataByIndex(), and lldb_private::HTRBlockMetadata::MergeMetadata().
Referenced by lldb_private::BasicSuperBlockMerge().
|
protected |