|
|
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: 2548 (0x9f4)
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;
-----------------
-- Store Elimination
-----------------
-- This test evaluates a code improvement potential that results
-- from the elimination of operations that store values when the
-- opportunity is offered to propagate these values.
-- The optimized test procedure evaluates two expressions that
-- redefine Global_1 and Global_2. These variables are immediately
-- redefined using their current values thereby allowing these
-- values to be propagated rather than explicitly stored.
-- The nonoptimized test procedure inhibits the optimization by
-- introducing a call to a procedure in the basic block that
-- necessitates that Global_1 and Global_2 be defined since their
-- values can no longer be safely propagated. The final expressions
-- redefining these variables must preclude legitimate optimizations
-- that may occur when the offered one is not recognized or chosen.
-- Typically this will result in an elimination of redundant stores
-- by virtue of the expression structure where the redefinition of
-- Global_1 and Global_2 is performed without additional stores.
procedure Opsea2 is
package New_Procs is new Procs (Integer);
use New_Procs;
Global_1 : T;
Global_2 : T;
Global_3 : T;
Global_4 : T;
Global_5 : T;
procedure Break_Basic_Block is
begin
Let (Global_1, Ident (Init / Init));
Let (Global_2, Ident (Init / Init));
Let (Global_3, Ident (Init / Init));
Let (Global_4, Ident (Init / Init));
Let (Global_5, Ident (Init / Init));
end Break_Basic_Block;
begin
Start ("OPSEA2", "Optimization Perf., Store Elim. (test)");
for I in 1 .. 1000 loop
Let (Global_1, Ident (Init / Init));
Let (Global_2, Ident (Init / Init));
Let (Global_3, Ident (Init / Init));
Let (Global_4, Ident (Init / Init));
Let (Global_5, Ident (Init / Init));
Global_1 := Global_4 + Global_5;
Global_2 := Global_4 - Global_5;
-- Break_Basic_Block; -- included in control version
Global_1 := Global_3 - Global_1;
Global_2 := Global_3 + Global_2;
Break_Basic_Block; -- included in test version
Let (Global_1, Ident (Init / Init));
Let (Global_2, Ident (Init / Init));
Let (Global_3, Ident (Init / Init));
Let (Global_4, Ident (Init / Init));
Let (Global_5, Ident (Init / Init));
end loop;
Stop;
end Opsea2;