ddc-driver-0.3.1.3: Disciplined Disciple Compiler top-level driver.

Safe HaskellNone

DDC.Driver.Stage

Contents

Description

Compiler stages.

A compiler stage is a sequence of standard transformations. Each of the individual transformations are expressed as a pipeline from DDC.Build.Pipeline. The stages here run several pipelines each, and contain the code that can dump the intermediate program after each transformation.

Synopsis

Documentation

data Config Source

Configuration for main compiler stages.

Constructors

Config 

Fields

configDump :: Bool

Dump intermediate code.

configSimplLite :: Simplifier Int () Name

Simplifiers to apply to intermediate code

configSimplSalt :: Simplifier Int () Name
 
configViaBackend :: ViaBackend

Backend code generator to use

configRuntime :: Config

Runtime system configuration

configBuilder :: Builder

The builder to use for the target architecture

configSuppressCoreImports :: Bool

Suppress imports in Core modules

configSuppressHashImports :: Bool

Suppress the #import prelude in C modules

configOutputFile :: Maybe FilePath

Override output file

configOutputDir :: Maybe FilePath

Override directory for build products

configKeepLlvmFiles :: Bool

Keep intermediate .ddc.ll files

configKeepSeaFiles :: Bool

Keep intermediate .ddc.c files

configKeepAsmFiles :: Bool

Keep intermediate .ddc.s files

data ViaBackend Source

Constructors

ViaC

Compile via the C backend.

ViaLLVM

Compile via the LLVM backend.

Instances

Lite stages

stageLiteLoad :: Config -> Source -> [PipeCore () Name] -> PipeText Name ErrorSource

Type check Core Lite.

stageLiteOpt :: Config -> Source -> [PipeCore () Name] -> PipeCore () NameSource

Optimise Core Lite.

stageLiteToSalt :: Config -> Source -> [PipeCore () Name] -> PipeCore () NameSource

Convert Core Lite to Core Salt.

Salt stages

stageSaltOpt :: Config -> Source -> [PipeCore () Name] -> PipeCore () NameSource

Optimise Core Salt.

stageSaltToC :: Config -> Source -> Sink -> PipeCore () NameSource

Convert Core Salt to C code.

stageSaltToLLVM :: Config -> Source -> [PipeLlvm] -> PipeCore () NameSource

Convert Core Salt to LLVM.

stageCompileSaltSource

Arguments

:: Config 
-> Source 
-> FilePath

Path of original source file. Build products are placed into the same dir.

-> Bool

Should we link this into an executable

-> PipeCore () Name 

Compile Core Salt via C code.

LLVM stages

stageCompileLLVMSource

Arguments

:: Config 
-> Source 
-> FilePath

Path of original source file. Build products are placed into the same dir.

-> Bool

Should we link this into an executable

-> PipeLlvm 

Compile LLVM code.