From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 102695 invoked by alias); 14 Aug 2017 19:26:07 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 73057 invoked by uid 89); 14 Aug 2017 19:25:22 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy= X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 14 Aug 2017 19:25:18 +0000 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 6128B83F43; Mon, 14 Aug 2017 19:25:17 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 6128B83F43 Authentication-Results: ext-mx03.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx03.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=law@redhat.com Received: from localhost.localdomain (ovpn-116-113.phx2.redhat.com [10.3.116.113]) by smtp.corp.redhat.com (Postfix) with ESMTP id 2F1B9600CE; Mon, 14 Aug 2017 19:25:17 +0000 (UTC) Subject: Re: [20/77] Replace MODE_INT checks with is_int_mode To: gcc-patches@gcc.gnu.org, richard.sandiford@linaro.org References: <8760ewohsv.fsf@linaro.org> <87r2xkk9mi.fsf@linaro.org> From: Jeff Law Message-ID: <71071dda-1cb4-a3e5-5933-a29129fdb747@redhat.com> Date: Mon, 14 Aug 2017 19:32:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-Version: 1.0 In-Reply-To: <87r2xkk9mi.fsf@linaro.org> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-IsSubscribed: yes X-SW-Source: 2017-08/txt/msg00898.txt.bz2 On 07/13/2017 02:45 AM, Richard Sandiford wrote: > Replace checks of "GET_MODE_CLASS (...) == MODE_INT" with > "is_int_mode (..., &var)", in cases where it becomes useful > to refer to the mode as a scalar_int_mode. > > 2017-07-13 Richard Sandiford > Alan Hayward > David Sherwood > > gcc/ > * machmode.h (is_int_mode): New fuction. > * combine.c (find_split_point): Use it. > (combine_simplify_rtx): Likewise. > (simplify_if_then_else): Likewise. > (simplify_set): Likewise. > (simplify_shift_const_1): Likewise. > (simplify_comparison): Likewise. > * config/aarch64/aarch64.c (aarch64_rtx_costs): Likewise. > * cse.c (notreg_cost): Likewise. > (cse_insn): Likewise. > * cselib.c (cselib_lookup_1): Likewise. > * dojump.c (do_jump_1): Likewise. > (do_compare_rtx_and_jump): Likewise. > * dse.c (get_call_args): Likewise. > * dwarf2out.c (rtl_for_decl_init): Likewise. > (native_encode_initializer): Likewise. > * expmed.c (emit_store_flag_1): Likewise. > (emit_store_flag): Likewise. > * expr.c (convert_modes): Likewise. > (store_field): Likewise. > (expand_expr_real_1): Likewise. > * fold-const.c (fold_read_from_constant_string): Likewise. > * gimple-ssa-sprintf.c (get_format_string): Likewise. > * optabs-libfuncs.c (gen_int_libfunc): Likewise. > * optabs.c (expand_binop): Likewise. > (expand_unop): Likewise. > (expand_abs_nojump): Likewise. > (expand_one_cmpl_abs_nojump): Likewise. > * simplify-rtx.c (mode_signbit_p): Likewise. > (val_signbit_p): Likewise. > (val_signbit_known_set_p): Likewise. > (val_signbit_known_clear_p): Likewise. > (simplify_relational_operation_1): Likewise. > * stor-layout.c (vector_type_mode): Likewise. > > gcc/go/ > * go-lang.c (go_langhook_type_for_mode): Use is_int_mode. OK. FWIW the "mode" -> "int_mode" that occurs in here is slightly worrisome, but probably a good thing to do. My worry is whether or not all the paths from the assignment to INT_MODE to all the uses that were converted have been checked to make sure they didn't modify MODE. It's easy to miss. Anyway, it's something to keep in mind, partciularly in older code where the definition and uses are potentially far away from each other. jeff