1(*
2    Copyright David C. J. Matthews 2017
3
4    This library is free software; you can redistribute it and/or
5    modify it under the terms of the GNU Lesser General Public
6    License version 2.1 as published by the Free Software Foundation.
7
8    This library is distributed in the hope that it will be useful,
9    but WITHOUT ANY WARRANTY; without even the implied warranty of
10    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
11    Lesser General Public License for more details.
12
13    You should have received a copy of the GNU Lesser General Public
14    License along with this library; if not, write to the Free Software
15    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
16*)
17
18signature X86ALLOCATEREGISTERSSIG =
19sig
20    type intSet and extendedBasicBlock and regProperty and reg
21    type address = Address.address
22
23    type conflictState =
24    {
25        conflicts: intSet, realConflicts: reg list
26    }
27
28    datatype allocateResult =
29        AllocateSuccess of reg vector
30    |   AllocateFailure of intSet list
31
32    val allocateRegisters :
33        {
34            blocks: extendedBasicBlock vector,
35            regStates: conflictState vector,
36            regProps: regProperty vector
37        } -> allocateResult
38
39    structure Sharing:
40    sig
41        type intSet             = intSet
42        and extendedBasicBlock  = extendedBasicBlock
43        and regProperty         = regProperty
44        and reg                 = reg
45        and allocateResult      = allocateResult
46    end
47end;
48