IrFunction

Stores info about single function in IR All data of a function is stored in a number of arenas Every function has its data stored sequentially in each arena, and items in each function have separate indexing Indices are relative to the pointers. All this implies that in order to modify the function's IR it needs to be at the end of each arena. Then we can freely append new items to the end of arenas.

Members

Aliases

getBlock
alias getBlock = get!IrBasicBlock
Undocumented in source.
getInstr
alias getInstr = get!IrInstrHeader
Undocumented in source.
getPhi
alias getPhi = get!IrPhi
Undocumented in source.
getStackSlot
alias getStackSlot = get!StackSlot
Undocumented in source.
getVirtReg
alias getVirtReg = get!IrVirtualRegister
Undocumented in source.

Functions

assignSequentialBlockIndices
void assignSequentialBlockIndices()
Undocumented in source. Be warned that the author may not have intended to support it.
blocks
BlockIterator blocks()
Undocumented in source. Be warned that the author may not have intended to support it.
blocksArray
IrBasicBlock[] blocksArray()
Undocumented in source. Be warned that the author may not have intended to support it.
blocksReverse
BlockReverseIterator blocksReverse()
Undocumented in source. Be warned that the author may not have intended to support it.
byteLength
size_t byteLength()
Undocumented in source. Be warned that the author may not have intended to support it.
dumpStackSlots
void dumpStackSlots(CompilationContext* context)
Undocumented in source. Be warned that the author may not have intended to support it.
firstVirtReg
IrIndex firstVirtReg()
Undocumented in source. Be warned that the author may not have intended to support it.
freeIrArray
void freeIrArray(IrIndex offset, uint capacity)
Undocumented in source. Be warned that the author may not have intended to support it.
get
T* get(IrIndex index)
Undocumented in source. Be warned that the author may not have intended to support it.
getArray
IrIndex* getArray(IrIndex index)
Undocumented in source. Be warned that the author may not have intended to support it.
getCallConv
CallConv* getCallConv(CompilationContext* c)
Undocumented in source. Be warned that the author may not have intended to support it.
getCallConvEnum
CallConvention getCallConvEnum(CompilationContext* c)
Undocumented in source. Be warned that the author may not have intended to support it.
getValueType
IrIndex getValueType(CompilationContext* context, IrIndex someIndex)
Undocumented in source. Be warned that the author may not have intended to support it.
lastBasicBlock
IrIndex lastBasicBlock()
Undocumented in source. Be warned that the author may not have intended to support it.
lastVirtReg
IrIndex lastVirtReg()
Undocumented in source. Be warned that the author may not have intended to support it.
nextInstr
IrIndex nextInstr(IrIndex instrIndex)
Undocumented in source. Be warned that the author may not have intended to support it.
orderBlocks
void orderBlocks()
Undocumented in source. Be warned that the author may not have intended to support it.
prevInstr
IrIndex prevInstr(IrIndex instrIndex)
Undocumented in source. Be warned that the author may not have intended to support it.
removeAllPhis
void removeAllPhis()
Undocumented in source. Be warned that the author may not have intended to support it.
stackSlots
StackSlot[] stackSlots()
Undocumented in source. Be warned that the author may not have intended to support it.
virtualRegisters
VregIterator virtualRegisters()
Undocumented in source. Be warned that the author may not have intended to support it.

Variables

arrayLength
uint arrayLength;

arrayPtr

arrayPtr
uint* arrayPtr;
Undocumented in source.
basicBlockPtr
IrBasicBlock* basicBlockPtr;
Undocumented in source.
entryBasicBlock
enum IrIndex entryBasicBlock;

Special block. Automatically created. Program entry. Created first.

exitBasicBlock
enum IrIndex exitBasicBlock;

Special block. Automatically created. All returns must jump to it.

frameSize
uint frameSize;
Undocumented in source.
instrNextPtr
IrIndex* instrNextPtr;
Undocumented in source.
instrPayloadPtr
IrIndex* instrPayloadPtr;
Undocumented in source.
instrPrevPtr
IrIndex* instrPrevPtr;
Undocumented in source.
instrPtr
IrInstrHeader* instrPtr;
Undocumented in source.
instructionSet
IrInstructionSet instructionSet;
name
Identifier name;
numBasicBlocks
uint numBasicBlocks;

basicBlockPtr

numCalls
uint numCalls;
Undocumented in source.
numInstructions
uint numInstructions;

Used for instrPtr, instrNextPtr, instrPrevPtr

numPayloadSlots
uint numPayloadSlots;

instrPayloadPtr

numPhis
uint numPhis;

phiPtr

numStackSlots
uint numStackSlots;

stackSlotPtr

numVirtualRegisters
uint numVirtualRegisters;

vregPtr

phiPtr
IrPhi* phiPtr;
Undocumented in source.
stackFrameSize
int stackFrameSize;

How many bytes we need to allocate in prolog and deallocate in epilog

stackSlotPtr
StackSlot* stackSlotPtr;
Undocumented in source.
type
IrIndex type;

IrTypeFunction index

vmSlotOffsets
uint* vmSlotOffsets;
Undocumented in source.
vregPtr
IrVirtualRegister* vregPtr;
Undocumented in source.

Meta