Module Regalloc.RegallocSource

Parameters

Signature

Sourceval create_return_addresses : (('info, 'asm) Prog.sfundef -> Z.t) -> ('info, 'asm) Prog.sfundef list -> retaddr Jasmin.Prog.Hf.t

Compute where the return address will be stored

Sourceval get_reg_oracle : (('info, 'asm) Prog.func -> bool) -> (Prog.var -> Prog.var) -> (Prog.funname -> Prog.Sv.t) -> ('info, 'asm) Prog.func -> reg_oracle_t

Extract from the outcome of register allocation the information that is needed by stack-allocation. To be called on export functions only.

Returns:

  • the global renaming function
  • the set of killed registers (see note below)
  • the input function with variables turned into registers

Note: Export functions can freely use caller-saved registers: they are not reported as killed. Subroutines report ALL killed registers.