tree-ssa-ccp.c (insert_clobber_before_stack_restore): Recurse on copy assignment statements.

* tree-ssa-ccp.c (insert_clobber_before_stack_restore): Recurse on copy
	assignment statements.

From-SVN: r202833
This commit is contained in:
Eric Botcazou 2013-09-23 16:07:19 +00:00 committed by Eric Botcazou
parent 5303f3a48f
commit cefce76908
6 changed files with 64 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2013-09-23 Eric Botcazou <ebotcazou@adacore.com>
* tree-ssa-ccp.c (insert_clobber_before_stack_restore): Recurse on copy
assignment statements.
2013-09-23 Kugan Vivekanandarajah <kuganv@linaro.org>
* gimple-pretty-print.c (dump_ssaname_info): New function.

View File

@ -1,3 +1,8 @@
2013-09-23 Eric Botcazou <ebotcazou@adacore.com>
* gnat.dg/opt28.ad[sb]: New test.
* gnat.dg/opt28_pkg.ads: New helper.
2013-09-23 Richard Biener <rguenther@suse.de>
PR tree-optimization/58464
@ -99,7 +104,7 @@
2013-09-18 Eric Botcazou <ebotcazou@adacore.com>
* gnat.dg/array_bounds_test2.adb: New test.
* gnat.dg/array_bounds_test2.adb: New test.
2013-09-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>

View File

@ -0,0 +1,31 @@
with Opt28_Pkg; use Opt28_Pkg;
package body Opt28 is
function Full_Filename (Filename : String) return String is
Path : constant String := "PATH";
Posix_Path : constant Posix_String := To_Posix (Path);
begin
declare
M : constant Posix_String := Value_Of (Posix_Path);
N : constant Posix_String (1 .. M'Length) := M;
Var : constant String := To_String (Str => N);
Start_Pos : Natural := 1;
End_Pos : Natural := 1;
begin
while Start_Pos <= Var'Length loop
End_Pos := Position (Var (Start_Pos .. Var'Length));
if Is_File (To_Posix (Var (Start_Pos .. End_Pos - 1) & Filename)) then
return Var (Start_Pos .. End_Pos - 1) & Filename;
else
Start_Pos := End_Pos + 1;
end if;
end loop;
end;
return "";
end;
end Opt28;

View File

@ -0,0 +1,8 @@
-- { dg-do compile }
-- { dg-options "-O2" }
package Opt28 is
function Full_Filename (Filename : String) return String;
end Opt28;

View File

@ -0,0 +1,11 @@
package Opt28_Pkg is
type Posix_String is array (Positive range <>) of aliased Character;
function To_Posix (Str : String) return Posix_String;
function To_String (Str : Posix_String) return String;
function Is_File (Str : Posix_String) return Boolean;
function Value_Of (Name : Posix_String) return Posix_String;
function Position (In_Line : String) return Natural;
end Opt28_Pkg;

View File

@ -1728,6 +1728,9 @@ insert_clobber_before_stack_restore (tree saved_val, tree var,
insert_clobber_before_stack_restore (gimple_phi_result (stmt), var,
visited);
}
else if (gimple_assign_ssa_name_copy_p (stmt))
insert_clobber_before_stack_restore (gimple_assign_lhs (stmt), var,
visited);
else
gcc_assert (is_gimple_debug (stmt));
}