Successfully identified regression in *gcc* in CI configuration 
tcwg_gnu/gnu-master-arm-check_bootstrap.  So far, this commit has regressed CI 
configurations:
 - tcwg_gnu/gnu-master-arm-check_bootstrap

Culprit:
<cut>
commit 8a8a7d332d5d01db5aea7336a36d9fd71a679fb1
Author: Ian Lance Taylor <i...@golang.org>
Date:   Mon Jun 28 16:47:55 2021 -0700

    compiler: in composite literals use temps only for interfaces
    
    For a composite literal we only need to introduce a temporary variable
    if we may be converting to an interface type, so only do it then.
    This saves over 80% of compilation time when using gccgo to compile
    cmd/internal/obj/x86, as the GCC middle-end spends a lot of time
    pointlessly computing interactions between temporary variables.
    
    For PR debug/101064
    For golang/go#46600
    
    Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/331513
</cut>

Results regressed to (for first_bad == 8a8a7d332d5d01db5aea7336a36d9fd71a679fb1)
# reset_artifacts:
-10
# build_abe bootstrap:
0
# build_abe check_bootstrap:
1
# # Comparing directories
# # REFERENCE: base-artifacts/sumfiles
# # CURRENT:   
/home/tcwg-buildslave/workspace/tcwg_gnu_2/artifacts/build-8a8a7d332d5d01db5aea7336a36d9fd71a679fb1/sumfiles
# 
# # Comparing 12 common sum files:
# g++.sum
# gcc.sum
# gfortran.sum
# go.sum
# gotools.sum
# libatomic.sum
# libffi.sum
# libgo.sum
# libgomp.sum
# libitm.sum
# libstdc++.sum
# objc.sum
# Comparing:
# REFERENCE:/tmp/gxx-sum1.1601595
# CURRENT:  /tmp/gxx-sum2.1601595
# 
#               `                              +---------+---------+
# o  RUN STATUS:                               |   REF   |   RES   |
#   +------------------------------------------+---------+---------+
#   | Passes                            [PASS] |  460522 |  460519 |
#   | Unexpected fails                  [FAIL] |     194 |     197 |
#   | Errors                           [ERROR] |       0 |       0 |
#   | Unexpected passes                [XPASS] |      15 |      15 |
#   | Expected fails                   [XFAIL] |    2737 |    2737 |
#   | Unresolved                  [UNRESOLVED] |     104 |     104 |
#   | Unsupported                [UNSUPPORTED] |   22896 |   22896 |
#   | Untested                      [UNTESTED] |      10 |      10 |
#   +------------------------------------------+---------+---------+
# 
#     REF PASS ratio: 0.952271
#     RES PASS ratio: 0.952265
# 
# o  REGRESSIONS:
#   +------------------------------------------+---------+
#   | PASS now FAIL             [PASS => FAIL] |       3 |
#   +------------------------------------------+---------+
#   | TOTAL_REGRESSIONS                        |       3 |
#   +------------------------------------------+---------+
# 
#   - PASS now FAIL             [PASS => FAIL]:
# 
#   Executed from: go.test/go-test.exp
#     go:go.test/test/fixedbugs/issue19182.go execution,  -O2 -g 
#   Executed from: 
/home/tcwg-buildslave/workspace/tcwg_gnu_2/abe/snapshots/gcc.git~master/libgo/libgo.exp
#     libgo:os/signal
#     libgo:sync/atomic
# 
# 
# 
# o  IMPROVEMENTS TO BE CHECKED:
#   +------------------------------------------+---------+
#   +------------------------------------------+---------+
#   | TOTAL_IMPROVEMENTS_TO_BE_CHECKED         |       0 |
#   +------------------------------------------+---------+
# 
# 
# # Regressions found
# # Regressions in 12 common sum files found

from (for last_good == c60d9160b4d966dbea5b1bbea4f817c64d0bee2d)
# reset_artifacts:
-10
# build_abe bootstrap:
0
# build_abe check_bootstrap:
1

Artifacts of last_good build: 
https://ci.linaro.org/job/tcwg_gcc-bisect-gnu-master-arm-check_bootstrap/72/artifact/artifacts/build-c60d9160b4d966dbea5b1bbea4f817c64d0bee2d/
Artifacts of first_bad build: 
https://ci.linaro.org/job/tcwg_gcc-bisect-gnu-master-arm-check_bootstrap/72/artifact/artifacts/build-8a8a7d332d5d01db5aea7336a36d9fd71a679fb1/
Build top page/logs: 
https://ci.linaro.org/job/tcwg_gcc-bisect-gnu-master-arm-check_bootstrap/72/

Configuration details:


Reproduce builds:
<cut>
mkdir investigate-gcc-8a8a7d332d5d01db5aea7336a36d9fd71a679fb1
cd investigate-gcc-8a8a7d332d5d01db5aea7336a36d9fd71a679fb1

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

mkdir -p artifacts/manifests
curl -o artifacts/manifests/build-baseline.sh 
https://ci.linaro.org/job/tcwg_gcc-bisect-gnu-master-arm-check_bootstrap/72/artifact/artifacts/manifests/build-baseline.sh
 --fail
curl -o artifacts/manifests/build-parameters.sh 
https://ci.linaro.org/job/tcwg_gcc-bisect-gnu-master-arm-check_bootstrap/72/artifact/artifacts/manifests/build-parameters.sh
 --fail
curl -o artifacts/test.sh 
https://ci.linaro.org/job/tcwg_gcc-bisect-gnu-master-arm-check_bootstrap/72/artifact/artifacts/test.sh
 --fail
chmod +x artifacts/test.sh

# Reproduce the baseline build (build all pre-requisites)
./jenkins-scripts/tcwg_gnu-build.sh @@ artifacts/manifests/build-baseline.sh

cd gcc

# Reproduce first_bad build
git checkout --detach 8a8a7d332d5d01db5aea7336a36d9fd71a679fb1
../artifacts/test.sh

# Reproduce last_good build
git checkout --detach c60d9160b4d966dbea5b1bbea4f817c64d0bee2d
../artifacts/test.sh

cd ..
</cut>

History of pending regressions and results: 
https://git.linaro.org/toolchain/ci/base-artifacts.git/log/?h=linaro-local/ci/tcwg_gnu/gnu-master-arm-check_bootstrap

Artifacts: 
https://ci.linaro.org/job/tcwg_gcc-bisect-gnu-master-arm-check_bootstrap/72/artifact/artifacts/
Build log: 
https://ci.linaro.org/job/tcwg_gcc-bisect-gnu-master-arm-check_bootstrap/72/consoleText

Full commit (up to 1000 lines):
<cut>
commit 8a8a7d332d5d01db5aea7336a36d9fd71a679fb1
Author: Ian Lance Taylor <i...@golang.org>
Date:   Mon Jun 28 16:47:55 2021 -0700

    compiler: in composite literals use temps only for interfaces
    
    For a composite literal we only need to introduce a temporary variable
    if we may be converting to an interface type, so only do it then.
    This saves over 80% of compilation time when using gccgo to compile
    cmd/internal/obj/x86, as the GCC middle-end spends a lot of time
    pointlessly computing interactions between temporary variables.
    
    For PR debug/101064
    For golang/go#46600
    
    Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/331513
---
 gcc/go/gofrontend/MERGE          |  2 +-
 gcc/go/gofrontend/expressions.cc | 17 +++++++++++++----
 2 files changed, 14 insertions(+), 5 deletions(-)

diff --git a/gcc/go/gofrontend/MERGE b/gcc/go/gofrontend/MERGE
index f16fb9facc3..f7bcc8c484a 100644
--- a/gcc/go/gofrontend/MERGE
+++ b/gcc/go/gofrontend/MERGE
@@ -1,4 +1,4 @@
-bcafcb3c39530bb325514d6377747eb3127d1a03
+cad187fe3aceb2a7d964b64c70dfa8c8ad24ce65
 
 The first line of this file holds the git revision number of the last
 merge done from the gofrontend repository.
diff --git a/gcc/go/gofrontend/expressions.cc b/gcc/go/gofrontend/expressions.cc
index 5d45e4baab4..94342b2f9b8 100644
--- a/gcc/go/gofrontend/expressions.cc
+++ b/gcc/go/gofrontend/expressions.cc
@@ -15148,7 +15148,7 @@ Struct_construction_expression::do_copy()
 }
 
 // Flatten a struct construction expression.  Store the values into
-// temporaries in case they need interface conversion.
+// temporaries if they may need interface conversion.
 
 Expression*
 Struct_construction_expression::do_flatten(Gogo*, Named_object*,
@@ -15162,10 +15162,13 @@ Struct_construction_expression::do_flatten(Gogo*, 
Named_object*,
     return this;
 
   Location loc = this->location();
+  const Struct_field_list* fields = this->type_->struct_type()->fields();
+  Struct_field_list::const_iterator pf = fields->begin();
   for (Expression_list::iterator pv = this->vals()->begin();
        pv != this->vals()->end();
-       ++pv)
+       ++pv, ++pf)
     {
+      go_assert(pf != fields->end());
       if (*pv != NULL)
        {
           if ((*pv)->is_error_expression() || (*pv)->type()->is_error_type())
@@ -15173,7 +15176,8 @@ Struct_construction_expression::do_flatten(Gogo*, 
Named_object*,
               go_assert(saw_errors());
               return Expression::make_error(loc);
             }
-         if (!(*pv)->is_multi_eval_safe())
+         if (pf->type()->interface_type() != NULL
+             && !(*pv)->is_multi_eval_safe())
            {
              Temporary_statement* temp =
                Statement::make_temporary(NULL, *pv, loc);
@@ -15448,7 +15452,7 @@ Array_construction_expression::do_check_types(Gogo*)
 }
 
 // Flatten an array construction expression.  Store the values into
-// temporaries in case they need interface conversion.
+// temporaries if they may need interface conversion.
 
 Expression*
 Array_construction_expression::do_flatten(Gogo*, Named_object*,
@@ -15467,6 +15471,11 @@ Array_construction_expression::do_flatten(Gogo*, 
Named_object*,
   if (this->is_constant_array() || this->is_static_initializer())
     return this;
 
+  // If the array element type is not an interface type, we don't need
+  // temporaries.
+  if (this->type_->array_type()->element_type()->interface_type() == NULL)
+    return this;
+
   Location loc = this->location();
   for (Expression_list::iterator pv = this->vals()->begin();
        pv != this->vals()->end();
</cut>
_______________________________________________
linaro-toolchain mailing list
linaro-toolchain@lists.linaro.org
https://lists.linaro.org/mailman/listinfo/linaro-toolchain

Reply via email to