NAME

LLVM::TargetMachine - LLVM target machine class

VERSION

version 0.10

DESCRIPTION

A LLVM::TargetMachine can be used to generate assembly or object files.

METHODS

create( $target, $triple, $cpu, $features )

Create a new LLVM::TargetMachine given a LLVM::Target, a string representing the platform's triple (e.g. 'x86_64-linux-gnu'), a string representing a CPU (e,g, 'athlon') and a list of CPU features.

To see what CPUs and features are supported for given target, run, from the command-line:

llvm-as < /dev/null | llc -march=xyz -mcpu=help

replacing xyz with the desired target (e.g. 'x86-64').

emit( $machine, $mod, $file, $to_object )

Emit an object (if $to_object is true) or ASM file for the given LLVM::Module to $file.

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.