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

Safe Haskell | None
Language | Haskell2010

GHC.CmmToLlvm.Config

Contents

- LLVM version

Description

Llvm code generator configuration

Synopsis

- data LlvmCgConfig = LlvmCgConfig {
  - llvmCgPlatform :: !Platform
  - llvmCgContext :: !SDocContext
  - llvmCgFillUndefWithGarbage :: !Bool
  - llvmCgSplitSection :: !Bool
  - llvmCgBmiVersion :: Maybe BmiVersion
  - llvmCgLlvmVersion :: Maybe LlvmVersion
  - llvmCgDoWarn :: !Bool
  - llvmCgLlvmTarget :: !String
  - llvmCgLlvmConfig :: !LlvmConfig
  }
- data LlvmConfig = LlvmConfig {
  - llvmTargets :: [(String, LlvmTarget)]
  - llvmPasses :: [(Int, String)]
  }
- data LlvmTarget = LlvmTarget {
  - lDataLayout :: String
  - lCPU :: String
  - lAttributes :: [String]
  }
- initLlvmConfig :: FilePath -> IO LlvmConfig
- newtype LlvmVersion = LlvmVersion {
  - llvmVersionNE :: NonEmpty Int
  }
- supportedLlvmVersionLowerBound :: LlvmVersion
- supportedLlvmVersionUpperBound :: LlvmVersion
- parseLlvmVersion :: String -> Maybe LlvmVersion
- llvmVersionSupported :: LlvmVersion -> Bool
- llvmVersionStr :: LlvmVersion -> String
- llvmVersionList :: LlvmVersion -> [Int]

# Documentation

data LlvmCgConfig #

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

- 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 #

Constructors

LlvmConfig |

Fields

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

data LlvmTarget #

Constructors

LlvmTarget |

Fields

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

initLlvmConfig :: FilePath -> IO LlvmConfig #

# LLVM version

newtype LlvmVersion #

Constructors

LlvmVersion |

Fields

- llvmVersionNE :: NonEmpty Int

#### Instances

Instances details

Eq LlvmVersion # |
Instance details Defined in GHC.CmmToLlvm.Config Methods (==) :: LlvmVersion -> LlvmVersion -> Bool # (/=) :: LlvmVersion -> LlvmVersion -> Bool #
Ord LlvmVersion # |
Instance details Defined in GHC.CmmToLlvm.Config Methods compare :: LlvmVersion -> LlvmVersion -> Ordering # (<) :: LlvmVersion -> LlvmVersion -> Bool # (<=) :: LlvmVersion -> LlvmVersion -> Bool # (>) :: LlvmVersion -> LlvmVersion -> Bool # (>=) :: LlvmVersion -> LlvmVersion -> Bool # max :: LlvmVersion -> LlvmVersion -> LlvmVersion # min :: LlvmVersion -> LlvmVersion -> LlvmVersion #

supportedLlvmVersionLowerBound :: LlvmVersion #

The (inclusive) lower bound on the LLVM Version that is currently supported.

supportedLlvmVersionUpperBound :: LlvmVersion #

The (not-inclusive) upper bound bound on the LLVM Version that is currently supported.

parseLlvmVersion :: String -> Maybe LlvmVersion #

llvmVersionSupported :: LlvmVersion -> Bool #

llvmVersionStr :: LlvmVersion -> String #

llvmVersionList :: LlvmVersion -> [Int] #