From patchwork Wed Apr 22 01:17:02 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 185633 Delivered-To: patch@linaro.org Received: by 2002:a92:3d9a:0:0:0:0:0 with SMTP id k26csp167840ilf; Tue, 21 Apr 2020 18:28:37 -0700 (PDT) X-Google-Smtp-Source: APiQypLlsyrYN3EwcjwIMQpfPL5B25OnWWkfKbwO8oe2gu3MJECzAvlSTgHGEqvJ987k4Xm8eJ8b X-Received: by 2002:a05:620a:5f1:: with SMTP id z17mr23289880qkg.21.1587518916683; Tue, 21 Apr 2020 18:28:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587518916; cv=none; d=google.com; s=arc-20160816; b=izSK40cvW2ULzvIyVoAOphrykvPXWXuRLRMIOxyVlYVWqMALiFUqNoY6GrnMK8dP1A 6hga6JkXxTSr0Vtzh7pKcHB9vL9+wPkzUGm7OMh2XEPIajp6Xm/uqs6XPUg1XqWGNgAA ZY4yfGUNM7/BtfVnvUllekvpO/RZ89zA2266E/eMkOPgNT8Y2kEwOCOHR+xM2M5whVfJ +d1AmaOq3QKUXElAbfunidHLWy23K8sQr+rZGik1ZRn5f7HhvPMJzrNF8GBRmOYqB4Cr oliC3w4e0nBNbfGu9mPe3C94jgBVkYRflmwSZKzIKDl1QUdnjhkgQQ23TdsQlka4BChD hxiQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=WTwykg5WtqouwfqyNJXpZG28wcFWcjxQG9OeloSSTFs=; b=YVb2gwttxWxv7x+UEq10MCu94c/VfTP/XwsjQU0+acbsU3+DV7/ob4z/JsbReyC2Fy ajC9GbzZdYH+pMNsQ2uYf/HR5oHVQyP6pzBOHFPexLJ0Bf0hb2chrnC6JNzFzXZdIFBx YAIdiQ97nh31vyorptDU7544i5NSULgxD5lcVAmwFBAPpvmPmIABWu1FYvBDnmX/MuHh Y8GHeu4nNo6yJOyyGZU71Bu4uIi3USF8iNUfYZzZAQ0RviNLeoNpFW6/S8PAA5FSSmoJ V5SyWUbAFPQOyjd/i+F19q0az6PU/fyq1Hk/hEjzVBV75+c+AiFRfB23wFrxHUb/PIkF peRQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="w/0R3Cz5"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id r26si2617808qvd.25.2020.04.21.18.28.36 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 21 Apr 2020 18:28:36 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="w/0R3Cz5"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:38852 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jR4Bo-00038d-7J for patch@linaro.org; Tue, 21 Apr 2020 21:28:36 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:34958) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jR41L-0001b1-MU for qemu-devel@nongnu.org; Tue, 21 Apr 2020 21:17:48 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.90_1) (envelope-from ) id 1jR41K-0001sx-UF for qemu-devel@nongnu.org; Tue, 21 Apr 2020 21:17:47 -0400 Received: from mail-pl1-x643.google.com ([2607:f8b0:4864:20::643]:36660) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jR41K-0001ps-Fh for qemu-devel@nongnu.org; Tue, 21 Apr 2020 21:17:46 -0400 Received: by mail-pl1-x643.google.com with SMTP id g2so249658plo.3 for ; Tue, 21 Apr 2020 18:17:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=WTwykg5WtqouwfqyNJXpZG28wcFWcjxQG9OeloSSTFs=; b=w/0R3Cz50bvCfxaiyVV5fskbbRUvai/v6eQwT7FKiwjOFLlTxOsNfpOPUb4MRqIeKh u9QykJN5EIJkJOGChshtS/45/uM0FM9OWebfMDq1JGhUDVTtewmsicAwjHAn657uTz0G aZ8j1U3Y7LZDpI2jmivYb8FuaME2/4muxK2keWOcM5X8AceiK0EbCVTrFl/XbEGLxi24 uHosF/cHr8OzEWXGDOGsr/3K4dg6K4LJz4EKQO1cuswRGmDzOTX4Z2pik70dM0ycoUsI VjWE0xOwZxXMvboBaLKT/b5ED2gFytFjKx5iJCpXklXXeZaK3fBeup+LSWLDW2Ncv1NB emlA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=WTwykg5WtqouwfqyNJXpZG28wcFWcjxQG9OeloSSTFs=; b=Z/xZ/PYL4FnJoKWKQ0pk986WV9q8POsHjyJcfoAN0n6OpY8hrs3qIQmyHBWpo+KzIP RnLCsiOG+Th2glUFlevvQJdi0NsycWQvHC6avlr47FJgOPQHNtsB9vzxTS6aiA5Au5Y3 VoXhqQr5+2ThUJIkhi3Hytr56tDMb7kXpLTnQ2/7Zd5TbXA6r1fnJDFMFVPSV9OsQ4Qq u5uaxTw0KdTzbZ7ZCXwaNc46P5hHeSUxyglD4lvr2h74+iFri7XLUGwp95BUkr87Ysoz D+h5ggqcDHopN1+k2er3XwDwBmoD2ZufpS8A8eUYOgUtN603s3fPbyN7hWA55wUuSrg3 riRQ== X-Gm-Message-State: AGi0PuaVaT+TsiSSHUhz9lIXNCNKL5XnkGYZqZggO+7VZKk+vDB/j07L NoN1SPEcmxI5uctB1iItpYMPgTpx2L8= X-Received: by 2002:a17:902:ed42:: with SMTP id y2mr23935586plb.85.1587518264697; Tue, 21 Apr 2020 18:17:44 -0700 (PDT) Received: from localhost.localdomain (174-21-149-226.tukw.qwest.net. [174.21.149.226]) by smtp.gmail.com with ESMTPSA id m4sm3673561pfm.26.2020.04.21.18.17.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Apr 2020 18:17:44 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v2 16/36] tcg: Rename struct tcg_temp_info to TempOptInfo Date: Tue, 21 Apr 2020 18:17:02 -0700 Message-Id: <20200422011722.13287-17-richard.henderson@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200422011722.13287-1-richard.henderson@linaro.org> References: <20200422011722.13287-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::643; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x643.google.com X-detected-operating-system: by eggs.gnu.org: Error: [-] PROGRAM ABORT : Malformed IPv6 address (bad octet value). Location : parse_addr6(), p0f-client.c:67 X-Received-From: 2607:f8b0:4864:20::643 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: alex.bennee@linaro.org, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Fix this name vs our coding style. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- tcg/optimize.c | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) -- 2.20.1 Reviewed-by: Alex Bennée diff --git a/tcg/optimize.c b/tcg/optimize.c index effb47eefd..b86bf3d707 100644 --- a/tcg/optimize.c +++ b/tcg/optimize.c @@ -35,20 +35,20 @@ glue(glue(case INDEX_op_, x), _i64): \ glue(glue(case INDEX_op_, x), _vec) -struct tcg_temp_info { +typedef struct TempOptInfo { bool is_const; TCGTemp *prev_copy; TCGTemp *next_copy; tcg_target_ulong val; tcg_target_ulong mask; -}; +} TempOptInfo; -static inline struct tcg_temp_info *ts_info(TCGTemp *ts) +static inline TempOptInfo *ts_info(TCGTemp *ts) { return ts->state_ptr; } -static inline struct tcg_temp_info *arg_info(TCGArg arg) +static inline TempOptInfo *arg_info(TCGArg arg) { return ts_info(arg_temp(arg)); } @@ -71,9 +71,9 @@ static inline bool ts_is_copy(TCGTemp *ts) /* Reset TEMP's state, possibly removing the temp for the list of copies. */ static void reset_ts(TCGTemp *ts) { - struct tcg_temp_info *ti = ts_info(ts); - struct tcg_temp_info *pi = ts_info(ti->prev_copy); - struct tcg_temp_info *ni = ts_info(ti->next_copy); + TempOptInfo *ti = ts_info(ts); + TempOptInfo *pi = ts_info(ti->prev_copy); + TempOptInfo *ni = ts_info(ti->next_copy); ni->prev_copy = ti->prev_copy; pi->next_copy = ti->next_copy; @@ -89,12 +89,12 @@ static void reset_temp(TCGArg arg) } /* Initialize and activate a temporary. */ -static void init_ts_info(struct tcg_temp_info *infos, +static void init_ts_info(TempOptInfo *infos, TCGTempSet *temps_used, TCGTemp *ts) { size_t idx = temp_idx(ts); if (!test_bit(idx, temps_used->l)) { - struct tcg_temp_info *ti = &infos[idx]; + TempOptInfo *ti = &infos[idx]; ts->state_ptr = ti; ti->next_copy = ts; @@ -114,7 +114,7 @@ static void init_ts_info(struct tcg_temp_info *infos, } } -static void init_arg_info(struct tcg_temp_info *infos, +static void init_arg_info(TempOptInfo *infos, TCGTempSet *temps_used, TCGArg arg) { init_ts_info(infos, temps_used, arg_temp(arg)); @@ -177,7 +177,7 @@ static void tcg_opt_gen_movi(TCGContext *s, TCGOp *op, TCGArg dst, TCGArg val) const TCGOpDef *def; TCGOpcode new_op; tcg_target_ulong mask; - struct tcg_temp_info *di = arg_info(dst); + TempOptInfo *di = arg_info(dst); def = &tcg_op_defs[op->opc]; if (def->flags & TCG_OPF_VECTOR) { @@ -208,8 +208,8 @@ static void tcg_opt_gen_mov(TCGContext *s, TCGOp *op, TCGArg dst, TCGArg src) TCGTemp *dst_ts = arg_temp(dst); TCGTemp *src_ts = arg_temp(src); const TCGOpDef *def; - struct tcg_temp_info *di; - struct tcg_temp_info *si; + TempOptInfo *di; + TempOptInfo *si; tcg_target_ulong mask; TCGOpcode new_op; @@ -242,7 +242,7 @@ static void tcg_opt_gen_mov(TCGContext *s, TCGOp *op, TCGArg dst, TCGArg src) di->mask = mask; if (src_ts->type == dst_ts->type) { - struct tcg_temp_info *ni = ts_info(si->next_copy); + TempOptInfo *ni = ts_info(si->next_copy); di->next_copy = si->next_copy; di->prev_copy = src_ts; @@ -605,7 +605,7 @@ void tcg_optimize(TCGContext *s) { int nb_temps, nb_globals; TCGOp *op, *op_next, *prev_mb = NULL; - struct tcg_temp_info *infos; + TempOptInfo *infos; TCGTempSet temps_used; /* Array VALS has an element for each temp. @@ -616,7 +616,7 @@ void tcg_optimize(TCGContext *s) nb_temps = s->nb_temps; nb_globals = s->nb_globals; bitmap_zero(temps_used.l, nb_temps); - infos = tcg_malloc(sizeof(struct tcg_temp_info) * nb_temps); + infos = tcg_malloc(sizeof(TempOptInfo) * nb_temps); QTAILQ_FOREACH_SAFE(op, &s->ops, link, op_next) { tcg_target_ulong mask, partmask, affected;