mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-02-23 09:49:31 +08:00
exp_ch5.adb (Expand_Assign_Array): For the GCC back-end, do not generate an assignment loop in case of overlap.
2009-04-16 Eric Botcazou <ebotcazou@adacore.com> * exp_ch5.adb (Expand_Assign_Array): For the GCC back-end, do not generate an assignment loop in case of overlap. From-SVN: r146150
This commit is contained in:
parent
b2ed7a03e2
commit
014caddba6
@ -1,3 +1,8 @@
|
|||||||
|
2009-04-16 Eric Botcazou <ebotcazou@adacore.com>
|
||||||
|
|
||||||
|
* exp_ch5.adb (Expand_Assign_Array): For the GCC back-end, do not
|
||||||
|
generate an assignment loop in case of overlap.
|
||||||
|
|
||||||
2009-04-16 Olivier Hainque <hainque@adacore.com>
|
2009-04-16 Olivier Hainque <hainque@adacore.com>
|
||||||
|
|
||||||
* gnat_ugn.texi (gnatmem description): Make it explicit that
|
* gnat_ugn.texi (gnatmem description): Make it explicit that
|
||||||
|
@ -634,16 +634,21 @@ package body Exp_Ch5 is
|
|||||||
end if;
|
end if;
|
||||||
end if;
|
end if;
|
||||||
|
|
||||||
-- If after that analysis, Forwards_OK is still True, and
|
-- If after that analysis Loop_Required is False, meaning that we
|
||||||
-- Loop_Required is False, meaning that we have not discovered some
|
-- have not discovered some non-overlap reason for requiring a loop,
|
||||||
-- non-overlap reason for requiring a loop, then we can still let
|
-- then the outcome depends on the capabilities of the back end.
|
||||||
-- gigi handle it.
|
|
||||||
|
|
||||||
if not Loop_Required then
|
if not Loop_Required then
|
||||||
|
|
||||||
-- Assume gigi can handle it if Forwards_OK is set
|
-- The GCC back end can deal with all cases of overlap by falling
|
||||||
|
-- back to memmove if it cannot use a more efficient approach.
|
||||||
|
|
||||||
if Forwards_OK (N) then
|
if VM_Target = No_VM and not AAMP_On_Target then
|
||||||
|
return;
|
||||||
|
|
||||||
|
-- Assume other back ends can handle it if Forwards_OK is set
|
||||||
|
|
||||||
|
elsif Forwards_OK (N) then
|
||||||
return;
|
return;
|
||||||
|
|
||||||
-- If Forwards_OK is not set, the back end will need something
|
-- If Forwards_OK is not set, the back end will need something
|
||||||
|
Loading…
Reference in New Issue
Block a user