summaryrefslogtreecommitdiff
path: root/gcc/ada/exp_pakd.adb
diff options
context:
space:
mode:
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2010-06-22 17:17:57 +0000
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2010-06-22 17:17:57 +0000
commit1473b207ced691551e6d534710e14193a555323f (patch)
tree6078bcaac066b9b80d5acf54d2737daa1f56b9ed /gcc/ada/exp_pakd.adb
parentcd5e5c04568f2b4704a48818a5f3667b9e90daca (diff)
downloadgcc-1473b207ced691551e6d534710e14193a555323f.tar.gz
2010-06-22 Robert Dewar <dewar@adacore.com>
* freeze.adb: Minor reformatting Minor code reorganization (use Nkind_In and Ekind_In). 2010-06-22 Bob Duff <duff@adacore.com> * gnat1drv.adb (Gnat1drv): Remove the messages that recommend using -gnatc when a file is compiled that we cannot generate code for, not helpful and confusing. 2010-06-22 Vincent Celier <celier@adacore.com> * switch-m.adb (Normalize_Compiler_Switches): Process correctly switches -gnatknn. 2010-06-22 Paul Hilfinger <hilfinger@adacore.com> * s-rannum.adb: Replace constants with commented symbols. * s-rannum.ads: Explain significance of the initial value of the data structure. 2010-06-22 Ed Schonberg <schonberg@adacore.com> * a-ngcoty.adb: Clarify comment. 2010-06-22 Gary Dismukes <dismukes@adacore.com> * exp_pakd.adb (Expand_Bit_Packed_Element_Set): Return without expansion for indexing packed arrays with small power-of-2 component sizes when the target is AAMP. (Expand_Packed_Element_Reference): Return without expansion for indexing packed arrays with small power-of-2 component sizes when the target is AAMP. 2010-06-22 Geert Bosch <bosch@adacore.com> * exp_ch4.adb (Expand_N_In): Do not substitute a valid check for X in Float'Range. 2010-06-22 Robert Dewar <dewar@adacore.com> * g-mbdira.adb, g-mbflra.adb, a-nuflra.adb, a-nudira.adb: Minor comment updates. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@161213 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/exp_pakd.adb')
-rw-r--r--gcc/ada/exp_pakd.adb26
1 files changed, 26 insertions, 0 deletions
diff --git a/gcc/ada/exp_pakd.adb b/gcc/ada/exp_pakd.adb
index be4669ce9b8..bd8a69771a4 100644
--- a/gcc/ada/exp_pakd.adb
+++ b/gcc/ada/exp_pakd.adb
@@ -1381,6 +1381,19 @@ package body Exp_Pakd is
Analyze_And_Resolve (Rhs, Ctyp);
end if;
+ -- For the AAMP target, indexing of certain packed array is passed
+ -- through to the back end without expansion, because the expansion
+ -- results in very inefficient code on that target. This allows the
+ -- GNAAMP back end to generate specialized macros that support more
+ -- efficient indexing of packed arrays with components having sizes
+ -- that are small powers of two.
+
+ if AAMP_On_Target
+ and then (Csiz = 1 or else Csiz = 2 or else Csiz = 4)
+ then
+ return;
+ end if;
+
-- Case of component size 1,2,4 or any component size for the modular
-- case. These are the cases for which we can inline the code.
@@ -1933,6 +1946,19 @@ package body Exp_Pakd is
Ctyp := Component_Type (Atyp);
Csiz := UI_To_Int (Component_Size (Atyp));
+ -- For the AAMP target, indexing of certain packed array is passed
+ -- through to the back end without expansion, because the expansion
+ -- results in very inefficient code on that target. This allows the
+ -- GNAAMP back end to generate specialized macros that support more
+ -- efficient indexing of packed arrays with components having sizes
+ -- that are small powers of two.
+
+ if AAMP_On_Target
+ and then (Csiz = 1 or else Csiz = 2 or else Csiz = 4)
+ then
+ return;
+ end if;
+
-- Case of component size 1,2,4 or any component size for the modular
-- case. These are the cases for which we can inline the code.