Struct cranelift_codegen::cursor::FuncCursor[][src]

pub struct FuncCursor<'f> {
    pub func: &'f mut Function,
    // some fields omitted
}

Function cursor.

A FuncCursor holds a mutable reference to a whole ir::Function while keeping a position too. The function can be re-borrowed by accessing the public cur.func member.

This cursor is for use before legalization. The inserted instructions are not given an encoding.

Fields

The referenced function.

Methods

impl<'f> FuncCursor<'f>
[src]

Create a new FuncCursor pointing nowhere.

Use the source location of inst for future instructions.

Create an instruction builder that inserts an instruction at the current position.

Trait Implementations

impl<'f> Cursor for FuncCursor<'f>
[src]

Get the current cursor position.

Set the current position.

Get the source location that should be assigned to new instructions.

Set the source location that should be assigned to new instructions.

Borrow a reference to the function layout that this cursor is navigating.

Borrow a mutable reference to the function layout that this cursor is navigating.

Exchange this cursor for one with a set source location. Read more

Rebuild this cursor positioned at pos.

Rebuild this cursor positioned at inst. Read more

Rebuild this cursor positioned at the first insertion point for ebb. This differs from at_first_inst in that it doesn't assume that any instructions have been inserted into ebb yet. Read more

Rebuild this cursor positioned at the first instruction in ebb. Read more

Rebuild this cursor positioned at the last instruction in ebb. Read more

Rebuild this cursor positioned after inst. Read more

Rebuild this cursor positioned at the top of ebb. Read more

Rebuild this cursor positioned at the bottom of ebb. Read more

Get the EBB corresponding to the current position.

Get the instruction corresponding to the current position, if any.

Go to the position after a specific instruction, which must be inserted in the layout. New instructions will be inserted after inst. Read more

Go to a specific instruction which must be inserted in the layout. New instructions will be inserted before inst. Read more

Go to the position for inserting instructions at the beginning of ebb, which unlike goto_first_inst doesn't assume that any instructions have been inserted into ebb yet. Read more

Go to the first instruction in ebb.

Go to the last instruction in ebb.

Go to the top of ebb which must be inserted into the layout. At this position, instructions cannot be inserted, but next_inst() will move to the first instruction in ebb. Read more

Go to the bottom of ebb which must be inserted into the layout. At this position, inserted instructions will be appended to ebb. Read more

Go to the top of the next EBB in layout order and return it. Read more

Go to the bottom of the previous EBB in layout order and return it. Read more

Move to the next instruction in the same EBB and return it. Read more

Move to the previous instruction in the same EBB and return it. Read more

Insert an instruction at the current position. Read more

Remove the instruction under the cursor. Read more

Remove the instruction under the cursor. Read more

Insert an EBB at the current position and switch to it. Read more

impl<'c, 'f> InstInserterBase<'c> for &'c mut FuncCursor<'f>
[src]

Get an immutable reference to the data flow graph.

Get a mutable reference to the data flow graph.

Insert a new instruction which belongs to the DFG.

Auto Trait Implementations

impl<'f> Send for FuncCursor<'f>

impl<'f> Sync for FuncCursor<'f>