public inbox for gcc-regression@sourceware.org
help / color / mirror / Atom feed
From: ci_notify@linaro.org
To: Eugene Rozenfeld <erozen@microsoft.com>
Cc: gcc-regression@gcc.gnu.org
Subject: [TCWG CI] Failure after basepoints/gcc-13-3172-gf30e9fd33e5: Set discriminators for call stmts on the same line within the same basic block.
Date: Sat, 8 Oct 2022 07:09:09 +0000 (UTC)	[thread overview]
Message-ID: <2033316938.8665.1665212950522@jenkins.jenkins> (raw)

[-- Attachment #1: Type: text/plain, Size: 6272 bytes --]

Failure after basepoints/gcc-13-3172-gf30e9fd33e5: Set discriminators for call stmts on the same line within the same basic block.:

Results changed to
-10
# true:
0
# build_abe binutils:
1
# build_abe bootstrap_lto:
# FAILED
# First few build errors in logs:
# 00:05:38 make[3]: [Makefile:1814: aarch64-unknown-linux-gnu/bits/largefile-config.h] Error 1 (ignored)
# 00:05:38 make[3]: [Makefile:1815: aarch64-unknown-linux-gnu/bits/largefile-config.h] Error 1 (ignored)
# 00:30:18 make[3]: [Makefile:1814: aarch64-unknown-linux-gnu/bits/largefile-config.h] Error 1 (ignored)
# 00:30:18 make[3]: [Makefile:1815: aarch64-unknown-linux-gnu/bits/largefile-config.h] Error 1 (ignored)
# 00:42:56 make[3]: [Makefile:1814: aarch64-unknown-linux-gnu/bits/largefile-config.h] Error 1 (ignored)
# 00:42:56 make[3]: [Makefile:1815: aarch64-unknown-linux-gnu/bits/largefile-config.h] Error 1 (ignored)
# 00:45:55 make[2]: *** [Makefile:25727: compare] Error 1
# 00:45:55 make[1]: *** [Makefile:25707: stage3-bubble] Error 2
# 00:45:55 make: *** [Makefile:1064: all] Error 2

from
-10
# true:
0
# build_abe binutils:
1
# build_abe bootstrap_lto:
2

THIS IS THE END OF INTERESTING STUFF.  BELOW ARE LINKS TO BUILDS, REPRODUCTION INSTRUCTIONS, AND THE RAW COMMIT.

For latest status see comments in https://linaro.atlassian.net/browse/GNU-692 .
Status of basepoints/gcc-13-3172-gf30e9fd33e5 commit for tcwg_gcc_bootstrap:
commit f30e9fd33e56a5a721346ea6140722e1b193db42
Author: Eugene Rozenfeld <erozen@microsoft.com>
Date:   Thu Apr 21 16:43:24 2022 -0700

    Set discriminators for call stmts on the same line within the same basic block.
    
    Call statements are possible split points of a basic block so they may end up
    in different basic blocks by the time pass_ipa_auto_profile executes.
    
    This change will also simplify call site lookups since now location with discriminator
    will uniquely identify the call site (no callee function name is needed).
    
    This change is based on commit 1e6c4a7a8fb8e20545bb9f9032d3854f3f794c18
    by Dehao Chen in vendors/google/heads/gcc-4_8.
    
    Tested on x86_64-pc-linux-gnu.
    
    gcc/ChangeLog:
            * tree-cfg.cc (assign_discriminators): Set discriminators for call stmts
            on the same line within the same basic block.
* master-aarch64-bootstrap_lto
** Failure after basepoints/gcc-13-3172-gf30e9fd33e5: Set discriminators for call stmts on the same line within the same basic block.:
** https://ci.linaro.org/job/tcwg_gcc_bootstrap-build-master-aarch64-bootstrap_lto/464/

Bad  build: https://ci.linaro.org/job/tcwg_gcc_bootstrap-build-master-aarch64-bootstrap_lto/464/artifact/artifacts
Good build: https://ci.linaro.org/job/tcwg_gcc_bootstrap-build-master-aarch64-bootstrap_lto/463/artifact/artifacts

Reproduce current build:
<cut>
mkdir -p investigate-gcc-f30e9fd33e56a5a721346ea6140722e1b193db42
cd investigate-gcc-f30e9fd33e56a5a721346ea6140722e1b193db42

# Fetch scripts
git clone https://git.linaro.org/toolchain/jenkins-scripts

# Fetch manifests for bad and good builds
mkdir -p bad/artifacts good/artifacts
curl -o bad/artifacts/manifest.sh https://ci.linaro.org/job/tcwg_gcc_bootstrap-build-master-aarch64-bootstrap_lto/464/artifact/artifacts/manifest.sh --fail
curl -o good/artifacts/manifest.sh https://ci.linaro.org/job/tcwg_gcc_bootstrap-build-master-aarch64-bootstrap_lto/463/artifact/artifacts/manifest.sh --fail

# Reproduce bad build
(cd bad; ../jenkins-scripts/tcwg_gnu-build.sh ^^ true %%rr[top_artifacts] artifacts)
# Reproduce good build
(cd good; ../jenkins-scripts/tcwg_gnu-build.sh ^^ true %%rr[top_artifacts] artifacts)
</cut>

Full commit (up to 1000 lines):
<cut>
commit f30e9fd33e56a5a721346ea6140722e1b193db42
Author: Eugene Rozenfeld <erozen@microsoft.com>
Date:   Thu Apr 21 16:43:24 2022 -0700

    Set discriminators for call stmts on the same line within the same basic block.
    
    Call statements are possible split points of a basic block so they may end up
    in different basic blocks by the time pass_ipa_auto_profile executes.
    
    This change will also simplify call site lookups since now location with discriminator
    will uniquely identify the call site (no callee function name is needed).
    
    This change is based on commit 1e6c4a7a8fb8e20545bb9f9032d3854f3f794c18
    by Dehao Chen in vendors/google/heads/gcc-4_8.
    
    Tested on x86_64-pc-linux-gnu.
    
    gcc/ChangeLog:
            * tree-cfg.cc (assign_discriminators): Set discriminators for call stmts
            on the same line within the same basic block.
---
 gcc/tree-cfg.cc | 32 ++++++++++++++++++++++++++++++++
 1 file changed, 32 insertions(+)

diff --git a/gcc/tree-cfg.cc b/gcc/tree-cfg.cc
index 42f40f17c56..41f2925665f 100644
--- a/gcc/tree-cfg.cc
+++ b/gcc/tree-cfg.cc
@@ -1203,8 +1203,40 @@ assign_discriminators (void)
     {
       edge e;
       edge_iterator ei;
+      gimple_stmt_iterator gsi;
       gimple *last = last_stmt (bb);
       location_t locus = last ? gimple_location (last) : UNKNOWN_LOCATION;
+      location_t curr_locus = UNKNOWN_LOCATION;
+      int curr_discr = 0;
+
+      /* Traverse the basic block, if two function calls within a basic block
+	are mapped to the same line, assign a new discriminator because a call
+	stmt could be a split point of a basic block.  */
+      for (gsi = gsi_start_bb (bb); !gsi_end_p (gsi); gsi_next (&gsi))
+	{
+	  gimple *stmt = gsi_stmt (gsi);
+	  expanded_location curr_locus_e;
+	  if (curr_locus == UNKNOWN_LOCATION)
+	    {
+	      curr_locus = gimple_location (stmt);
+	      curr_locus_e = expand_location (curr_locus);
+	    }
+	  else if (!same_line_p (curr_locus, &curr_locus_e, gimple_location (stmt)))
+	    {
+	      curr_locus = gimple_location (stmt);
+	      curr_locus_e = expand_location (curr_locus);
+	      curr_discr = 0;
+	    }
+	  else if (curr_discr != 0)
+	    {
+	      location_t loc = gimple_location (stmt);
+	      location_t dloc = location_with_discriminator (loc, curr_discr);
+	      gimple_set_location (stmt, dloc);
+	    }
+	  /* Allocate a new discriminator for CALL stmt.  */
+	  if (gimple_code (stmt) == GIMPLE_CALL)
+	    curr_discr = next_discriminator_for_locus (curr_locus);
+	}
 
       if (locus == UNKNOWN_LOCATION)
 	continue;
</cut>

                 reply	other threads:[~2022-10-08  7:09 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2033316938.8665.1665212950522@jenkins.jenkins \
    --to=ci_notify@linaro.org \
    --cc=erozen@microsoft.com \
    --cc=gcc-regression@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).