|
nany
|
Public Member Functions | |
| Sequence (const Sequence &)=delete | |
| Sequence (const Sequence &, uint32_t offset) | |
Cursor manipulation | |
| bool | isCursorValid (const Instruction &instr) const |
| Get if a cursor is valid. | |
| void | invalidateCursor (const Instruction *&cusror) const |
| Get the upper limit. | |
| void | invalidateCursor (Instruction *&cusror) const |
| Get the upper limit. | |
| bool | jumpToLabelForward (const Instruction *&cursor, uint32_t label) const |
| Go to the next label. | |
| bool | jumpToLabelBackward (const Instruction *&cursor, uint32_t label) const |
| Go to a previous label. | |
| void | moveCursorFromBlueprintToEnd (Instruction *&cursor) const |
| Move the cursor at the end of the blueprint. | |
| void | moveCursorFromBlueprintToEnd (const Instruction *&cursor) const |
| Move the cursor at the end of the blueprint. | |
Opcodes | |
| template<isa::Op O> | |
| isa::Operand< O > & | at (uint32_t offset) |
| Fetch an instruction at a given offset. | |
| template<isa::Op O> | |
| const isa::Operand< O > & | at (uint32_t offset) const |
| Fetch an instruction at a given offset (const) | |
| const Instruction & | at (uint32_t offset) const |
| Fetch an instruction at a given offset. | |
| Instruction & | at (uint32_t offset) |
| Fetch an instruction at a given offset. | |
| template<isa::Op O> | |
| isa::Operand< O > & | emit () |
| emit a new Instruction | |
| template<isa::Op O> | |
| uint32_t | offsetOf (const isa::Operand< O > &instr) const |
| Get the offset of an instruction within the sequence. | |
| uint32_t | offsetOf (const Instruction &instr) const |
| Get the offset of an instruction within the sequence. | |
Iteration | |
| template<class T > | |
| void | each (T &visitor, uint32_t offset=0) |
| Visit each instruction. | |
| template<class T > | |
| void | each (T &visitor, uint32_t offset=0) const |
| Visit each instruction (const) | |
Opcode utils | |
| void | increaseAllLVID (uint32_t inc, uint32_t greaterThan, uint32_t offset=0) |
| Iterate through all opcodes and increment all lvid. More... | |
Memory Management | |
| uint32_t | opcodeCount () const |
| Get how many instructions the sequence has. | |
| uint32_t | capacity () const |
| Get the capacity of the sequence (in instructions) | |
| void | clear () |
| Clear the sequence. | |
| void | reserve (uint32_t count) |
| Reserve enough memory for N instructions. | |
Debug | |
| void | print (Yuni::String &out, const AtomMap *=nullptr, uint32_t offset=0) const |
| Print the sequence to a string. | |
Operators | |
| Sequence & | operator= (const Sequence &)=delete |
| Copy operator. | |
Public Attributes | |
| StringRefs | stringrefs |
| All strings. | |
| void ny::ir::Sequence::increaseAllLVID | ( | uint32_t | inc, |
| uint32_t | greaterThan, | ||
| uint32_t | offset = 0 |
||
| ) |
Iterate through all opcodes and increment all lvid.
This method is used to insert a posteriori new lvid (for capturing variables for ex.)
| inc | The value to add to all lvid |
| greaterThan | Increment only lvid strictly greater than X |
| offset | First opcode |
1.8.12