[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
ooc-961107 & oo2c-0.1
Hi.
This update introduces the most simple of the loop tranformation
optimizations: loop invariant code motion. It's very cheap to run and
speeds up the oo2c executable by another few percent. With this the
oo2c/gcc combination achieves a speedup of 1.18 compared to o2c/gcc
(as always the benchmark is to compile oo2c with itself).
There have been some minor bug fixes in the front end, and some not so
minor ones in the oo2c back-end to include support for X11 libs. Some
allocation problems caused by nested procedures have been solved, too.
With this the `register' allocator is as good as it can get without a
more sophisticated scheduler, allocating an average of 4.4 `registers'
per global region for oo2c.
----
oo2c_32-0.0 has been successfully installed on the following systems:
system compiler
Linux 2.0.23 gcc 2.7.2
SunOS 4.1.2/3 gcc 2.5.5, gcc 2.7.2
Solaris 2.4 gcc 2.7.2.1, SunPRO-C 3.0.1
Solaris 2.5 [*] gcc 2.7.2.1
HP-UX A.09.01 gcc 2.5.8, c89
AIX 3.2.5 gcc 2.7.0
[*] on an UltraSPARC, compiled as 32 bit application; gc had to be
compiled with `make CC=gcc gc.a'.
I have no reports regarding BSD or IRIX systems. Chances are good
that it will install on these systems, too.
An all new and improved oo2c_32-0.1 is available on cognac (gzipped
and bzipped, in pub/ooc/oo2c). It has an adjusted configuration that
should get rid of any memcpy warnings, and it includes the X11 stuff.
-- mva
------------------------------------------------------------------------
Here is a little application to test if X11 support works:
MODULE Fern;
(* Iterated Function System, from Programming in Oberon *)
IMPORT
RandomNumbers, XYplane;
CONST
e = 64;
a1 = -0.0 ; a2 = 0.85; a3 = 0.2 ; a4 = -0.15;
b1 = 0.0 ; b2 = 0.04; b3 = -0.26; b4 = 0.28;
c1 = 0.0 ; c2 = -0.04; c3 = 0.23; c4 = 0.26;
d1 = 0.16; d2 = 0.85; d3 = 0.22; d4 = 0.24;
e1 = 0.0 ; e2 = 0.0 ; e3 = 0.0 ; e4 = 0.0 ;
f1 = 0.0 ; f2 = 1.6 ; f3 = 1.6 ; f4 = 0.44;
p1 = 0.01; p2 = 0.85; p3 = 0.07; p4 = 0.07;
PROCEDURE Draw;
VAR
X, Y, x, y: REAL;
xi, eta, x0, y0: INTEGER;
rn: REAL;
BEGIN
x0 := XYplane.W DIV 2; y0 := 0;
X := 0; Y := 0;
REPEAT
rn := RandomNumbers.Random();
IF rn < p1 THEN
x := a1 * X + b1 * Y + e1; y := c1 * X + d1 * Y + f1
ELSIF rn < (p1 + p2) THEN
x := a2 * X + b2 * Y + e2; y := c2 * X + d2 * Y + f2
ELSIF rn < (p1 + p2 + p3) THEN
x := a3 * X + b3 * Y + e3; y := c3 * X + d3 * Y + f3
ELSE
x := a4 * X + b4 * Y + e4; y := c4 * X + d4 * Y + f4
END;
X := x; xi := x0 + SHORT(ENTIER(X*e));
Y := y; eta := y0 + SHORT(ENTIER(Y*e));
XYplane.Dot(xi, eta, XYplane.draw);
UNTIL (XYplane.Key() # 0X)
END Draw;
BEGIN
XYplane.Open;
Draw
END Fern.
------------------------------------------------------------------------
ChangeLog Oct 28 to Nov 7:
Thu Nov 7 11:54:29 1996 Michael van Acken <acken@informatik.uni-kl.de>
* frontend/SymbolFile.Mod:
Changed encoding of string values to increase efficiency when
reading identifiers and string constants from symbol file.
Thu Nov 7 10:30:46 1996 Michael van Acken <acken@informatik.uni-kl.de>
* backend/ansi-c/oo2c.Mod: Option --no-rtc disables stack checks, too.
* frontend/doc/SymbolFile.ebnf:
Changed encoding of string values to increase efficiency when
reading identifiers and string constants from symbol file.
Wed Nov 6 18:05:13 1996 Michael van Acken <acken@informatik.uni-kl.de>
* backend/ansi-c/doc/ExternalC, backend/ansi-c/Build.Mod, backend/ansi-c/SystemFlags.Mod:
Split link flag ADD_OPTION into prefix and suffix.
Mon Nov 4 12:42:15 1996 Michael van Acken <acken@informatik.uni-kl.de>
* backend/ansi-c/doc/ExternalC:
Added new ADD_OPTION flag to the `link library' section.
* frontend/doc/SE0.Mod, frontend/doc/SetExtension: Initial revision
* backend/ansi-c/CodeGen.Mod:
Added loop transformation (currently this is only a simple loop
invariant code motion) to default optimizations.
* backend/ansi-c/SystemFlags.Mod (LinkSection): Added ADD_OPTION rule.
* backend/ansi-c/oo2c.Mod:
New debug option --alloc-stats to evaluate efficieny of register
allocator.
* backend/ansi-c/Build.Mod (Main):
Don't call module body if it doesn't have an initialization
function.
(LinkProgram): Add additional flags from the OPTIONS section if
required by the module.
* backend/ansi-c/GenStatm.Mod (TypeCastInstr):
Fixed cast from pointer or procedure type.
* backend/ansi-c/GenDecl.Mod (SetStructName):
Scan structure even if it has been given a name in
its symbol file.
(Declaration): Added code to add an additional pointer level to
function types. Fixed pointers to union types. Fixed struct marking
for multiple aliases for the same type.
(WriteScalarType): Modified to handle `pointer to function'
correctly.
* frontend/SideEffects.Mod (AdjustResults):
Mark any call to a procedure that won't return as
`not dead' to avoid having it removed by dead code elimination.
* frontend/ParseStatm.Mod (PredefCodeGen):
Make sure that SYSTEM.ADR always returns a LONGINT
value.
(RegisterSideEffects): Mark any call to a procedure that won't return
as `not dead' to avoid having it removed by dead code elimination.
Fri Nov 1 18:53:03 1996 Michael van Acken <acken@informatik.uni-kl.de>
* backend/ansi-c/Classify.Mod:
Fixed classification of access instructions that pass nonlocal reads
to called procedures. They are marked with `instrNoOutput' and won't
use up any registers.
* frontend/SideEffects.Mod:
Fixed adding of operands to procedure calls. Address, type tag, and
length arguments were not handled properly.
* backend/ansi-c/WriteGSAvC.Mod:
Renamed flag `instrMayTrap' to `instrNotDead'; more appropriate this
way. New flag `instrUniqueResult' for instructions whose dynamic
execution count can never be changed by a code transformation.
* backend/ansi-c/CodeGen.Mod:
Added optimization `loop transformation', id is `l'.
* backend/ansi-c/GenDecl.Mod:
Added reserved C++ words `bool', `true', and `false'.
* optimizers/LoopTransformation.Mod: Initial revision
* optimizers/ConstPropagation.Mod, optimizers/DeadCodeElimination.Mod, frontend/ParseStatm.Mod, frontend/ParseExpr.Mod, frontend/WriteGSA.Mod, frontend/Attributes.Mod, frontend/Data.Mod:
Renamed flag `instrMayTrap' to `instrNotDead'; more appropriate this
way. New flag `instrUniqueResult' for instructions whose dynamic
execution count can never be changed by a code transformation.
* frontend/Opcode.Mod:
Removed record resp. array value from argument list of `type-tag'
resp. `array-length'. This implies that these instructions may be
scheduled before the dereference (i.e. access-heap) instruction they
belong to. In particular they can be classified as loop invariant and
moved out of loops.