Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CompilePackage ¶ added in v0.17.0
func CompilePackage(moduleName string, pkg *loader.Package, ssaPkg *ssa.Package, machine llvm.TargetMachine, config *Config, dumpSSA bool) (llvm.Module, []error)
CompilePackage compiles a single package to a LLVM module.
func NewTargetMachine ¶ added in v0.13.0
NewTargetMachine returns a new llvm.TargetMachine based on the passed-in configuration. It is used by the compiler and is needed for machine code emission.
Types ¶
type Config ¶
type Config struct { // Target and output information. Triple string CPU string Features string ABI string GOOS string GOARCH string BuildMode string CodeModel string RelocationModel string SizeLevel int TinyGoVersion string // for llvm.ident // Various compiler options that determine how code is generated. Scheduler string AutomaticStackSize bool DefaultStackSize uint64 MaxStackAlloc uint64 NeedsStackObjects bool Debug bool // Whether to emit debug information in the LLVM module. PanicStrategy string }
Config is the configuration for the compiler. Most settings should be copied directly from compileopts.Config, it recreated here to decouple the compiler package a bit and because it makes caching easier.
This struct can be used for caching: if one of the flags here changes the code must be recompiled.
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
Package ircheck implements a checker for LLVM IR, that goes a bit further than the regular LLVM IR verifier.
|
Package ircheck implements a checker for LLVM IR, that goes a bit further than the regular LLVM IR verifier. |
Package llvmutil contains utility functions used across multiple compiler packages.
|
Package llvmutil contains utility functions used across multiple compiler packages. |
Click to show internal directories.
Click to hide internal directories.