[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

ooc-960926



Hi.

After more than a month new sources have materialized on cognac. 

The update provides the last of the missing pieces of the the ANSI-C
back-end: the allocator now uses hierarchical graph coloring to assign
values to variables.  This means that no longer C functions with 600+
local variables are generated :-).  As far as the C back-end is
concerned there is still a lot to improve, but these enhancements are
relatively small and won't need a module of serveral hundred lines to
implement.  Right now the top of my `to do' list for the C back-end
looks like this:
 o add coalescing at gates to hierarchical graph allocator
 o suppress empty blocks in the generated code
 o try to reduce the number of `gotos' in the C code

News on the optimizer front are that constant propagation and
unreachable code elimination finally works.  `Works' defined as `being
able to bootstrap oo2c'.

There have been two additions to the list of GSA opcodes: Instructions
that do string comparisons now have 4 (instead of 2) parameters, the
3rd and 4th argument take the addresses of the compared strings.  A
new instruction `struct-copy' is introduced to handle assignments
(copying) of whole records and arrays.  Both changes were necessary
for the live range based allocator.  Especially the `struct-copy'
simplifies dealing with structured assignments considerably.

-- mva


ChangeLog Aug 16 to Sep 26:

Thu Sep 26 09:13:25 1996  Juergen Zimmermann  <jnzimmer@informatik.uni-kl.de>

	* optimizers/AliasAnalysis.Mod: Initial revision

Thu Sep 26 09:08:41 1996  Juergen Zimmermann  <jnzimmer@informatik.uni-kl.de>

	* optimizers/ConstPropagation.Mod:
	Added support for propagation of constants over disabled boundIndex or
	boundRange instructions.

	* optimizers/AlgebraicTransformation.Mod:
	Added return statements in GetOne/GetZero.

Thu Sep 26 08:41:01 1996  Juergen Zimmermann  <jnzimmer@informatik.uni-kl.de>

	* optimizers/ValueNumbering.Mod: *** empty log message ***

Thu Sep 26 08:09:05 1996  Juergen Zimmermann  <jnzimmer@informatik.uni-kl.de>

	* optimizers/Worklist.Mod:
	AddUsingInstr* added more instructions than needed, namely for not
	only for the `used' result, but for all results which followed the
	`used' one.

Wed Sep 25 15:23:08 1996  Michael van Acken  <acken@informatik.uni-kl.de>

	* frontend/ParseStatm.Mod (AssignToVar):
	Fixed obscure problem when propagating a loop gate into
	the enclosing region if the loop is guarded by a conditional
	expression.

Tue Sep 24 17:09:51 1996  Michael van Acken  <acken@informatik.uni-kl.de>

	* backend/ansi-c/Allocate.Mod (IntegrateInstruction):
	Handle the pathological case of empty live
	ranges correctly.

	* frontend/Attributes.Mod (TypeTag, ArrayLength):
	Let dead code elimination remove unused
	type-tag and array-length instructions, even if they might raise an
	exception if their argument is NIL.

	* backend/ansi-c/Allocate.Mod:
	Rewritten from scratch.  Allocation is now done by a hierarchical
	graph allocator.  Coalescing of gate arguments/gate results is not
	implemented yet.

	* frontend/SymbolFile.Mod (ReadObject):
	Set the type of the formal parameter `...' type to
	`strNone'.

	* frontend/Attributes.Mod (GetNonParamOpnd):
	Deal correctly with arguments passed to special
	formal parameter `...' (obj.mode=Data.objRestParam).

	* frontend/ParseStatm.Mod (Statement):
	Make distinction between unstructured and structured
	assignment statement.  For the latter insert an explicit `struct-copy'
	instruction.

	* frontend/ParseExpr.Mod (Designator):
	Fixed code generation for receiver of type-bound call.

	(EvalDyadicOp): Add addresses of strings to be compared to the
	instructions that model string comparisons.

	* frontend/Opcode.Mod:
	New instruction `struct-copy'.  Models assignment of whole structured
	values, e.g. when assigning a record value to a record variable.

	String compare opcodes (like eqlstr) have 4 (instead of 2) operands.
	The 3rd and 4th operands hold the addresses of the string to be
	compared.

	* frontend/Data.Mod: Made `Location' an extension of `Info'.

	* backend/ansi-c/Schedule.Mod:
	Added code to handle instruction `struct-copy'.

	* backend/ansi-c/GenStatm.Mod:
	Fixed code generation for type-bound procedure call.  String compares
	use the 3rd/4th operand of the compare instruction.  Fixed parallel
	assignment of (the live ranges of) gate arguments to their gates.
	Added code to handle instruction `struct-copy'.

	* backend/ansi-c/Classify.Mod:
	Added code to deal with opcode `struct-copy'.

	* backend/ansi-c/CodeGen.Mod (NumerateRegions):
	Use instruction list to determine the sequence of
	regions calculated by the scheduler, _not_ the region list.

Fri Sep 20 09:38:38 1996  Juergen Zimmermann  <jnzimmer@informatik.uni-kl.de>

	* optimizers/ConstPropagation.Mod:
	Added propagation of constant first operand for boundIndex/boundRange
	if the instruction is disabled.

Thu Sep 19 07:08:35 1996  Juergen Zimmermann  <jnzimmer@informatik.uni-kl.de>

	* optimizers/ConstPropagation.Mod: Cleaned up code a bit.
	Seem to work for now with the `oo2c' backend.

Sat Sep 14 16:59:12 1996  Michael van Acken  <acken@informatik.uni-kl.de>

	* optimizers/GateReduction.Mod (VisibleValue):
	Recognize redundant loop gates.  Such gates take
	either the same value as 2nd/3rd operand or the 3rd operand is the
	gate itself.

Tue Sep 10 20:47:56 1996  Juergen Zimmermann  <jnzimmer@informatik.uni-kl.de>

	* optimizers/ConstPropagation.Mod:
	Removed trial-check, which was for the wrong case and corrupted the
	whole front-end constant folding.

	Still to implement some nasty features on bound-index/-range opcodes.

	A working `oo2c' compiler could be created with this revision.

	* optimizers/RedundantGates.Mod:
	Added new type of `redundant gate' to the selection routine: If a
	loop-gate is the third operand of itself (i.e. the back-edge value),
	then the gates value is loop-invariant and can be replaced by the
	gates second operand.

Tue Sep  3 09:47:58 1996  Juergen Zimmermann  <jnzimmer@informatik.uni-kl.de>

	* optimizers/ConstPropagation.Mod:
	Do not fold bound-(index|range) during trial phase.
	Fixed problem with unhandled merges, which are operands of other,
	nonconstant merges.

Wed Aug 21 06:57:10 1996  Michael van Acken  <acken@informatik.uni-kl.de>

	* backend/demo/CodeGen.Mod, backend/demo/doc/ood, frontend/WriteGSA.Mod:
	Removed references to module TopologicalOrder, including the command
	line option --write-sorted.

Tue Aug 20 08:06:22 1996  Michael van Acken  <acken@informatik.uni-kl.de>

	* doc/Directory, README:
	Updated o2c version and current status; removed Sapir files.

Mon Aug 19 22:43:08 1996  Juergen Zimmermann  <jnzimmer@informatik.uni-kl.de>

	* optimizers/ValueNumbering.Mod:
	Put all `access' and all `update' instructions to a partition on their
	own in order to disable CSE on them for now. If we do not so, some of
	those instructions are thought of giving the same result, which they
	definitely do not! Futher investigations have to follow here...
        [ don't believe this; it's a lie ;-)  --mva ]

	* optimizers/AlgebraicTransformation.Mod: Removed some debug output