diff options
author | Eric Botcazou <ebotcazou@adacore.com> | 2015-10-02 09:18:34 +0000 |
---|---|---|
committer | Eric Botcazou <ebotcazou@gcc.gnu.org> | 2015-10-02 09:18:34 +0000 |
commit | 1ddde8dca28e6e8d35db1782938d33e5320145e2 (patch) | |
tree | 0c86523efe143f65b5f0ec98fe758a0d5d63d52a /gcc/ada/gcc-interface/ada-tree.h | |
parent | 7262aee97867264a6cd283ea8a7739c5dfcf13f7 (diff) | |
download | gcc-1ddde8dca28e6e8d35db1782938d33e5320145e2.zip gcc-1ddde8dca28e6e8d35db1782938d33e5320145e2.tar.gz gcc-1ddde8dca28e6e8d35db1782938d33e5320145e2.tar.bz2 |
ada-tree.h (DECL_RESTRICTED_ALIASING_P): New flag.
* gcc-interface/ada-tree.h (DECL_RESTRICTED_ALIASING_P): New flag.
* gcc-interface/decl.c (gnat_to_gnu_param): For parameters passed by
reference but whose type isn't by-ref and whose mechanism hasn't been
forced to by-ref, set the DECL_RESTRICTED_ALIASING_P flag directly on
them instead of changing their type.
* gcc-interface/trans.c (scan_rhs_r): New helper function.
(independent_iterations_p): New predicate.
(Loop_Statement_to_gnu): For a loop with an iteration scheme, set an
ivdep pragma if the iterations are independent.
From-SVN: r228377
Diffstat (limited to 'gcc/ada/gcc-interface/ada-tree.h')
-rw-r--r-- | gcc/ada/gcc-interface/ada-tree.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/gcc/ada/gcc-interface/ada-tree.h b/gcc/ada/gcc-interface/ada-tree.h index 5f6d0a1..6864451 100644 --- a/gcc/ada/gcc-interface/ada-tree.h +++ b/gcc/ada/gcc-interface/ada-tree.h @@ -369,6 +369,21 @@ do { \ in the main unit, i.e. the full declaration is available. */ #define DECL_TAFT_TYPE_P(NODE) DECL_LANG_FLAG_0 (TYPE_DECL_CHECK (NODE)) +/* Nonzero in a PARM_DECL passed by reference but for which only a restricted + form of aliasing is allowed. The first restriction comes explicitly from + the RM 6.2(12) clause: there is no read-after-write dependency between a + store based on such a PARM_DECL and a load not based on this PARM_DECL, + so stores based on such PARM_DECLs can be sunk past all loads based on + a distinct object. The second restriction can be inferred from the same + clause: there is no write-after-write dependency between a store based + on such a PARM_DECL and a store based on a distinct such PARM_DECL, as + the compiler would be allowed to pass the parameters by copy and the + order of assignment to actual parameters after a call is arbitrary as + per the RM 6.4.1(17) clause, so stores based on distinct such PARM_DECLs + can be swapped. */ +#define DECL_RESTRICTED_ALIASING_P(NODE) \ + DECL_LANG_FLAG_0 (PARM_DECL_CHECK (NODE)) + /* Nonzero in a DECL if it is always used by reference, i.e. an INDIRECT_REF is needed to access the object. */ #define DECL_BY_REF_P(NODE) DECL_LANG_FLAG_1 (NODE) |