NAME

LLVM::Builder - LLVM builder class

VERSION

version 0.02

DESCRIPTION

A LLVM::Builder is the means of building instructions and represents a point within a basic block.

METHODS

new( $ctx, $blk )

Create a new LLVM::Builder object given a LLVM::Context and a LLVM::BasicBlock.

TERMINATOR INSTRUCTIONS

See the LLVM reference for more information about the single instructions.

ret( $v )

Append a ret instruction to the block. This function takes a LLVM::Value representing the value to be returned and returns a LLVM::Value.

BINARY OPERATIONS

The binary operations require two arguments of the same LLVM::Type and produce a single LLVM::Value.

See the LLVM reference for more information about the single instructions.

add( $lhs, $rhs, $name )

Append an integer add instruction to the block and name the result $name.

fadd( $lhs, $rhs, $name )

Append a floating add instruction to the block and name the result $name.

mul( $lhs, $rhs, $name )

Append a mul instruction to the block and name the result $name.

fmul( $lhs, $rhs, $name )

Append a floating mul instruction to the block and name the result $name.

sub( $lhs, $rhs, $name )

Append a sub instruction to the block and name the result $name.

fsub( $lhs, $rhs, $name )

Append a floating sub instruction to the block and name the result $name.

udiv( $lhs, $rhs, $name )

Append an unsigned div instruction to the block and name the result $name.

sdiv( $lhs, $rhs, $name )

Append a signed div instruction to the block and name the result $name.

fdiv( $lhs, $rhs, $name )

Append a floating div instruction to the block and name the result $name.

BINARY BITWISE OPERATIONS

The binary bitwise operations require two arguments of the same LLVM::Type and produce a single LLVM::Value.

See the LLVM reference for more information about the single instructions.

shl( $lhs, $rhs, $name)

Append a shift left instruction to the block and name the result $name.

lshr( $lhs, $rhs, $name)

Append a logical shift right instruction to the block and name the result $name.

ashr( $lhs, $rhs, $name)

Append an arithmetic shift right instruction to the block and name the result $name.

and( $lhs, $rhs, $name)

Append an and instruction to the block and name the result $name.

or( $lhs, $rhs, $name)

Append an or instruction to the block and name the result $name.

xor( $lhs, $rhs, $name)

Append a xor instruction to the block and name the result $name.

AUTHOR

Alessandro Ghedini <alexbio@cpan.org>

LICENSE AND COPYRIGHT

Copyright 2012 Alessandro Ghedini.

This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.

See http://dev.perl.org/licenses/ for more information.