ghc-9.12.1: The GHC API
Safe HaskellNone
LanguageGHC2021

GHC.Llvm.Ppr

Description

Pretty print LLVM IR Code.

Synopsis

Top level LLVM objects.

ppLlvmModule :: IsDoc doc => LlvmCgConfig -> LlvmModule -> doc Source #

Print out a whole LLVM module.

ppLlvmComments :: IsDoc doc => [LMString] -> doc Source #

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

ppLlvmComment :: IsLine doc => LMString -> doc Source #

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

ppLlvmGlobals :: IsDoc doc => LlvmCgConfig -> [LMGlobal] -> doc Source #

Print out a list of global mutable variable definitions

ppLlvmGlobal :: IsLine doc => LlvmCgConfig -> LMGlobal -> doc Source #

Print out a global mutable variable definition

ppLlvmAliases :: IsDoc doc => [LlvmAlias] -> doc Source #

Print out a list of LLVM type aliases.

ppLlvmAlias :: IsLine doc => LlvmAlias -> doc Source #

Print out an LLVM type alias.

ppLlvmMetas :: IsDoc doc => LlvmCgConfig -> [MetaDecl] -> doc Source #

Print out a list of LLVM metadata.

ppLlvmMeta :: IsLine doc => LlvmCgConfig -> MetaDecl -> doc Source #

Print out an LLVM metadata definition.

ppLlvmFunctionDecls :: IsDoc doc => LlvmFunctionDecls -> doc Source #

Print out a list of function declaration.

ppLlvmFunctionDecl :: IsDoc doc => LlvmFunctionDecl -> doc Source #

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

ppLlvmFunctions :: IsDoc doc => LlvmCgConfig -> LlvmFunctions -> doc Source #

Print out a list of function definitions.

ppLlvmFunction :: IsDoc doc => LlvmCgConfig -> LlvmFunction -> doc Source #

Print out a function definition.

ppVar :: IsLine doc => LlvmCgConfig -> LlvmVar -> doc Source #

ppLit :: IsLine doc => LlvmCgConfig -> LlvmLit -> doc Source #

Print a literal value. No type.

ppName :: IsLine doc => LlvmCgConfig -> LlvmVar -> doc Source #

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

ppPlainName :: IsLine doc => LlvmCgConfig -> LlvmVar -> doc Source #

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