Safe Haskell | None |
---|
A PassManager
holds collection of passes, to be run on Module
s.
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
- data PassManager
- data PassSetSpec
- = PassSetSpec { }
- | CuratedPassSetSpec { }
- defaultPassSetSpec :: PassSetSpec
- defaultCuratedPassSetSpec :: PassSetSpec
- withPassManager :: PassSetSpec -> (PassManager -> IO a) -> IO a
- runPassManager :: PassManager -> Module -> IO Bool
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.
PassSetSpec | a |
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 |
defaultPassSetSpec :: PassSetSpec
an empty PassSetSpec
defaultCuratedPassSetSpec :: PassSetSpec
Helper to make a curated PassSetSpec
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
.