GCC is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2, or (at your option)
+the Free Software Foundation; either version 3, or (at your option)
any later version.
GCC is distributed in the hope that it will be useful,
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
-along with GCC; see the file COPYING. If not, write to
-the Free Software Foundation, 51 Franklin Street, Fifth Floor,
-Boston, MA 02110-1301, USA. */
+along with GCC; see the file COPYING3. If not see
+<http://www.gnu.org/licenses/>. */
#include "config.h"
#include "system.h"
static hashval_t
avail_expr_hash (const void *p)
{
- tree stmt = ((struct expr_hash_elt *)p)->stmt;
- tree rhs = ((struct expr_hash_elt *)p)->rhs;
+ tree stmt = ((const struct expr_hash_elt *)p)->stmt;
+ tree rhs = ((const struct expr_hash_elt *)p)->rhs;
tree vuse;
ssa_op_iter iter;
hashval_t val = 0;
static int
avail_expr_eq (const void *p1, const void *p2)
{
- tree stmt1 = ((struct expr_hash_elt *)p1)->stmt;
- tree rhs1 = ((struct expr_hash_elt *)p1)->rhs;
- tree stmt2 = ((struct expr_hash_elt *)p2)->stmt;
- tree rhs2 = ((struct expr_hash_elt *)p2)->rhs;
+ tree stmt1 = ((const struct expr_hash_elt *)p1)->stmt;
+ tree rhs1 = ((const struct expr_hash_elt *)p1)->rhs;
+ tree stmt2 = ((const struct expr_hash_elt *)p2)->stmt;
+ tree rhs2 = ((const struct expr_hash_elt *)p2)->rhs;
/* If they are the same physical expression, return true. */
if (rhs1 == rhs2 && stmt1 == stmt2)
&& operand_equal_p (rhs1, rhs2, OEP_PURE_SAME))
{
bool ret = compare_ssa_operands_equal (stmt1, stmt2, SSA_OP_VUSE);
- gcc_assert (!ret || ((struct expr_hash_elt *)p1)->hash
- == ((struct expr_hash_elt *)p2)->hash);
+ gcc_assert (!ret || ((const struct expr_hash_elt *)p1)->hash
+ == ((const struct expr_hash_elt *)p2)->hash);
return ret;
}