> I've committed (r183305) a slightly changed variant that merges the two
> outer bitmap loops again, like so:
>
> + EXECUTE_IF_AND_COMPL_IN_BITMAP (work, old_conflicts, 0, i,
> bi) {
> unsigned j;
> bitmap_iterator bj;
> - EXECUTE_IF_SET_IN_BITMAP (work, i + 1, j, bj)
> + /* First the conflicts between new and old_conflicts. */
> + EXECUTE_IF_SET_IN_BITMAP (old_conflicts, 0, j, bj)
> + add_stack_var_conflict (i, j);
> + /* Then the conflicts between only the new members. */
> + EXECUTE_IF_AND_COMPL_IN_BITMAP (work, old_conflicts, i +
> 1, + j, bj)
> add_stack_var_conflict (i, j);
> }
Is it supposed to change the generated code or...? Because it has introduced
regressions in stack usage. Compile the attached testcase (stack_test.adb)
with -fstack-usage on x86-64 and you'll get 496 bytes in the .su file. If the
patch is reverted, this goes back to the expected 64 bytes.
--
Eric Botcazou
package body Pack is
function Ident_Int (X : Integer) return Integer is
begin
return X;
end Ident_Int;
procedure My_Proc (X : R) is
begin
null;
end My_Proc;
end Pack;
with Pack; use Pack;
procedure Stack_Test is
A : Integer := Ident_Int (123);
begin
case A is
when 0 =>
My_Proc (R'(Ident_Int(0), Ident_Int(1), Ident_Int(2), Ident_Int(3), Ident_Int(4), Ident_Int(5), Ident_Int(6), Ident_Int(7), Ident_Int(8), Ident_Int(9)));
when 1 =>
My_Proc (R'(Ident_Int(0), Ident_Int(1), Ident_Int(2), Ident_Int(3), Ident_Int(4), Ident_Int(5), Ident_Int(6), Ident_Int(7), Ident_Int(8), Ident_Int(9)));
when 2 =>
My_Proc (R'(Ident_Int(0), Ident_Int(1), Ident_Int(2), Ident_Int(3), Ident_Int(4), Ident_Int(5), Ident_Int(6), Ident_Int(7), Ident_Int(8), Ident_Int(9)));
when 3 =>
My_Proc (R'(Ident_Int(0), Ident_Int(1), Ident_Int(2), Ident_Int(3), Ident_Int(4), Ident_Int(5), Ident_Int(6), Ident_Int(7), Ident_Int(8), Ident_Int(9)));
when 4 =>
My_Proc (R'(Ident_Int(0), Ident_Int(1), Ident_Int(2), Ident_Int(3), Ident_Int(4), Ident_Int(5), Ident_Int(6), Ident_Int(7), Ident_Int(8), Ident_Int(9)));
when 5 =>
My_Proc (R'(Ident_Int(0), Ident_Int(1), Ident_Int(2), Ident_Int(3), Ident_Int(4), Ident_Int(5), Ident_Int(6), Ident_Int(7), Ident_Int(8), Ident_Int(9)));
when 6 =>
My_Proc (R'(Ident_Int(0), Ident_Int(1), Ident_Int(2), Ident_Int(3), Ident_Int(4), Ident_Int(5), Ident_Int(6), Ident_Int(7), Ident_Int(8), Ident_Int(9)));
when 7 =>
My_Proc (R'(Ident_Int(0), Ident_Int(1), Ident_Int(2), Ident_Int(3), Ident_Int(4), Ident_Int(5), Ident_Int(6), Ident_Int(7), Ident_Int(8), Ident_Int(9)));
when 8 =>
My_Proc (R'(Ident_Int(0), Ident_Int(1), Ident_Int(2), Ident_Int(3), Ident_Int(4), Ident_Int(5), Ident_Int(6), Ident_Int(7), Ident_Int(8), Ident_Int(9)));
when 9 =>
My_Proc (R'(Ident_Int(0), Ident_Int(1), Ident_Int(2), Ident_Int(3), Ident_Int(4), Ident_Int(5), Ident_Int(6), Ident_Int(7), Ident_Int(8), Ident_Int(9)));
when others =>
null;
end case;
end Stack_Test;
package Pack is
function Ident_Int (X : Integer) return Integer;
type R is
record
C0, C1, C2, C3, C4, C5, C6, C7, C8, C9 : Integer;
end record;
procedure My_Proc (X : R);
end Pack;