-
Notifications
You must be signed in to change notification settings - Fork 0
/
formalization.txt
executable file
·50 lines (46 loc) · 1.13 KB
/
formalization.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
Order_LCT (heuristic);
Compute_Layout
Init_Ram;
Update_Node_Types;
Order_Tree (heuristic);
Load_Constraints;
for I in 1..children(root) loop
alreadyMapped = {};
sharing := false;
Process_Sub_tree (childNode, nmb of its children, newPool);
if not marked and is procNode then
Mark (childnode);
Add_procedure (childNode, newPool);
end if;
if sharing then
Check_Mapping (alreadyMapped, displacement);
if displacement != 0 then
Map (displacement);
end if;
end if;
Map_Pool (newPool);
Free (newPool);
end loop;
Map_Procedure (root);
end Compute_Layout;
procedure Process_Sub_Tree (n:node; pool : in out Pool) is
for c in 1..childNum loop
if c is ProcedureNode then
if MarkedSibling (c) then
null;
elsif Marked (c) and Is_Already_Mapped (c) then
sharing := True;
if (localOpti) then
Flush_Pool (pool);
end if;
else
Process_Sub_Tree (c, pool);
Mark_Node_and_Sibiling (c)
Add_Procedure (c, pool);
end if;
else if c is LoopNode then
Process_Sub_Tree (c, pool);
end if;
end loop;
Unmark_Sibilings;
end Process_Sub_Tree;