888530db28752b1a23ee2d05f80b2a30ac697229
[libfirm] / Changes
1   15.8.2000 Goetz
2   looking at bug in dead_node_elimination.
3   Following fixes:
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.
8
9   2.8.2000 Goetz
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
13   is less effective.
14   Also made some changes to optimizations of Not.
15
16   31.7.2000 Chris
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.
20
21   20.7.2000 Goetz
22   Fixed bug in optimize(). Returned Null instead n if
23   get_optimize() == false.
24
25   19.7.2000 Christian
26   Added some access routines in type.[hc]. Solved a recursive definition
27   of type_class struct, entity struct and type union.
28
29   18.7.2000 Goetz
30   Separated entity header into pure functional header and header
31   with data types.
32
33   Goetz
34   ... a bunch small changes not documented
35
36   12.7.2000 Goetz
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.
41
42   12.7.2000 Goetz
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
46   for this.
47   Added fields sub and super to type_class for inheritance.
48   Added field main_irg to irprog.
49
50   7.7.2000 Chris
51   Fixed some bugs in irgopt.c
52   Added some missing 'get_new_node' methods, so the new obstack contains
53   the correct nodes.
54
55   6.7.2000 Chris
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.
59
60   6.7.2000 Goetz
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.
64
65   5.7.2000 Goetz
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.
82
83   4.7.2000 Goetz
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.
90
91   29.6.2000 Chris
92   Changed the irnode attribut 'visit' into 'visited'.
93   Added some access functions, like get/set_irn_visit etc.
94
95   28.6.2000 Chris
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.
100
101   26.6.2000 Chris
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.
106
107   19.6.2000 Chris
108   Solved some problems in the 'copy_node' function. The in array was not
109   as easy as it seamed.
110
111   16.6.2000 Chris
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'.
114
115   14.6.2000 Chris
116   Moved 'optimze_in_place_wrapper' from iropt.* tothe new files irgopt.*.
117   New functions 'local_optimze_graph' and 'dead_node_elimination' are added,
118   but not finished.
119
120   31.5.2000 Chris
121   Removed some files from the archive, after dependencies and usage are
122   checked:
123   - 'ir/common/strerror.c'
124   was nowhere used;
125   - 'ir/ident/xx_ident.h'
126   an empty file, only included by 'ident.c', but never used;
127   - 'ir/tv/label.c' and
128   - 'ir/tv/label.h'
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.
135
136   26.5.2000 Chris
137   Moved the 'new_ir_node' constructor from ircons.* to irnode.* and fixed
138   afterwards some recursive includes, so libfirm works again.
139
140   2+3.2000 Goetz
141   Did a lot of changes, which I never commented until now (4.7.00).
142
143   * Added new result to Start node: Pointer to global data segment.
144   * Extended Semantics of SymConst node to represent information for the
145     linker.
146   * Added arithmeitc nodes (Shrs, Minus ...)
147
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
157     /ident:
158   include:  external files needen as includes
159   testprograms: examples to test the lib.
160
161   The makefiles generate files with extension .d that contain the dependencies
162   between the files.
163
164   15.2.2000 Goetz
165   Added access routine to attribute link of irnode in irnode.ch.
166   Added get_negated_pnc to irnode.ch.
167
168   14.2.2000 Goetz
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
174   flow.
175   Added call to optimize_in_place in mature_block. Is this useful?
176
177   10.2.2000 Goetz
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
181
182   10.2.2000 Goetz
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.
189
190   10.2.2000 Goetz
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.
194
195   9.2.2000 Goetz
196   Updated comments in ircons.h.
197
198   9.2.2000 Goetz
199   Changed possible attribute of SymConst from type_class to type.
200   SymConst size could be the size of a union, array, ...
201
202   9.2.2000 Goetz
203   Implemented two dumpers that dump type information and a graph with
204   type information.
205
206   9.2.2000 Goetz
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
213
214   9.2.2000 Goetz
215   Implemented constructor for ShrA.
216   Added type struct.
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.
220
221   9.2.2000 Goetz
222   Implemented dumper for control flow graphs.  Changed irr_* and dead_*
223   examples to dump cfg.
224
225   8.2.2000 Goetz
226   Implemeted explicit stack for the Phi node generation.  See ircons.c.
227
228   8.2.2000 Goetz
229   added include string.h in xoprintf.c to get rid of warning:
230   implicit declaration of function `bcopy'
231
232   7.2.2000 Goetz
233   Worked on iropt.c:
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.
241
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
244   mature.
245
246   7.2.2000 Goetz
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
253   basic block graph.
254   Changed the examples to call the new dump routine.
255
256   7.2.2000 Goetz
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.
262
263   3.2.2000 Goetz
264   Repaired Phi computation, changed new_r_Phi_in.  Added test program to
265   test irregular controlflow.
266
267   2.2.2000 Goetz
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.
271
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.
275
276   1.2.2000 Goetz
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.
281
282   1.2.2000 Goetz
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
287                   the proper value.)
288   fails.  Added test wether graph_arr is already set in phi_merge.
289
290   Added tons of comments to explain Phi generation -- the stack hack.
291
292
293   27.1.2000 Goetz
294   irdump now outputs the pnc_number for projs of Cmp nodes.
295   Added routine to access the pnc_string.
296
297   27.1.2000 Goetz
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
303   common.h
304   Changed files: common.h, irgraph.ch, irnode.h
305
306   26.1.2000 Goetz
307   Testprograms:
308   removed array_example, added array-heap_example and
309   array-stack_example and adapted makefile.
310   ir_lib:
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.
315
316   24.1.2000 Chris
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.
320
321   22.1.2000 Chris
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);
330
331   21.1.2000 Goetz
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
337       only type_class.
338     Adapted all testprograms to avoid warnings.
339
340   removed dtest ... from Makefile, replaced by test.
341
342   20.1.2000 Goetz
343   Added "run" to makefile, added array_example to makefile of testprograms.
344   Corrected testprogram array
345   Changed assert in irvrfy -- Conv.
346   Started Change log.
347   Started TODO log.