ghc-9.6.3: The GHC API

Safe Haskell | Safe-Inferred
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 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

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

# LLVM version

newtype LlvmVersion Source #

Constructors

LlvmVersion |

Fields

- llvmVersionNE :: NonEmpty Int

#### Instances

Instances details

Eq LlvmVersion Source # |
Instance details Defined in GHC.CmmToLlvm.Config Methods (==) :: LlvmVersion -> LlvmVersion -> Bool # (/=) :: LlvmVersion -> LlvmVersion -> Bool #
Ord LlvmVersion Source # |
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 Source #

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

supportedLlvmVersionUpperBound :: LlvmVersion Source #

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

parseLlvmVersion :: String -> Maybe LlvmVersion Source #

llvmVersionSupported :: LlvmVersion -> Bool Source #

llvmVersionStr :: LlvmVersion -> String Source #

llvmVersionList :: LlvmVersion -> [Int] Source #