HORIZON HASKELLDocslts/ghc-10.0.x04404a62026-10-19Search packagesCtrl K
Theme: |

GHC 10.0.0.20260917 · lts/ghc-10.0.x · 04404a6 · 2026-10-19

Moduleghc-10.0.0.20260917GHC2024

GHC.CmmToAsm.X86.CodeGen

Synopsis
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.

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.