ghc-7.8.2: The GHC API

Safe Haskell | None
Language | Haskell98

RegAlloc.Linear.JoinToTargets

Description

Handles joining of a jump instruction to its targets.

Synopsis

- joinToTargets :: (FR freeRegs, Instruction instr) => BlockMap RegSet -> BlockId -> instr -> RegM freeRegs ([NatBasicBlock instr], instr)

# Documentation

joinToTargets

Arguments

:: (FR freeRegs, Instruction instr) |
=> BlockMap RegSet | maps the unique of the blockid to the set of vregs that are known to be live on the entry to each block.
-> BlockId | id of the current block
-> instr | branch instr on the end of the source block.
-> RegM freeRegs ([NatBasicBlock instr], instr) |

For a jump instruction at the end of a block, generate fixup code so its vregs are in the correct regs for its destination.