DataMuseum.dk

Presents historical artifacts from the history of:

Rational R1000/400 Tapes

This is an automatic "excavation" of a thematic subset of
artifacts from Datamuseum.dk's BitArchive.

See our Wiki for more about Rational R1000/400 Tapes

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - metrics - download
Index: B T

⟦b92fb7daf⟧ TextFile

    Length: 1845 (0x735)
    Types: TextFile
    Names: »B«

Derivation

└─⟦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⟧ 

TextFile

with Instrument;
use Instrument;

-----------------------------
-- Nested Expression Computation
-----------------------------

--  This test evaluates a code improvement potential similar to  that
--  resulting from the Expression Computation benchmark.

--  The  two  test  procedures  are  identical  to   the   Expression
--  Computation  test  procedures  except that the loop enclosing the
--  redefinition of Local_1 is enclosed within an outer loop in  each
--  procedure.   Consequently,  in  the  optimized test procedure the
--  opportunity is offered  to  relocate  the  invariant  computation
--  outside of the two loop bodies and is evidenced by an increase in
--  the difference in the execution times of the two procedures.

--  The camouflaged discrete ranges of the two loops  safeguard  loop
--  transformations that would invalidate the benchmark.

procedure Lonea1 is

    package New_Procs is new Procs (Integer);
    use New_Procs;

    Local_1, Local_2, Local_3 : T := Ident (Init / Init);

begin

    Start ("LONEA1", "Loop Optimization, Nested Expr. comp. (control)");
    for I in 1 .. 1000 loop

        Let (Global, Ident (Init));

        for J in Ident (T'Val (1)) .. Ident (T'Val (10)) loop

            for K in Ident (T'Val (1)) .. Ident (T'Val (10)) loop

                -----optimize----
                --        Let(Local_1, Ident(T(T(Local_2 * Local_3)/Local_1)));
                -- included in test version
                Let (Local_2, Ident (T (T (Local_2 * Local_3) / Local_1)));
                -- included in control version

            end loop;

        end loop;

        --  Let(Global, Ident(Local_1));         -- included in test version
        Let (Global, Ident (Local_2));         -- included in control version

        Let (Global, Ident (Init));

    end loop;
    Stop;

end Lonea1;