llvm-general-3.2.4.7: 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:

  • from a CuratedPassSetSpec if you want optimization but not to play with your compiler
  • from a [Pass] if you do want to play with your compiler
  • from a ([Pass], TargetLowering) if you want to provide target-specific information (e.g. instruction costs) to the few passes that use it (see comments on Pass).

Synopsis

Documentation

data 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 :: PassManagerSpecification s => s -> (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.