diff options
author | Richard Sandiford <rdsandiford@googlemail.com> | 2010-07-04 22:13:09 +0000 |
---|---|---|
committer | Richard Sandiford <rsandifo@gcc.gnu.org> | 2010-07-04 22:13:09 +0000 |
commit | 947131ba4e351e264f3aa3a7ccd6b0c82bcc7ebd (patch) | |
tree | c58b0fad8bf6ca1d17ba2102d04c971975a84d81 /gcc/tree-ssa-math-opts.c | |
parent | 47e5ff44ccdcf7c7936ad91d07b78cbf64d430d1 (diff) | |
download | gcc-947131ba4e351e264f3aa3a7ccd6b0c82bcc7ebd.zip gcc-947131ba4e351e264f3aa3a7ccd6b0c82bcc7ebd.tar.gz gcc-947131ba4e351e264f3aa3a7ccd6b0c82bcc7ebd.tar.bz2 |
optabs.h (optab_handler, [...]): Turn into inline functions that return an insn code.
gcc/
* optabs.h (optab_handler, convert_optab_handler): Turn into
inline functions that return an insn code.
(set_optab_handler, set_convert_optab_handler): New functions.
* builtins.c: Replace optab_handler(X)->insn_code with
optab_handler or set_optab_handler thoughout. Likewise
convert_optab_handler(X)->insn_code with convert_optab_handler
and set_convert_optab_handler.
* expmed.c, expr.c, genopinit.c, ifcvt.c, optabs.c, reload.c,
reload1.c, stmt.c, targhooks.c, tree-ssa-loop-prefetch.c,
tree-ssa-math-opts.c, tree-vect-data-refs.c, tree-vect-generic.c,
tree-vect-loop.c, tree-vect-patterns.c, tree-vect-slp.c,
tree-vect-stmts.c, config/m32c/m32c.c, config/rs6000/rs6000.c,
config/spu/spu.c: Likewise.
From-SVN: r161808
Diffstat (limited to 'gcc/tree-ssa-math-opts.c')
-rw-r--r-- | gcc/tree-ssa-math-opts.c | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/gcc/tree-ssa-math-opts.c b/gcc/tree-ssa-math-opts.c index c8c6492..9a8b13f 100644 --- a/gcc/tree-ssa-math-opts.c +++ b/gcc/tree-ssa-math-opts.c @@ -1113,11 +1113,9 @@ execute_optimize_bswap (void) return 0; bswap32_p = (built_in_decls[BUILT_IN_BSWAP32] - && optab_handler (bswap_optab, SImode)->insn_code != - CODE_FOR_nothing); + && optab_handler (bswap_optab, SImode) != CODE_FOR_nothing); bswap64_p = (built_in_decls[BUILT_IN_BSWAP64] - && (optab_handler (bswap_optab, DImode)->insn_code != - CODE_FOR_nothing + && (optab_handler (bswap_optab, DImode) != CODE_FOR_nothing || (bswap32_p && word_mode == SImode))); if (!bswap32_p && !bswap64_p) @@ -1324,17 +1322,17 @@ convert_mult_to_widen (gimple stmt) if ((rhs1_stmt == NULL || TYPE_UNSIGNED (type1)) && (rhs2_stmt == NULL || TYPE_UNSIGNED (type2)) && (optab_handler (umul_widen_optab, TYPE_MODE (type)) - ->insn_code == CODE_FOR_nothing)) + == CODE_FOR_nothing)) return false; else if ((rhs1_stmt == NULL || !TYPE_UNSIGNED (type1)) && (rhs2_stmt == NULL || !TYPE_UNSIGNED (type2)) && (optab_handler (smul_widen_optab, TYPE_MODE (type)) - ->insn_code == CODE_FOR_nothing)) + == CODE_FOR_nothing)) return false; else if (rhs1_stmt != NULL && rhs2_stmt != NULL && (TYPE_UNSIGNED (type1) != TYPE_UNSIGNED (type2)) && (optab_handler (usmul_widen_optab, TYPE_MODE (type)) - ->insn_code == CODE_FOR_nothing)) + == CODE_FOR_nothing)) return false; if ((rhs1_stmt == NULL && !int_fits_type_p (rhs1, type2)) @@ -1385,8 +1383,7 @@ convert_plusminus_to_widen (gimple_stmt_iterator *gsi, gimple stmt, accumulate in this mode/signedness combination, otherwise this transformation is likely to pessimize code. */ this_optab = optab_for_tree_code (wmult_code, type, optab_default); - if (optab_handler (this_optab, TYPE_MODE (type))->insn_code - == CODE_FOR_nothing) + if (optab_handler (this_optab, TYPE_MODE (type)) == CODE_FOR_nothing) return false; rhs1 = gimple_assign_rhs1 (stmt); |