2 More colours in vcg output.
3 Fixed bug: cse found that start block equals it's
4 first successor as both have the Start block as predecessor.
5 This only happens for local_optimize_graph() as during construction
6 the Start block is not entered in the value table.
7 Changed implementation: irgmod: local_optimize_graph() did not
8 empty the hash table with the irnodes for cse. This might cause that
9 cse turns up with a node that seems better but was removed from the
10 graph in an earlier optimization phase.
11 Removed old #if 1 from ircons.c
12 Commented in call of optimization for Block nodes in irgopt.c, copy_preds():
13 Optimizes blocks that had bad predecessors.
18 Moved struct from irprog.h to irprog_t.h, same for irmode.h.
19 Added a module deb_info in debug.h. Adapted makefile. Added example
21 Removed use of debug.h in ident.c. Now debug.c|h can be moved to
23 Removed inabled code for dead node elimination in irgopt.h.
24 Renamed some missnamed access routines (_of_). Macros with old names
25 are in old_fctnames.h.
26 Edited makefiles to remove #* and *.flc.
29 Some minor bugfixes...
32 After compacting of in arrays in dead_node_elimination
33 merge blocks and remove Phis with one pred.
36 Freeing of obstack in dead_node_elimination commented in.
37 Compacting in arrays of Block and Phi nodes in dead_node_
42 added set/get_SymConst_type_or_id in irnode.h
43 added field offset to entity in entity.h
44 added field size to type_class in type.h
45 include "gmp.h" in tv.h with "" instead <>
48 Some changes to make the lib better portable
51 Initialize max_node_nr in irprog.
54 Now outputs warning if faulty type in irdump, dump_type_info.
55 Explicit string termination in irdump, vcg_open.
58 Added external to declaration of irp.
59 Added typedef before pns and pnc_number.
60 irmode.c, init_mode(): We need to memset all new modes as
61 tarval_vrfy reads fields before they are initialized: It
62 compares to min/max when tarvals for min/max are allocated!
65 Changed parameter of Methods in type.h and type.c from
66 class to clss. Class is a C++ keyword.
69 Changed some testprograms to accomodate Uebprakt.
72 Finished implementation of dump_all_types.
73 Added new testprogram inheritance_example.
76 Added seven access routines in type.[hc]:
77 get_class_n_member, get_class_n_subtype, get_class_n_supertype,
78 get_strct_n_member, add_strct_member, get_strct_member and set_strct_member.
79 Fixed the type_walk_2 for those seven routines.
82 Added irdump routine dump_all_types.
83 Did changes to irprog, type, typewalk to achieve this.
84 typewalk needs to walk along members, sub and supertypes, this
85 is still missing! irdump then needs to output these edges.
87 ======================================================================
88 ==================== New version: 0.2.5 ==============================
89 ======================================================================
92 Made new Version: 0.2.5
94 15.8.2000 Goetz until 3.9.00
95 Separated irnode.h and many others into two files: one public
97 Added funcionality to extract headers for lib.
100 type_dump also dumps irg->ent
101 if_example: corrected nr of locals
104 irgopt: Correct copy of self pointer in start block.
105 irgopt: Correct treatment of loops: pre function in walker
106 breaks all possible loops in Phi and Block nodes.
107 irr_loop_example: wrong Return statement
108 Now I fixed all but one error: in memory_example.
109 This error showed a conceptual problem, so I wrote
110 a slightly different algorithm. This now runs for
112 dead_node_example: cse is buggy!! merges start and the
116 looking at bug in dead_node_elimination.
118 irnode: all get_..._arr functions changed
119 ircons: new_r_Block: set matured flag.
120 ircons: new_r_SymConst: needs mode_p for linkage_ptr_info.
121 adapted call_str_example to new concepts.
124 Implemented simpler Phi construction algorithm that constructs
125 correct code for three_cfpred_example in ircons. This algorithm
126 generates more Id nodes than the original algorithm and therefore
128 Also made some changes to optimizations of Not.
131 Fixed a bug, caused by the recursive use in type.h and entity.h.
132 Deleted the _TYPE_TYPEDEF_ and inserted the _ENTITY_TYPEDEF_ instead.
133 Fixed a problem in if_while testprogram, so it now works.
136 Fixed bug in optimize(). Returned Null instead n if
137 get_optimize() == false.
140 Added some access routines in type.[hc]. Solved a recursive definition
141 of type_class struct, entity struct and type union.
144 Separated entity header into pure functional header and header
148 ... a bunch small changes not documented
151 Changed output of oo_prog_example: now uses the internal list
152 of all irgs. Had to implement some of the access routines for
153 that. Also fixed a bug in irdump. Main routines did not use
154 current_ir_graph properly.
157 Implemented some missing parts in irgopt.
158 Added field irg to entity. Only valid if entity is a method.
159 Had to resove a cyclic de[endency between irgraph.h and entity.h
161 Added fields sub and super to type_class for inheritance.
162 Added field main_irg to irprog.
165 Fixed some bugs in irgopt.c
166 Added some missing 'get_new_node' methods, so the new obstack contains
170 Renamed ir_vrfy to irn_vrfy and vrfy_graphg to irg_vrfy.
171 Solved some copy'n'paste problems. Deleted most debug-code!
172 Added comments to several files.
175 Fixed bug in _r_ constructors for all four Div operations.
176 Fixed bug in turn_into_tuple: didn't remember the block.
177 Tested transform_node.
180 Fixed some testprograms to new semantics of firm.
181 Added testprogram global_var_example.
182 Fixed a bug in irop: Size of Sel node was (entity *) instead of
183 sel_attr. Therefor array_heap_example aborted.
184 Also found a missing break in typewalk, case iro_Alloc.
185 Added a construct that unifies all things constructed by the lib
186 and needed to represent a program: irprog.ch
187 This contains a list of all types as well as a list of all ir graphs.
188 I added calls to initialization and constructors so that this is constructed
189 automatically. I changed firm.c, type.c, irgraph.c and ev. more.
190 Removed strange block struct and constructor from ircons.c.
191 Moved routines for automatic Phi construction from irgmod to ircons.
192 Sorted functions in ircons to reflect the different interfaces.
193 Renamed dataseg to globals to be conformant with documentation.
194 Added conservation of current_ir_graph to irgopt.c.
195 Corrected bug in Makefiles: wrong path to directory ./inlude.
198 Commented a whole bunch of stuff, e.g. in ircons.h (Procedure to construct)
199 We should change the naming of the Block constructor.
200 Removed acces routines to attr. "closed" of Block.
201 Removed second implementation of new_ir_node from ircons and some comments
202 concerned with the now resolved cyclic dependency.
203 Fixed some bugs in irgopt so that the compilation goes through.
206 Changed the irnode attribut 'visit' into 'visited'.
207 Added some access functions, like get/set_irn_visit etc.
210 Renamed some access funtion in irgraph.*.
211 Deleted two global flags (ir_visited and block_visited) from irgraph.*.
212 Added two attributes to the irgraph struct. The visited flags belongs
213 to a ir graph, not to a whole program.
216 A new optimization has been finished. The dead-node-elimination copies
217 the existing ir graph from one opstack to another. While walking the
218 graph, only the reachable nodes will be copied, so the "dead-nodes"
219 (unreachable in the controlflow) are removed.
222 Solved some problems in the 'copy_node' function. The in array was not
223 as easy as it seamed.
226 Wrote a new 'post' funtion, for future use in 'dead-node-elimination'
227 optimization, which is needed in the paramter list of 'irg_walk'.
230 Moved 'optimze_in_place_wrapper' from iropt.* tothe new files irgopt.*.
231 New functions 'local_optimze_graph' and 'dead_node_elimination' are added,
235 Removed some files from the archive, after dependencies and usage are
237 - 'ir/common/strerror.c'
239 - 'ir/ident/xx_ident.h'
240 an empty file, only included by 'ident.c', but never used;
241 - 'ir/tv/label.c' and
243 contained a numeric counter;
244 The files were included in 'tv.h' and implemented in 'tarval.c'. The two
245 functions 'tarval_label' and 'tarval_forall_labeled' were also never used.
246 In the old fiasco compiler, the label thing is used in the backend.
247 Search for 'babil' to see the usage.
248 Also removed the two attributes 'lab' and 'used' in the tarval struct.
251 Moved the 'new_ir_node' constructor from ircons.* to irnode.* and fixed
252 afterwards some recursive includes, so libfirm works again.
255 Did a lot of changes, which I never commented until now (4.7.00).
257 * Added new result to Start node: Pointer to global data segment.
258 * Extended Semantics of SymConst node to represent information for the
260 * Added arithmeitc nodes (Shrs, Minus ...)
262 Rearranged the directory structure and adjusted the makefiles.
263 The directories contain:
264 ir: everything for the intermediate representation (better: src?)
265 /ir: the ir itself, and standard optimizations.
266 /tv: the target value module
267 /tr: the type and entity representation
268 /adt: abstract data types
269 /common: stuff needed by all other dirs
270 /debug: debugging Unterstuetzung
272 include: external files needen as includes
273 testprograms: examples to test the lib.
275 The makefiles generate files with extension .d that contain the dependencies
279 Added access routine to attribute link of irnode in irnode.ch.
280 Added get_negated_pnc to irnode.ch.
283 Added an iterator in iropt that calls the optimization for all nodes.
284 Copied optimize's code to optimize_in_place and removed deallocations.
285 Made set_irn_n in irnode.c public.
286 Added Bad as possible cfg predecessor in is_cfg_node in irnode. Bads
287 are allowded as cfgpredecessors to represent dead "incoming" control
289 Added call to optimize_in_place in mature_block. Is this useful?
292 Changed tests from comparing enums to comparing pointers. This is more
293 efficient (is it?) and reads better. e.g., instead get_irn_opcode == irm_And
294 now get_irn_op == op_And
297 Compared equivalent_value to the one in the original fiasco.
298 Added a test in case iro_And.
299 Changed implementation of iro_Div. Added routines turn_into_tuple
300 and set_irn_op() in irgmod/irnode.
301 Changed implementation of irn_Minus (although commented out).
302 Now all features are ported or documented for this function.
305 Compared computed_value to the one in the original fiasco.
306 Added one further optimization in case iro_Proj.
307 Now all features are ported for this function.
310 Updated comments in ircons.h.
313 Changed possible attribute of SymConst from type_class to type.
314 SymConst size could be the size of a union, array, ...
317 Implemented two dumpers that dump type information and a graph with
321 Implemented a walker that walks over the type informatin that can
322 be reached from an ir node.
323 Added routine get_kind(firm_thing) in common.h, Added file common.c.
324 Added files typewalk.ch and routines to irdump.
325 Added visited flags and initialization to entity and all types.
326 Implemented some of the missing access routines in type.c, entity.c
329 Implemented constructor for ShrA.
331 Added routine that iterates the graph and verifies all nodes.
332 Added Phi_in stack to irgraph. This allows to build several
333 graphs at once with respect to the Phi building algorithm.
336 Implemented dumper for control flow graphs. Changed irr_* and dead_*
337 examples to dump cfg.
340 Implemeted explicit stack for the Phi node generation. See ircons.c.
343 added include string.h in xoprintf.c to get rid of warning:
344 implicit declaration of function `bcopy'
348 Added more cases to equivalent_node.
349 Portet gigo, identify, identify_remember.
350 The set/pset library can not handle several hash tables. At least,
351 compiling several procedures causes a segmentation fault during access
352 to the tables (oo_program_example). Need to work on this.
353 transform_node still needs to be ported.
354 some cases in equivalent_node are still missing.
356 To get it running I had to remove the call to optimize in the
357 new_Block constructor. It can only be called when the Block is
361 Introduced a walker that walks only over blocks. The asserts
362 might be too strict for general graphs, but so far it works.
363 For the walker I introduced an additional flag in the attribute
364 of Blocks, an a global block_visited variable (in irgraph.h).
365 Furhter I modularized dump_ir_node, implemented dump_ir_graph
366 with the existing walker, and added new routines to output a
368 Changed the examples to call the new dump routine.
371 Added auxiliary routines to ir_node:
372 skip_Proj, skip_Nop, is_Bad ...
373 Changed access routines to use get_irn_n instead of explicit array
374 accesses. Changed get_irn_n to call skip_Id, so that the access routines
375 never will return Id nodes.
378 Repaired Phi computation, changed new_r_Phi_in. Added test program to
379 test irregular controlflow.
382 Updated optimizations computed_value and equivalent_node to new
383 Syntax of FIRM nodes and to use access routines.
384 Added routine skip_Proj in irnode.
386 2.2.2000 Boris Boesler
387 Added files irgwalk.c and irgwalk.h. They include a simple function to
388 traverse an ir graph and execute pre and post functions to current node.
391 Added arrays with parameters and result types to the type informtion
392 of a procedure. This is needed for the code generation. Also added
393 the corresponding access routines.
394 Adapted the testprograms.
397 Found a bug / complication: the call order
398 get_value (makes Phi0, put's it into graph_arr)
399 set_value (overwrites Phi0 in graph_arr)
400 mature_block (upgrades Phi0, puts it again into graph_arr, overwriting
402 fails. Added test wether graph_arr is already set in phi_merge.
404 Added tons of comments to explain Phi generation -- the stack hack.
408 irdump now outputs the pnc_number for projs of Cmp nodes.
409 Added routine to access the pnc_string.
412 Added result "dataseg" to Start node, with all it's consequences.
413 We need this for the compiler lab to translate global variables.
414 Now they can be selected from the data segment, and the start
415 node supplies the pointer to this segment.
416 These changes are guarded by preprocessor variable UEBPRAKT in
418 Changed files: common.h, irgraph.ch, irnode.h
422 removed array_example, added array-heap_example and
423 array-stack_example and adapted makefile.
425 Entity now also allows type_method as owner. This is to model
426 the stack, Sel nodes that select a variable (array) from the
427 stack need an entity that describes what they select. This
428 entity gets the type of the enclosing procedure as owner.
431 Added future access routines in `irmode.[ch]' as comments,
432 that all attributes in the ir_mode struct can be user-defined.
433 Added access routines in `irgraph.[ch]', for all attributes.
436 Moved verify routines from `irgraph.[ch]' to own files `irvrfy.[ch]'.
437 Added `irvrfy.[ch]' to MAKEFILE
438 Added "inline" before access routines in `irnode.h', that no warnings
439 will appear furthermore.
440 Added three more access routines in `irmode.[ch]':
441 struct tarval *get_min_of_mode (ir_mode *mode);
442 struct tarval *get_max_of_mode (ir_mode *mode);
443 struct tarval *get_null_of_mode (ir_mode *mode);
446 Adaption of Alloc, Sel and Entity to new types:
447 Changed array_example to use type instead of type_class.
448 Changed entity to allow all types as owner instead of
449 only type_class. Added routine "assert_legal_owner_of_ent(type* type)".
450 Changed alloc to allow allocating variables of any type instead of
452 Adapted all testprograms to avoid warnings.
454 removed dtest ... from Makefile, replaced by test.
457 Added "run" to makefile, added array_example to makefile of testprograms.
458 Corrected testprogram array
459 Changed assert in irvrfy -- Conv.