new comments
[libfirm] / Changes
1   6.9.2000 Chris
2   Added seven access routines in type.[hc]:
3   get_class_n_member, get_class_n_subtype, get_class_n_supertype,
4   get_strct_n_member, add_strct_member, get_strct_member and set_strct_member.
5   Fixed the type_walk_2 for those seven routines.
6
7   6.9.2000 Goetz
8   Added irdump routine dump_all_types.
9   Did changes to irprog, type, typewalk to achieve this.
10   typewalk needs to walk along members, sub and supertypes, this
11   is still missing!  irdump then needs to output these edges.
12
13 ======================================================================
14 ==================== New version: 0.2.5 ==============================
15 ======================================================================
16
17   3.9.2000 Goetz
18   Made new Version: 0.2.5
19
20   15.8.2000 Goetz until 3.9.00
21   Separated irnode.h and many others into two files: one public
22   one private.
23   Added funcionality to extract headers for lib.
24
25   23.8.2000 Goetz
26   type_dump also dumps irg->ent
27   if_example: corrected nr of locals
28
29   16.8.2000 Goetz
30   irgopt: Correct copy of self pointer in start block.
31   irgopt: Correct treatment of loops: pre function in walker
32     breaks all possible loops in Phi and Block nodes.
33   irr_loop_example: wrong Return statement
34   Now I fixed all but one error: in memory_example.
35   This error showed a conceptual problem, so I wrote
36   a slightly different algorithm.  This now runs for
37   all testprograms.
38   dead_node_example: cse is buggy!! merges start and the
39   following block!
40
41   15.8.2000 Goetz
42   looking at bug in dead_node_elimination.
43   Following fixes:
44   irnode:  all get_..._arr functions changed
45   ircons:  new_r_Block: set matured flag.
46   ircons:  new_r_SymConst: needs mode_p for linkage_ptr_info.
47   adapted call_str_example to new concepts.
48
49   2.8.2000 Goetz
50   Implemented simpler Phi construction algorithm that constructs
51   correct code for three_cfpred_example in ircons.  This algorithm
52   generates more Id nodes than the original algorithm and therefore
53   is less effective.
54   Also made some changes to optimizations of Not.
55
56   31.7.2000 Chris
57   Fixed a bug, caused by the recursive use in type.h and entity.h.
58   Deleted the _TYPE_TYPEDEF_ and inserted the _ENTITY_TYPEDEF_ instead.
59   Fixed a problem in if_while testprogram, so it now works.
60
61   20.7.2000 Goetz
62   Fixed bug in optimize(). Returned Null instead n if
63   get_optimize() == false.
64
65   19.7.2000 Christian
66   Added some access routines in type.[hc]. Solved a recursive definition
67   of type_class struct, entity struct and type union.
68
69   18.7.2000 Goetz
70   Separated entity header into pure functional header and header
71   with data types.
72
73   Goetz
74   ... a bunch small changes not documented
75
76   12.7.2000 Goetz
77   Changed output of oo_prog_example: now uses the internal list
78   of all irgs.  Had to implement some of the access routines for
79   that.  Also fixed a bug in irdump.  Main routines did not use
80   current_ir_graph properly.
81
82   12.7.2000 Goetz
83   Implemented some missing parts in irgopt.
84   Added field irg to entity. Only valid if entity is a method.
85   Had to resove a cyclic de[endency between irgraph.h and entity.h
86   for this.
87   Added fields sub and super to type_class for inheritance.
88   Added field main_irg to irprog.
89
90   7.7.2000 Chris
91   Fixed some bugs in irgopt.c
92   Added some missing 'get_new_node' methods, so the new obstack contains
93   the correct nodes.
94
95   6.7.2000 Chris
96   Renamed ir_vrfy to irn_vrfy and vrfy_graphg to irg_vrfy.
97   Solved some copy'n'paste problems. Deleted most debug-code!
98   Added comments to several files.
99
100   6.7.2000 Goetz
101   Fixed bug in _r_ constructors for all four Div operations.
102   Fixed bug in turn_into_tuple: didn't remember the block.
103   Tested transform_node.
104
105   5.7.2000 Goetz
106   Fixed some testprograms to new semantics of firm.
107   Added testprogram global_var_example.
108   Fixed a bug in irop:  Size of Sel node was (entity *) instead of
109   sel_attr.  Therefor array_heap_example aborted.
110   Also found a missing break in typewalk, case iro_Alloc.
111   Added a construct that unifies all things constructed by the lib
112   and needed to represent a program:  irprog.ch
113   This contains a list of all types as well as a list of all ir graphs.
114   I added calls to initialization and constructors so that this is constructed
115   automatically.  I changed firm.c, type.c, irgraph.c and ev. more.
116   Removed strange block struct and constructor from ircons.c.
117   Moved routines for automatic Phi construction from irgmod to ircons.
118   Sorted functions in ircons to reflect the different interfaces.
119   Renamed dataseg to globals to be conformant with documentation.
120   Added conservation of current_ir_graph to irgopt.c.
121   Corrected bug in Makefiles: wrong path to directory ./inlude.
122
123   4.7.2000 Goetz
124   Commented a whole bunch of stuff, e.g. in ircons.h  (Procedure to construct)
125   We should change the naming of the Block constructor.
126   Removed acces routines to attr. "closed" of Block.
127   Removed second implementation of new_ir_node from ircons and some comments
128   concerned with the now resolved cyclic dependency.
129   Fixed some bugs in irgopt so that the compilation goes through.
130
131   29.6.2000 Chris
132   Changed the irnode attribut 'visit' into 'visited'.
133   Added some access functions, like get/set_irn_visit etc.
134
135   28.6.2000 Chris
136   Renamed some access funtion in irgraph.*.
137   Deleted two global flags (ir_visited and block_visited) from irgraph.*.
138   Added two attributes to the irgraph struct. The visited flags belongs
139   to a ir graph, not to a whole program.
140
141   26.6.2000 Chris
142   A new optimization has been finished. The dead-node-elimination copies
143   the existing ir graph from one opstack to another. While walking the
144   graph, only the reachable nodes will be copied, so the "dead-nodes"
145   (unreachable in the controlflow) are removed.
146
147   19.6.2000 Chris
148   Solved some problems in the 'copy_node' function. The in array was not
149   as easy as it seamed.
150
151   16.6.2000 Chris
152   Wrote a new 'post' funtion, for future use in 'dead-node-elimination'
153   optimization, which is needed in the paramter list of 'irg_walk'.
154
155   14.6.2000 Chris
156   Moved 'optimze_in_place_wrapper' from iropt.* tothe new files irgopt.*.
157   New functions 'local_optimze_graph' and 'dead_node_elimination' are added,
158   but not finished.
159
160   31.5.2000 Chris
161   Removed some files from the archive, after dependencies and usage are
162   checked:
163   - 'ir/common/strerror.c'
164   was nowhere used;
165   - 'ir/ident/xx_ident.h'
166   an empty file, only included by 'ident.c', but never used;
167   - 'ir/tv/label.c' and
168   - 'ir/tv/label.h'
169   contained a numeric counter;
170   The files were included in 'tv.h' and implemented in 'tarval.c'. The two
171   functions 'tarval_label' and 'tarval_forall_labeled' were also never used.
172   In the old fiasco compiler, the label thing is used in the backend.
173   Search for 'babil' to see the usage.
174   Also removed the two attributes 'lab' and 'used' in the tarval struct.
175
176   26.5.2000 Chris
177   Moved the 'new_ir_node' constructor from ircons.* to irnode.* and fixed
178   afterwards some recursive includes, so libfirm works again.
179
180   2+3.2000 Goetz
181   Did a lot of changes, which I never commented until now (4.7.00).
182
183   * Added new result to Start node: Pointer to global data segment.
184   * Extended Semantics of SymConst node to represent information for the
185     linker.
186   * Added arithmeitc nodes (Shrs, Minus ...)
187
188   Rearranged the directory structure and adjusted the makefiles.
189   The directories contain:
190   ir:       everything for the intermediate representation (better: src?)
191     /ir:    the ir itself, and standard optimizations.
192     /tv:    the target value module
193     /tr:    the type and entity representation
194     /adt:   abstract data types
195     /common:  stuff needed by all other dirs
196     /debug: debugging Unterstuetzung
197     /ident:
198   include:  external files needen as includes
199   testprograms: examples to test the lib.
200
201   The makefiles generate files with extension .d that contain the dependencies
202   between the files.
203
204   15.2.2000 Goetz
205   Added access routine to attribute link of irnode in irnode.ch.
206   Added get_negated_pnc to irnode.ch.
207
208   14.2.2000 Goetz
209   Added an iterator in iropt that calls the optimization for all nodes.
210   Copied optimize's code to optimize_in_place and removed deallocations.
211   Made set_irn_n in irnode.c public.
212   Added Bad as possible cfg predecessor in is_cfg_node in irnode.  Bads
213   are allowded as cfgpredecessors to represent dead "incoming" control
214   flow.
215   Added call to optimize_in_place in mature_block. Is this useful?
216
217   10.2.2000 Goetz
218   Changed tests from comparing enums to comparing pointers. This is more
219   efficient (is it?) and reads better.  e.g., instead get_irn_opcode == irm_And
220   now get_irn_op == op_And
221
222   10.2.2000 Goetz
223   Compared equivalent_value to the one in the original fiasco.
224   Added a test in case iro_And.
225   Changed implementation of iro_Div. Added routines turn_into_tuple
226     and set_irn_op() in irgmod/irnode.
227   Changed implementation of irn_Minus (although commented out).
228   Now all features are ported or documented for this function.
229
230   10.2.2000 Goetz
231   Compared computed_value to the one in the original fiasco.
232   Added one further optimization in case iro_Proj.
233   Now all features are ported for this function.
234
235   9.2.2000 Goetz
236   Updated comments in ircons.h.
237
238   9.2.2000 Goetz
239   Changed possible attribute of SymConst from type_class to type.
240   SymConst size could be the size of a union, array, ...
241
242   9.2.2000 Goetz
243   Implemented two dumpers that dump type information and a graph with
244   type information.
245
246   9.2.2000 Goetz
247   Implemented a walker that walks over the type informatin that can
248   be reached from an ir node.
249   Added routine get_kind(firm_thing) in common.h, Added file common.c.
250   Added files typewalk.ch and routines to irdump.
251   Added visited flags and initialization to entity and all types.
252   Implemented some of the missing access routines in type.c, entity.c
253
254   9.2.2000 Goetz
255   Implemented constructor for ShrA.
256   Added type struct.
257   Added routine that iterates the graph and verifies all nodes.
258   Added Phi_in stack to irgraph.  This allows to build several
259     graphs at once with respect to the Phi building algorithm.
260
261   9.2.2000 Goetz
262   Implemented dumper for control flow graphs.  Changed irr_* and dead_*
263   examples to dump cfg.
264
265   8.2.2000 Goetz
266   Implemeted explicit stack for the Phi node generation.  See ircons.c.
267
268   8.2.2000 Goetz
269   added include string.h in xoprintf.c to get rid of warning:
270   implicit declaration of function `bcopy'
271
272   7.2.2000 Goetz
273   Worked on iropt.c:
274   Added more cases to equivalent_node.
275   Portet gigo, identify, identify_remember.
276   The set/pset library can not handle several hash tables.  At least,
277   compiling several procedures causes a segmentation fault during access
278   to the tables (oo_program_example).  Need to work on this.
279   transform_node still needs to be ported.
280   some cases in equivalent_node are still missing.
281
282   To get it running I had to remove the call to optimize in the
283   new_Block constructor. It can only be called when the Block is
284   mature.
285
286   7.2.2000 Goetz
287   Introduced a walker that walks only over blocks.  The asserts
288   might be too strict for general graphs, but so far it works.
289   For the walker I introduced an additional flag in the attribute
290   of Blocks, an a global block_visited variable (in irgraph.h).
291   Furhter I modularized dump_ir_node, implemented dump_ir_graph
292   with the existing walker, and added new routines to output a
293   basic block graph.
294   Changed the examples to call the new dump routine.
295
296   7.2.2000 Goetz
297   Added auxiliary routines to ir_node:
298   skip_Proj, skip_Nop, is_Bad ...
299   Changed access routines to use get_irn_n instead of explicit array
300   accesses. Changed get_irn_n to call skip_Id, so that the access routines
301   never will return Id nodes.
302
303   3.2.2000 Goetz
304   Repaired Phi computation, changed new_r_Phi_in.  Added test program to
305   test irregular controlflow.
306
307   2.2.2000 Goetz
308   Updated optimizations computed_value and equivalent_node to new
309   Syntax of FIRM nodes and to use access routines.
310   Added routine skip_Proj in irnode.
311
312   2.2.2000 Boris Boesler
313   Added files irgwalk.c and irgwalk.h. They include a simple function to
314   traverse an ir graph and execute pre and post functions to current node.
315
316   1.2.2000 Goetz
317   Added arrays with parameters and result types to the type informtion
318   of a procedure.  This is needed for the code generation.  Also added
319   the corresponding access routines.
320   Adapted the testprograms.
321
322   1.2.2000 Goetz
323   Found a bug / complication:  the call order
324     get_value   (makes Phi0, put's it into graph_arr)
325     set_value   (overwrites Phi0 in graph_arr)
326     mature_block (upgrades Phi0, puts it again into graph_arr, overwriting
327                   the proper value.)
328   fails.  Added test wether graph_arr is already set in phi_merge.
329
330   Added tons of comments to explain Phi generation -- the stack hack.
331
332
333   27.1.2000 Goetz
334   irdump now outputs the pnc_number for projs of Cmp nodes.
335   Added routine to access the pnc_string.
336
337   27.1.2000 Goetz
338   Added result "dataseg" to Start node, with all it's consequences.
339   We need this for the compiler lab to translate global variables.
340   Now they can be selected from the data segment, and the start
341   node supplies the pointer to this segment.
342   These changes are guarded by preprocessor variable UEBPRAKT in
343   common.h
344   Changed files: common.h, irgraph.ch, irnode.h
345
346   26.1.2000 Goetz
347   Testprograms:
348   removed array_example, added array-heap_example and
349   array-stack_example and adapted makefile.
350   ir_lib:
351   Entity now also allows type_method as owner. This is to model
352   the stack, Sel nodes that select a variable (array) from the
353   stack need an entity that describes what they select.  This
354   entity gets the type of the enclosing procedure as owner.
355
356   24.1.2000 Chris
357   Added future access routines in `irmode.[ch]' as comments,
358     that all attributes in the ir_mode struct can be user-defined.
359   Added access routines in `irgraph.[ch]', for all attributes.
360
361   22.1.2000 Chris
362   Moved verify routines from `irgraph.[ch]' to own files `irvrfy.[ch]'.
363   Added `irvrfy.[ch]' to MAKEFILE
364   Added "inline" before access routines in `irnode.h', that no warnings
365     will appear furthermore.
366   Added three more access routines in `irmode.[ch]':
367         struct tarval *get_min_of_mode (ir_mode *mode);
368         struct tarval *get_max_of_mode (ir_mode *mode);
369         struct tarval *get_null_of_mode (ir_mode *mode);
370
371   21.1.2000 Goetz
372   Adaption of Alloc, Sel and Entity to new types:
373     Changed array_example to use type instead of type_class.
374     Changed entity to allow all types as owner instead of
375       only type_class.  Added routine "assert_legal_owner_of_ent(type* type)".
376     Changed alloc to allow allocating variables of any type instead of
377       only type_class.
378     Adapted all testprograms to avoid warnings.
379
380   removed dtest ... from Makefile, replaced by test.
381
382   20.1.2000 Goetz
383   Added "run" to makefile, added array_example to makefile of testprograms.
384   Corrected testprogram array
385   Changed assert in irvrfy -- Conv.
386   Started Change log.
387   Started TODO log.