diff options
author | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-04-16 08:43:32 +0000 |
---|---|---|
committer | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-04-16 08:43:32 +0000 |
commit | 0650d72b889fc555f6a115225b58e7828b54b0ea (patch) | |
tree | 1cb1d0027caffc818b3c2aa56a9a0d732935975f /gcc/ada/exp_ch5.adb | |
parent | 50fa76135f8430273372a03baa627cbdf607b241 (diff) | |
download | gcc-0650d72b889fc555f6a115225b58e7828b54b0ea.tar.gz |
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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@146150 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/exp_ch5.adb')
-rw-r--r-- | gcc/ada/exp_ch5.adb | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/gcc/ada/exp_ch5.adb b/gcc/ada/exp_ch5.adb index 99870dc873d..b51e8d2afa5 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 |