JITBlock

Class wrapper for gcc_jit_block

Constructors

this
this()
this
this(gcc_jit_block* block)

Members

Functions

addAssignment
void addAssignment(JITLocation loc, JITLValue lvalue, JITRValue rvalue)
void addAssignment(JITLValue lvalue, JITRValue rvalue)

Add evaluation of an rvalue, assigning the result to the given lvalue. This is equivalent to "lvalue = rvalue".

addAssignmentOp
void addAssignmentOp(JITLocation loc, JITLValue lvalue, JITBinaryOp op, JITRValue rvalue)
void addAssignmentOp(JITLValue lvalue, JITBinaryOp op, JITRValue rvalue)

Add evaluation of an rvalue, using the result to modify an lvalue. This is equivalent to "lvalue op= rvalue".

addCall
JITRValue addCall(JITLocation loc, JITFunction func, JITRValue[] args)
JITRValue addCall(JITFunction func, JITRValue[] args)

A way to add a function call to the body of a function being defined, with various number of args.

addComment
void addComment(JITLocation loc, string text)
void addComment(string text)

Add a no-op textual comment to the internal representation of the code. It will be optimized away, but visible in the dumps seens via JITBoolOption.DUMP_INITIAL_TREE and JITBoolOption.DUMP_INITIAL_GIMPLE.

addEval
void addEval(JITLocation loc, JITRValue rvalue)
void addEval(JITRValue rvalue)

Add evaluation of an rvalue, discarding the result.

endWithConditional
void endWithConditional(JITLocation loc, JITRValue val, JITBlock on_true, JITBlock on_false)
void endWithConditional(JITRValue val, JITBlock on_true, JITBlock on_false)

Terminate a block by adding evaluation of an rvalue, branching on the result to the appropriate successor block.

endWithJump
void endWithJump(JITLocation loc, JITBlock target)
void endWithJump(JITBlock target)

Terminate a block by adding a jump to the given target block. This is equivalent to "goto target".

endWithReturn
void endWithReturn(JITLocation loc, JITRValue rvalue)
void endWithReturn(JITRValue rvalue)

Terminate a block by adding evaluation of an rvalue, returning the value. This is equivalent to "return rvalue".

endWithReturn
void endWithReturn(JITLocation loc)

Terminate a block by adding a valueless return, for use within a function with "void" return type. This is equivalent to "return".

getBlock
gcc_jit_block* getBlock()

Returns the internal gcc_jit_block object.

getFunction
JITFunction getFunction()

Returns the JITFunction this JITBlock is within.

Inherited Members

From JITObject

getContext
JITContext getContext()

Return the context this JITObject is within.

toString
string toString()

Get a human-readable description of this object.

getObject
gcc_jit_object* getObject()
Undocumented in source. Be warned that the author may not have intended to support it.

Meta