1 (* Copyright (C) 1999-2008 Henry Cejtin, Matthew Fluet, Suresh
2 * Jagannathan, and Stephen Weeks.
3 * Copyright (C) 1997-2000 NEC Research Institute.
5 * MLton is released under a BSD-style license.
6 * See the file MLton-LICENSE for details.
9 signature X86_LIVENESS_STRUCTS =
12 structure x86MLtonBasic: X86_MLTON_BASIC
13 sharing x86 = x86MLtonBasic.x86
16 signature X86_LIVENESS =
18 include X86_LIVENESS_STRUCTS
20 structure LiveSet: sig
22 val toMemLocSet: t -> x86.MemLocSet.t
24 sharing type LiveSet.Element.t = x86.MemLoc.t
26 val track : x86.MemLoc.t -> bool
31 val newLiveInfo : unit -> t
33 val setLiveOperands : t * x86.Label.t * x86.Operand.t list -> unit
34 val setLive : t * x86.Label.t * LiveSet.t -> unit
35 val getLive : t * x86.Label.t -> LiveSet.t
36 val completeLiveInfo : {chunk: x86.Chunk.t,
39 val completeLiveInfo_msg : unit -> unit
40 val verifyLiveInfo : {chunk: x86.Chunk.t,
42 val verifyLiveInfo_msg : unit -> unit
47 datatype t = T of {liveIn: LiveSet.t,
51 val dead: t -> LiveSet.t
52 val liveIn: t -> LiveSet.t
53 val livenessAssembly : {assembly : x86.Assembly.t, live : LiveSet.t} -> t
54 val livenessEntry : {entry : x86.Entry.t, live : LiveSet.t} -> t
55 val livenessTransfer : {transfer: x86.Transfer.t, liveInfo: LiveInfo.t} -> t
58 structure LivenessBlock:
60 datatype t = T of {entry: (x86.Entry.t * Liveness.t),
61 profileLabel: x86.ProfileLabel.t option,
62 statements: (x86.Assembly.t * Liveness.t) list,
63 transfer: (x86.Transfer.t * Liveness.t)}
65 val printBlock : t -> unit
66 val toLivenessEntry : {entry: x86.Entry.t,
68 {entry: (x86.Entry.t * Liveness.t),
70 val reLivenessEntry : {entry: (x86.Entry.t * Liveness.t),
72 {entry: (x86.Entry.t * Liveness.t),
74 val toLivenessStatements : {statements: x86.Assembly.t list,
76 {statements: (x86.Assembly.t * Liveness.t) list,
78 val reLivenessStatements : {statements: (x86.Assembly.t * Liveness.t) list,
80 {statements: (x86.Assembly.t * Liveness.t) list,
82 val toLivenessTransfer : {transfer: x86.Transfer.t,
83 liveInfo: LiveInfo.t} ->
84 {transfer: (x86.Transfer.t * Liveness.t),
86 val reLivenessTransfer : {transfer: (x86.Transfer.t * Liveness.t)} ->
87 {transfer: (x86.Transfer.t * Liveness.t),
89 val toLivenessBlock : {block: x86.Block.t, liveInfo: LiveInfo.t} -> t
90 val toLivenessBlock_msg : unit -> unit
91 val verifyLivenessBlock : {block: t,
92 liveInfo: LiveInfo.t} -> bool
93 val verifyLivenessBlock_msg : unit -> unit
94 val toBlock : {block: t} -> x86.Block.t
95 val toBlock_msg : unit -> unit