From patchwork Wed Nov 22 11:14:11 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxim Kuvyrkov X-Patchwork-Id: 746019 Delivered-To: patch@linaro.org Received: by 2002:a5d:6706:0:b0:32d:baff:b0ca with SMTP id o6csp240180wru; Wed, 22 Nov 2023 03:17:00 -0800 (PST) X-Google-Smtp-Source: AGHT+IGkbECSDqvLtRJ09J8u91K+TN8dgQS5UwigxiUhvGjiA3ze2h11CxthzhzRhJLq8qg4UjIP X-Received: by 2002:ac8:5c8b:0:b0:418:151a:5c0c with SMTP id r11-20020ac85c8b000000b00418151a5c0cmr8221725qta.11.1700651819917; Wed, 22 Nov 2023 03:16:59 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1700651819; cv=pass; d=google.com; s=arc-20160816; b=n8y/yiRhOeMdqCwW7MhVIxpoAf/SZAxpuma9JlS2bjRT8G+GXL29k4Jcp1n9jioLdx dK2hmwWgp7m9hWuE/udJN5eCUOnqIFg5Leie5s/kM+YosXP2yfHkUQICGhzNRUFuuwNO cw8yj2q+O+d/kZZDk2OSV00Ja/NfwHJzy621NERenfeaYdVnxnNsnbYOqzRheAt2rOh+ OqJFmcI7X4SXdl9HKtrnV5xZR8aDHSLHcjOh9MkIcusqvAAHRFpEW8uzVvNi5LPpO5k5 1Cbd1ZV/X1uzLdSAkN1De+6kTu0CqqBMxQkrri2rgzdMNSm84jPabj97IyVFYsdbeqga hBZA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to: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:cc:to :from:dkim-signature:arc-filter:dmarc-filter:delivered-to; bh=0pJajU2nlDrwysjZmlE0UjB/iuf4+ccwsz182IWPBLk=; fh=WFm8hI3He6vfed9bNVx/Tt8MS1NEGxq9c34GiEnOLuU=; b=ErfNtVgMvuAlyc4F1DLVyzlxtOLQ9NBs6xbcQIEUv00qYi3McSfRAoco0E26lEvlbQ 4RIzi7/hfxlZm0lm8wSYkit6478sbKQ8QEOYZctAriCUdN+M3rrSVZhQLLt5sjSMkuIn Zb+uH6//KmMBwuln9DeGAtx4YWaPv+fS8+XkEKYrtF3KbhsnBU5FkdFzGq4fMllh96Uu IOLfKpZQRU6goFPG3yZusJI8COwuVw7EoJg+Bv+9/Ielhu/pw3XJfNfzJDF4AdwsZeQo BQGpmr9OPqSmEo0JMNuqIfaFzDEMrXwX3SaOVos3boEQWxa34gcoLefTSuumU4OVzfqW nSag== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=YUyCSz+M; arc=pass (i=1); spf=pass (google.com: domain of gcc-patches-bounces+patch=linaro.org@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+patch=linaro.org@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from server2.sourceware.org (server2.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id gx8-20020a05622a27c800b004236e210d43si3286565qtb.341.2023.11.22.03.16.59 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 Nov 2023 03:16:59 -0800 (PST) Received-SPF: pass (google.com: domain of gcc-patches-bounces+patch=linaro.org@gcc.gnu.org designates 8.43.85.97 as permitted sender) client-ip=8.43.85.97; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=YUyCSz+M; arc=pass (i=1); spf=pass (google.com: domain of gcc-patches-bounces+patch=linaro.org@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+patch=linaro.org@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 8D92F38582B1 for ; Wed, 22 Nov 2023 11:16:59 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-lf1-x134.google.com (mail-lf1-x134.google.com [IPv6:2a00:1450:4864:20::134]) by sourceware.org (Postfix) with ESMTPS id 0B5B43858298 for ; Wed, 22 Nov 2023 11:14:59 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 0B5B43858298 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=linaro.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 0B5B43858298 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2a00:1450:4864:20::134 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1700651700; cv=none; b=eJo5LR1BypH9UGybEdFgoCO9zxKPZYlP9cOE+36G8FGHSy5sG+eFD+7dpauTU2iPcQoKW6KRijimZmE0BMjSsYwFEkxfVfbmPhWSSp1WXlgA7wJa8ZGBv9kakeclRkcgsHCPntvzLGo9/JmCCGKWzp3YSajDtqdt8FpKJkwppig= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1700651700; c=relaxed/simple; bh=mLvJRuVEz55mWUIzvxvbz7oW00I+oG0vjq+zl3SOLGI=; h=DKIM-Signature:From:To:Subject:Date:Message-Id:MIME-Version; b=xFTi2/F1c7ikVfrNc7HUKt1bMlScoW8pdQbfLCKPAP9w+xno0SvI6P9lr7eachqQVRuZQXAU325ipdWL/dWBa6296oHD214nHVjRQ4O+tVwNUXwsJTgZSR66wBEaIH3bPH+0Ua1fpwxxoYhOFh+yoyNNAHGcCe24hS/0U0fksaE= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-lf1-x134.google.com with SMTP id 2adb3069b0e04-507a3af69d8so1802699e87.0 for ; Wed, 22 Nov 2023 03:14:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1700651697; x=1701256497; darn=gcc.gnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=0pJajU2nlDrwysjZmlE0UjB/iuf4+ccwsz182IWPBLk=; b=YUyCSz+MHgwMrDVXvfO9evcczxZpILvzRedrXWUdoZmCA65BZDlSbCj3gNrnsxQU0v Hnavy7GjpxOMmcB6P9JpZ5rKOGReC2ldR1r9XK2I3FB+MYXv888iXQVgt52X0ORhLE54 9+w9vZQ6wK9csKsNoc7fq+zH65Vd4EiYpNwiX21WMCnakPuxscx3Oi61mjMqCWly+Sf1 UOh/moaoAnF86bpz00EtFokYFfeoFIYW1qYnFL+uavuQnR4YLSMxFVqKUKj962Bcanu3 ZCvNmYCbht0ZfsOxRS7F8aJYRuB/ad23reZZ2npeaIImUb3uwHQMXWskUyLDpwIJSr/o 4CdA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700651697; x=1701256497; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=0pJajU2nlDrwysjZmlE0UjB/iuf4+ccwsz182IWPBLk=; b=U856enlt+scadd2VP9a/5bADxim/9LPq02PjrbJHwEI3pUTfACHTD3nNo1z/EhNZiX 5JNeyYqAjZfn4xRYL4QqUccEUujViE/6FyMf9hbVdNFew6l/p041GKNNG7qJGl9I91dO dVETfIREG8l68bpo95SqdmY1T0SB1PHJ2E2X8UHmOBTKDvB0t2kJEbx9OPvKu7jd7hJ4 HfjkUu6IyDBZYu32LeIdEakJWskiZag3+VMu9jys13tV091iJ4ogLX+Cg8XncCocSuMj 2MbczrjuAIVx6adWEHR02+GAjK0VScp+vpkHoTlepN/+ohTa9v8TOsj9yoqFajOh2noE AzgQ== X-Gm-Message-State: AOJu0Yx0dV+BqU/nT7HbH3CvD/kx6NQaGzzk8vD7L4XR8hZPNPPwqJpi rMqhF9J2SeefNEQx6MArgOKvVjGKqd/rHWhWq3EgwNk= X-Received: by 2002:a05:6512:ba4:b0:509:4c65:f4cf with SMTP id b36-20020a0565120ba400b005094c65f4cfmr1465807lfv.0.1700651696705; Wed, 22 Nov 2023 03:14:56 -0800 (PST) Received: from localhost.localdomain (static.225.72.216.95.clients.your-server.de. [95.216.72.225]) by smtp.gmail.com with ESMTPSA id t13-20020a195f0d000000b0050919538b00sm1848553lfb.79.2023.11.22.03.14.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 Nov 2023 03:14:55 -0800 (PST) From: Maxim Kuvyrkov To: gcc-patches@gcc.gnu.org Cc: Maxim Kuvyrkov , Bernd Schmidt , Vladimir Makarov , Jeff Law , Alexander Monakov , Richard Guenther Subject: [PATCH v3 4/8] Improve and fix sched-deps.cc: dump_dep() and dump_lists(). Date: Wed, 22 Nov 2023 11:14:11 +0000 Message-Id: <20231122111415.815147-5-maxim.kuvyrkov@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231120120649.672893-1-maxim.kuvyrkov@linaro.org> References: <20231120120649.672893-1-maxim.kuvyrkov@linaro.org> MIME-Version: 1.0 X-Spam-Status: No, score=-11.9 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces+patch=linaro.org@gcc.gnu.org Better propagate flags from dump_lists() into dump_dep() and add a missing "]" in dump_lists(). gcc/ChangeLog: * sched-deps.cc (DUMP_DEP_PRO): Improve comment. (dump_dep_flags): Remove. (DUMP_LISTS_SIZE, DUMP_LISTS_DEPS, DUMP_LISTS_ALL): Continue numbering from DUMP_DEP_* flags. (dump_lists): Update and fix. --- gcc/sched-deps.cc | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/gcc/sched-deps.cc b/gcc/sched-deps.cc index 005fc0f567e..4d357079a7a 100644 --- a/gcc/sched-deps.cc +++ b/gcc/sched-deps.cc @@ -132,7 +132,8 @@ static void dump_ds (FILE *, ds_t); /* Define flags for dump_dep (). */ /* Dump producer of the dependence. */ -#define DUMP_DEP_PRO (2) +#define DUMP_DEP_PRO (2) /* Reserve "1" for handling of DUMP_DEP_ALL and + DUMP_LISTS_ALL. */ /* Dump consumer of the dependence. */ #define DUMP_DEP_CON (4) @@ -206,9 +207,6 @@ dump_dep (FILE *dump, dep_t dep, int flags) fprintf (dump, ">"); } -/* Default flags for dump_dep (). */ -static int dump_dep_flags = (DUMP_DEP_PRO | DUMP_DEP_CON); - /* Dump all fields of DEP to STDERR. */ void sd_debug_dep (dep_t dep) @@ -1454,19 +1452,20 @@ sd_delete_dep (sd_iterator_def sd_it) } /* Dump size of the lists. */ -#define DUMP_LISTS_SIZE (2) +#define DUMP_LISTS_SIZE (32) /* (DUMP_DEP_STATUS << 1) */ /* Dump dependencies of the lists. */ -#define DUMP_LISTS_DEPS (4) +#define DUMP_LISTS_DEPS (64) /* Dump all information about the lists. */ #define DUMP_LISTS_ALL (DUMP_LISTS_SIZE | DUMP_LISTS_DEPS) /* Dump deps_lists of INSN specified by TYPES to DUMP. - FLAGS is a bit mask specifying what information about the lists needs - to be printed. + FLAGS is a bit mask specifying what information about the lists and + the individual deps needs to be printed, this is a combination of + DUMP_DEP_* and DUMP_LISTS_* flags. If FLAGS has the very first bit set, then dump all information about - the lists and propagate this bit into the callee dump functions. */ + the lists and deps propagate this bit into the callee dump functions. */ static void dump_lists (FILE *dump, rtx insn, sd_list_types_def types, int flags) { @@ -1488,10 +1487,12 @@ dump_lists (FILE *dump, rtx insn, sd_list_types_def types, int flags) { FOR_EACH_DEP (insn, types, sd_it, dep) { - dump_dep (dump, dep, dump_dep_flags | all); + dump_dep (dump, dep, flags | all); fprintf (dump, " "); } } + + fprintf (dump, "]"); } /* Dump all information about deps_lists of INSN specified by TYPES