Commit f23585f1 by Robert Dewar Committed by Arnaud Charlet

exp_ch5.adb: Activate memmove type processing if debug flag d.s is set

2007-09-26  Robert Dewar  <dewar@adacore.com>

	* exp_ch5.adb: Activate memmove type processing if debug flag d.s is set

	* debug.adb: Add d.s flag.

From-SVN: r128787
parent fdce4bb7
...@@ -111,7 +111,7 @@ package body Debug is ...@@ -111,7 +111,7 @@ package body Debug is
-- d.p -- d.p
-- d.q -- d.q
-- d.r -- d.r
-- d.s -- d.s Disable expansion of slice move, use memmove
-- d.t Disable static allocation of library level dispatch tables -- d.t Disable static allocation of library level dispatch tables
-- d.u -- d.u
-- d.v -- d.v
...@@ -514,6 +514,11 @@ package body Debug is ...@@ -514,6 +514,11 @@ package body Debug is
-- main source (this corresponds to a previous behavior of -gnatl and -- main source (this corresponds to a previous behavior of -gnatl and
-- is used for running the ACATS tests). -- is used for running the ACATS tests).
-- d.s Normally the compiler expands slice moves into loops if overlap
-- might be possible. This debug flag inhibits that expansion, and
-- the back end is expected to use an appropriate routine to handle
-- overlap, based on Forward_OK and Backwards_OK flags.
-- d.t The compiler has been modified (a fairly extensive modification) -- d.t The compiler has been modified (a fairly extensive modification)
-- to generate static dispatch tables for library level tagged types. -- to generate static dispatch tables for library level tagged types.
-- This debug switch disables this modification and reverts to the -- This debug switch disables this modification and reverts to the
......
...@@ -387,7 +387,7 @@ package body Exp_Ch5 is ...@@ -387,7 +387,7 @@ package body Exp_Ch5 is
-- File.Storage := Contents; -- File.Storage := Contents;
-- end Write_All; -- end Write_All;
-- We expand to a loop in either of these two cases. -- We expand to a loop in either of these two cases
-- Question for future thought. Another potentially more efficient -- Question for future thought. Another potentially more efficient
-- approach would be to create the actual subtype, and then do an -- approach would be to create the actual subtype, and then do an
...@@ -636,11 +636,18 @@ package body Exp_Ch5 is ...@@ -636,11 +636,18 @@ package body Exp_Ch5 is
-- gigi handle it. -- gigi handle it.
if not Loop_Required then if not Loop_Required then
-- Assume gigi can handle it if Forwards_OK is set
if Forwards_OK (N) then if Forwards_OK (N) then
return; return;
else
null; -- If Forwards_OK is not set, the back end will need something
-- Here is where a memmove would be appropriate ??? -- like memmove to handle the move. For now, this processing is
-- activated using the .s debug flag (-gnatd.s).
elsif Debug_Flag_Dot_S then
return;
end if; end if;
end if; end if;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment