|
|
DataMuseum.dkPresents historical artifacts from the history of: Rational R1000/400 Tapes |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about Rational R1000/400 Tapes Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - metrics - downloadIndex: B T
Length: 1922 (0x782)
Types: TextFile
Names: »B«
└─⟦180fe333a⟧ Bits:30000405 8mm tape, Rational 1000, SW CATALOG, 10_20_0
└─⟦180fe333a⟧ Bits:30000537 8mm tape, Rational 1000, SW Catalog 10_20_0
└─⟦5cb1d1d7f⟧ »DATA«
└─⟦3b1ee7bd8⟧
└─⟦this⟧
with Instrument;
use Instrument;
-----------------------
-- Unroll Scalar Reference
-----------------------
-- This test evaluates a code improvement potential that results
-- from replicating operations when the opportunity is offered to
-- unroll a simple redefinition enclosed in a loop.
-- The test procedures contain a redefinition of a local variable,
-- Local_1, enclosed by two loops. The unrolling of the inner loop
-- in the optimized test procedure is evidenced by a difference in
-- the execution time and space requirements of the two procedures.
-- The redefinition is adequately camouflaged to prevent the
-- elimination of the inner loop in the optimized test procedure and
-- relocation of the redefinition in the nonoptimized test
-- procedure.
-- The camouflaged redefinition of Global_1 using the local variable
-- ensures that other unexpected optimizations do not invalidate the
-- benchmark.
procedure Lousa2 is
package New_Procs is new Procs (Integer);
use New_Procs;
Local_1 : T := Ident (Init);
begin
Start ("LOUSA2", "Loop Optimization, Unroll Scalar (test)");
for I in 1 .. 10000 loop
Let (Global, Ident (Init));
for J in Ident (T (1)) .. Ident (T (10)) loop
-- included in test version
-- for J in Ident(T(1)) .. Ident(T(2)) loop -- included in control version
Unroll_Scalar_Assgnt:
-- included in test version
for K in 1 .. 2 loop
-- included in test version
-- for K in 1 .. 10 loop -- included in control version
Local_1 := Ident (Local_1);
end loop Unroll_Scalar_Assgnt; -- included in test version
end loop;
Let (Global, Ident (Local_1));
Let (Global, Ident (Init));
end loop;
Stop;
end Lousa2;