ghc-9.10.3: The GHC API

Safe Haskell | None
Language | GHC2021

GHC.CmmToAsm.Config

Description

Native code generator configuration

Synopsis

- data NCGConfig = NCGConfig {
  - ncgPlatform :: !Platform
  - ncgAsmContext :: !SDocContext
  - ncgThisModule :: !Module
  - ncgProcAlignment :: !(Maybe Int)
  - ncgExternalDynamicRefs :: !Bool
  - ncgPIC :: !Bool
  - ncgInlineThresholdMemcpy :: !Word
  - ncgInlineThresholdMemset :: !Word
  - ncgSplitSections :: !Bool
  - ncgRegsIterative :: !Bool
  - ncgRegsGraph :: !Bool
  - ncgAsmLinting :: !Bool
  - ncgDoConstantFolding :: !Bool
  - ncgSseVersion :: Maybe SseVersion
  - ncgBmiVersion :: Maybe BmiVersion
  - ncgDumpRegAllocStages :: !Bool
  - ncgDumpAsmStats :: !Bool
  - ncgDumpAsmConflicts :: !Bool
  - ncgCfgWeights :: !Weights
  - ncgCfgBlockLayout :: !Bool
  - ncgCfgWeightlessLayout :: !Bool
  - ncgDwarfEnabled :: !Bool
  - ncgDwarfUnwindings :: !Bool
  - ncgDwarfStripBlockInfo :: !Bool
  - ncgExposeInternalSymbols :: !Bool
  - ncgDwarfSourceNotes :: !Bool
  - ncgCmmStaticPred :: !Bool
  - ncgEnableShortcutting :: !Bool
  - ncgEnableInterModuleFarJumps :: !Bool
  - ncgComputeUnwinding :: !Bool
  - ncgEnableDeadCodeElimination :: !Bool
  }
- ncgWordWidth :: NCGConfig -> Width
- ncgSpillPreallocSize :: NCGConfig -> Int
- platformWordWidth :: Platform -> Width

# Documentation

data NCGConfig Source #

Native code generator configuration

Constructors

NCGConfig |

Fields

- ncgPlatform :: !Platform

  Target platform

- ncgAsmContext :: !SDocContext

  Context for ASM code generation

- ncgThisModule :: !Module

  The name of the module we are currently compiling

- ncgProcAlignment :: !(Maybe Int)

  Mandatory proc alignment

- ncgExternalDynamicRefs :: !Bool

  Generate code to link against dynamic libraries

- ncgPIC :: !Bool

  Enable Position-Independent Code

- ncgInlineThresholdMemcpy :: !Word

  If inlining `memcpy` produces less than this threshold (in pseudo-instruction unit), do it

- ncgInlineThresholdMemset :: !Word

  Ditto for `memset`

- ncgSplitSections :: !Bool

  Split sections

- ncgRegsIterative :: !Bool
- ncgRegsGraph :: !Bool
- ncgAsmLinting :: !Bool

  Perform ASM linting pass

- ncgDoConstantFolding :: !Bool

  Perform CMM constant folding

- ncgSseVersion :: Maybe SseVersion

  (x86) SSE instructions

- ncgBmiVersion :: Maybe BmiVersion

  (x86) BMI instructions

- ncgDumpRegAllocStages :: !Bool
- ncgDumpAsmStats :: !Bool
- ncgDumpAsmConflicts :: !Bool
- ncgCfgWeights :: !Weights

  CFG edge weights

- ncgCfgBlockLayout :: !Bool

  Use CFG based block layout algorithm

- ncgCfgWeightlessLayout :: !Bool

  Layout based on last instruction per block.

- ncgDwarfEnabled :: !Bool

  Enable Dwarf generation

- ncgDwarfUnwindings :: !Bool

  Enable unwindings

- ncgDwarfStripBlockInfo :: !Bool

  Strip out block information from generated Dwarf

- ncgExposeInternalSymbols :: !Bool

  Expose symbol table entries for internal symbols

- ncgDwarfSourceNotes :: !Bool

  Enable GHC-specific source note DIEs

- ncgCmmStaticPred :: !Bool

  Enable static control-flow prediction

- ncgEnableShortcutting :: !Bool

  Enable shortcutting (don't jump to blocks only containing a jump)

- ncgEnableInterModuleFarJumps :: !Bool

  Use far-jumps for cross-module jumps.

- ncgComputeUnwinding :: !Bool

  Compute block unwinding tables

- ncgEnableDeadCodeElimination :: !Bool

  Whether to enable the dead-code elimination

ncgWordWidth :: NCGConfig -> Width Source #

Return Word size

ncgSpillPreallocSize :: NCGConfig -> Int Source #

Size in bytes of the pre-allocated spill space on the C stack

platformWordWidth :: Platform -> Width Source #

Return Word size