GHC.Llvm.Ppr

ghc-9.0.0.20201227: The GHC API

Safe Haskell | None
Language | Haskell2010

GHC.Llvm.Ppr

Contents

- Top level LLVM objects.

Description

Pretty print LLVM IR Code.

Synopsis

- ppLlvmModule :: LlvmOpts -> LlvmModule -> SDoc
- ppLlvmComments :: [LMString] -> SDoc
- ppLlvmComment :: LMString -> SDoc
- ppLlvmGlobals :: LlvmOpts -> [LMGlobal] -> SDoc
- ppLlvmGlobal :: LlvmOpts -> LMGlobal -> SDoc
- ppLlvmAliases :: [LlvmAlias] -> SDoc
- ppLlvmAlias :: LlvmAlias -> SDoc
- ppLlvmMetas :: LlvmOpts -> [MetaDecl] -> SDoc
- ppLlvmMeta :: LlvmOpts -> MetaDecl -> SDoc
- ppLlvmFunctionDecls :: LlvmFunctionDecls -> SDoc
- ppLlvmFunctionDecl :: LlvmFunctionDecl -> SDoc
- ppLlvmFunctions :: LlvmOpts -> LlvmFunctions -> SDoc
- ppLlvmFunction :: LlvmOpts -> LlvmFunction -> SDoc
- ppVar :: LlvmOpts -> LlvmVar -> SDoc
- ppLit :: LlvmOpts -> LlvmLit -> SDoc
- ppTypeLit :: LlvmOpts -> LlvmLit -> SDoc
- ppName :: LlvmOpts -> LlvmVar -> SDoc
- ppPlainName :: LlvmOpts -> LlvmVar -> SDoc

# Top level LLVM objects.

ppLlvmModule :: LlvmOpts -> LlvmModule -> SDoc Source #

Print out a whole LLVM module.

ppLlvmComments :: [LMString] -> SDoc Source #

Print out a multi-line comment, can be inside a function or on its own

ppLlvmComment :: LMString -> SDoc Source #

Print out a comment, can be inside a function or on its own

ppLlvmGlobals :: LlvmOpts -> [LMGlobal] -> SDoc Source #

Print out a list of global mutable variable definitions

ppLlvmGlobal :: LlvmOpts -> LMGlobal -> SDoc Source #

Print out a global mutable variable definition

ppLlvmAliases :: [LlvmAlias] -> SDoc Source #

Print out a list of LLVM type aliases.

ppLlvmAlias :: LlvmAlias -> SDoc Source #

Print out an LLVM type alias.

ppLlvmMetas :: LlvmOpts -> [MetaDecl] -> SDoc Source #

Print out a list of LLVM metadata.

ppLlvmMeta :: LlvmOpts -> MetaDecl -> SDoc Source #

Print out an LLVM metadata definition.

ppLlvmFunctionDecls :: LlvmFunctionDecls -> SDoc Source #

Print out a list of function declaration.

ppLlvmFunctionDecl :: LlvmFunctionDecl -> SDoc Source #

Print out a function declaration. Declarations define the function type but don't define the actual body of the function.

ppLlvmFunctions :: LlvmOpts -> LlvmFunctions -> SDoc Source #

Print out a list of function definitions.

ppLlvmFunction :: LlvmOpts -> LlvmFunction -> SDoc Source #

Print out a function definition.

ppVar :: LlvmOpts -> LlvmVar -> SDoc Source #

ppLit :: LlvmOpts -> LlvmLit -> SDoc Source #

Print a literal value. No type.

ppTypeLit :: LlvmOpts -> LlvmLit -> SDoc Source #

ppName :: LlvmOpts -> LlvmVar -> SDoc Source #

Return the variable name or value of the `LlvmVar` in Llvm IR textual representation (e.g. `@x`, `%y` or `42`).

ppPlainName :: LlvmOpts -> LlvmVar -> SDoc Source #

Return the variable name or value of the `LlvmVar` in a plain textual representation (e.g. `x`, `y` or `42`).