ghc-lib-parser-9.12.2.20250421: The GHC API, decoupled from GHC versions

Safe Haskell | Ignore
Language | GHC2021

GHC.CmmToLlvm.Config

Description

Llvm code generator configuration

# Documentation

data LlvmCgConfig Source #

Constructors

LlvmCgConfig |

Fields

- llvmCgPlatform :: !Platform

  Target platform

- llvmCgContext :: !SDocContext

  Context for LLVM code generation

- llvmCgFillUndefWithGarbage :: !Bool

  Fill undefined literals with garbage values

- llvmCgSplitSection :: !Bool

  Split sections

- llvmCgAvxEnabled :: !Bool
- llvmCgBmiVersion :: Maybe BmiVersion

  (x86) BMI instructions

- llvmCgLlvmVersion :: Maybe LlvmVersion

  version of Llvm we're using

- llvmCgDoWarn :: !Bool

  True ==> warn unsupported Llvm version

- llvmCgLlvmTarget :: !String

  target triple passed to LLVM

- llvmCgLlvmConfig :: !LlvmConfig

  Supported LLVM configurations. see Note [LLVM configuration]

data LlvmConfig Source #

Constructors

LlvmConfig |

Fields

- llvmTargets :: [(String, LlvmTarget)]
- llvmPasses :: [(Int, String)]

data LlvmTarget Source #

Constructors

LlvmTarget |

Fields

- lDataLayout :: String
- lCPU :: String
- lAttributes :: [String]

initLlvmConfig :: FilePath -> IO LlvmConfig Source #