tree-ssa-loop-ivopts.c (may_be_nonaddressable_p): Return true for non-addressable GIMPLE operands.
* tree-ssa-loop-ivopts.c (may_be_nonaddressable_p) <VIEW_CONVERT_EXPR>: Return true for non-addressable GIMPLE operands. From-SVN: r140941
This commit is contained in:
parent
d208e2d242
commit
cf9322ca65
|
@ -1,3 +1,8 @@
|
|||
2008-10-07 Eric Botcazou <ebotcazou@adacore.com>
|
||||
|
||||
* tree-ssa-loop-ivopts.c (may_be_nonaddressable_p) <VIEW_CONVERT_EXPR>:
|
||||
Return true for non-addressable GIMPLE operands.
|
||||
|
||||
2008-10-07 H.J. Lu <hongjiu.lu@intel.com>
|
||||
|
||||
PR target/24765
|
||||
|
|
|
@ -1,3 +1,8 @@
|
|||
2008-10-07 Eric Botcazou <ebotcazou@adacore.com>
|
||||
|
||||
* gnat.dg/loop_optimization4.adb: New test.
|
||||
* gnat.dg/loop_optimization4_pkg.ad[sb]: New helper.
|
||||
|
||||
2008-10-07 Bob Wilson <bob.wilson@acm.org>
|
||||
|
||||
* gcc.dg/compat/struct-layout-1_generate.c (dg_options): New. Moved
|
||||
|
|
|
@ -0,0 +1,9 @@
|
|||
-- { dg-do run }
|
||||
-- { dg-options "-O2" }
|
||||
|
||||
with Loop_Optimization4_Pkg; use Loop_Optimization4_Pkg;
|
||||
|
||||
procedure Loop_Optimization4 is
|
||||
begin
|
||||
Add ("Nothing");
|
||||
end;
|
|
@ -0,0 +1,17 @@
|
|||
package body Loop_Optimization4_Pkg is
|
||||
|
||||
procedure Add (Phrase : String) is
|
||||
begin
|
||||
if Debug_Buffer_Len = Max_Debug_Buffer_Len then
|
||||
return;
|
||||
end if;
|
||||
for I in Phrase'Range loop
|
||||
Debug_Buffer_Len := Debug_Buffer_Len + 1;
|
||||
Debug_Buffer (Debug_Buffer_Len) := Phrase (I);
|
||||
if Debug_Buffer_Len = Max_Debug_Buffer_Len then
|
||||
exit;
|
||||
end if;
|
||||
end loop;
|
||||
end Add;
|
||||
|
||||
end Loop_Optimization4_Pkg;
|
|
@ -0,0 +1,9 @@
|
|||
package Loop_Optimization4_Pkg is
|
||||
|
||||
Max_Debug_Buffer_Len : Natural := 8 * 1024;
|
||||
Debug_Buffer : String (1 .. Max_Debug_Buffer_Len);
|
||||
Debug_Buffer_Len : Natural range 0 .. Max_Debug_Buffer_Len;
|
||||
|
||||
procedure Add (Phrase : String);
|
||||
|
||||
end Loop_Optimization4_Pkg;
|
|
@ -1558,7 +1558,7 @@ may_be_nonaddressable_p (tree expr)
|
|||
non-addressability may be uncovered again, causing ADDR_EXPRs
|
||||
of inappropriate objects to be built. */
|
||||
if (is_gimple_reg (TREE_OPERAND (expr, 0))
|
||||
|| is_gimple_min_invariant (TREE_OPERAND (expr, 0)))
|
||||
|| !is_gimple_addressable (TREE_OPERAND (expr, 0)))
|
||||
return true;
|
||||
|
||||
/* ... fall through ... */
|
||||
|
|
Loading…
Reference in New Issue