aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorEric Botcazou <ebotcazou@adacore.com>2009-04-16 08:43:32 +0000
committerArnaud Charlet <charlet@gcc.gnu.org>2009-04-16 10:43:32 +0200
commit014caddba66dcce6f7abb2a2d95ec452d15e0d80 (patch)
tree1cb1d0027caffc818b3c2aa56a9a0d732935975f /gcc
parentb2ed7a03e24eec7539c7656a7aff0ea73ec73f34 (diff)
downloadgcc-014caddba66dcce6f7abb2a2d95ec452d15e0d80.zip
gcc-014caddba66dcce6f7abb2a2d95ec452d15e0d80.tar.gz
gcc-014caddba66dcce6f7abb2a2d95ec452d15e0d80.tar.bz2
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
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ada/ChangeLog5
-rw-r--r--gcc/ada/exp_ch5.adb17
2 files changed, 16 insertions, 6 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog
index 14e369d..a7e730b 100644
--- a/gcc/ada/ChangeLog
+++ b/gcc/ada/ChangeLog
@@ -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>
* gnat_ugn.texi (gnatmem description): Make it explicit that
diff --git a/gcc/ada/exp_ch5.adb b/gcc/ada/exp_ch5.adb
index 99870dc..b51e8d2 100644
--- a/gcc/ada/exp_ch5.adb
+++ b/gcc/ada/exp_ch5.adb
@@ -634,16 +634,21 @@ package body Exp_Ch5 is
end if;
end if;
- -- If after that analysis, Forwards_OK is still True, and
- -- Loop_Required is False, meaning that we have not discovered some
- -- non-overlap reason for requiring a loop, then we can still let
- -- gigi handle it.
+ -- If after that analysis Loop_Required is False, meaning that we
+ -- have not discovered some non-overlap reason for requiring a loop,
+ -- then the outcome depends on the capabilities of the back end.
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;
-- If Forwards_OK is not set, the back end will need something