From patchwork Thu Apr 13 16:55:46 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luc Van Oostenryck X-Patchwork-Id: 9679735 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 47F5860381 for ; Thu, 13 Apr 2017 16:56:04 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3A4D02869B for ; Thu, 13 Apr 2017 16:56:04 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2EFE2286A7; Thu, 13 Apr 2017 16:56:04 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.3 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E149F2869B for ; Thu, 13 Apr 2017 16:56:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753951AbdDMQ4D (ORCPT ); Thu, 13 Apr 2017 12:56:03 -0400 Received: from mail-wm0-f68.google.com ([74.125.82.68]:36731 "EHLO mail-wm0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753970AbdDMQ4C (ORCPT ); Thu, 13 Apr 2017 12:56:02 -0400 Received: by mail-wm0-f68.google.com with SMTP id q125so13647842wmd.3 for ; Thu, 13 Apr 2017 09:56:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=XhFuH9YC4PmeDARiIqufLnqzF6rXVgaFHyIRD3UDeAs=; b=S+pxjyWQfoZvw0uKxj/S8NGfsF3hsrM4CaRXlr4gIoMPWDVXIgbruJjMGVXA7PE/9e Q4i4lsOq2HBSfaJnnrTNUyu1QiWadygBk9awQb9jWxHS2XnzQKI6TPyGw4v+M77Nw1k6 i9KsVE7zPOOxFbR3xbIP0NOwjG3ehUi/4Tj/aOpz175kCrB6HMqBUiDleavc/FvMPq7x zp5e9fpv5Ei90hrbQyIxg3LQSD3pDvIc4hYpWyLxTBbqAJkKU/02oqSAxOAWpBUs8tFf /N0Yj2g/VUnkwk2gU0ajq1IXnv8a93GF8Ii4uP1eZjVBv7AeqaB32jiYl24UnPIohW0p Q/7A== 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; bh=XhFuH9YC4PmeDARiIqufLnqzF6rXVgaFHyIRD3UDeAs=; b=R/vqB88P/XS5XsSeeTwqzapw5wgz5KLUhNvuKYtTEPsD4dqqVjtivb5EPVvpwA+q43 0sHxRtTtWdYmFaTiPAAewT5UohspPc19gvXbZn4avOVEMArVFsbSvZkp40cupIs7e3WK 4FliKoxXDEe0esOfs8mCTbYxWeogSt6ixolL1SN3VsJZ4/2rlPpXE1R96IsmHQP0PqRI kadxZUV70PaoSEAijBncEG6AyvGlwvp6X1xh0nh/wdXFzTlN2MFwXWtToIoE22HoS9GF TfgF/PGxm2uK2xIYsOv0rArz4j0huTAs2faL6XNR1MzacJU3eFRLT1WR6DMwgUU4DGfs 70gA== X-Gm-Message-State: AN3rC/47jRwA7we+s9Od+Tj3voNvdktonn1MV9mm6+WO5TtyV4yYZUXd LX+TeMmMKLzAV+sEXCQ= X-Received: by 10.28.151.81 with SMTP id z78mr4248525wmd.95.1492102560422; Thu, 13 Apr 2017 09:56:00 -0700 (PDT) Received: from localhost.localdomain ([2a02:a03f:8b2:dc00:a909:829c:fd:bc60]) by smtp.gmail.com with ESMTPSA id q129sm13297803wmg.1.2017.04.13.09.55.59 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 13 Apr 2017 09:55:59 -0700 (PDT) From: Luc Van Oostenryck To: linux-sparse@vger.kernel.org Cc: Christopher Li , Luc Van Oostenryck Subject: [PATCH 3/8] remove test on initial phi->ident Date: Thu, 13 Apr 2017 18:55:46 +0200 Message-Id: <20170413165551.2785-4-luc.vanoostenryck@gmail.com> X-Mailer: git-send-email 2.12.0 In-Reply-To: <20170413165551.2785-1-luc.vanoostenryck@gmail.com> References: <20170413165551.2785-1-luc.vanoostenryck@gmail.com> Sender: linux-sparse-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sparse@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The code used to be like: pseudo_t phi = alloc_phi(...); phi->ident = phi->ident ? : ... but this new allocated phi can never have an identifier. Change this by removing the test and directly assigning the other part of the conditional. Signed-off-by: Luc Van Oostenryck --- flow.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flow.c b/flow.c index 25a5bffbe..aa7a6586f 100644 --- a/flow.c +++ b/flow.c @@ -412,7 +412,7 @@ void add_dominator(struct pseudo_list **phi_list, struct instruction *insn, struct basic_block *bb = dom->bb; struct instruction *br = delete_last_instruction(&bb->insns); pseudo_t phi = alloc_phi(bb, dom->target, dom->type); - phi->ident = phi->ident ? : ident ? : dom->target->ident; + phi->ident = ident ? : dom->target->ident; add_instruction(&bb->insns, br); use_pseudo(insn, phi, add_pseudo(phi_list, phi)); }