Successfully identified regression in *llvm* in CI configuration tcwg_bmk_llvm_tx1/llvm-release-aarch64-spec2k6-Os. So far, this commit has regressed CI configurations: - tcwg_bmk_llvm_tx1/llvm-release-aarch64-spec2k6-Os
Culprit: <cut> commit f96fef89b5eca29f2dc41e97829c20bf742cdcd9 Author: Fangrui Song i@maskray.me Date: Tue Nov 24 09:51:32 2020 -0800
[Driver] Default Generic_GCC aarch64 to -fasynchronous-unwind-tables
In GCC, `aarch64-*-linux` and `aarch64-*-freebsd` made the switch in 2018 (https://gcc.gnu.org/pipermail/gcc-patches/2018-March/495549.html). In Clang, FreeBSD/Fuchsia/NetBSD/MinGW aarch64 default to -fasynchronous-unwind-tables.
This patch defaults Generic_GCC aarch64 (which affects Linux) to use -fasynchronous-unwind-tables.
Reviewed By: nickdesaulniers
Differential Revision: https://reviews.llvm.org/D91760 </cut>
Results regressed to (for first_bad == f96fef89b5eca29f2dc41e97829c20bf742cdcd9) # reset_artifacts: -10 # build_abe binutils: -9 # build_abe stage1 -- --set gcc_override_configure=--disable-libsanitizer: -8 # build_abe linux: -7 # build_abe glibc: -6 # build_abe stage2 -- --set gcc_override_configure=--disable-libsanitizer: -5 # build_llvm true: -3 # true: 0 # benchmark -Os -- artifacts/build-f96fef89b5eca29f2dc41e97829c20bf742cdcd9/results_id: 1 # 433.milc,milc_base.default regressed by 112 # 445.gobmk,gobmk_base.default regressed by 108 # 447.dealII,dealII_base.default regressed by 102 # 400.perlbench,perlbench_base.default regressed by 109 # 401.bzip2,bzip2_base.default regressed by 107 # 403.gcc,gcc_base.default regressed by 107 # 429.mcf,mcf_base.default regressed by 110 # 450.soplex,soplex_base.default regressed by 103 # 453.povray,povray_base.default regressed by 102 # 456.hmmer,hmmer_base.default regressed by 110 # 458.sjeng,sjeng_base.default regressed by 105 # 462.libquantum,libquantum_base.default regressed by 113 # 464.h264ref,h264ref_base.default regressed by 105 # 470.lbm,lbm_base.default regressed by 108 # 471.omnetpp,omnetpp_base.default regressed by 104 # 473.astar,astar_base.default regressed by 105 # 482.sphinx3,sphinx_livepretend_base.default regressed by 110
from (for last_good == 4926eed59c77bb452539d88a0a8ba3f3c21c4016) # reset_artifacts: -10 # build_abe binutils: -9 # build_abe stage1 -- --set gcc_override_configure=--disable-libsanitizer: -8 # build_abe linux: -7 # build_abe glibc: -6 # build_abe stage2 -- --set gcc_override_configure=--disable-libsanitizer: -5 # build_llvm true: -3 # true: 0 # benchmark -Os -- artifacts/build-4926eed59c77bb452539d88a0a8ba3f3c21c4016/results_id: 1
Artifacts of last_good build: https://ci.linaro.org/job/tcwg_bmk_ci_llvm-bisect-tcwg_bmk_tx1-llvm-release-... Results ID of last_good: tx1_64/tcwg_bmk_llvm_tx1/bisect-llvm-release-aarch64-spec2k6-Os/934 Artifacts of first_bad build: https://ci.linaro.org/job/tcwg_bmk_ci_llvm-bisect-tcwg_bmk_tx1-llvm-release-... Results ID of first_bad: tx1_64/tcwg_bmk_llvm_tx1/bisect-llvm-release-aarch64-spec2k6-Os/963 Build top page/logs: https://ci.linaro.org/job/tcwg_bmk_ci_llvm-bisect-tcwg_bmk_tx1-llvm-release-...
Configuration details:
Reproduce builds: <cut> mkdir investigate-llvm-f96fef89b5eca29f2dc41e97829c20bf742cdcd9 cd investigate-llvm-f96fef89b5eca29f2dc41e97829c20bf742cdcd9
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_bmk_ci_llvm-bisect-tcwg_bmk_tx1-llvm-release-... --fail curl -o artifacts/manifests/build-parameters.sh https://ci.linaro.org/job/tcwg_bmk_ci_llvm-bisect-tcwg_bmk_tx1-llvm-release-... --fail curl -o artifacts/test.sh https://ci.linaro.org/job/tcwg_bmk_ci_llvm-bisect-tcwg_bmk_tx1-llvm-release-... --fail chmod +x artifacts/test.sh
# Reproduce the baseline build (build all pre-requisites) ./jenkins-scripts/tcwg_bmk-build.sh @@ artifacts/manifests/build-baseline.sh
cd llvm
# Reproduce first_bad build git checkout --detach f96fef89b5eca29f2dc41e97829c20bf742cdcd9 ../artifacts/test.sh
# Reproduce last_good build git checkout --detach 4926eed59c77bb452539d88a0a8ba3f3c21c4016 ../artifacts/test.sh
cd .. </cut>
History of pending regressions and results: https://git.linaro.org/toolchain/ci/base-artifacts.git/log/?h=linaro-local/c...
Artifacts: https://ci.linaro.org/job/tcwg_bmk_ci_llvm-bisect-tcwg_bmk_tx1-llvm-release-... Build log: https://ci.linaro.org/job/tcwg_bmk_ci_llvm-bisect-tcwg_bmk_tx1-llvm-release-...
Full commit (up to 1000 lines): <cut> commit f96fef89b5eca29f2dc41e97829c20bf742cdcd9 Author: Fangrui Song i@maskray.me Date: Tue Nov 24 09:51:32 2020 -0800
[Driver] Default Generic_GCC aarch64 to -fasynchronous-unwind-tables
In GCC, `aarch64-*-linux` and `aarch64-*-freebsd` made the switch in 2018 (https://gcc.gnu.org/pipermail/gcc-patches/2018-March/495549.html). In Clang, FreeBSD/Fuchsia/NetBSD/MinGW aarch64 default to -fasynchronous-unwind-tables.
This patch defaults Generic_GCC aarch64 (which affects Linux) to use -fasynchronous-unwind-tables.
Reviewed By: nickdesaulniers
Differential Revision: https://reviews.llvm.org/D91760 --- clang/lib/Driver/ToolChains/Gnu.cpp | 8 +++++++- clang/test/Driver/aarch64-features.c | 2 ++ 2 files changed, 9 insertions(+), 1 deletion(-)
diff --git a/clang/lib/Driver/ToolChains/Gnu.cpp b/clang/lib/Driver/ToolChains/Gnu.cpp index 7d75e90c6092..08158ba4bae8 100644 --- a/clang/lib/Driver/ToolChains/Gnu.cpp +++ b/clang/lib/Driver/ToolChains/Gnu.cpp @@ -2672,7 +2672,13 @@ void Generic_GCC::printVerboseInfo(raw_ostream &OS) const { }
bool Generic_GCC::IsUnwindTablesDefault(const ArgList &Args) const { - return getArch() == llvm::Triple::x86_64; + switch (getArch()) { + case llvm::Triple::aarch64: + case llvm::Triple::x86_64: + return true; + default: + return false; + } }
bool Generic_GCC::isPICDefault() const { diff --git a/clang/test/Driver/aarch64-features.c b/clang/test/Driver/aarch64-features.c index 7c3f8754049a..8d8cc3c68afe 100644 --- a/clang/test/Driver/aarch64-features.c +++ b/clang/test/Driver/aarch64-features.c @@ -1,6 +1,8 @@ // RUN: %clang -target aarch64-none-linux-gnu -### %s -fsyntax-only 2>&1 | FileCheck %s // RUN: %clang -target arm64-none-linux-gnu -### %s -fsyntax-only 2>&1 | FileCheck %s
+// CHECK: "-munwind-tables" + // The AArch64 PCS states that chars should be unsigned. // CHECK: fno-signed-char
</cut>