|
|
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: 2006 (0x7d6)
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 Index Reference
----------------------
-- This test evaluates a code improvement potential similar to that
-- resulting from the Unroll Scalar Reference benchmark except that
-- the redefinition references a loop parameter.
-- The test procedures contain a redefinition of components of a
-- local array. Each component of the array is identified by a
-- subscript expression that uses the inner loop parameter. The
-- local array is defined so that the range of its index is
-- consistent with the larger of the two loop parameter ranges.
-- Consequently, in the optimized test procedure the opportunity to
-- individualize the redefinition of the appropriate subset of the
-- array is evidenced by a difference in the execution time of the
-- two procedures.
--
-- A component of the array is used to redefine global information
-- in order to prevent other unexpected optimizations.
procedure Louia1 is
package New_Procs is new Procs (Integer);
use New_Procs;
Local : array (1 .. 10) of T := (others => Ident (Init));
begin
Start ("LOUIA1", "Loop Optimization, Unroll Index ref. (control)");
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_Array_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 (K) := Ident (Local (K));
end loop; -- Unroll_Array_Assgnt -- included in test version
end loop;
Let (Global, Ident (Local (1)));
Let (Global, Ident (Init));
end loop;
Stop;
end Louia1;