*** empty log message ***
[libfirm] / Changes
1   11.7.2001 Goetz
2   Implemented stuff to change the type graph.  See
3   typegmod.h and tpop.h for basic documentation of the change.
4   There now exists a type of kind type_id.  If this appears
5   externally this is a bug.
6
7   9.7.2001 Goetz
8   Added some new access routines to types.
9   List of overwritten fields for entities.
10   Removed a bug in irnode.
11
12   4.7.2001 Goetz
13   Added a routine to set the mangled entity name.
14   Added two routines to copy entites.
15
16   3.7.2001 Goetz
17   Entities now have two more flags, for visibility and allocation mode.
18   Types that have a layout have a flag indicating whether the layout is
19   fixed.
20
21   25.6.2001 Goetz
22   We distinguish three kinds of Cond nodes.  These can be distinguished
23   by the mode of the selector operand and an internal flag of type cond_kind.
24   First we distinguish binary Conds and switch Conds.
25   A binary Cond has as selector a boolean value.  Proj(0) projects the control
26   flow for case "False", Proj(1) the control flow for "True".  A binary Cond
27   is recognized by the boolean selector.
28   The switch Cond has as selector an unsigned integer.  It produces as result
29   an n+1 Tuple (cf0, ... , cfn) of control flows.
30   We differ two flavours of this Cond.  The first, the dense Cond, passes
31   control along output i if the selector value is i, 0 <= i <= n.  If the
32   selector value is >n it passes control along output n.
33   The second Cond flavor differes in the treatment of cases not specified in
34   the source program.  It magically knows about the existence of Proj nodes.
35   It only passes control along output i, 0 <= i <= n, if a node Proj(Cond, i)
36   exists.  Else it passes control along output n (even if this Proj does not
37   exist.)  This Cond we call "fragmentary".  There is a special constructor
38   new_defaultProj that automatically sets the flavor.
39   The two switch flavors are distinguished by a flag of type cond_kind.
40   Default flavor is "dense"
41
42   20.6.2001 Goetz
43   Extended iropt, tv.
44   tv now implements Minus, Abs.
45   iropt now optimizes these and Div, Mod, Quot, DivMod.
46   Still missing: Shrs, Rot.
47   tarval_shr somtimes performs shrs, depending on the compiler/system!!
48   If the ArmRoq implementation is faulty there might appear errors.
49
50   20.6.2001 Goetz
51   Changed ircons: If undefined values are used the Phi construction
52   inserts a constant with value tarval_bad.
53
54   19.6.2001 Goetz
55   Changed array bounds in type.h to ir_node*.  This allows to
56   construct array bounds that are complex constant expressions
57   simpler.  Further dynamic array bounds can be displayed.
58   Comment in ircons.c extended: undefined values in start_block.
59
60   7.6.2001 Goetz
61   ifdef'ed all uses of gmp in tv.c away.  Optimizations for
62   mode_Z no more supported, as well as constants of that mode.
63
64   7.6.2001 Goetz
65   Dokumentation in ir_dump
66   Habe Routinen fuer einzelne Knoten/Kanten aus header entfernt:
67   Benutzen globale Variable die nicht oeffentlich zugaenglich ist.
68
69   28.5.2001 Goetz
70   We need an entity for the array elements for the Sel nodes.  This
71   entity should be stored in the array type.  Changed constructor
72   parameters: include array element type.  Entity for elements is built
73   automatically now.
74
75   28.5.2001 Goetz
76   Removed bug in tv.c.
77   Faulty use of va_arg, became visible with new, stricter gcc 2.96.
78
79   23.5.2001 Goetz
80   Added list of member entites to union.  unioned_types and delimiters
81   are superfluous now -- removed.
82   Rationale: we want to express selection of a union member as a Sel
83   node. for this we need to have entities.  The entities contain the
84   unioned type and have as name the delimiters...
85
86   17.4.2001 Boris
87   Changed Makefile/MakeTargets to install headers and libraries
88   seperately.
89
90   28.3.2001 Boris
91   Changed Makefile and Configure scripts to produce a proper tar file
92   for distribution (libfirm-VERSION.tar)
93   Use 'make distrib' instead of 'make dist'
94
95   14.3.2001 Goetz
96   Changed implementation of tr module.  With this I also changed the
97   interface!!  Type casts are unnecessary now, but some access funcions
98   differ.
99
100
101 ======================================================================
102 ==================== New version: 0.3.0 ==============================
103 ======================================================================
104
105   14.3.2001 Boris
106   added file TODO
107
108   14.3.2001 Boris
109   added creation of a tar archive for distribution
110   replaced ir/.dummy.in by ir/Makefile.in
111
112   13.3.2001 Goetz
113   Changed equivalent_node() and copy_preds() so that the end block
114   is not optimized away if it has no real predecessors.  This fixes
115   the problem with the while examples.
116   Added while_example in Makefile
117
118   12.3.2001 Goetz
119   Fooled around with if_while_example: Why does cse make it abort?
120   Cse removes path to End node, Bad remains as pred of Endblock.
121   The block walker can't deal with this.
122   Made new example with only loop:  while_example.
123
124   12.3.2001 Boris
125   added auto documentation in Makefiles, configure, etc
126   example in ir/ir/ircons.c - much must be added
127   creation of documentation by 'make autodoc' in architecture directory
128
129   5.3.2001 Boris
130   added lots of #ifdef HAVE_CONFIG_G #include "config.h" #endif
131   replaced some C++ style comments (//) by standard C comments /**/
132   added autoconf stuff
133   worked this night:
134         - configure (with some features, see --help for more)
135         - make [depend | tags | install]
136         - make [run] in testprograms
137   did not work:
138         - compilation on SunOS
139         - make dist
140         - automatic call of autoconf if required
141
142   5.3.2001 Goetz
143   More colours in vcg output.
144   Fixed bug:  cse found that start block equals it's
145   first successor as both have the Start block as predecessor.
146   This only happens for local_optimize_graph() as during construction
147   the Start block is not entered in the value table.
148   Changed implementation:  irgmod:  local_optimize_graph() did not
149   empty the hash table with the irnodes for cse.  This might cause that
150   cse turns up with a node that seems better but was removed from the
151   graph in an earlier optimization phase.
152   Removed old #if 1 from ircons.c
153   Commented in call of optimization for Block nodes in irgopt.c, copy_preds():
154   Optimizes blocks that had bad predecessors.
155   Same for Phi nodes.
156
157
158   27.2.2001 Goetz
159   Moved struct from irprog.h to irprog_t.h, same for irmode.h.
160   Added a module deb_info in debug.h.  Adapted makefile.  Added example
161   use in iropt.h.
162   Removed use of debug.h in ident.c. Now debug.c|h can be moved to
163   /adt/.
164   Removed inabled code for dead node elimination in irgopt.h.
165   Renamed some missnamed access routines (_of_).  Macros with old names
166   are in old_fctnames.h.
167   Edited makefiles to remove #* and *.flc.
168
169   ??.2.2001 Goetz
170   Some minor bugfixes...
171
172   25.1.2001 Goetz
173   After compacting of in arrays in dead_node_elimination
174   merge blocks and remove Phis with one pred.
175
176   24.1.2001 Goetz
177   Freeing of obstack in dead_node_elimination commented in.
178   Compacting in arrays of Block and Phi nodes in dead_node_
179   elimination.
180   Some more changes...
181
182   15.01.2001 Goetz
183   added set/get_SymConst_type_or_id in irnode.h
184   added field offset to entity in entity.h
185   added field size to type_class in type.h
186   include "gmp.h" in tv.h with "" instead <>
187
188   12.01.2001 Goetz
189   Some changes to make the lib better portable
190
191   29.12.2000 Goetz
192   Initialize max_node_nr in irprog.
193
194   27.12.2000 Goetz
195   Now outputs warning if faulty type in irdump, dump_type_info.
196   Explicit string termination in irdump, vcg_open.
197
198   20.12.2000 Goetz
199   Added external to declaration of irp.
200   Added typedef before pns and pnc_number.
201   irmode.c, init_mode(): We need to memset all new modes as
202   tarval_vrfy reads fields before they are initialized: It
203   compares to min/max when tarvals for min/max are allocated!
204
205   18.12.2000 Goetz
206   Changed parameter of Methods in type.h and type.c from
207   class to clss.  Class is a C++ keyword.
208
209   10.12.2000 Goetz
210   Changed some testprograms to accomodate Uebprakt.
211
212   7.9.2000 Goetz
213   Finished implementation of dump_all_types.
214   Added new testprogram inheritance_example.
215
216   6.9.2000 Chris
217   Added seven access routines in type.[hc]:
218   get_class_n_member, get_class_n_subtype, get_class_n_supertype,
219   get_strct_n_member, add_strct_member, get_strct_member and set_strct_member.
220   Fixed the type_walk_2 for those seven routines.
221
222   6.9.2000 Goetz
223   Added irdump routine dump_all_types.
224   Did changes to irprog, type, typewalk to achieve this.
225   typewalk needs to walk along members, sub and supertypes, this
226   is still missing!  irdump then needs to output these edges.
227
228 ======================================================================
229 ==================== New version: 0.2.5 ==============================
230 ======================================================================
231
232   3.9.2000 Goetz
233   Made new Version: 0.2.5
234
235   15.8.2000 Goetz until 3.9.00
236   Separated irnode.h and many others into two files: one public
237   one private.
238   Added funcionality to extract headers for lib.
239
240   23.8.2000 Goetz
241   type_dump also dumps irg->ent
242   if_example: corrected nr of locals
243
244   16.8.2000 Goetz
245   irgopt: Correct copy of self pointer in start block.
246   irgopt: Correct treatment of loops: pre function in walker
247     breaks all possible loops in Phi and Block nodes.
248   irr_loop_example: wrong Return statement
249   Now I fixed all but one error: in memory_example.
250   This error showed a conceptual problem, so I wrote
251   a slightly different algorithm.  This now runs for
252   all testprograms.
253   dead_node_example: cse is buggy!! merges start and the
254   following block!
255
256   15.8.2000 Goetz
257   looking at bug in dead_node_elimination.
258   Following fixes:
259   irnode:  all get_..._arr functions changed
260   ircons:  new_r_Block: set matured flag.
261   ircons:  new_r_SymConst: needs mode_p for linkage_ptr_info.
262   adapted call_str_example to new concepts.
263
264   2.8.2000 Goetz
265   Implemented simpler Phi construction algorithm that constructs
266   correct code for three_cfpred_example in ircons.  This algorithm
267   generates more Id nodes than the original algorithm and therefore
268   is less effective.
269   Also made some changes to optimizations of Not.
270
271   31.7.2000 Chris
272   Fixed a bug, caused by the recursive use in type.h and entity.h.
273   Deleted the _TYPE_TYPEDEF_ and inserted the _ENTITY_TYPEDEF_ instead.
274   Fixed a problem in if_while testprogram, so it now works.
275
276   20.7.2000 Goetz
277   Fixed bug in optimize(). Returned Null instead n if
278   get_optimize() == false.
279
280   19.7.2000 Christian
281   Added some access routines in type.[hc]. Solved a recursive definition
282   of type_class struct, entity struct and type union.
283
284   18.7.2000 Goetz
285   Separated entity header into pure functional header and header
286   with data types.
287
288   Goetz
289   ... a bunch small changes not documented
290
291   12.7.2000 Goetz
292   Changed output of oo_prog_example: now uses the internal list
293   of all irgs.  Had to implement some of the access routines for
294   that.  Also fixed a bug in irdump.  Main routines did not use
295   current_ir_graph properly.
296
297   12.7.2000 Goetz
298   Implemented some missing parts in irgopt.
299   Added field irg to entity. Only valid if entity is a method.
300   Had to resove a cyclic de[endency between irgraph.h and entity.h
301   for this.
302   Added fields sub and super to type_class for inheritance.
303   Added field main_irg to irprog.
304
305   7.7.2000 Chris
306   Fixed some bugs in irgopt.c
307   Added some missing 'get_new_node' methods, so the new obstack contains
308   the correct nodes.
309
310   6.7.2000 Chris
311   Renamed ir_vrfy to irn_vrfy and vrfy_graphg to irg_vrfy.
312   Solved some copy'n'paste problems. Deleted most debug-code!
313   Added comments to several files.
314
315   6.7.2000 Goetz
316   Fixed bug in _r_ constructors for all four Div operations.
317   Fixed bug in turn_into_tuple: didn't remember the block.
318   Tested transform_node.
319
320   5.7.2000 Goetz
321   Fixed some testprograms to new semantics of firm.
322   Added testprogram global_var_example.
323   Fixed a bug in irop:  Size of Sel node was (entity *) instead of
324   sel_attr.  Therefor array_heap_example aborted.
325   Also found a missing break in typewalk, case iro_Alloc.
326   Added a construct that unifies all things constructed by the lib
327   and needed to represent a program:  irprog.ch
328   This contains a list of all types as well as a list of all ir graphs.
329   I added calls to initialization and constructors so that this is constructed
330   automatically.  I changed firm.c, type.c, irgraph.c and ev. more.
331   Removed strange block struct and constructor from ircons.c.
332   Moved routines for automatic Phi construction from irgmod to ircons.
333   Sorted functions in ircons to reflect the different interfaces.
334   Renamed dataseg to globals to be conformant with documentation.
335   Added conservation of current_ir_graph to irgopt.c.
336   Corrected bug in Makefiles: wrong path to directory ./inlude.
337
338   4.7.2000 Goetz
339   Commented a whole bunch of stuff, e.g. in ircons.h  (Procedure to construct)
340   We should change the naming of the Block constructor.
341   Removed acces routines to attr. "closed" of Block.
342   Removed second implementation of new_ir_node from ircons and some comments
343   concerned with the now resolved cyclic dependency.
344   Fixed some bugs in irgopt so that the compilation goes through.
345
346   29.6.2000 Chris
347   Changed the irnode attribut 'visit' into 'visited'.
348   Added some access functions, like get/set_irn_visit etc.
349
350   28.6.2000 Chris
351   Renamed some access funtion in irgraph.*.
352   Deleted two global flags (ir_visited and block_visited) from irgraph.*.
353   Added two attributes to the irgraph struct. The visited flags belongs
354   to a ir graph, not to a whole program.
355
356   26.6.2000 Chris
357   A new optimization has been finished. The dead-node-elimination copies
358   the existing ir graph from one opstack to another. While walking the
359   graph, only the reachable nodes will be copied, so the "dead-nodes"
360   (unreachable in the controlflow) are removed.
361
362   19.6.2000 Chris
363   Solved some problems in the 'copy_node' function. The in array was not
364   as easy as it seamed.
365
366   16.6.2000 Chris
367   Wrote a new 'post' funtion, for future use in 'dead-node-elimination'
368   optimization, which is needed in the paramter list of 'irg_walk'.
369
370   14.6.2000 Chris
371   Moved 'optimze_in_place_wrapper' from iropt.* tothe new files irgopt.*.
372   New functions 'local_optimze_graph' and 'dead_node_elimination' are added,
373   but not finished.
374
375   31.5.2000 Chris
376   Removed some files from the archive, after dependencies and usage are
377   checked:
378   - 'ir/common/strerror.c'
379   was nowhere used;
380   - 'ir/ident/xx_ident.h'
381   an empty file, only included by 'ident.c', but never used;
382   - 'ir/tv/label.c' and
383   - 'ir/tv/label.h'
384   contained a numeric counter;
385   The files were included in 'tv.h' and implemented in 'tarval.c'. The two
386   functions 'tarval_label' and 'tarval_forall_labeled' were also never used.
387   In the old fiasco compiler, the label thing is used in the backend.
388   Search for 'babil' to see the usage.
389   Also removed the two attributes 'lab' and 'used' in the tarval struct.
390
391   26.5.2000 Chris
392   Moved the 'new_ir_node' constructor from ircons.* to irnode.* and fixed
393   afterwards some recursive includes, so libfirm works again.
394
395   2+3.2000 Goetz
396   Did a lot of changes, which I never commented until now (4.7.00).
397
398   * Added new result to Start node: Pointer to global data segment.
399   * Extended Semantics of SymConst node to represent information for the
400     linker.
401   * Added arithmeitc nodes (Shrs, Minus ...)
402
403   Rearranged the directory structure and adjusted the makefiles.
404   The directories contain:
405   ir:       everything for the intermediate representation (better: src?)
406     /ir:    the ir itself, and standard optimizations.
407     /tv:    the target value module
408     /tr:    the type and entity representation
409     /adt:   abstract data types
410     /common:  stuff needed by all other dirs
411     /debug: debugging Unterstuetzung
412     /ident:
413   include:  external files needen as includes
414   testprograms: examples to test the lib.
415
416   The makefiles generate files with extension .d that contain the dependencies
417   between the files.
418
419   15.2.2000 Goetz
420   Added access routine to attribute link of irnode in irnode.ch.
421   Added get_negated_pnc to irnode.ch.
422
423   14.2.2000 Goetz
424   Added an iterator in iropt that calls the optimization for all nodes.
425   Copied optimize's code to optimize_in_place and removed deallocations.
426   Made set_irn_n in irnode.c public.
427   Added Bad as possible cfg predecessor in is_cfg_node in irnode.  Bads
428   are allowded as cfgpredecessors to represent dead "incoming" control
429   flow.
430   Added call to optimize_in_place in mature_block. Is this useful?
431
432   10.2.2000 Goetz
433   Changed tests from comparing enums to comparing pointers. This is more
434   efficient (is it?) and reads better.  e.g., instead get_irn_opcode == irm_And
435   now get_irn_op == op_And
436
437   10.2.2000 Goetz
438   Compared equivalent_value to the one in the original fiasco.
439   Added a test in case iro_And.
440   Changed implementation of iro_Div. Added routines turn_into_tuple
441     and set_irn_op() in irgmod/irnode.
442   Changed implementation of irn_Minus (although commented out).
443   Now all features are ported or documented for this function.
444
445   10.2.2000 Goetz
446   Compared computed_value to the one in the original fiasco.
447   Added one further optimization in case iro_Proj.
448   Now all features are ported for this function.
449
450   9.2.2000 Goetz
451   Updated comments in ircons.h.
452
453   9.2.2000 Goetz
454   Changed possible attribute of SymConst from type_class to type.
455   SymConst size could be the size of a union, array, ...
456
457   9.2.2000 Goetz
458   Implemented two dumpers that dump type information and a graph with
459   type information.
460
461   9.2.2000 Goetz
462   Implemented a walker that walks over the type informatin that can
463   be reached from an ir node.
464   Added routine get_kind(firm_thing) in common.h, Added file common.c.
465   Added files typewalk.ch and routines to irdump.
466   Added visited flags and initialization to entity and all types.
467   Implemented some of the missing access routines in type.c, entity.c
468
469   9.2.2000 Goetz
470   Implemented constructor for ShrA.
471   Added type struct.
472   Added routine that iterates the graph and verifies all nodes.
473   Added Phi_in stack to irgraph.  This allows to build several
474     graphs at once with respect to the Phi building algorithm.
475
476   9.2.2000 Goetz
477   Implemented dumper for control flow graphs.  Changed irr_* and dead_*
478   examples to dump cfg.
479
480   8.2.2000 Goetz
481   Implemeted explicit stack for the Phi node generation.  See ircons.c.
482
483   8.2.2000 Goetz
484   added include string.h in xoprintf.c to get rid of warning:
485   implicit declaration of function `bcopy'
486
487   7.2.2000 Goetz
488   Worked on iropt.c:
489   Added more cases to equivalent_node.
490   Portet gigo, identify, identify_remember.
491   The set/pset library can not handle several hash tables.  At least,
492   compiling several procedures causes a segmentation fault during access
493   to the tables (oo_program_example).  Need to work on this.
494   transform_node still needs to be ported.
495   some cases in equivalent_node are still missing.
496
497   To get it running I had to remove the call to optimize in the
498   new_Block constructor. It can only be called when the Block is
499   mature.
500
501   7.2.2000 Goetz
502   Introduced a walker that walks only over blocks.  The asserts
503   might be too strict for general graphs, but so far it works.
504   For the walker I introduced an additional flag in the attribute
505   of Blocks, an a global block_visited variable (in irgraph.h).
506   Furhter I modularized dump_ir_node, implemented dump_ir_graph
507   with the existing walker, and added new routines to output a
508   basic block graph.
509   Changed the examples to call the new dump routine.
510
511   7.2.2000 Goetz
512   Added auxiliary routines to ir_node:
513   skip_Proj, skip_Nop, is_Bad ...
514   Changed access routines to use get_irn_n instead of explicit array
515   accesses. Changed get_irn_n to call skip_Id, so that the access routines
516   never will return Id nodes.
517
518   3.2.2000 Goetz
519   Repaired Phi computation, changed new_r_Phi_in.  Added test program to
520   test irregular controlflow.
521
522   2.2.2000 Goetz
523   Updated optimizations computed_value and equivalent_node to new
524   Syntax of FIRM nodes and to use access routines.
525   Added routine skip_Proj in irnode.
526
527   2.2.2000 Boris Boesler
528   Added files irgwalk.c and irgwalk.h. They include a simple function to
529   traverse an ir graph and execute pre and post functions to current node.
530
531   1.2.2000 Goetz
532   Added arrays with parameters and result types to the type informtion
533   of a procedure.  This is needed for the code generation.  Also added
534   the corresponding access routines.
535   Adapted the testprograms.
536
537   1.2.2000 Goetz
538   Found a bug / complication:  the call order
539     get_value   (makes Phi0, put's it into graph_arr)
540     set_value   (overwrites Phi0 in graph_arr)
541     mature_block (upgrades Phi0, puts it again into graph_arr, overwriting
542                   the proper value.)
543   fails.  Added test wether graph_arr is already set in phi_merge.
544
545   Added tons of comments to explain Phi generation -- the stack hack.
546
547
548   27.1.2000 Goetz
549   irdump now outputs the pnc_number for projs of Cmp nodes.
550   Added routine to access the pnc_string.
551
552   27.1.2000 Goetz
553   Added result "dataseg" to Start node, with all it's consequences.
554   We need this for the compiler lab to translate global variables.
555   Now they can be selected from the data segment, and the start
556   node supplies the pointer to this segment.
557   These changes are guarded by preprocessor variable UEBPRAKT in
558   common.h
559   Changed files: common.h, irgraph.ch, irnode.h
560
561   26.1.2000 Goetz
562   Testprograms:
563   removed array_example, added array-heap_example and
564   array-stack_example and adapted makefile.
565   ir_lib:
566   Entity now also allows type_method as owner. This is to model
567   the stack, Sel nodes that select a variable (array) from the
568   stack need an entity that describes what they select.  This
569   entity gets the type of the enclosing procedure as owner.
570
571   24.1.2000 Chris
572   Added future access routines in `irmode.[ch]' as comments,
573     that all attributes in the ir_mode struct can be user-defined.
574   Added access routines in `irgraph.[ch]', for all attributes.
575
576   22.1.2000 Chris
577   Moved verify routines from `irgraph.[ch]' to own files `irvrfy.[ch]'.
578   Added `irvrfy.[ch]' to MAKEFILE
579   Added "inline" before access routines in `irnode.h', that no warnings
580     will appear furthermore.
581   Added three more access routines in `irmode.[ch]':
582         struct tarval *get_min_of_mode (ir_mode *mode);
583         struct tarval *get_max_of_mode (ir_mode *mode);
584         struct tarval *get_null_of_mode (ir_mode *mode);
585
586   21.1.2000 Goetz
587   Adaption of Alloc, Sel and Entity to new types:
588     Changed array_example to use type instead of type_class.
589     Changed entity to allow all types as owner instead of
590       only type_class.  Added routine "assert_legal_owner_of_ent(type* type)".
591     Changed alloc to allow allocating variables of any type instead of
592       only type_class.
593     Adapted all testprograms to avoid warnings.
594
595   removed dtest ... from Makefile, replaced by test.
596
597   20.1.2000 Goetz
598   Added "run" to makefile, added array_example to makefile of testprograms.
599   Corrected testprogram array
600   Changed assert in irvrfy -- Conv.
601   Started Change log.
602   Started TODO log.