llvm-general-3.3.6.0: General purpose LLVM bindings

Safe HaskellNone

LLVM.General.PassManager

Description

A PassManager holds collection of passes, to be run on Modules. Build one with withPassManager:

  • using CuratedPassSetSpec if you want optimization but not to play with your compiler
  • using PassSetSpec if you do want to play with your compiler

Synopsis

Documentation

data PassManager

http://llvm.org/doxygen/classllvm_1_1PassManager.html Note: a PassManager does substantive behind-the-scenes work, arranging for the results of various analyses to be available as needed by transform passes, shared as possible.

data PassSetSpec

There are different ways to get a PassManager. This type embodies them.

Constructors

PassSetSpec

a PassSetSpec is a lower-level, detailed specification of a set of passes. It allows fine-grained control of what passes are to be run when, and the specification of passes not available through CuratedPassSetSpec.

CuratedPassSetSpec

This type is a high-level specification of a set of passes. It uses the same collection of passes chosen by the LLVM team in the command line tool opt. The fields of this spec are much like typical compiler command-line flags - e.g. -O<n>, etc.

withPassManager :: PassSetSpec -> (PassManager -> IO a) -> IO a

bracket the creation of a PassManager

runPassManager :: PassManager -> Module -> IO Bool

run the passes in a PassManager on a Module, modifying the Module.