HORIZON HASKELLDocslts/ghc-9.14.x3e2d5682026-10-11Search names, modules, packages, or :: a typeCtrl K

GHC 9.14.1 · lts/ghc-9.14.x · 3e2d568 · 2026-10-11

Moduleghc-9.14.1GHC2021

GHC.CmmToAsm.X86.CodeGen

  • 1 type
  • 4 values
  • Packageghc-9.14.1
  • Exports5
  • LanguageGHC2021
  • LicenceBSD-3-Clause
  • SourceCodeGen.hs
valueinvertCondBranches
  1. :: Maybe CFG

    CFG if present

  2. -> LabelMap a

    Blocks with info tables

  3. -> [NatBasicBlock Instr]

    List of basic blocks

  4. -> [NatBasicBlock Instr]
#

This works on the invariant that all jumps in the given blocks are required. Starting from there we try to make a few more jumps redundant by reordering them. We depend on the information in the CFG to do so so without a given CFG we do nothing.

typetype InstrBlock = OrdList Instr
#

InstrBlocks are the insn sequences generated by the insn selectors. They are really trees of insns to facilitate fast appending, where a left-to-right traversal yields the insns in the correct order.