]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/m2/gm2-compiler/M2BasicBlock.def
Update copyright years.
[thirdparty/gcc.git] / gcc / m2 / gm2-compiler / M2BasicBlock.def
CommitLineData
1eee94d3
GM
1(* M2BasicBlock.def converts a scope block into a list of basic blocks.
2
a945c346 3Copyright (C) 2001-2024 Free Software Foundation, Inc.
1eee94d3
GM
4Contributed by Gaius Mulley <gaius.mulley@southwales.ac.uk>.
5
6This file is part of GNU Modula-2.
7
8GNU Modula-2 is free software; you can redistribute it and/or modify
9it under the terms of the GNU General Public License as published by
10the Free Software Foundation; either version 3, or (at your option)
11any later version.
12
13GNU Modula-2 is distributed in the hope that it will be useful, but
14WITHOUT ANY WARRANTY; without even the implied warranty of
15MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16General Public License for more details.
17
18You should have received a copy of the GNU General Public License
19along with GNU Modula-2; see the file COPYING3. If not see
20<http://www.gnu.org/licenses/>. *)
21
22DEFINITION MODULE M2BasicBlock ;
23
24(*
25 Title : M2BasicBlock
26 Author : Gaius Mulley
27 Date : 20/8/2003
28 System : GNU Modula-2
29 Description: Converts a scope block into a list of basic blocks.
30 The basic blocks are either converted back into quadruples
31 or alternatively translated into GCC trees.
32*)
33
34FROM M2Scope IMPORT ScopeBlock ;
35EXPORT QUALIFIED BasicBlock, BasicBlockProc,
36 InitBasicBlocks, InitBasicBlocksFromRange,
37 KillBasicBlocks, FreeBasicBlocks,
38 ForeachBasicBlockDo ;
39
40
41TYPE
42 BasicBlock ;
43 BasicBlockProc = PROCEDURE (CARDINAL, CARDINAL) ;
44
45
46(*
47 InitBasicBlocks - converts a list of quadruples as defined by
48 scope blocks into a set of basic blocks.
49 All quadruples within this list which are not
50 reachable are removed.
51*)
52
53PROCEDURE InitBasicBlocks (sb: ScopeBlock) : BasicBlock ;
54
55
56(*
57 InitBasicBlocksFromRange - converts a list of quadruples as defined by
58 start..end.
59 All quadruples within this list which are not
60 reachable are removed.
61*)
62
40b91158
GM
63PROCEDURE InitBasicBlocksFromRange (ScopeSym: CARDINAL;
64 start, end: CARDINAL) : BasicBlock ;
1eee94d3
GM
65
66
67(*
68 KillBasicBlocks - destroys the list of Basic Blocks and assigns bb to NIL.
69*)
70
71PROCEDURE KillBasicBlocks (VAR bb: BasicBlock) ;
72
73
74(*
75 FreeBasicBlocks - destroys the list of Basic Blocks.
76*)
77
78PROCEDURE FreeBasicBlocks (bb: BasicBlock) ;
79
80
81(*
82 ForeachBasicBlockDo - for each basic block call procedure, p.
83*)
84
85PROCEDURE ForeachBasicBlockDo (bb: BasicBlock; p: BasicBlockProc) ;
86
87
88END M2BasicBlock.