diff options
author | Jakub Jelinek <jakub@redhat.com> | 2010-08-17 20:10:20 +0200 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2010-08-17 20:10:20 +0200 |
commit | a085a55ae20e806a5168191a0a2669661d6e2d23 (patch) | |
tree | 5e5fff5764b5dfc1f78d77426ebe72d4571a8edf /gcc | |
parent | 47b914698dd6a773392a881fc5afc9b8929b324c (diff) | |
download | gcc-a085a55ae20e806a5168191a0a2669661d6e2d23.zip gcc-a085a55ae20e806a5168191a0a2669661d6e2d23.tar.gz gcc-a085a55ae20e806a5168191a0a2669661d6e2d23.tar.bz2 |
tree.h (host_integerp): Add ATTRIBUTE_PURE when not ENABLE_TREE_CHECKING.
* tree.h (host_integerp): Add ATTRIBUTE_PURE when not
ENABLE_TREE_CHECKING.
(tree_low_cst): Add inline version for !ENABLE_TREE_CHECKING
and GCC >= 4.3.
From-SVN: r163313
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 7 | ||||
-rw-r--r-- | gcc/tree.h | 14 |
2 files changed, 20 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 47aa331..a91099f 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2010-08-17 Jakub Jelinek <jakub@redhat.com> + + * tree.h (host_integerp): Add ATTRIBUTE_PURE when not + ENABLE_TREE_CHECKING. + (tree_low_cst): Add inline version for !ENABLE_TREE_CHECKING + and GCC >= 4.3. + 2010-08-17 H.J. Lu <hongjiu.lu@intel.com> * config/i386/i386.c (ix86_lea_for_add_ok): For !TARGET_OPT_AGU @@ -4099,8 +4099,20 @@ extern int attribute_list_contained (const_tree, const_tree); extern int tree_int_cst_equal (const_tree, const_tree); extern int tree_int_cst_lt (const_tree, const_tree); extern int tree_int_cst_compare (const_tree, const_tree); -extern int host_integerp (const_tree, int); +extern int host_integerp (const_tree, int) +#ifndef ENABLE_TREE_CHECKING + ATTRIBUTE_PURE /* host_integerp is pure only when checking is disabled. */ +#endif + ; extern HOST_WIDE_INT tree_low_cst (const_tree, int); +#if !defined ENABLE_TREE_CHECKING && (GCC_VERSION >= 4003) +extern inline __attribute__ ((__gnu_inline__)) HOST_WIDE_INT +tree_low_cst (const_tree t, int pos) +{ + gcc_assert (host_integerp (t, pos)); + return TREE_INT_CST_LOW (t); +} +#endif extern int tree_int_cst_msb (const_tree); extern int tree_int_cst_sgn (const_tree); extern int tree_int_cst_sign_bit (const_tree); |