2 looking at bug in dead_node_elimination.
4 irnode: all get_..._arr functions changed
5 ircons: new_r_Block: set matured flag.
6 ircons: new_r_SymConst: needs mode_p for linkage_ptr_info.
7 adapted call_str_example to new concepts.
10 Implemented simpler Phi construction algorithm that constructs
11 correct code for three_cfpred_example in ircons. This algorithm
12 generates more Id nodes than the original algorithm and therefore
14 Also made some changes to optimizations of Not.
17 Fixed a bug, caused by the recursive use in type.h and entity.h.
18 Deleted the _TYPE_TYPEDEF_ and inserted the _ENTITY_TYPEDEF_ instead.
19 Fixed a problem in if_while testprogram, so it now works.
22 Fixed bug in optimize(). Returned Null instead n if
23 get_optimize() == false.
26 Added some access routines in type.[hc]. Solved a recursive definition
27 of type_class struct, entity struct and type union.
30 Separated entity header into pure functional header and header
34 ... a bunch small changes not documented
37 Changed output of oo_prog_example: now uses the internal list
38 of all irgs. Had to implement some of the access routines for
39 that. Also fixed a bug in irdump. Main routines did not use
40 current_ir_graph properly.
43 Implemented some missing parts in irgopt.
44 Added field irg to entity. Only valid if entity is a method.
45 Had to resove a cyclic de[endency between irgraph.h and entity.h
47 Added fields sub and super to type_class for inheritance.
48 Added field main_irg to irprog.
51 Fixed some bugs in irgopt.c
52 Added some missing 'get_new_node' methods, so the new obstack contains
56 Renamed ir_vrfy to irn_vrfy and vrfy_graphg to irg_vrfy.
57 Solved some copy'n'paste problems. Deleted most debug-code!
58 Added comments to several files.
61 Fixed bug in _r_ constructors for all four Div operations.
62 Fixed bug in turn_into_tuple: didn't remember the block.
63 Tested transform_node.
66 Fixed some testprograms to new semantics of firm.
67 Added testprogram global_var_example.
68 Fixed a bug in irop: Size of Sel node was (entity *) instead of
69 sel_attr. Therefor array_heap_example aborted.
70 Also found a missing break in typewalk, case iro_Alloc.
71 Added a construct that unifies all things constructed by the lib
72 and needed to represent a program: irprog.ch
73 This contains a list of all types as well as a list of all ir graphs.
74 I added calls to initialization and constructors so that this is constructed
75 automatically. I changed firm.c, type.c, irgraph.c and ev. more.
76 Removed strange block struct and constructor from ircons.c.
77 Moved routines for automatic Phi construction from irgmod to ircons.
78 Sorted functions in ircons to reflect the different interfaces.
79 Renamed dataseg to globals to be conformant with documentation.
80 Added conservation of current_ir_graph to irgopt.c.
81 Corrected bug in Makefiles: wrong path to directory ./inlude.
84 Commented a whole bunch of stuff, e.g. in ircons.h (Procedure to construct)
85 We should change the naming of the Block constructor.
86 Removed acces routines to attr. "closed" of Block.
87 Removed second implementation of new_ir_node from ircons and some comments
88 concerned with the now resolved cyclic dependency.
89 Fixed some bugs in irgopt so that the compilation goes through.
92 Changed the irnode attribut 'visit' into 'visited'.
93 Added some access functions, like get/set_irn_visit etc.
96 Renamed some access funtion in irgraph.*.
97 Deleted two global flags (ir_visited and block_visited) from irgraph.*.
98 Added two attributes to the irgraph struct. The visited flags belongs
99 to a ir graph, not to a whole program.
102 A new optimization has been finished. The dead-node-elimination copies
103 the existing ir graph from one opstack to another. While walking the
104 graph, only the reachable nodes will be copied, so the "dead-nodes"
105 (unreachable in the controlflow) are removed.
108 Solved some problems in the 'copy_node' function. The in array was not
109 as easy as it seamed.
112 Wrote a new 'post' funtion, for future use in 'dead-node-elimination'
113 optimization, which is needed in the paramter list of 'irg_walk'.
116 Moved 'optimze_in_place_wrapper' from iropt.* tothe new files irgopt.*.
117 New functions 'local_optimze_graph' and 'dead_node_elimination' are added,
121 Removed some files from the archive, after dependencies and usage are
123 - 'ir/common/strerror.c'
125 - 'ir/ident/xx_ident.h'
126 an empty file, only included by 'ident.c', but never used;
127 - 'ir/tv/label.c' and
129 contained a numeric counter;
130 The files were included in 'tv.h' and implemented in 'tarval.c'. The two
131 functions 'tarval_label' and 'tarval_forall_labeled' were also never used.
132 In the old fiasco compiler, the label thing is used in the backend.
133 Search for 'babil' to see the usage.
134 Also removed the two attributes 'lab' and 'used' in the tarval struct.
137 Moved the 'new_ir_node' constructor from ircons.* to irnode.* and fixed
138 afterwards some recursive includes, so libfirm works again.
141 Did a lot of changes, which I never commented until now (4.7.00).
143 * Added new result to Start node: Pointer to global data segment.
144 * Extended Semantics of SymConst node to represent information for the
146 * Added arithmeitc nodes (Shrs, Minus ...)
148 Rearranged the directory structure and adjusted the makefiles.
149 The directories contain:
150 ir: everything for the intermediate representation (better: src?)
151 /ir: the ir itself, and standard optimizations.
152 /tv: the target value module
153 /tr: the type and entity representation
154 /adt: abstract data types
155 /common: stuff needed by all other dirs
156 /debug: debugging Unterstuetzung
158 include: external files needen as includes
159 testprograms: examples to test the lib.
161 The makefiles generate files with extension .d that contain the dependencies
165 Added access routine to attribute link of irnode in irnode.ch.
166 Added get_negated_pnc to irnode.ch.
169 Added an iterator in iropt that calls the optimization for all nodes.
170 Copied optimize's code to optimize_in_place and removed deallocations.
171 Made set_irn_n in irnode.c public.
172 Added Bad as possible cfg predecessor in is_cfg_node in irnode. Bads
173 are allowded as cfgpredecessors to represent dead "incoming" control
175 Added call to optimize_in_place in mature_block. Is this useful?
178 Changed tests from comparing enums to comparing pointers. This is more
179 efficient (is it?) and reads better. e.g., instead get_irn_opcode == irm_And
180 now get_irn_op == op_And
183 Compared equivalent_value to the one in the original fiasco.
184 Added a test in case iro_And.
185 Changed implementation of iro_Div. Added routines turn_into_tuple
186 and set_irn_op() in irgmod/irnode.
187 Changed implementation of irn_Minus (although commented out).
188 Now all features are ported or documented for this function.
191 Compared computed_value to the one in the original fiasco.
192 Added one further optimization in case iro_Proj.
193 Now all features are ported for this function.
196 Updated comments in ircons.h.
199 Changed possible attribute of SymConst from type_class to type.
200 SymConst size could be the size of a union, array, ...
203 Implemented two dumpers that dump type information and a graph with
207 Implemented a walker that walks over the type informatin that can
208 be reached from an ir node.
209 Added routine get_kind(firm_thing) in common.h, Added file common.c.
210 Added files typewalk.ch and routines to irdump.
211 Added visited flags and initialization to entity and all types.
212 Implemented some of the missing access routines in type.c, entity.c
215 Implemented constructor for ShrA.
217 Added routine that iterates the graph and verifies all nodes.
218 Added Phi_in stack to irgraph. This allows to build several
219 graphs at once with respect to the Phi building algorithm.
222 Implemented dumper for control flow graphs. Changed irr_* and dead_*
223 examples to dump cfg.
226 Implemeted explicit stack for the Phi node generation. See ircons.c.
229 added include string.h in xoprintf.c to get rid of warning:
230 implicit declaration of function `bcopy'
234 Added more cases to equivalent_node.
235 Portet gigo, identify, identify_remember.
236 The set/pset library can not handle several hash tables. At least,
237 compiling several procedures causes a segmentation fault during access
238 to the tables (oo_program_example). Need to work on this.
239 transform_node still needs to be ported.
240 some cases in equivalent_node are still missing.
242 To get it running I had to remove the call to optimize in the
243 new_Block constructor. It can only be called when the Block is
247 Introduced a walker that walks only over blocks. The asserts
248 might be too strict for general graphs, but so far it works.
249 For the walker I introduced an additional flag in the attribute
250 of Blocks, an a global block_visited variable (in irgraph.h).
251 Furhter I modularized dump_ir_node, implemented dump_ir_graph
252 with the existing walker, and added new routines to output a
254 Changed the examples to call the new dump routine.
257 Added auxiliary routines to ir_node:
258 skip_Proj, skip_Nop, is_Bad ...
259 Changed access routines to use get_irn_n instead of explicit array
260 accesses. Changed get_irn_n to call skip_Id, so that the access routines
261 never will return Id nodes.
264 Repaired Phi computation, changed new_r_Phi_in. Added test program to
265 test irregular controlflow.
268 Updated optimizations computed_value and equivalent_node to new
269 Syntax of FIRM nodes and to use access routines.
270 Added routine skip_Proj in irnode.
272 2.2.2000 Boris Boesler
273 Added files irgwalk.c and irgwalk.h. They include a simple function to
274 traverse an ir graph and execute pre and post functions to current node.
277 Added arrays with parameters and result types to the type informtion
278 of a procedure. This is needed for the code generation. Also added
279 the corresponding access routines.
280 Adapted the testprograms.
283 Found a bug / complication: the call order
284 get_value (makes Phi0, put's it into graph_arr)
285 set_value (overwrites Phi0 in graph_arr)
286 mature_block (upgrades Phi0, puts it again into graph_arr, overwriting
288 fails. Added test wether graph_arr is already set in phi_merge.
290 Added tons of comments to explain Phi generation -- the stack hack.
294 irdump now outputs the pnc_number for projs of Cmp nodes.
295 Added routine to access the pnc_string.
298 Added result "dataseg" to Start node, with all it's consequences.
299 We need this for the compiler lab to translate global variables.
300 Now they can be selected from the data segment, and the start
301 node supplies the pointer to this segment.
302 These changes are guarded by preprocessor variable UEBPRAKT in
304 Changed files: common.h, irgraph.ch, irnode.h
308 removed array_example, added array-heap_example and
309 array-stack_example and adapted makefile.
311 Entity now also allows type_method as owner. This is to model
312 the stack, Sel nodes that select a variable (array) from the
313 stack need an entity that describes what they select. This
314 entity gets the type of the enclosing procedure as owner.
317 Added future access routines in `irmode.[ch]' as comments,
318 that all attributes in the ir_mode struct can be user-defined.
319 Added access routines in `irgraph.[ch]', for all attributes.
322 Moved verify routines from `irgraph.[ch]' to own files `irvrfy.[ch]'.
323 Added `irvrfy.[ch]' to MAKEFILE
324 Added "inline" before access routines in `irnode.h', that no warnings
325 will appear furthermore.
326 Added three more access routines in `irmode.[ch]':
327 struct tarval *get_min_of_mode (ir_mode *mode);
328 struct tarval *get_max_of_mode (ir_mode *mode);
329 struct tarval *get_null_of_mode (ir_mode *mode);
332 Adaption of Alloc, Sel and Entity to new types:
333 Changed array_example to use type instead of type_class.
334 Changed entity to allow all types as owner instead of
335 only type_class. Added routine "assert_legal_owner_of_ent(type* type)".
336 Changed alloc to allow allocating variables of any type instead of
338 Adapted all testprograms to avoid warnings.
340 removed dtest ... from Makefile, replaced by test.
343 Added "run" to makefile, added array_example to makefile of testprograms.
344 Corrected testprogram array
345 Changed assert in irvrfy -- Conv.