From patchwork Wed Sep 9 00:16:20 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 249405 Delivered-To: patch@linaro.org Received: by 2002:a92:5b9c:0:0:0:0:0 with SMTP id c28csp5015863ilg; Tue, 8 Sep 2020 17:23:45 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwA9xmtTxwRPfxuqPN3g4F+PO7GqVHXX8l6K9PMAn5VvYfGVnz1KF1hDA3RB+fWtr6r77R7 X-Received: by 2002:a25:3258:: with SMTP id y85mr2342232yby.473.1599611025432; Tue, 08 Sep 2020 17:23:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599611025; cv=none; d=google.com; s=arc-20160816; b=pGqRP6/AXzmlxm1ozMnVeNRVKVXyCZj7PTTkB2ggNufznHCAnWpgfiYrwDRODKn0Rj L+7NnpMJBDLsTBYRP7nCZ807tKEbP4aaYjCOVLLKEAHT9renLGhAF9ZYEopAglT1lOhB Y+1ZmZLkqctjaoXpfl8bYE1w+DgOTmA8Vbvqhk8KfaR+R5dOWRN+sYrQsivkCzKGcGDZ 8kLR72eZ4BRQPE9HtSOexRPW5RmE5CtUAmUYZRn3K3mSOmbDWJjxJc1YZYWtSjfLOlbN V2gm+Ec9seaiIifGqT3E8/323HaM/RZU2XcHb1f0yY7QC6KqroNBCkEGOx5h/cyI9tIb 8HTw== 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=bBAAD2EsIW/155GIjaU48r4O2esHCcXs+AbT7vfXmho=; b=FLybiwyNEbFuNZEtIyrH7NIFx4I1SmdJ9ILJ1tYhfS/b8plqXkMDYcrCX2sigf4FEB eLHD6/i78TTx7UZhb0MmjVGnEIEbwwwVRGc4DHL5VZBpruc/ZRlyc4KCfgv/6Cgndxfx E4ClyCJuYj5qj0PO693rr6QiSDU4ccZkAVpPKwzBWGLP6vuaOeAVtWeyYzZVhCGy/W9c hDKaRy+RnGmaYzCbV/FJ8LfVB0BzhakjnT+gr5Xx6ZhLkAcqGvW3O6+hHn35NZu3ewNm 75umuLwYOSkMadkusT2CUR1pV2n19y6dSa3ix4rJLPWmVFcsxWIZ+it+apCJRrBsJwvS CG+w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=dcHQ9efW; 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 q84si925380ybq.190.2020.09.08.17.23.45 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 08 Sep 2020 17:23:45 -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=dcHQ9efW; 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]:59492 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kFnto-0004rC-TU for patch@linaro.org; Tue, 08 Sep 2020 20:23:44 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:37470) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kFnnV-0008Fq-5H for qemu-devel@nongnu.org; Tue, 08 Sep 2020 20:17:13 -0400 Received: from mail-pg1-x541.google.com ([2607:f8b0:4864:20::541]:35603) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kFnnS-0002Ea-Qi for qemu-devel@nongnu.org; Tue, 08 Sep 2020 20:17:12 -0400 Received: by mail-pg1-x541.google.com with SMTP id g29so746323pgl.2 for ; Tue, 08 Sep 2020 17:17:10 -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=bBAAD2EsIW/155GIjaU48r4O2esHCcXs+AbT7vfXmho=; b=dcHQ9efWjQzRqqgiVRImB5r9ULzsT2o7TINvOITGHpnf8aByKOguNFw5gHzaTHa9Z3 9l7nn6YySB08tkIvMb8N7p4E8i8bos35JPZVGNjJND9mU8QrCgskbMvFBiC6ryNG2mRj UbIwWNQfJ++wxihm5FwcR/wLkKI0ohXQERVPNA2sZb9bDW3fwr3H7Ud6j6N/po/Ijnw+ AclxK2jwsilnC4ivIeqOJYCntgIKSP4YG6ZEnnvFvSrOpES1XKmT42pJqzkRAtnx5pLV IqhB6VLqTNv+NcW4CCCddCyafnsu9DKd/CenurWvJNFxrb6DVfQ9rCnN7vOYdG6W9PQ/ knGg== 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=bBAAD2EsIW/155GIjaU48r4O2esHCcXs+AbT7vfXmho=; b=VlpC/4QGRu3kniv3QRNP0JF9YEENJ/8Eme3kr0YFp2poEUv/E7E9vyaDpdLR6L6DOX nlurTWNcR5K88OJIm0n+N6wXXUGqOWzZNthVwwx8Fuaq/A3KZGXbfyuWxDuq547Kouia V3Geu72h5LyJrpYV+w1FlviODJ033gJIamvi7s2tGLeS95aLKbrgzjQL5anLM2fA5FYt yIUQJb8xe/gFEPNqF16yWsON2ibyOwHYZrUm63a6M4HdUCsX4Bidlp213P7QKJGmUkKy WlPtjaIsgdOsir8dbEQKMA0yOs63YKQfEXmiL3FpLW1gTiYsuYJLeFChNOUvjgPgqabR bcHQ== X-Gm-Message-State: AOAM532NJYEob8PBHWvcK3vLKRC+v3oPpVpn0L30EnT+Y8vJ14byXFNT 7ZR6mlCUKrAERISAHCsVNQtw+agmF4xCnQ== X-Received: by 2002:a63:5c66:: with SMTP id n38mr922759pgm.217.1599610629154; Tue, 08 Sep 2020 17:17:09 -0700 (PDT) Received: from localhost.localdomain ([71.212.141.89]) by smtp.gmail.com with ESMTPSA id 137sm505437pfu.149.2020.09.08.17.17.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Sep 2020 17:17:08 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH 16/43] tcg: Rename struct tcg_temp_info to TempOptInfo Date: Tue, 8 Sep 2020 17:16:20 -0700 Message-Id: <20200909001647.532249-17-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200909001647.532249-1-richard.henderson@linaro.org> References: <20200909001647.532249-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::541; envelope-from=richard.henderson@linaro.org; helo=mail-pg1-x541.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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: =?utf-8?q?Alex_Benn=C3=A9e?= , =?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: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- tcg/optimize.c | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) -- 2.25.1 diff --git a/tcg/optimize.c b/tcg/optimize.c index 3cffd941bd..81faf7cf10 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; @@ -105,7 +105,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)); @@ -171,7 +171,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) { @@ -202,8 +202,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; @@ -236,7 +236,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; @@ -599,7 +599,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. @@ -610,7 +610,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;