Successfully identified regression in *gcc* in CI configuration tcwg_bmk_gnu_tx1/gnu-release-aarch64-spec2k6-O2. So far, this commit has regressed CI configurations:
- tcwg_bmk_gnu_tx1/gnu-release-aarch64-spec2k6-O2
Culprit:
<cut>
commit df7c22831f1e48dba49479c5960c1c180d8eab2c
Author: Richard Sandiford <richard.sandiford(a)arm.com>
Date: Thu Nov 14 15:12:58 2019 +0000
Support vectorisation with mixed vector sizes
After previous patches, it's now possible to make the vectoriser
support multiple vector sizes in the same vector region, using
related_vector_mode to pick the right vector mode for a given
element mode. No port yet takes advantage of this, but I have
a follow-on patch for AArch64.
This patch also seemed like a good opportunity to add some more dump
messages: one to make it clear which vector size/mode was being used
when analysis passed or failed, and another to say when we've decided
to skip a redundant vector size/mode.
2019-11-14 Richard Sandiford <richard.sandiford(a)arm.com>
gcc/
* machmode.h (opt_machine_mode::operator==): New function.
(opt_machine_mode::operator!=): Likewise.
* tree-vectorizer.h (vec_info::vector_mode): Update comment.
(get_related_vectype_for_scalar_type): Delete.
(get_vectype_for_scalar_type_and_size): Declare.
* tree-vect-slp.c (vect_slp_bb_region): Print dump messages to say
whether analysis passed or failed, and with what vector modes.
Use related_vector_mode to check whether trying a particular
vector mode would be redundant with the autodetected mode,
and print a dump message if we decide to skip it.
* tree-vect-loop.c (vect_analyze_loop): Likewise.
(vect_create_epilog_for_reduction): Use
get_related_vectype_for_scalar_type instead of
get_vectype_for_scalar_type_and_size.
* tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): Replace
with...
(get_related_vectype_for_scalar_type): ...this new function.
Take a starting/"prevailing" vector mode rather than a vector size.
Take an optional nunits argument, with the same meaning as for
related_vector_mode. Use related_vector_mode when not
auto-detecting a mode, falling back to mode_for_vector if no
target mode exists.
(get_vectype_for_scalar_type): Update accordingly.
(get_same_sized_vectype): Likewise.
* tree-vectorizer.c (get_vec_alignment_for_array_type): Likewise.
From-SVN: r278240
</cut>
Results regressed to (for first_bad == df7c22831f1e48dba49479c5960c1c180d8eab2c)
# 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
# true:
0
# benchmark -- -O2 artifacts/build-df7c22831f1e48dba49479c5960c1c180d8eab2c/results_id:
1
# 453.povray,[.] _ZN3povL24All_Sphere_IntersectionsEPNS_13Objec regressed by 114
# 482.sphinx3,[.] subvq_mgau_shortlist regressed by 112
from (for last_good == 7f52eb891b738337d5cf82c7c440a5eea8c7b0c9)
# 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
# true:
0
# benchmark -- -O2 artifacts/build-7f52eb891b738337d5cf82c7c440a5eea8c7b0c9/results_id:
1
Artifacts of last_good build: https://ci.linaro.org/job/tcwg_bmk_ci_gnu-bisect-tcwg_bmk_tx1-gnu-release-a…
Results ID of last_good: tx1_64/tcwg_bmk_gnu_tx1/bisect-gnu-release-aarch64-spec2k6-O2/3483
Artifacts of first_bad build: https://ci.linaro.org/job/tcwg_bmk_ci_gnu-bisect-tcwg_bmk_tx1-gnu-release-a…
Results ID of first_bad: tx1_64/tcwg_bmk_gnu_tx1/bisect-gnu-release-aarch64-spec2k6-O2/3492
Build top page/logs: https://ci.linaro.org/job/tcwg_bmk_ci_gnu-bisect-tcwg_bmk_tx1-gnu-release-a…
Configuration details:
Reproduce builds:
<cut>
mkdir investigate-gcc-df7c22831f1e48dba49479c5960c1c180d8eab2c
cd investigate-gcc-df7c22831f1e48dba49479c5960c1c180d8eab2c
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_gnu-bisect-tcwg_bmk_tx1-gnu-release-a… --fail
curl -o artifacts/manifests/build-parameters.sh https://ci.linaro.org/job/tcwg_bmk_ci_gnu-bisect-tcwg_bmk_tx1-gnu-release-a… --fail
curl -o artifacts/test.sh https://ci.linaro.org/job/tcwg_bmk_ci_gnu-bisect-tcwg_bmk_tx1-gnu-release-a… --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
# Save baseline build state (which is then restored in artifacts/test.sh)
mkdir -p ./bisect
rsync -a --del --delete-excluded --exclude /bisect/ --exclude /artifacts/ --exclude /gcc/ ./ ./bisect/baseline/
cd gcc
# Reproduce first_bad build
git checkout --detach df7c22831f1e48dba49479c5960c1c180d8eab2c
../artifacts/test.sh
# Reproduce last_good build
git checkout --detach 7f52eb891b738337d5cf82c7c440a5eea8c7b0c9
../artifacts/test.sh
cd ..
</cut>
History of pending regressions and results: https://git.linaro.org/toolchain/ci/base-artifacts.git/log/?h=linaro-local/…
Artifacts: https://ci.linaro.org/job/tcwg_bmk_ci_gnu-bisect-tcwg_bmk_tx1-gnu-release-a…
Build log: https://ci.linaro.org/job/tcwg_bmk_ci_gnu-bisect-tcwg_bmk_tx1-gnu-release-a…
Full commit (up to 1000 lines):
<cut>
commit df7c22831f1e48dba49479c5960c1c180d8eab2c
Author: Richard Sandiford <richard.sandiford(a)arm.com>
Date: Thu Nov 14 15:12:58 2019 +0000
Support vectorisation with mixed vector sizes
After previous patches, it's now possible to make the vectoriser
support multiple vector sizes in the same vector region, using
related_vector_mode to pick the right vector mode for a given
element mode. No port yet takes advantage of this, but I have
a follow-on patch for AArch64.
This patch also seemed like a good opportunity to add some more dump
messages: one to make it clear which vector size/mode was being used
when analysis passed or failed, and another to say when we've decided
to skip a redundant vector size/mode.
2019-11-14 Richard Sandiford <richard.sandiford(a)arm.com>
gcc/
* machmode.h (opt_machine_mode::operator==): New function.
(opt_machine_mode::operator!=): Likewise.
* tree-vectorizer.h (vec_info::vector_mode): Update comment.
(get_related_vectype_for_scalar_type): Delete.
(get_vectype_for_scalar_type_and_size): Declare.
* tree-vect-slp.c (vect_slp_bb_region): Print dump messages to say
whether analysis passed or failed, and with what vector modes.
Use related_vector_mode to check whether trying a particular
vector mode would be redundant with the autodetected mode,
and print a dump message if we decide to skip it.
* tree-vect-loop.c (vect_analyze_loop): Likewise.
(vect_create_epilog_for_reduction): Use
get_related_vectype_for_scalar_type instead of
get_vectype_for_scalar_type_and_size.
* tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): Replace
with...
(get_related_vectype_for_scalar_type): ...this new function.
Take a starting/"prevailing" vector mode rather than a vector size.
Take an optional nunits argument, with the same meaning as for
related_vector_mode. Use related_vector_mode when not
auto-detecting a mode, falling back to mode_for_vector if no
target mode exists.
(get_vectype_for_scalar_type): Update accordingly.
(get_same_sized_vectype): Likewise.
* tree-vectorizer.c (get_vec_alignment_for_array_type): Likewise.
From-SVN: r278240
---
gcc/ChangeLog | 28 +++++++++++++++++++++++++
gcc/machmode.h | 3 +++
gcc/tree-vect-loop.c | 54 +++++++++++++++++++++++++++++++++++-------------
gcc/tree-vect-slp.c | 33 +++++++++++++++++++++++++----
gcc/tree-vect-stmts.c | 57 ++++++++++++++++++++++++++++++++++++---------------
gcc/tree-vectorizer.c | 2 +-
gcc/tree-vectorizer.h | 8 +++++---
7 files changed, 147 insertions(+), 38 deletions(-)
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 41c94140b1a..680aa85121a 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,31 @@
+2019-11-14 Richard Sandiford <richard.sandiford(a)arm.com>
+
+ * machmode.h (opt_machine_mode::operator==): New function.
+ (opt_machine_mode::operator!=): Likewise.
+ * tree-vectorizer.h (vec_info::vector_mode): Update comment.
+ (get_related_vectype_for_scalar_type): Delete.
+ (get_vectype_for_scalar_type_and_size): Declare.
+ * tree-vect-slp.c (vect_slp_bb_region): Print dump messages to say
+ whether analysis passed or failed, and with what vector modes.
+ Use related_vector_mode to check whether trying a particular
+ vector mode would be redundant with the autodetected mode,
+ and print a dump message if we decide to skip it.
+ * tree-vect-loop.c (vect_analyze_loop): Likewise.
+ (vect_create_epilog_for_reduction): Use
+ get_related_vectype_for_scalar_type instead of
+ get_vectype_for_scalar_type_and_size.
+ * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): Replace
+ with...
+ (get_related_vectype_for_scalar_type): ...this new function.
+ Take a starting/"prevailing" vector mode rather than a vector size.
+ Take an optional nunits argument, with the same meaning as for
+ related_vector_mode. Use related_vector_mode when not
+ auto-detecting a mode, falling back to mode_for_vector if no
+ target mode exists.
+ (get_vectype_for_scalar_type): Update accordingly.
+ (get_same_sized_vectype): Likewise.
+ * tree-vectorizer.c (get_vec_alignment_for_array_type): Likewise.
+
2019-11-14 Richard Sandiford <richard.sandiford(a)arm.com>
* tree-vect-stmts.c (vectorizable_call): Require the types
diff --git a/gcc/machmode.h b/gcc/machmode.h
index 6750833c2fe..a507ed66c3f 100644
--- a/gcc/machmode.h
+++ b/gcc/machmode.h
@@ -258,6 +258,9 @@ public:
bool exists () const;
template<typename U> bool exists (U *) const;
+ bool operator== (const T &m) const { return m_mode == m; }
+ bool operator!= (const T &m) const { return m_mode != m; }
+
private:
machine_mode m_mode;
};
diff --git a/gcc/tree-vect-loop.c b/gcc/tree-vect-loop.c
index 213d620ed2c..e60c159d11a 100644
--- a/gcc/tree-vect-loop.c
+++ b/gcc/tree-vect-loop.c
@@ -2435,6 +2435,17 @@ vect_analyze_loop (class loop *loop, vec_info_shared *shared)
res = vect_analyze_loop_2 (loop_vinfo, fatal, &n_stmts);
if (mode_i == 0)
autodetected_vector_mode = loop_vinfo->vector_mode;
+ if (dump_enabled_p ())
+ {
+ if (res)
+ dump_printf_loc (MSG_NOTE, vect_location,
+ "***** Analysis succeeded with vector mode %s\n",
+ GET_MODE_NAME (loop_vinfo->vector_mode));
+ else
+ dump_printf_loc (MSG_NOTE, vect_location,
+ "***** Analysis failed with vector mode %s\n",
+ GET_MODE_NAME (loop_vinfo->vector_mode));
+ }
loop->aux = NULL;
if (res)
@@ -2501,9 +2512,22 @@ vect_analyze_loop (class loop *loop, vec_info_shared *shared)
}
if (mode_i < vector_modes.length ()
- && known_eq (GET_MODE_SIZE (vector_modes[mode_i]),
- GET_MODE_SIZE (autodetected_vector_mode)))
- mode_i += 1;
+ && VECTOR_MODE_P (autodetected_vector_mode)
+ && (related_vector_mode (vector_modes[mode_i],
+ GET_MODE_INNER (autodetected_vector_mode))
+ == autodetected_vector_mode)
+ && (related_vector_mode (autodetected_vector_mode,
+ GET_MODE_INNER (vector_modes[mode_i]))
+ == vector_modes[mode_i]))
+ {
+ if (dump_enabled_p ())
+ dump_printf_loc (MSG_NOTE, vect_location,
+ "***** Skipping vector mode %s, which would"
+ " repeat the analysis for %s\n",
+ GET_MODE_NAME (vector_modes[mode_i]),
+ GET_MODE_NAME (autodetected_vector_mode));
+ mode_i += 1;
+ }
if (mode_i == vector_modes.length ()
|| autodetected_vector_mode == VOIDmode)
@@ -4898,13 +4922,14 @@ vect_create_epilog_for_reduction (stmt_vec_info stmt_info,
halves against each other. */
enum machine_mode mode1 = mode;
tree stype = TREE_TYPE (vectype);
- unsigned sz = tree_to_uhwi (TYPE_SIZE_UNIT (vectype));
- unsigned sz1 = sz;
+ unsigned nunits = TYPE_VECTOR_SUBPARTS (vectype).to_constant ();
+ unsigned nunits1 = nunits;
if (!slp_reduc
&& (mode1 = targetm.vectorize.split_reduction (mode)) != mode)
- sz1 = GET_MODE_SIZE (mode1).to_constant ();
+ nunits1 = GET_MODE_NUNITS (mode1).to_constant ();
- tree vectype1 = get_vectype_for_scalar_type_and_size (stype, sz1);
+ tree vectype1 = get_related_vectype_for_scalar_type (TYPE_MODE (vectype),
+ stype, nunits1);
reduce_with_shift = have_whole_vector_shift (mode1);
if (!VECTOR_MODE_P (mode1))
reduce_with_shift = false;
@@ -4918,11 +4943,13 @@ vect_create_epilog_for_reduction (stmt_vec_info stmt_info,
/* First reduce the vector to the desired vector size we should
do shift reduction on by combining upper and lower halves. */
new_temp = new_phi_result;
- while (sz > sz1)
+ while (nunits > nunits1)
{
gcc_assert (!slp_reduc);
- sz /= 2;
- vectype1 = get_vectype_for_scalar_type_and_size (stype, sz);
+ nunits /= 2;
+ vectype1 = get_related_vectype_for_scalar_type (TYPE_MODE (vectype),
+ stype, nunits);
+ unsigned int bitsize = tree_to_uhwi (TYPE_SIZE (vectype1));
/* The target has to make sure we support lowpart/highpart
extraction, either via direct vector extract or through
@@ -4947,15 +4974,14 @@ vect_create_epilog_for_reduction (stmt_vec_info stmt_info,
= gimple_build_assign (dst2, BIT_FIELD_REF,
build3 (BIT_FIELD_REF, vectype1,
new_temp, TYPE_SIZE (vectype1),
- bitsize_int (sz * BITS_PER_UNIT)));
+ bitsize_int (bitsize)));
gsi_insert_before (&exit_gsi, epilog_stmt, GSI_SAME_STMT);
}
else
{
/* Extract via punning to appropriately sized integer mode
vector. */
- tree eltype = build_nonstandard_integer_type (sz * BITS_PER_UNIT,
- 1);
+ tree eltype = build_nonstandard_integer_type (bitsize, 1);
tree etype = build_vector_type (eltype, 2);
gcc_assert (convert_optab_handler (vec_extract_optab,
TYPE_MODE (etype),
@@ -4984,7 +5010,7 @@ vect_create_epilog_for_reduction (stmt_vec_info stmt_info,
= gimple_build_assign (tem, BIT_FIELD_REF,
build3 (BIT_FIELD_REF, eltype,
new_temp, TYPE_SIZE (eltype),
- bitsize_int (sz * BITS_PER_UNIT)));
+ bitsize_int (bitsize)));
gsi_insert_before (&exit_gsi, epilog_stmt, GSI_SAME_STMT);
dst2 = make_ssa_name (vectype1);
epilog_stmt = gimple_build_assign (dst2, VIEW_CONVERT_EXPR,
diff --git a/gcc/tree-vect-slp.c b/gcc/tree-vect-slp.c
index 3885d9cbe4a..1e00db5a326 100644
--- a/gcc/tree-vect-slp.c
+++ b/gcc/tree-vect-slp.c
@@ -3203,7 +3203,12 @@ vect_slp_bb_region (gimple_stmt_iterator region_begin,
&& dbg_cnt (vect_slp))
{
if (dump_enabled_p ())
- dump_printf_loc (MSG_NOTE, vect_location, "SLPing BB part\n");
+ {
+ dump_printf_loc (MSG_NOTE, vect_location,
+ "***** Analysis succeeded with vector mode"
+ " %s\n", GET_MODE_NAME (bb_vinfo->vector_mode));
+ dump_printf_loc (MSG_NOTE, vect_location, "SLPing BB part\n");
+ }
bb_vinfo->shared->check_datarefs ();
vect_schedule_slp (bb_vinfo);
@@ -3223,6 +3228,13 @@ vect_slp_bb_region (gimple_stmt_iterator region_begin,
vectorized = true;
}
+ else
+ {
+ if (dump_enabled_p ())
+ dump_printf_loc (MSG_NOTE, vect_location,
+ "***** Analysis failed with vector mode %s\n",
+ GET_MODE_NAME (bb_vinfo->vector_mode));
+ }
if (mode_i == 0)
autodetected_vector_mode = bb_vinfo->vector_mode;
@@ -3230,9 +3242,22 @@ vect_slp_bb_region (gimple_stmt_iterator region_begin,
delete bb_vinfo;
if (mode_i < vector_modes.length ()
- && known_eq (GET_MODE_SIZE (vector_modes[mode_i]),
- GET_MODE_SIZE (autodetected_vector_mode)))
- mode_i += 1;
+ && VECTOR_MODE_P (autodetected_vector_mode)
+ && (related_vector_mode (vector_modes[mode_i],
+ GET_MODE_INNER (autodetected_vector_mode))
+ == autodetected_vector_mode)
+ && (related_vector_mode (autodetected_vector_mode,
+ GET_MODE_INNER (vector_modes[mode_i]))
+ == vector_modes[mode_i]))
+ {
+ if (dump_enabled_p ())
+ dump_printf_loc (MSG_NOTE, vect_location,
+ "***** Skipping vector mode %s, which would"
+ " repeat the analysis for %s\n",
+ GET_MODE_NAME (vector_modes[mode_i]),
+ GET_MODE_NAME (autodetected_vector_mode));
+ mode_i += 1;
+ }
if (vectorized
|| mode_i == vector_modes.length ()
diff --git a/gcc/tree-vect-stmts.c b/gcc/tree-vect-stmts.c
index 80f59accad7..36f832bb522 100644
--- a/gcc/tree-vect-stmts.c
+++ b/gcc/tree-vect-stmts.c
@@ -11138,18 +11138,28 @@ vect_remove_stores (stmt_vec_info first_stmt_info)
}
}
-/* Function get_vectype_for_scalar_type_and_size.
+/* If NUNITS is nonzero, return a vector type that contains NUNITS
+ elements of type SCALAR_TYPE, or null if the target doesn't support
+ such a type.
- Returns the vector type corresponding to SCALAR_TYPE and SIZE as supported
- by the target. */
+ If NUNITS is zero, return a vector type that contains elements of
+ type SCALAR_TYPE, choosing whichever vector size the target prefers.
+
+ If PREVAILING_MODE is VOIDmode, we have not yet chosen a vector mode
+ for this vectorization region and want to "autodetect" the best choice.
+ Otherwise, PREVAILING_MODE is a previously-chosen vector TYPE_MODE
+ and we want the new type to be interoperable with it. PREVAILING_MODE
+ in this case can be a scalar integer mode or a vector mode; when it
+ is a vector mode, the function acts like a tree-level version of
+ related_vector_mode. */
tree
-get_vectype_for_scalar_type_and_size (tree scalar_type, poly_uint64 size)
+get_related_vectype_for_scalar_type (machine_mode prevailing_mode,
+ tree scalar_type, poly_uint64 nunits)
{
tree orig_scalar_type = scalar_type;
scalar_mode inner_mode;
machine_mode simd_mode;
- poly_uint64 nunits;
tree vectype;
if (!is_int_mode (TYPE_MODE (scalar_type), &inner_mode)
@@ -11189,10 +11199,11 @@ get_vectype_for_scalar_type_and_size (tree scalar_type, poly_uint64 size)
if (scalar_type == NULL_TREE)
return NULL_TREE;
- /* If no size was supplied use the mode the target prefers. Otherwise
- lookup a vector mode of the specified size. */
- if (known_eq (size, 0U))
+ /* If no prevailing mode was supplied, use the mode the target prefers.
+ Otherwise lookup a vector mode based on the prevailing mode. */
+ if (prevailing_mode == VOIDmode)
{
+ gcc_assert (known_eq (nunits, 0U));
simd_mode = targetm.vectorize.preferred_simd_mode (inner_mode);
if (SCALAR_INT_MODE_P (simd_mode))
{
@@ -11208,9 +11219,19 @@ get_vectype_for_scalar_type_and_size (tree scalar_type, poly_uint64 size)
return NULL_TREE;
}
}
- else if (!multiple_p (size, nbytes, &nunits)
- || !mode_for_vector (inner_mode, nunits).exists (&simd_mode))
- return NULL_TREE;
+ else if (SCALAR_INT_MODE_P (prevailing_mode)
+ || !related_vector_mode (prevailing_mode,
+ inner_mode, nunits).exists (&simd_mode))
+ {
+ /* Fall back to using mode_for_vector, mostly in the hope of being
+ able to use an integer mode. */
+ if (known_eq (nunits, 0U)
+ && !multiple_p (GET_MODE_SIZE (prevailing_mode), nbytes, &nunits))
+ return NULL_TREE;
+
+ if (!mode_for_vector (inner_mode, nunits).exists (&simd_mode))
+ return NULL_TREE;
+ }
vectype = build_vector_type_for_mode (scalar_type, simd_mode);
@@ -11238,9 +11259,8 @@ get_vectype_for_scalar_type_and_size (tree scalar_type, poly_uint64 size)
tree
get_vectype_for_scalar_type (vec_info *vinfo, tree scalar_type)
{
- tree vectype;
- poly_uint64 vector_size = GET_MODE_SIZE (vinfo->vector_mode);
- vectype = get_vectype_for_scalar_type_and_size (scalar_type, vector_size);
+ tree vectype = get_related_vectype_for_scalar_type (vinfo->vector_mode,
+ scalar_type);
if (vectype && vinfo->vector_mode == VOIDmode)
vinfo->vector_mode = TYPE_MODE (vectype);
return vectype;
@@ -11273,8 +11293,13 @@ get_same_sized_vectype (tree scalar_type, tree vector_type)
if (VECT_SCALAR_BOOLEAN_TYPE_P (scalar_type))
return truth_type_for (vector_type);
- return get_vectype_for_scalar_type_and_size
- (scalar_type, GET_MODE_SIZE (TYPE_MODE (vector_type)));
+ poly_uint64 nunits;
+ if (!multiple_p (GET_MODE_SIZE (TYPE_MODE (vector_type)),
+ GET_MODE_SIZE (TYPE_MODE (scalar_type)), &nunits))
+ return NULL_TREE;
+
+ return get_related_vectype_for_scalar_type (TYPE_MODE (vector_type),
+ scalar_type, nunits);
}
/* Function vect_is_simple_use.
diff --git a/gcc/tree-vectorizer.c b/gcc/tree-vectorizer.c
index d6de78350e6..7be81a0b27f 100644
--- a/gcc/tree-vectorizer.c
+++ b/gcc/tree-vectorizer.c
@@ -1359,7 +1359,7 @@ get_vec_alignment_for_array_type (tree type)
poly_uint64 array_size, vector_size;
tree scalar_type = strip_array_types (type);
- tree vectype = get_vectype_for_scalar_type_and_size (scalar_type, 0);
+ tree vectype = get_related_vectype_for_scalar_type (VOIDmode, scalar_type);
if (!vectype
|| !poly_int_tree_p (TYPE_SIZE (type), &array_size)
|| !poly_int_tree_p (TYPE_SIZE (vectype), &vector_size)
diff --git a/gcc/tree-vectorizer.h b/gcc/tree-vectorizer.h
index f6efed1f863..fadc4d89d16 100644
--- a/gcc/tree-vectorizer.h
+++ b/gcc/tree-vectorizer.h
@@ -335,8 +335,9 @@ public:
/* Cost data used by the target cost model. */
void *target_cost_data;
- /* If we've chosen a vector size for this vectorization region,
- this is one mode that has such a size, otherwise it is VOIDmode. */
+ /* The argument we should pass to related_vector_mode when looking up
+ the vector mode for a scalar mode, or VOIDmode if we haven't yet
+ made any decisions about which vector modes to use. */
machine_mode vector_mode;
private:
@@ -1624,8 +1625,9 @@ extern bool vect_can_advance_ivs_p (loop_vec_info);
extern void vect_update_inits_of_drs (loop_vec_info, tree, tree_code);
/* In tree-vect-stmts.c. */
+extern tree get_related_vectype_for_scalar_type (machine_mode, tree,
+ poly_uint64 = 0);
extern tree get_vectype_for_scalar_type (vec_info *, tree);
-extern tree get_vectype_for_scalar_type_and_size (tree, poly_uint64);
extern tree get_mask_type_for_scalar_type (vec_info *, tree);
extern tree get_same_sized_vectype (tree, tree);
extern bool vect_get_loop_mask_type (loop_vec_info);
</cut>
VirtIO Initiative ([STR-9])
===========================
- posted Enabling hypervisor agnosticism for VirtIO backends
Message-Id: <87v94ldrqq.fsf(a)linaro.org>
VirtIO RPMB ([STR-5])
- made more progress and now have PROGRAM_KEY/WRITE_COUNTER done -
feels like it's getting faster
[hacking branch] <https://github.com/stsquad/virtio-rpmb/tree/hacking>
Fix VirtIO spec as per Rucha's email
------------------------------------
QEMU Upstream Work ([UM-2])
===========================
- posted [PATCH for 6.1-rc3 v1 0/4] gitlab and plugins pre-PR
Message-Id: <20210806141015.2487502-1-alex.bennee(a)linaro.org>
- prepared a potential [pull request for testing issues] but looks
like it will wait for 6.2
[pull request for testing issues]
<https://github.com/stsquad/qemu/tree/pr/120821-for-6.1-rc4-1>
Write a generic overview of vhost user usage for the manual
Enable plugins by default on TCG builds
- [X] clean-up testing matrix
Completed Reviews [10/10]
=========================
[PATCH 00/13] new plugin argument passing scheme
Message-Id: <20210717100920.240793-1-ma.mandourr(a)gmail.com>
[PATCH 0/9] new plugin argument passing scheme
Message-Id: <20210716080345.136784-1-ma.mandourr(a)gmail.com>
[RFC PATCH] Subject: [RFC PATCH] plugins: Passed the parsed arguments directly to plugins
Message-Id: <20210623155553.481099-1-ma.mandourr(a)gmail.com>
[PATCH 3/6] plugins/cache: Fixed a use-after-free bug with multithreaded usermode
Message-Id: <20210714172151.8494-4-ma.mandourr(a)gmail.com>
[PATCH v8] tests/tcg/s390x: Test SIGILL and SIGSEGV handling
Message-Id: <20210804225146.154513-1-iii(a)linux.ibm.com>
[RFC PATCH v2] Add a post for the new TCG cache modelling plugin
Message-Id: <20210617121707.764126-1-ma.mandourr(a)gmail.com>
[PATCH for 6.1] plugins: do not limit exported symbols if modules are active
Message-Id: <20210811100550.54714-1-pbonzini(a)redhat.com>
[PATCH v4 00/13] new plugin argument passing scheme
Message-Id: <20210730135817.17816-1-ma.mandourr(a)gmail.com>
[PATCH 0/6] docs/devel: Organize devel manual into further subsections
Message-Id: <20210804005621.1577302-1-jsnow(a)redhat.com>
[PATCH] Makefile: Fix cscope issues on MacOS and soft links
Message-Id: <20210801171144.60412-1-peterx(a)redhat.com>
Absences
========
- Another partial week
- On holiday for rest of August
Current Review Queue
====================
TODO [PATCH v3] accel/tcg: Clear PAGE_WRITE before translation
Message-Id: <20210805204835.158918-1-iii(a)linux.ibm.com>
=====================================================================================================================
TODO [PATCH 0/7] tcg: some small towards more modular tcg
Message-Id: <20210804143826.3402872-1-kraxel(a)redhat.com>
=================================================================================================================
TODO [PATCH 0/2] Acceptance Tests: clean up of temporary dirs and MAINTAINERS entry
Message-Id: <20210803193447.3946219-1-crosa(a)redhat.com>
==========================================================================================================================================
TODO [PATCH v2 00/11] Atomic cleanup + clang-12 build fix
Message-Id: <20210717014121.1784956-1-richard.henderson(a)linaro.org>
============================================================================================================================
--
Alex Bennée
Progress:
* UM-2 [QEMU upstream maintainership]
+ Getting rc3 out of the door
+ Finished the systick timer refactoring series and sent it out for
review (it ended up weighing in at 25 patches...)
+ Worked through some Coverity issue reports to analyze them and
either close as false-positive or send out patches fixing them
-- PMM
I'm compiling and running a bare metal AArch64 bootloader using 3
different compilers: the Linaro / ARM GCC 10.3.1 compiler, the Linaro /
ARM GCC 10.2.1 compiler, and an in-house built GCC 10.2.0 compiler.
GDB will single step using the either of the GCC 10.2 compilers; but
runs without halting when step is requested - or perhaps steps multiple
instructions - when built using the Linaro / ARM-supplied GCC 10.3.1.
Eclipse CDT (v4.20 aka 2021-06) is able to correlate debugging
information from binaries built with either of the gcc 10.2 toolchains,
and to single step correctly through the program. Breakpoints work as
expected. Registers display fine.
Eclipse CDT is not able to correlate current PC location to source code
using the binary built with Linaro / ARM 10.3, instead bringing up a
disassembly window. Breakpoints placed at assembly instructions in the
editor do not work.
I've tried three different GDB versions - ARM's supplied 10.2 and 10.3
GDB, and the in-house built GDB. Results are the same.
The same makefile is used to create the binaries, with just a few macro
definitions to switch. The only compiler flag of interest is
-march=armv8.2-a (and of course -g -O0). -mtune=cortex-a53 doesn't help.
The board is connected via JTAG using OpenOCD 0.11.0+ and an Olimex
ARM-USB-OCD-H adapter.
I'm building in a cygwin shell on Windows 10 version 21H1 using the
compilers:
gcc-arm-10.3-2021.07-mingw-w64-i686-aarch64-none-elf.tar.xz
gcc-arm-10.2-2020.11-mingw-w64-i686-aarch64-none-elf.tar.xz
downloaded from:
https://developer.arm.com/tools-and-software/open-source-software/developer…
Differences in compiler configuration (gcc -v) are:
Failing - Linaro / ARM GCC 10.3(.1):
--enable-checking=release
--target=aarch64-none-elf
--with-libiconv-prefix=/data/jenkins/workspace/GNU-toolchain/arm-10-4/build-mingw-aarch64-none-elf/host-tools
Working - in house GCC 10.2.1:
--build=x86_64-w64-mingw32
--disable-libffi
--disable-libgomp
--disable-libmudflap
--disable-libssp
--disable-libstdcxx-pch
--disable-lto
--disable-win32-registry
--enable-multilib
--target=aarch64-elf
--with-gcc
--with-gnu-as
--with-gnu-ld
--with-host-libstdcxx='-static-libgcc -Wl,-Bstatic,-lstdc++,-Bdynamic -lm'
--with-multilib-list=lp64,ilp32
--with-stabs
--with-sysroot=/build/aarch64-elf_10.2.0/cross-gcc/aarch64-elf
--with-zstd=/build/aarch64-elf_10.2.0/host
Has anyone been able to perform hardware debugging of binaries built
with the latest 10.3 builds using GDB (and maybe even Eclipse CDT)?
Any suggestions as to other steps to try?
Thanks.
== This Week ==
* GNU-708 (Attribute to mark param as const)
- Created prototype patch
- Discussions on gcc mailing list
* PR66791 (replace builtins in intrinsics with vector extensions)
- Fixed issue with PR98435 test-case as suggested by Christophe
- Pinged patches for review.
== Next Week ==
- GNU-708, PR66791
Successfully identified regression in *gcc* in CI configuration tcwg_bmk_gnu_tk1/gnu-master-arm-spec2k6-O3_LTO. So far, this commit has regressed CI configurations:
- tcwg_bmk_gnu_tk1/gnu-master-arm-spec2k6-O3_LTO
Culprit:
<cut>
commit f31da42e047e8018ca6ad9809273bc7efb6ffcaf
Author: Richard Biener <rguenther(a)suse.de>
Date: Fri Aug 6 14:39:05 2021 +0200
tree-optimization/101801 - remove vect_worthwhile_without_simd_p
This removes the cost part of vect_worthwhile_without_simd_p, retaining
only the correctness bits. The reason is that the cost heuristic
do not properly account for SLP plus the check whether "without simd"
applies misfires for AVX512 mask vectors at the moment, leading to
missed vectorizations there.
Any costing decision should take place in the cost modeling, no
single stmt is to disable all vectorization on its own.
2021-08-06 Richard Biener <rguenther(a)suse.de>
PR tree-optimization/101801
* tree-vectorizer.h (vect_worthwhile_without_simd_p): Rename...
(vect_can_vectorize_without_simd_p): ... to this.
* tree-vect-loop.c (vect_worthwhile_without_simd_p): Rename...
(vect_can_vectorize_without_simd_p): ... to this and fold
in vect_min_worthwhile_factor.
(vect_min_worthwhile_factor): Remove.
(vectorizable_reduction): Adjust and remove the cost part.
* tree-vect-stmts.c (vectorizable_shift): Likewise.
(vectorizable_operation): Likewise.
</cut>
Results regressed to (for first_bad == f31da42e047e8018ca6ad9809273bc7efb6ffcaf)
# reset_artifacts:
-10
# build_abe binutils:
-9
# build_abe stage1 -- --set gcc_override_configure=--with-mode=arm --set gcc_override_configure=--disable-libsanitizer:
-8
# build_abe linux:
-7
# build_abe glibc:
-6
# build_abe stage2 -- --set gcc_override_configure=--with-mode=arm --set gcc_override_configure=--disable-libsanitizer:
-5
# true:
0
# benchmark -- -O3_LTO_marm artifacts/build-f31da42e047e8018ca6ad9809273bc7efb6ffcaf/results_id:
1
# 482.sphinx3,sphinx_livepretend_base.default regressed by 105
from (for last_good == c2a984a3570b908a44a35e43bb48f0a05196156a)
# reset_artifacts:
-10
# build_abe binutils:
-9
# build_abe stage1 -- --set gcc_override_configure=--with-mode=arm --set gcc_override_configure=--disable-libsanitizer:
-8
# build_abe linux:
-7
# build_abe glibc:
-6
# build_abe stage2 -- --set gcc_override_configure=--with-mode=arm --set gcc_override_configure=--disable-libsanitizer:
-5
# true:
0
# benchmark -- -O3_LTO_marm artifacts/build-c2a984a3570b908a44a35e43bb48f0a05196156a/results_id:
1
Artifacts of last_good build: https://ci.linaro.org/job/tcwg_bmk_ci_gnu-bisect-tcwg_bmk_tk1-gnu-master-ar…
Results ID of last_good: tk1_32/tcwg_bmk_gnu_tk1/bisect-gnu-master-arm-spec2k6-O3_LTO/3203
Artifacts of first_bad build: https://ci.linaro.org/job/tcwg_bmk_ci_gnu-bisect-tcwg_bmk_tk1-gnu-master-ar…
Results ID of first_bad: tk1_32/tcwg_bmk_gnu_tk1/bisect-gnu-master-arm-spec2k6-O3_LTO/3211
Build top page/logs: https://ci.linaro.org/job/tcwg_bmk_ci_gnu-bisect-tcwg_bmk_tk1-gnu-master-ar…
Configuration details:
Reproduce builds:
<cut>
mkdir investigate-gcc-f31da42e047e8018ca6ad9809273bc7efb6ffcaf
cd investigate-gcc-f31da42e047e8018ca6ad9809273bc7efb6ffcaf
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_gnu-bisect-tcwg_bmk_tk1-gnu-master-ar… --fail
curl -o artifacts/manifests/build-parameters.sh https://ci.linaro.org/job/tcwg_bmk_ci_gnu-bisect-tcwg_bmk_tk1-gnu-master-ar… --fail
curl -o artifacts/test.sh https://ci.linaro.org/job/tcwg_bmk_ci_gnu-bisect-tcwg_bmk_tk1-gnu-master-ar… --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
# Save baseline build state (which is then restored in artifacts/test.sh)
mkdir -p ./bisect
rsync -a --del --delete-excluded --exclude /bisect/ --exclude /artifacts/ --exclude /gcc/ ./ ./bisect/baseline/
cd gcc
# Reproduce first_bad build
git checkout --detach f31da42e047e8018ca6ad9809273bc7efb6ffcaf
../artifacts/test.sh
# Reproduce last_good build
git checkout --detach c2a984a3570b908a44a35e43bb48f0a05196156a
../artifacts/test.sh
cd ..
</cut>
History of pending regressions and results: https://git.linaro.org/toolchain/ci/base-artifacts.git/log/?h=linaro-local/…
Artifacts: https://ci.linaro.org/job/tcwg_bmk_ci_gnu-bisect-tcwg_bmk_tk1-gnu-master-ar…
Build log: https://ci.linaro.org/job/tcwg_bmk_ci_gnu-bisect-tcwg_bmk_tk1-gnu-master-ar…
Full commit (up to 1000 lines):
<cut>
commit f31da42e047e8018ca6ad9809273bc7efb6ffcaf
Author: Richard Biener <rguenther(a)suse.de>
Date: Fri Aug 6 14:39:05 2021 +0200
tree-optimization/101801 - remove vect_worthwhile_without_simd_p
This removes the cost part of vect_worthwhile_without_simd_p, retaining
only the correctness bits. The reason is that the cost heuristic
do not properly account for SLP plus the check whether "without simd"
applies misfires for AVX512 mask vectors at the moment, leading to
missed vectorizations there.
Any costing decision should take place in the cost modeling, no
single stmt is to disable all vectorization on its own.
2021-08-06 Richard Biener <rguenther(a)suse.de>
PR tree-optimization/101801
* tree-vectorizer.h (vect_worthwhile_without_simd_p): Rename...
(vect_can_vectorize_without_simd_p): ... to this.
* tree-vect-loop.c (vect_worthwhile_without_simd_p): Rename...
(vect_can_vectorize_without_simd_p): ... to this and fold
in vect_min_worthwhile_factor.
(vect_min_worthwhile_factor): Remove.
(vectorizable_reduction): Adjust and remove the cost part.
* tree-vect-stmts.c (vectorizable_shift): Likewise.
(vectorizable_operation): Likewise.
---
gcc/tree-vect-loop.c | 43 +++++++------------------------------------
gcc/tree-vect-stmts.c | 26 ++------------------------
gcc/tree-vectorizer.h | 2 +-
3 files changed, 10 insertions(+), 61 deletions(-)
diff --git a/gcc/tree-vect-loop.c b/gcc/tree-vect-loop.c
index 1e21fe6b13d..37c7daa7f9e 100644
--- a/gcc/tree-vect-loop.c
+++ b/gcc/tree-vect-loop.c
@@ -7227,24 +7227,13 @@ vectorizable_reduction (loop_vec_info loop_vinfo,
if (dump_enabled_p ())
dump_printf (MSG_NOTE, "op not supported by target.\n");
if (maybe_ne (GET_MODE_SIZE (vec_mode), UNITS_PER_WORD)
- || !vect_worthwhile_without_simd_p (loop_vinfo, code))
+ || !vect_can_vectorize_without_simd_p (code))
ok = false;
else
if (dump_enabled_p ())
dump_printf (MSG_NOTE, "proceeding using word mode.\n");
}
- /* Worthwhile without SIMD support? */
- if (ok
- && !VECTOR_MODE_P (TYPE_MODE (vectype_in))
- && !vect_worthwhile_without_simd_p (loop_vinfo, code))
- {
- if (dump_enabled_p ())
- dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location,
- "not worthwhile without SIMD support.\n");
- ok = false;
- }
-
/* lane-reducing operations have to go through vect_transform_reduction.
For the other cases try without the single cycle optimization. */
if (!ok)
@@ -7948,46 +7937,28 @@ vectorizable_phi (vec_info *,
}
-/* Function vect_min_worthwhile_factor.
+/* Return true if we can emulate CODE on an integer mode representation
+ of a vector. */
- For a loop where we could vectorize the operation indicated by CODE,
- return the minimum vectorization factor that makes it worthwhile
- to use generic vectors. */
-static unsigned int
-vect_min_worthwhile_factor (enum tree_code code)
+bool
+vect_can_vectorize_without_simd_p (tree_code code)
{
switch (code)
{
case PLUS_EXPR:
case MINUS_EXPR:
case NEGATE_EXPR:
- return 4;
-
case BIT_AND_EXPR:
case BIT_IOR_EXPR:
case BIT_XOR_EXPR:
case BIT_NOT_EXPR:
- return 2;
+ return true;
default:
- return INT_MAX;
+ return false;
}
}
-/* Return true if VINFO indicates we are doing loop vectorization and if
- it is worth decomposing CODE operations into scalar operations for
- that loop's vectorization factor. */
-
-bool
-vect_worthwhile_without_simd_p (vec_info *vinfo, tree_code code)
-{
- loop_vec_info loop_vinfo = dyn_cast <loop_vec_info> (vinfo);
- unsigned HOST_WIDE_INT value;
- return (loop_vinfo
- && LOOP_VINFO_VECT_FACTOR (loop_vinfo).is_constant (&value)
- && value >= vect_min_worthwhile_factor (code));
-}
-
/* Function vectorizable_induction
Check if STMT_INFO performs an induction computation that can be vectorized.
diff --git a/gcc/tree-vect-stmts.c b/gcc/tree-vect-stmts.c
index 94bdb74ea8d..5b94d41e292 100644
--- a/gcc/tree-vect-stmts.c
+++ b/gcc/tree-vect-stmts.c
@@ -5685,24 +5685,13 @@ vectorizable_shift (vec_info *vinfo,
/* Check only during analysis. */
if (maybe_ne (GET_MODE_SIZE (vec_mode), UNITS_PER_WORD)
|| (!vec_stmt
- && !vect_worthwhile_without_simd_p (vinfo, code)))
+ && !vect_can_vectorize_without_simd_p (code)))
return false;
if (dump_enabled_p ())
dump_printf_loc (MSG_NOTE, vect_location,
"proceeding using word mode.\n");
}
- /* Worthwhile without SIMD support? Check only during analysis. */
- if (!vec_stmt
- && !VECTOR_MODE_P (TYPE_MODE (vectype))
- && !vect_worthwhile_without_simd_p (vinfo, code))
- {
- if (dump_enabled_p ())
- dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location,
- "not worthwhile without SIMD support.\n");
- return false;
- }
-
if (!vec_stmt) /* transformation not required. */
{
if (slp_node
@@ -6094,24 +6083,13 @@ vectorizable_operation (vec_info *vinfo,
"op not supported by target.\n");
/* Check only during analysis. */
if (maybe_ne (GET_MODE_SIZE (vec_mode), UNITS_PER_WORD)
- || (!vec_stmt && !vect_worthwhile_without_simd_p (vinfo, code)))
+ || (!vec_stmt && !vect_can_vectorize_without_simd_p (code)))
return false;
if (dump_enabled_p ())
dump_printf_loc (MSG_NOTE, vect_location,
"proceeding using word mode.\n");
}
- /* Worthwhile without SIMD support? Check only during analysis. */
- if (!VECTOR_MODE_P (vec_mode)
- && !vec_stmt
- && !vect_worthwhile_without_simd_p (vinfo, code))
- {
- if (dump_enabled_p ())
- dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location,
- "not worthwhile without SIMD support.\n");
- return false;
- }
-
int reduc_idx = STMT_VINFO_REDUC_IDX (stmt_info);
vec_loop_masks *masks = (loop_vinfo ? &LOOP_VINFO_MASKS (loop_vinfo) : NULL);
internal_fn cond_fn = get_conditional_internal_fn (code);
diff --git a/gcc/tree-vectorizer.h b/gcc/tree-vectorizer.h
index 5571b3cce3b..de0ecf86478 100644
--- a/gcc/tree-vectorizer.h
+++ b/gcc/tree-vectorizer.h
@@ -2061,7 +2061,7 @@ extern bool vectorizable_lc_phi (loop_vec_info, stmt_vec_info,
gimple **, slp_tree);
extern bool vectorizable_phi (vec_info *, stmt_vec_info, gimple **, slp_tree,
stmt_vector_for_cost *);
-extern bool vect_worthwhile_without_simd_p (vec_info *, tree_code);
+extern bool vect_can_vectorize_without_simd_p (tree_code);
extern int vect_get_known_peeling_cost (loop_vec_info, int, int *,
stmt_vector_for_cost *,
stmt_vector_for_cost *,
</cut>
Successfully identified regression in *gcc* in CI configuration tcwg_bmk_llvm_apm/llvm-release-arm-spec2k6-Os. So far, this commit has regressed CI configurations:
- tcwg_bmk_llvm_apm/llvm-release-arm-spec2k6-Os
Culprit:
<cut>
commit b9bb6a5e12cae44a1cbf298b69f28fc6871f81c8
Author: Jakub Jelinek <jakub(a)redhat.com>
Date: Tue Aug 11 16:46:49 2020 +0200
c-family: Fix ICE in get_atomic_generic_size [PR96545]
As the testcase shows, we would ICE if the type of the first argument of
various atomic builtins was pointer to (non-void) incomplete type, we would
assume that TYPE_SIZE_UNIT must be non-NULL. This patch diagnoses it
instead. And also changes the TREE_CODE != INTEGER_CST check to
!tree_fits_uhwi_p, as we use tree_to_uhwi after this and at least in theory
the int could be too large and not fit.
2020-08-11 Jakub Jelinek <jakub(a)redhat.com>
PR c/96545
* c-common.c (get_atomic_generic_size): Require that first argument's
type points to a complete type and use tree_fits_uhwi_p instead of
just INTEGER_CST TREE_CODE check for the TYPE_SIZE_UNIT.
* c-c++-common/pr96545.c: New test.
(cherry picked from commit 7840b4dc05539cf5575b3e9ff57ff5f6c3da2cae)
</cut>
Results regressed to (for first_bad == b9bb6a5e12cae44a1cbf298b69f28fc6871f81c8)
# reset_artifacts:
-10
# build_abe binutils:
-9
# build_abe stage1 -- --set gcc_override_configure=--with-mode=thumb --set gcc_override_configure=--disable-libsanitizer:
-8
# build_abe linux:
-7
# build_abe glibc:
-6
# build_abe stage2 -- --set gcc_override_configure=--with-mode=thumb --set gcc_override_configure=--disable-libsanitizer:
-5
# build_llvm true:
-3
# true:
0
# benchmark -- -Os_mthumb artifacts/build-b9bb6a5e12cae44a1cbf298b69f28fc6871f81c8/results_id:
1
# 429.mcf,mcf_base.default regressed by 104
# 470.lbm,lbm_base.default regressed by 103
from (for last_good == db00336a49707327552e678b59da8e85384bdae6)
# reset_artifacts:
-10
# build_abe binutils:
-9
# build_abe stage1 -- --set gcc_override_configure=--with-mode=thumb --set gcc_override_configure=--disable-libsanitizer:
-8
# build_abe linux:
-7
# build_abe glibc:
-6
# build_abe stage2 -- --set gcc_override_configure=--with-mode=thumb --set gcc_override_configure=--disable-libsanitizer:
-5
# build_llvm true:
-3
# true:
0
# benchmark -- -Os_mthumb artifacts/build-db00336a49707327552e678b59da8e85384bdae6/results_id:
1
Artifacts of last_good build: https://ci.linaro.org/job/tcwg_bmk_ci_llvm-bisect-tcwg_bmk_apm-llvm-release…
Results ID of last_good: apm_32/tcwg_bmk_llvm_apm/bisect-llvm-release-arm-spec2k6-Os/3201
Artifacts of first_bad build: https://ci.linaro.org/job/tcwg_bmk_ci_llvm-bisect-tcwg_bmk_apm-llvm-release…
Results ID of first_bad: apm_32/tcwg_bmk_llvm_apm/bisect-llvm-release-arm-spec2k6-Os/3141
Build top page/logs: https://ci.linaro.org/job/tcwg_bmk_ci_llvm-bisect-tcwg_bmk_apm-llvm-release…
Configuration details:
Reproduce builds:
<cut>
mkdir investigate-gcc-b9bb6a5e12cae44a1cbf298b69f28fc6871f81c8
cd investigate-gcc-b9bb6a5e12cae44a1cbf298b69f28fc6871f81c8
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_apm-llvm-release… --fail
curl -o artifacts/manifests/build-parameters.sh https://ci.linaro.org/job/tcwg_bmk_ci_llvm-bisect-tcwg_bmk_apm-llvm-release… --fail
curl -o artifacts/test.sh https://ci.linaro.org/job/tcwg_bmk_ci_llvm-bisect-tcwg_bmk_apm-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
# Save baseline build state (which is then restored in artifacts/test.sh)
mkdir -p ./bisect
rsync -a --del --delete-excluded --exclude /bisect/ --exclude /artifacts/ --exclude /gcc/ ./ ./bisect/baseline/
cd gcc
# Reproduce first_bad build
git checkout --detach b9bb6a5e12cae44a1cbf298b69f28fc6871f81c8
../artifacts/test.sh
# Reproduce last_good build
git checkout --detach db00336a49707327552e678b59da8e85384bdae6
../artifacts/test.sh
cd ..
</cut>
History of pending regressions and results: https://git.linaro.org/toolchain/ci/base-artifacts.git/log/?h=linaro-local/…
Artifacts: https://ci.linaro.org/job/tcwg_bmk_ci_llvm-bisect-tcwg_bmk_apm-llvm-release…
Build log: https://ci.linaro.org/job/tcwg_bmk_ci_llvm-bisect-tcwg_bmk_apm-llvm-release…
Full commit (up to 1000 lines):
<cut>
commit b9bb6a5e12cae44a1cbf298b69f28fc6871f81c8
Author: Jakub Jelinek <jakub(a)redhat.com>
Date: Tue Aug 11 16:46:49 2020 +0200
c-family: Fix ICE in get_atomic_generic_size [PR96545]
As the testcase shows, we would ICE if the type of the first argument of
various atomic builtins was pointer to (non-void) incomplete type, we would
assume that TYPE_SIZE_UNIT must be non-NULL. This patch diagnoses it
instead. And also changes the TREE_CODE != INTEGER_CST check to
!tree_fits_uhwi_p, as we use tree_to_uhwi after this and at least in theory
the int could be too large and not fit.
2020-08-11 Jakub Jelinek <jakub(a)redhat.com>
PR c/96545
* c-common.c (get_atomic_generic_size): Require that first argument's
type points to a complete type and use tree_fits_uhwi_p instead of
just INTEGER_CST TREE_CODE check for the TYPE_SIZE_UNIT.
* c-c++-common/pr96545.c: New test.
(cherry picked from commit 7840b4dc05539cf5575b3e9ff57ff5f6c3da2cae)
---
gcc/c-family/c-common.c | 9 ++++++++-
gcc/testsuite/c-c++-common/pr96545.c | 31 +++++++++++++++++++++++++++++++
2 files changed, 39 insertions(+), 1 deletion(-)
diff --git a/gcc/c-family/c-common.c b/gcc/c-family/c-common.c
index 20258c331af..b6eb40c8122 100644
--- a/gcc/c-family/c-common.c
+++ b/gcc/c-family/c-common.c
@@ -6948,8 +6948,15 @@ get_atomic_generic_size (location_t loc, tree function,
return 0;
}
+ if (!COMPLETE_TYPE_P (TREE_TYPE (type_0)))
+ {
+ error_at (loc, "argument 1 of %qE must be a pointer to a complete type",
+ function);
+ return 0;
+ }
+
/* Types must be compile time constant sizes. */
- if (TREE_CODE ((TYPE_SIZE_UNIT (TREE_TYPE (type_0)))) != INTEGER_CST)
+ if (!tree_fits_uhwi_p ((TYPE_SIZE_UNIT (TREE_TYPE (type_0)))))
{
error_at (loc,
"argument 1 of %qE must be a pointer to a constant size type",
diff --git a/gcc/testsuite/c-c++-common/pr96545.c b/gcc/testsuite/c-c++-common/pr96545.c
new file mode 100644
index 00000000000..bc6b0cf345c
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/pr96545.c
@@ -0,0 +1,31 @@
+/* PR c/96545 */
+/* { dg-do compile } */
+
+extern char x[], y[], z[];
+struct S;
+extern struct S s, t, u;
+int v, w;
+
+void
+foo (void)
+{
+ __atomic_exchange (&x, &y, &z, 0); /* { dg-error "must be a pointer to a complete type" } */
+}
+
+void
+bar (void)
+{
+ __atomic_exchange (&s, &t, &u, 0); /* { dg-error "must be a pointer to a complete type" } */
+}
+
+void
+baz (void)
+{
+ __atomic_exchange (&v, &t, &w, 0); /* { dg-error "size mismatch in argument 2 of" } */
+}
+
+void
+qux (void)
+{
+ __atomic_exchange (&v, &w, &t, 0); /* { dg-error "size mismatch in argument 3 of" } */
+}
</cut>
Successfully identified regression in *llvm* in CI configuration tcwg_bmk_llvm_tx1/llvm-master-aarch64-spec2k6-O3. So far, this commit has regressed CI configurations:
- tcwg_bmk_llvm_tx1/llvm-master-aarch64-spec2k6-O3
Culprit:
<cut>
commit f1ab60e40d16970381a003e145be6d5932823597
Author: Tomasz Kamiński <tomasz.kaminski(a)sonarsource.com>
Date: Thu Jul 29 10:55:24 2021 +0200
Fix FindZ3.cmake to support static libraries and Windows
Use absolute path to link z3 to allow builds both on windows and linux
since the library name is platform dependent for Z3 (libz3 on Windows
and z3 on Linux) and MSVC does not recognized -L and -l options.
Fix CMAKE_CROSSCOMPILING that does not work correctly since it uses
Z3_BUILD_VERSION instead of Z3_BUILD_NUMBER
Fix building with the static version of z3 library (supersedes D80227).
- Build the Z3 version detection code as C++, since the static
library brings in libstdc++ symbols
- Detect threading support and link against threading, in the
(likely) case Z3 was built with threads
Exposed compilation error from building a program that is used to detect
z3 version in the warning message, to simplify troubleshooting.
Reviewed By: JDevlieghere
Differential Revision: https://reviews.llvm.org/D106131
</cut>
Results regressed to (for first_bad == f1ab60e40d16970381a003e145be6d5932823597)
# 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 -- -O3 artifacts/build-f1ab60e40d16970381a003e145be6d5932823597/results_id:
1
# 464.h264ref,h264ref_base.default regressed by 106
# 464.h264ref,[.] FastFullPelBlockMotionSearch regressed by 131
from (for last_good == 2df8bf9339e43de63d8d28e07182e1d6d7ffb843)
# 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 -- -O3 artifacts/build-2df8bf9339e43de63d8d28e07182e1d6d7ffb843/results_id:
1
Artifacts of last_good build: https://ci.linaro.org/job/tcwg_bmk_ci_llvm-bisect-tcwg_bmk_tx1-llvm-master-…
Results ID of last_good: tx1_64/tcwg_bmk_llvm_tx1/bisect-llvm-master-aarch64-spec2k6-O3/3087
Artifacts of first_bad build: https://ci.linaro.org/job/tcwg_bmk_ci_llvm-bisect-tcwg_bmk_tx1-llvm-master-…
Results ID of first_bad: tx1_64/tcwg_bmk_llvm_tx1/bisect-llvm-master-aarch64-spec2k6-O3/3058
Build top page/logs: https://ci.linaro.org/job/tcwg_bmk_ci_llvm-bisect-tcwg_bmk_tx1-llvm-master-…
Configuration details:
Reproduce builds:
<cut>
mkdir investigate-llvm-f1ab60e40d16970381a003e145be6d5932823597
cd investigate-llvm-f1ab60e40d16970381a003e145be6d5932823597
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-master-… --fail
curl -o artifacts/manifests/build-parameters.sh https://ci.linaro.org/job/tcwg_bmk_ci_llvm-bisect-tcwg_bmk_tx1-llvm-master-… --fail
curl -o artifacts/test.sh https://ci.linaro.org/job/tcwg_bmk_ci_llvm-bisect-tcwg_bmk_tx1-llvm-master-… --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
# Save baseline build state (which is then restored in artifacts/test.sh)
mkdir -p ./bisect
rsync -a --del --delete-excluded --exclude /bisect/ --exclude /artifacts/ --exclude /llvm/ ./ ./bisect/baseline/
cd llvm
# Reproduce first_bad build
git checkout --detach f1ab60e40d16970381a003e145be6d5932823597
../artifacts/test.sh
# Reproduce last_good build
git checkout --detach 2df8bf9339e43de63d8d28e07182e1d6d7ffb843
../artifacts/test.sh
cd ..
</cut>
History of pending regressions and results: https://git.linaro.org/toolchain/ci/base-artifacts.git/log/?h=linaro-local/…
Artifacts: https://ci.linaro.org/job/tcwg_bmk_ci_llvm-bisect-tcwg_bmk_tx1-llvm-master-…
Build log: https://ci.linaro.org/job/tcwg_bmk_ci_llvm-bisect-tcwg_bmk_tx1-llvm-master-…
Full commit (up to 1000 lines):
<cut>
commit f1ab60e40d16970381a003e145be6d5932823597
Author: Tomasz Kamiński <tomasz.kaminski(a)sonarsource.com>
Date: Thu Jul 29 10:55:24 2021 +0200
Fix FindZ3.cmake to support static libraries and Windows
Use absolute path to link z3 to allow builds both on windows and linux
since the library name is platform dependent for Z3 (libz3 on Windows
and z3 on Linux) and MSVC does not recognized -L and -l options.
Fix CMAKE_CROSSCOMPILING that does not work correctly since it uses
Z3_BUILD_VERSION instead of Z3_BUILD_NUMBER
Fix building with the static version of z3 library (supersedes D80227).
- Build the Z3 version detection code as C++, since the static
library brings in libstdc++ symbols
- Detect threading support and link against threading, in the
(likely) case Z3 was built with threads
Exposed compilation error from building a program that is used to detect
z3 version in the warning message, to simplify troubleshooting.
Reviewed By: JDevlieghere
Differential Revision: https://reviews.llvm.org/D106131
---
llvm/cmake/modules/FindZ3.cmake | 29 ++++++++++++++++++++++-------
1 file changed, 22 insertions(+), 7 deletions(-)
diff --git a/llvm/cmake/modules/FindZ3.cmake b/llvm/cmake/modules/FindZ3.cmake
index 95dd37789a87..118b1eac3b32 100644
--- a/llvm/cmake/modules/FindZ3.cmake
+++ b/llvm/cmake/modules/FindZ3.cmake
@@ -2,8 +2,21 @@ INCLUDE(CheckCXXSourceRuns)
# Function to check Z3's version
function(check_z3_version z3_include z3_lib)
+ # Get lib path
+ set(z3_link_libs "${z3_lib}")
+
+ # Try to find a threading module in case Z3 was built with threading support.
+ # Threads are required elsewhere in LLVM, but not marked as required here because
+ # Z3 could have been compiled without threading support.
+ find_package(Threads)
+ # CMAKE_THREAD_LIBS_INIT may be empty if the thread functions are provided by the
+ # system libraries and no special flags are needed.
+ if(CMAKE_THREAD_LIBS_INIT)
+ list(APPEND z3_link_libs "${CMAKE_THREAD_LIBS_INIT}")
+ endif()
+
# The program that will be executed to print Z3's version.
- file(WRITE ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/testz3.c
+ file(WRITE ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/testz3.cpp
"#include <assert.h>
#include <z3.h>
int main() {
@@ -13,16 +26,14 @@ function(check_z3_version z3_include z3_lib)
return 0;
}")
- # Get lib path
- get_filename_component(z3_lib_path ${z3_lib} PATH)
-
try_run(
Z3_RETURNCODE
Z3_COMPILED
${CMAKE_BINARY_DIR}
- ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/testz3.c
+ ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/testz3.cpp
COMPILE_DEFINITIONS -I"${z3_include}"
- LINK_LIBRARIES -L${z3_lib_path} -lz3
+ LINK_LIBRARIES ${z3_link_libs}
+ COMPILE_OUTPUT_VARIABLE COMPILE_OUTPUT
RUN_OUTPUT_VARIABLE SRC_OUTPUT
)
@@ -30,6 +41,9 @@ function(check_z3_version z3_include z3_lib)
string(REGEX REPLACE "([0-9]*\\.[0-9]*\\.[0-9]*)" "\\1"
z3_version "${SRC_OUTPUT}")
set(Z3_VERSION_STRING ${z3_version} PARENT_SCOPE)
+ else()
+ message(NOTICE "${COMPILE_OUTPUT}")
+ message(WARNING "Failed to compile Z3 program that is used to determine library version.")
endif()
endfunction(check_z3_version)
@@ -86,7 +100,7 @@ if(NOT Z3_VERSION_STRING AND (CMAKE_CROSSCOMPILING AND
file(STRINGS "${Z3_INCLUDE_DIR}/z3_version.h"
z3_version_str REGEX "^#define[\t ]+Z3_BUILD_NUMBER[\t ]+.*")
- string(REGEX REPLACE "^.*Z3_BUILD_VERSION[\t ]+([0-9]).*$" "\\1"
+ string(REGEX REPLACE "^.*Z3_BUILD_NUMBER[\t ]+([0-9]).*$" "\\1"
Z3_BUILD "${z3_version_str}")
set(Z3_VERSION_STRING ${Z3_MAJOR}.${Z3_MINOR}.${Z3_BUILD})
@@ -98,6 +112,7 @@ if(NOT Z3_VERSION_STRING)
# conservative and force the found version to 0.0.0 to make version
# checks always fail.
set(Z3_VERSION_STRING "0.0.0")
+ message(WARNING "Failed to determine Z3 library version, defaulting to 0.0.0.")
endif()
# handle the QUIETLY and REQUIRED arguments and set Z3_FOUND to TRUE if
</cut>
Progress:
* UM-2 [QEMU upstream maintainership]
+ Usual release work (rc2 now out) and code review
+ Continuing with systick timer refactoring. This has turned out a bit
more complicated than I expected: had to do a preliminary refactor
to move some stuff out of the NVIC device into the armv7m container;
also needed to add support in the Clock APIs for frequency multiply
and divide for the benefit of the stm32 SoCs which drive the systick
reference clock at 1/8 the speed of the main CPU clock
-- PMM
Successfully identified regression in *gcc* in CI configuration tcwg_bmk_gnu_tx1/gnu-release-aarch64-spec2k6-O2. So far, this commit has regressed CI configurations:
- tcwg_bmk_gnu_tx1/gnu-release-aarch64-spec2k6-O2
Culprit:
<cut>
commit 6ff0cdebb1bc281ba2374f3ecdbe358c4fa74093
Author: Richard Sandiford <richard.sandiford(a)arm.com>
Date: Thu Oct 31 17:16:31 2019 +0000
[AArch64] Fix build for non-default languages
The SVE PCS support broke go, D and Ada because those languages don't
call TARGET_INIT_BUILTINS. We therefore ended up trying to get the
TYPE_MAIN_VARIANT of a null __SVBool_t.
We shouldn't really need to apply TYPE_MAIN_VARIANT there anyway,
since the ABI-defined types are (and need to be) their own main
variants. This patch asserts for that instead.
2019-10-31 Richard Sandiford <richard.sandiford(a)arm.com>
gcc/
* config/aarch64/aarch64-sve-builtins.cc (register_builtin_types):
Assert that the type we store in abi_vector_types is its own
main variant.
(svbool_type_p): Don't apply TYPE_MAIN_VARIANT here.
From-SVN: r277680
</cut>
Results regressed to (for first_bad == 6ff0cdebb1bc281ba2374f3ecdbe358c4fa74093)
# 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
# true:
0
# benchmark -- -O2 artifacts/build-6ff0cdebb1bc281ba2374f3ecdbe358c4fa74093/results_id:
1
# 458.sjeng,[.] setup_attackers regressed by 111
# 458.sjeng,[.] search regressed by 215
from (for last_good == aaa80941e042d18dcd5add6e7bb28cb392767a39)
# 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
# true:
0
# benchmark -- -O2 artifacts/build-aaa80941e042d18dcd5add6e7bb28cb392767a39/results_id:
1
Artifacts of last_good build: https://ci.linaro.org/job/tcwg_bmk_ci_gnu-bisect-tcwg_bmk_tx1-gnu-release-a…
Results ID of last_good: tx1_64/tcwg_bmk_gnu_tx1/bisect-gnu-release-aarch64-spec2k6-O2/2854
Artifacts of first_bad build: https://ci.linaro.org/job/tcwg_bmk_ci_gnu-bisect-tcwg_bmk_tx1-gnu-release-a…
Results ID of first_bad: tx1_64/tcwg_bmk_gnu_tx1/bisect-gnu-release-aarch64-spec2k6-O2/2851
Build top page/logs: https://ci.linaro.org/job/tcwg_bmk_ci_gnu-bisect-tcwg_bmk_tx1-gnu-release-a…
Configuration details:
Reproduce builds:
<cut>
mkdir investigate-gcc-6ff0cdebb1bc281ba2374f3ecdbe358c4fa74093
cd investigate-gcc-6ff0cdebb1bc281ba2374f3ecdbe358c4fa74093
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_gnu-bisect-tcwg_bmk_tx1-gnu-release-a… --fail
curl -o artifacts/manifests/build-parameters.sh https://ci.linaro.org/job/tcwg_bmk_ci_gnu-bisect-tcwg_bmk_tx1-gnu-release-a… --fail
curl -o artifacts/test.sh https://ci.linaro.org/job/tcwg_bmk_ci_gnu-bisect-tcwg_bmk_tx1-gnu-release-a… --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
# Save baseline build state (which is then restored in artifacts/test.sh)
mkdir -p ./bisect
rsync -a --del --delete-excluded --exclude /bisect/ --exclude /artifacts/ --exclude /gcc/ ./ ./bisect/baseline/
cd gcc
# Reproduce first_bad build
git checkout --detach 6ff0cdebb1bc281ba2374f3ecdbe358c4fa74093
../artifacts/test.sh
# Reproduce last_good build
git checkout --detach aaa80941e042d18dcd5add6e7bb28cb392767a39
../artifacts/test.sh
cd ..
</cut>
History of pending regressions and results: https://git.linaro.org/toolchain/ci/base-artifacts.git/log/?h=linaro-local/…
Artifacts: https://ci.linaro.org/job/tcwg_bmk_ci_gnu-bisect-tcwg_bmk_tx1-gnu-release-a…
Build log: https://ci.linaro.org/job/tcwg_bmk_ci_gnu-bisect-tcwg_bmk_tx1-gnu-release-a…
Full commit (up to 1000 lines):
<cut>
commit 6ff0cdebb1bc281ba2374f3ecdbe358c4fa74093
Author: Richard Sandiford <richard.sandiford(a)arm.com>
Date: Thu Oct 31 17:16:31 2019 +0000
[AArch64] Fix build for non-default languages
The SVE PCS support broke go, D and Ada because those languages don't
call TARGET_INIT_BUILTINS. We therefore ended up trying to get the
TYPE_MAIN_VARIANT of a null __SVBool_t.
We shouldn't really need to apply TYPE_MAIN_VARIANT there anyway,
since the ABI-defined types are (and need to be) their own main
variants. This patch asserts for that instead.
2019-10-31 Richard Sandiford <richard.sandiford(a)arm.com>
gcc/
* config/aarch64/aarch64-sve-builtins.cc (register_builtin_types):
Assert that the type we store in abi_vector_types is its own
main variant.
(svbool_type_p): Don't apply TYPE_MAIN_VARIANT here.
From-SVN: r277680
---
gcc/ChangeLog | 7 +++++++
gcc/config/aarch64/aarch64-sve-builtins.cc | 4 ++--
2 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 66b7a142251..affa74cdd25 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,10 @@
+2019-10-31 Richard Sandiford <richard.sandiford(a)arm.com>
+
+ * config/aarch64/aarch64-sve-builtins.cc (register_builtin_types):
+ Assert that the type we store in abi_vector_types is its own
+ main variant.
+ (svbool_type_p): Don't apply TYPE_MAIN_VARIANT here.
+
2019-10-31 Richard Earnshaw <rearnsha(a)arm.com>
* config/arm/arm.c (arm_legitimize_address): Don't form negative offsets
diff --git a/gcc/config/aarch64/aarch64-sve-builtins.cc b/gcc/config/aarch64/aarch64-sve-builtins.cc
index 70d7b1a165d..424f64adfef 100644
--- a/gcc/config/aarch64/aarch64-sve-builtins.cc
+++ b/gcc/config/aarch64/aarch64-sve-builtins.cc
@@ -2993,6 +2993,7 @@ register_builtin_types ()
BITS_PER_SVE_VECTOR));
}
vectype = build_distinct_type_copy (vectype);
+ gcc_assert (vectype == TYPE_MAIN_VARIANT (vectype));
SET_TYPE_STRUCTURAL_EQUALITY (vectype);
TYPE_ARTIFICIAL (vectype) = 1;
abi_vector_types[i] = vectype;
@@ -3235,8 +3236,7 @@ bool
svbool_type_p (const_tree type)
{
tree abi_type = abi_vector_types[VECTOR_TYPE_svbool_t];
- return (type != error_mark_node
- && TYPE_MAIN_VARIANT (type) == TYPE_MAIN_VARIANT (abi_type));
+ return type != error_mark_node && TYPE_MAIN_VARIANT (type) == abi_type;
}
/* If TYPE is a built-in type defined by the SVE ABI, return the mangled name,
</cut>
Successfully identified regression in *gcc* in CI configuration tcwg_gnu/gnu-master-arm-check_gcc. So far, this commit has regressed CI configurations:
- tcwg_gnu/gnu-master-arm-check_gcc
Culprit:
<cut>
commit 34dbb5f346459a1b36cd0cfbfe1cf18cd099fdf3
Author: Marek Polacek <polacek(a)redhat.com>
Date: Tue Jul 20 16:26:28 2021 -0400
include: Fix -Wundef warnings in ansidecl.h
This quashes -Wundef warnings in ansidecl.h when compiled in C or C++.
In C, __cpp_constexpr and __cplusplus aren't defined so we evaluate
them to 0; conversely, __STDC_VERSION__ is not defined in C++.
This has caused grief when -Wundef is used with -Werror.
I've also tested -traditional-cpp.
include/ChangeLog:
* ansidecl.h: Check if __cplusplus is defined before checking
the value of __cpp_constexpr and __cplusplus. Don't check
__STDC_VERSION__ in C++.
</cut>
Results regressed to (for first_bad == 34dbb5f346459a1b36cd0cfbfe1cf18cd099fdf3)
# reset_artifacts:
-10
# build_abe binutils:
-2
# build_abe gcc:
-1
# build_abe dejagnu:
0
# build_abe check_gcc -- --set runtestflags=gcc.c-torture/execute/execute.exp:
1
# Getting actual results from build directory /home/tcwg-buildslave/workspace/tcwg_gnu_0/artifacts/build-34dbb5f346459a1b36cd0cfbfe1cf18cd099fdf3/sumfiles
# /home/tcwg-buildslave/workspace/tcwg_gnu_0/artifacts/build-34dbb5f346459a1b36cd0cfbfe1cf18cd099fdf3/sumfiles/libstdc++.sum
# /home/tcwg-buildslave/workspace/tcwg_gnu_0/artifacts/build-34dbb5f346459a1b36cd0cfbfe1cf18cd099fdf3/sumfiles/gfortran.sum
# /home/tcwg-buildslave/workspace/tcwg_gnu_0/artifacts/build-34dbb5f346459a1b36cd0cfbfe1cf18cd099fdf3/sumfiles/libitm.sum
# /home/tcwg-buildslave/workspace/tcwg_gnu_0/artifacts/build-34dbb5f346459a1b36cd0cfbfe1cf18cd099fdf3/sumfiles/libgomp.sum
# /home/tcwg-buildslave/workspace/tcwg_gnu_0/artifacts/build-34dbb5f346459a1b36cd0cfbfe1cf18cd099fdf3/sumfiles/libatomic.sum
# /home/tcwg-buildslave/workspace/tcwg_gnu_0/artifacts/build-34dbb5f346459a1b36cd0cfbfe1cf18cd099fdf3/sumfiles/g++.sum
# /home/tcwg-buildslave/workspace/tcwg_gnu_0/artifacts/build-34dbb5f346459a1b36cd0cfbfe1cf18cd099fdf3/sumfiles/gcc.sum
# Manifest: gcc-compare-results/contrib/testsuite-management/flaky/gnu-master-arm-check_gcc.xfail
# Getting actual results from build directory base-artifacts/sumfiles
# base-artifacts/sumfiles/libstdc++.sum
# base-artifacts/sumfiles/gfortran.sum
# base-artifacts/sumfiles/libitm.sum
# base-artifacts/sumfiles/libgomp.sum
# base-artifacts/sumfiles/libatomic.sum
# base-artifacts/sumfiles/g++.sum
# base-artifacts/sumfiles/gcc.sum
#
#
# Unexpected results in this build (new failures)
# === gcc tests ===
#
# Running gcc.c-torture/execute/execute.exp ...
# FAIL: gcc.c-torture/execute/20030117-1.c -Os execution test
# FAIL: gcc.c-torture/execute/20031215-1.c -O1 execution test
#
# === Results Summary ===
from (for last_good == ead235f60139edc6eb408d8d083cbb15e417b447)
# reset_artifacts:
-10
# build_abe binutils:
-2
# build_abe gcc:
-1
# build_abe dejagnu:
0
# build_abe check_gcc -- --set runtestflags=gcc.c-torture/execute/execute.exp:
1
Artifacts of last_good build: https://ci.linaro.org/job/tcwg_gcc-bisect-gnu-master-arm-check_gcc/2/artifa…
Artifacts of first_bad build: https://ci.linaro.org/job/tcwg_gcc-bisect-gnu-master-arm-check_gcc/2/artifa…
Build top page/logs: https://ci.linaro.org/job/tcwg_gcc-bisect-gnu-master-arm-check_gcc/2/
Configuration details:
Reproduce builds:
<cut>
mkdir investigate-gcc-34dbb5f346459a1b36cd0cfbfe1cf18cd099fdf3
cd investigate-gcc-34dbb5f346459a1b36cd0cfbfe1cf18cd099fdf3
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_gcc/2/artifa… --fail
curl -o artifacts/manifests/build-parameters.sh https://ci.linaro.org/job/tcwg_gcc-bisect-gnu-master-arm-check_gcc/2/artifa… --fail
curl -o artifacts/test.sh https://ci.linaro.org/job/tcwg_gcc-bisect-gnu-master-arm-check_gcc/2/artifa… --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
# Save baseline build state (which is then restored in artifacts/test.sh)
mkdir -p ./bisect
rsync -a --del --delete-excluded --exclude /bisect/ --exclude /artifacts/ --exclude /gcc/ ./ ./bisect/baseline/
cd gcc
# Reproduce first_bad build
git checkout --detach 34dbb5f346459a1b36cd0cfbfe1cf18cd099fdf3
../artifacts/test.sh
# Reproduce last_good build
git checkout --detach ead235f60139edc6eb408d8d083cbb15e417b447
../artifacts/test.sh
cd ..
</cut>
History of pending regressions and results: https://git.linaro.org/toolchain/ci/base-artifacts.git/log/?h=linaro-local/…
Artifacts: https://ci.linaro.org/job/tcwg_gcc-bisect-gnu-master-arm-check_gcc/2/artifa…
Build log: https://ci.linaro.org/job/tcwg_gcc-bisect-gnu-master-arm-check_gcc/2/consol…
Full commit (up to 1000 lines):
<cut>
commit 34dbb5f346459a1b36cd0cfbfe1cf18cd099fdf3
Author: Marek Polacek <polacek(a)redhat.com>
Date: Tue Jul 20 16:26:28 2021 -0400
include: Fix -Wundef warnings in ansidecl.h
This quashes -Wundef warnings in ansidecl.h when compiled in C or C++.
In C, __cpp_constexpr and __cplusplus aren't defined so we evaluate
them to 0; conversely, __STDC_VERSION__ is not defined in C++.
This has caused grief when -Wundef is used with -Werror.
I've also tested -traditional-cpp.
include/ChangeLog:
* ansidecl.h: Check if __cplusplus is defined before checking
the value of __cpp_constexpr and __cplusplus. Don't check
__STDC_VERSION__ in C++.
---
include/ansidecl.h | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/include/ansidecl.h b/include/ansidecl.h
index 0515228f325..2efe3e85e59 100644
--- a/include/ansidecl.h
+++ b/include/ansidecl.h
@@ -79,7 +79,7 @@ So instead we use the macro below and test it against specific values. */
/* inline requires special treatment; it's in C99, and GCC >=2.7 supports
it too, but it's not in C89. */
#undef inline
-#if __STDC_VERSION__ >= 199901L || defined(__cplusplus) || (defined(__SUNPRO_C) && defined(__C99FEATURES__))
+#if (!defined(__cplusplus) && __STDC_VERSION__ >= 199901L) || defined(__cplusplus) || (defined(__SUNPRO_C) && defined(__C99FEATURES__))
/* it's a keyword */
#else
# if GCC_VERSION >= 2007
@@ -356,7 +356,7 @@ So instead we use the macro below and test it against specific values. */
#define ENUM_BITFIELD(TYPE) unsigned int
#endif
-#if __cpp_constexpr >= 200704
+#if defined(__cplusplus) && __cpp_constexpr >= 200704
#define CONSTEXPR constexpr
#else
#define CONSTEXPR
@@ -419,7 +419,7 @@ So instead we use the macro below and test it against specific values. */
so that most attempts at copy are caught at compile-time. */
-#if __cplusplus >= 201103
+#if defined(__cplusplus) && __cplusplus >= 201103
#define DISABLE_COPY_AND_ASSIGN(TYPE) \
TYPE (const TYPE&) = delete; \
void operator= (const TYPE &) = delete
</cut>
Progress:
* UM-2 [QEMU upstream maintainership]
+ collected up/reviewed arm patches ready for rc1
+ sent patch fixing a silly crash if the user tried to pass both a
guest kernel and a firmware blob to the raspi3 machine
+ patchset fixing a lot of places in our docs where we used `foo`
in rST markup but we meant ``foo``
+ some docs patches converting old .txt files to .rst so we
actually ship the docs to users
+ patchset doing a bit of cleanup on arch-init.c
+ patches implementing M-profile trap-on-division-by-zero
+ started to look at refactoring the M-profile systick timer to
no longer rely on an ugly global variable to specify the frequency
* QEMU-406 [QEMU support for MVE (M-profile Vector Extension; Helium)]
+ sent out MVE patchset for review which has full coverage of the
instruction set and includes "enable MVE on Cortex-M55"
+ remaining TODO items: fault on unaligned accesses; report MVE
registers via gdbstub; optimize codegen for the no-predication case
-- PMM
Successfully identified regression in *gcc* in CI configuration tcwg_bmk_gnu_tx1/gnu-master-aarch64-spec2k6-O2_LTO. So far, this commit has regressed CI configurations:
- tcwg_bmk_gnu_tx1/gnu-master-aarch64-spec2k6-O2_LTO
Culprit:
<cut>
commit fedcf3c476aff7533741a1c61071200f0a38cf83
Author: Richard Biener <rguenther(a)suse.de>
Date: Thu Jul 8 09:52:49 2021 +0200
tree-optimization/101373 - avoid PRE across externally throwing call
PRE already tries to avoid hoisting possibly trapping expressions
across calls that might not return normally but fails to consider
const calls that throw externally. The following fixes that and
also plugs the hole of trapping references not pruned in case
they are not catched by the actuall call clobbering it.
At -Os we hit the same issue in RTL PRE and postreload-gcse has
even more incomplete checks so the patch adjusts both of those
as well.
2021-07-08 Richard Biener <rguenther(a)suse.de>
PR tree-optimization/101373
* tree-ssa-pre.c (prune_clobbered_mems): Also prune trapping
references when the BB may not return.
(compute_avail): Pass in the function we're working on and
replace cfun references with it. Externally throwing
const calls also possibly terminate the function.
(pass_pre::execute): Pass down the function we're working on.
* gcse.c (compute_hash_table_work): Externally throwing
const/pure calls also need record_last_mem_set_info.
* postreload-gcse.c (record_opr_changes): Looping or externally
throwing const/pure calls also need record_last_mem_set_info.
* g++.dg/torture/pr101373.C: New testcase, XFAILed.
* gnat.dg/opt95.adb: Likewise.
</cut>
Results regressed to (for first_bad == fedcf3c476aff7533741a1c61071200f0a38cf83)
# 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
# true:
0
# benchmark -O2_LTO -- artifacts/build-fedcf3c476aff7533741a1c61071200f0a38cf83/results_id:
1
# 429.mcf,mcf_base.default regressed by 106
from (for last_good == fe610051a803131822bd02a8842a67b573b8e46a)
# 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
# true:
0
# benchmark -O2_LTO -- artifacts/build-fe610051a803131822bd02a8842a67b573b8e46a/results_id:
1
Artifacts of last_good build: https://ci.linaro.org/job/tcwg_bmk_ci_gnu-bisect-tcwg_bmk_tx1-gnu-master-aa…
Results ID of last_good: tx1_64/tcwg_bmk_gnu_tx1/bisect-gnu-master-aarch64-spec2k6-O2_LTO/2345
Artifacts of first_bad build: https://ci.linaro.org/job/tcwg_bmk_ci_gnu-bisect-tcwg_bmk_tx1-gnu-master-aa…
Results ID of first_bad: tx1_64/tcwg_bmk_gnu_tx1/bisect-gnu-master-aarch64-spec2k6-O2_LTO/2337
Build top page/logs: https://ci.linaro.org/job/tcwg_bmk_ci_gnu-bisect-tcwg_bmk_tx1-gnu-master-aa…
Configuration details:
Reproduce builds:
<cut>
mkdir investigate-gcc-fedcf3c476aff7533741a1c61071200f0a38cf83
cd investigate-gcc-fedcf3c476aff7533741a1c61071200f0a38cf83
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_gnu-bisect-tcwg_bmk_tx1-gnu-master-aa… --fail
curl -o artifacts/manifests/build-parameters.sh https://ci.linaro.org/job/tcwg_bmk_ci_gnu-bisect-tcwg_bmk_tx1-gnu-master-aa… --fail
curl -o artifacts/test.sh https://ci.linaro.org/job/tcwg_bmk_ci_gnu-bisect-tcwg_bmk_tx1-gnu-master-aa… --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
# Save baseline build state (which is then restored in artifacts/test.sh)
mkdir -p ./bisect
rsync -a --del --delete-excluded --exclude /bisect/ --exclude /artifacts/ --exclude /gcc/ ./ ./bisect/baseline/
cd gcc
# Reproduce first_bad build
git checkout --detach fedcf3c476aff7533741a1c61071200f0a38cf83
../artifacts/test.sh
# Reproduce last_good build
git checkout --detach fe610051a803131822bd02a8842a67b573b8e46a
../artifacts/test.sh
cd ..
</cut>
History of pending regressions and results: https://git.linaro.org/toolchain/ci/base-artifacts.git/log/?h=linaro-local/…
Artifacts: https://ci.linaro.org/job/tcwg_bmk_ci_gnu-bisect-tcwg_bmk_tx1-gnu-master-aa…
Build log: https://ci.linaro.org/job/tcwg_bmk_ci_gnu-bisect-tcwg_bmk_tx1-gnu-master-aa…
Full commit (up to 1000 lines):
<cut>
commit fedcf3c476aff7533741a1c61071200f0a38cf83
Author: Richard Biener <rguenther(a)suse.de>
Date: Thu Jul 8 09:52:49 2021 +0200
tree-optimization/101373 - avoid PRE across externally throwing call
PRE already tries to avoid hoisting possibly trapping expressions
across calls that might not return normally but fails to consider
const calls that throw externally. The following fixes that and
also plugs the hole of trapping references not pruned in case
they are not catched by the actuall call clobbering it.
At -Os we hit the same issue in RTL PRE and postreload-gcse has
even more incomplete checks so the patch adjusts both of those
as well.
2021-07-08 Richard Biener <rguenther(a)suse.de>
PR tree-optimization/101373
* tree-ssa-pre.c (prune_clobbered_mems): Also prune trapping
references when the BB may not return.
(compute_avail): Pass in the function we're working on and
replace cfun references with it. Externally throwing
const calls also possibly terminate the function.
(pass_pre::execute): Pass down the function we're working on.
* gcse.c (compute_hash_table_work): Externally throwing
const/pure calls also need record_last_mem_set_info.
* postreload-gcse.c (record_opr_changes): Looping or externally
throwing const/pure calls also need record_last_mem_set_info.
* g++.dg/torture/pr101373.C: New testcase, XFAILed.
* gnat.dg/opt95.adb: Likewise.
---
gcc/gcse.c | 3 ++-
gcc/postreload-gcse.c | 4 +++-
gcc/testsuite/g++.dg/torture/pr101373.C | 33 +++++++++++++++++++++++++++
gcc/testsuite/gnat.dg/opt95.adb | 40 +++++++++++++++++++++++++++++++++
gcc/tree-ssa-pre.c | 34 +++++++++++++++++-----------
5 files changed, 99 insertions(+), 15 deletions(-)
diff --git a/gcc/gcse.c b/gcc/gcse.c
index ecf7e51aac5..ccd33664af5 100644
--- a/gcc/gcse.c
+++ b/gcc/gcse.c
@@ -1537,7 +1537,8 @@ compute_hash_table_work (struct gcse_hash_table_d *table)
record_last_reg_set_info (insn, regno);
if (! RTL_CONST_OR_PURE_CALL_P (insn)
- || RTL_LOOPING_CONST_OR_PURE_CALL_P (insn))
+ || RTL_LOOPING_CONST_OR_PURE_CALL_P (insn)
+ || can_throw_external (insn))
record_last_mem_set_info (insn);
}
diff --git a/gcc/postreload-gcse.c b/gcc/postreload-gcse.c
index 0b28247e299..6c95d09a1e5 100644
--- a/gcc/postreload-gcse.c
+++ b/gcc/postreload-gcse.c
@@ -779,7 +779,9 @@ record_opr_changes (rtx_insn *insn)
EXECUTE_IF_SET_IN_HARD_REG_SET (callee_clobbers, 0, regno, hrsi)
record_last_reg_set_info_regno (insn, regno);
- if (! RTL_CONST_OR_PURE_CALL_P (insn))
+ if (! RTL_CONST_OR_PURE_CALL_P (insn)
+ || RTL_LOOPING_CONST_OR_PURE_CALL_P (insn)
+ || can_throw_external (insn))
record_last_mem_set_info (insn);
}
}
diff --git a/gcc/testsuite/g++.dg/torture/pr101373.C b/gcc/testsuite/g++.dg/torture/pr101373.C
new file mode 100644
index 00000000000..f8c809739e2
--- /dev/null
+++ b/gcc/testsuite/g++.dg/torture/pr101373.C
@@ -0,0 +1,33 @@
+// { dg-do run }
+// { dg-xfail-run-if "PR100409" { *-*-* } }
+
+int __attribute__((const,noipa)) foo (int j)
+{
+ if (j != 0)
+ throw 1;
+ return 0;
+}
+
+int __attribute__((noipa)) bar (int *p, int n)
+{
+ int ret = 0;
+ if (n)
+ {
+ foo (n);
+ ret = *p;
+ }
+ ret += *p;
+ return ret;
+}
+
+int main()
+{
+ try
+ {
+ return bar (nullptr, 1);
+ }
+ catch (...)
+ {
+ return 0;
+ }
+}
diff --git a/gcc/testsuite/gnat.dg/opt95.adb b/gcc/testsuite/gnat.dg/opt95.adb
new file mode 100644
index 00000000000..2c72582b3f1
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/opt95.adb
@@ -0,0 +1,40 @@
+-- { dg-do run }
+-- { dg-options "-O2 -gnatp" }
+
+procedure Opt95 is
+
+ function Foo (J : Integer) return Integer;
+ pragma Pure_Function (Foo);
+ pragma Machine_Attribute (Foo, "noipa");
+
+ function Foo (J : Integer) return Integer is
+ begin
+ if J /= 0 then
+ raise Constraint_Error;
+ end if;
+ return 0;
+ end;
+
+ function Bar (A : access Integer; N : Integer) return Integer;
+ pragma Machine_Attribute (Bar, "noipa");
+
+ function Bar (A : access Integer; N : Integer) return Integer is
+ Ret : Integer := 0;
+ Ret2 : Integer := 0;
+ begin
+ if N /= 0 then
+ Ret2 := Foo (N);
+ Ret := A.all;
+ end if;
+ Ret := Ret + A.all;
+ return Ret + Ret2;
+ end;
+
+ V : Integer;
+ pragma Volatile (V);
+
+begin
+ V := Bar (null, 1);
+exception
+ when Constraint_Error => null;
+end;
diff --git a/gcc/tree-ssa-pre.c b/gcc/tree-ssa-pre.c
index 69141c2f0c9..aa5244e678c 100644
--- a/gcc/tree-ssa-pre.c
+++ b/gcc/tree-ssa-pre.c
@@ -2071,6 +2071,13 @@ prune_clobbered_mems (bitmap_set_t set, basic_block block)
&& value_dies_in_block_x (expr, block))))
to_remove = i;
}
+ /* If the REFERENCE may trap make sure the block does not contain
+ a possible exit point.
+ ??? This is overly conservative if we translate AVAIL_OUT
+ as the available expression might be after the exit point. */
+ if (BB_MAY_NOTRETURN (block)
+ && vn_reference_may_trap (ref))
+ to_remove = i;
}
else if (expr->kind == NARY)
{
@@ -3860,7 +3867,7 @@ insert (void)
AVAIL_OUT[BLOCK] = AVAIL_IN[BLOCK] U PHI_GEN[BLOCK] U TMP_GEN[BLOCK]. */
static void
-compute_avail (void)
+compute_avail (function *fun)
{
basic_block block, son;
@@ -3871,7 +3878,7 @@ compute_avail (void)
/* We pretend that default definitions are defined in the entry block.
This includes function arguments and the static chain decl. */
- FOR_EACH_SSA_NAME (i, name, cfun)
+ FOR_EACH_SSA_NAME (i, name, fun)
{
pre_expr e;
if (!SSA_NAME_IS_DEFAULT_DEF (name)
@@ -3881,31 +3888,31 @@ compute_avail (void)
e = get_or_alloc_expr_for_name (name);
add_to_value (get_expr_value_id (e), e);
- bitmap_insert_into_set (TMP_GEN (ENTRY_BLOCK_PTR_FOR_FN (cfun)), e);
- bitmap_value_insert_into_set (AVAIL_OUT (ENTRY_BLOCK_PTR_FOR_FN (cfun)),
+ bitmap_insert_into_set (TMP_GEN (ENTRY_BLOCK_PTR_FOR_FN (fun)), e);
+ bitmap_value_insert_into_set (AVAIL_OUT (ENTRY_BLOCK_PTR_FOR_FN (fun)),
e);
}
if (dump_file && (dump_flags & TDF_DETAILS))
{
- print_bitmap_set (dump_file, TMP_GEN (ENTRY_BLOCK_PTR_FOR_FN (cfun)),
+ print_bitmap_set (dump_file, TMP_GEN (ENTRY_BLOCK_PTR_FOR_FN (fun)),
"tmp_gen", ENTRY_BLOCK);
- print_bitmap_set (dump_file, AVAIL_OUT (ENTRY_BLOCK_PTR_FOR_FN (cfun)),
+ print_bitmap_set (dump_file, AVAIL_OUT (ENTRY_BLOCK_PTR_FOR_FN (fun)),
"avail_out", ENTRY_BLOCK);
}
/* Allocate the worklist. */
- worklist = XNEWVEC (basic_block, n_basic_blocks_for_fn (cfun));
+ worklist = XNEWVEC (basic_block, n_basic_blocks_for_fn (fun));
/* Seed the algorithm by putting the dominator children of the entry
block on the worklist. */
- for (son = first_dom_son (CDI_DOMINATORS, ENTRY_BLOCK_PTR_FOR_FN (cfun));
+ for (son = first_dom_son (CDI_DOMINATORS, ENTRY_BLOCK_PTR_FOR_FN (fun));
son;
son = next_dom_son (CDI_DOMINATORS, son))
worklist[sp++] = son;
- BB_LIVE_VOP_ON_EXIT (ENTRY_BLOCK_PTR_FOR_FN (cfun))
- = ssa_default_def (cfun, gimple_vop (cfun));
+ BB_LIVE_VOP_ON_EXIT (ENTRY_BLOCK_PTR_FOR_FN (fun))
+ = ssa_default_def (fun, gimple_vop (fun));
/* Loop until the worklist is empty. */
while (sp)
@@ -3970,7 +3977,8 @@ compute_avail (void)
before it. */
int flags = gimple_call_flags (stmt);
if (!(flags & ECF_CONST)
- || (flags & ECF_LOOPING_CONST_OR_PURE))
+ || (flags & ECF_LOOPING_CONST_OR_PURE)
+ || stmt_can_throw_external (fun, stmt))
BB_MAY_NOTRETURN (block) = 1;
}
@@ -3987,7 +3995,7 @@ compute_avail (void)
BB_LIVE_VOP_ON_EXIT (block) = gimple_vdef (stmt);
if (gimple_has_side_effects (stmt)
- || stmt_could_throw_p (cfun, stmt)
+ || stmt_could_throw_p (fun, stmt)
|| is_gimple_debug (stmt))
continue;
@@ -4384,7 +4392,7 @@ pass_pre::execute (function *fun)
we require AVAIL. */
if (n_basic_blocks_for_fn (fun) < 4000)
{
- compute_avail ();
+ compute_avail (fun);
compute_antic ();
insert ();
}
</cut>
Successfully identified regression in *gcc* in CI configuration tcwg_bmk_gnu_eabi_stm32/gnu_eabi-master-arm_eabi-coremark-Os. So far, this commit has regressed CI configurations:
- tcwg_bmk_gnu_eabi_stm32/gnu_eabi-master-arm_eabi-coremark-Os
Culprit:
<cut>
commit 784de5292c34e287c848b382b431599b818ea76e
Author: Jakub Jelinek <jakub(a)redhat.com>
Date: Fri Apr 16 09:34:26 2021 +0200
c++: Fix up C++23 [] <...> requires primary -> type {} parsing [PR99850]
The requires clause parsing has code to suggest users wrapping
non-primary expressions in (), so if it e.g. parses a primary expression
and sees it is followed by ++, --, ., ( or -> among other things it
will try to reparse it as assignment expression or what and if that works
suggests wrapping it inside of parens.
When it is requires-clause that is after <typename T> etc. it already
has an exception from that as ( can occur in valid C++20 expression there
- starting the parameters of the lambda.
In C++23 another case can occur, as the parameters with the ()s can be
omitted, requires C can be followed immediately by -> which starts a
trailing return type. Even in that case, we don't want to parse that
as C->...
2021-04-16 Jakub Jelinek <jakub(a)redhat.com>
PR c++/99850
* parser.c (cp_parser_constraint_requires_parens) <case CPP_DEREF>:
If lambda_p, return pce_ok instead of pce_maybe_postfix.
* g++.dg/cpp23/lambda-specifiers2.C: New test.
</cut>
Results regressed to (for first_bad == 784de5292c34e287c848b382b431599b818ea76e)
# reset_artifacts:
-10
# build_abe binutils:
-9
# build_abe stage1 -- --set gcc_override_configure=--disable-libsanitizer --set gcc_override_configure=--disable-multilib --set gcc_override_configure=--with-cpu=cortex-m4 --set gcc_override_configure=--with-mode=thumb --set gcc_override_configure=--with-float=hard:
-8
# build_abe newlib:
-6
# build_abe stage2 -- --set gcc_override_configure=--disable-libsanitizer --set gcc_override_configure=--disable-multilib --set gcc_override_configure=--with-cpu=cortex-m4 --set gcc_override_configure=--with-mode=thumb --set gcc_override_configure=--with-float=hard:
-5
# true:
0
# benchmark -Os_mthumb -- artifacts/build-784de5292c34e287c848b382b431599b818ea76e/results_id:
1
from (for last_good == 20eb7a1891cfd7fa85295a236cebe0322d041edd)
# reset_artifacts:
-10
# build_abe binutils:
-9
# build_abe stage1 -- --set gcc_override_configure=--disable-libsanitizer --set gcc_override_configure=--disable-multilib --set gcc_override_configure=--with-cpu=cortex-m4 --set gcc_override_configure=--with-mode=thumb --set gcc_override_configure=--with-float=hard:
-8
# build_abe newlib:
-6
# build_abe stage2 -- --set gcc_override_configure=--disable-libsanitizer --set gcc_override_configure=--disable-multilib --set gcc_override_configure=--with-cpu=cortex-m4 --set gcc_override_configure=--with-mode=thumb --set gcc_override_configure=--with-float=hard:
-5
# true:
0
# benchmark -Os_mthumb -- artifacts/build-baseline/results_id:
1
Artifacts of last_good build: https://ci.linaro.org/job/tcwg_bmk_ci_gnu_eabi-bisect-tcwg_bmk_stm32-gnu_ea…
Results ID of last_good: stm32_STM32L476RGTx/tcwg_bmk_gnu_eabi_stm32/baseline-gnu_eabi-master-arm_eabi-coremark-Os/2215
Artifacts of first_bad build: https://ci.linaro.org/job/tcwg_bmk_ci_gnu_eabi-bisect-tcwg_bmk_stm32-gnu_ea…
Results ID of first_bad: stm32_STM32L476RGTx/tcwg_bmk_gnu_eabi_stm32/bisect-gnu_eabi-master-arm_eabi-coremark-Os/2252
Build top page/logs: https://ci.linaro.org/job/tcwg_bmk_ci_gnu_eabi-bisect-tcwg_bmk_stm32-gnu_ea…
Configuration details:
Reproduce builds:
<cut>
mkdir investigate-gcc-784de5292c34e287c848b382b431599b818ea76e
cd investigate-gcc-784de5292c34e287c848b382b431599b818ea76e
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_gnu_eabi-bisect-tcwg_bmk_stm32-gnu_ea… --fail
curl -o artifacts/manifests/build-parameters.sh https://ci.linaro.org/job/tcwg_bmk_ci_gnu_eabi-bisect-tcwg_bmk_stm32-gnu_ea… --fail
curl -o artifacts/test.sh https://ci.linaro.org/job/tcwg_bmk_ci_gnu_eabi-bisect-tcwg_bmk_stm32-gnu_ea… --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
# Save baseline build state (which is then restored in artifacts/test.sh)
mkdir -p ./bisect
rsync -a --del --delete-excluded --exclude /bisect/ --exclude /artifacts/ --exclude /gcc/ ./ ./bisect/baseline/
cd gcc
# Reproduce first_bad build
git checkout --detach 784de5292c34e287c848b382b431599b818ea76e
../artifacts/test.sh
# Reproduce last_good build
git checkout --detach 20eb7a1891cfd7fa85295a236cebe0322d041edd
../artifacts/test.sh
cd ..
</cut>
History of pending regressions and results: https://git.linaro.org/toolchain/ci/base-artifacts.git/log/?h=linaro-local/…
Artifacts: https://ci.linaro.org/job/tcwg_bmk_ci_gnu_eabi-bisect-tcwg_bmk_stm32-gnu_ea…
Build log: https://ci.linaro.org/job/tcwg_bmk_ci_gnu_eabi-bisect-tcwg_bmk_stm32-gnu_ea…
Full commit (up to 1000 lines):
<cut>
commit 784de5292c34e287c848b382b431599b818ea76e
Author: Jakub Jelinek <jakub(a)redhat.com>
Date: Fri Apr 16 09:34:26 2021 +0200
c++: Fix up C++23 [] <...> requires primary -> type {} parsing [PR99850]
The requires clause parsing has code to suggest users wrapping
non-primary expressions in (), so if it e.g. parses a primary expression
and sees it is followed by ++, --, ., ( or -> among other things it
will try to reparse it as assignment expression or what and if that works
suggests wrapping it inside of parens.
When it is requires-clause that is after <typename T> etc. it already
has an exception from that as ( can occur in valid C++20 expression there
- starting the parameters of the lambda.
In C++23 another case can occur, as the parameters with the ()s can be
omitted, requires C can be followed immediately by -> which starts a
trailing return type. Even in that case, we don't want to parse that
as C->...
2021-04-16 Jakub Jelinek <jakub(a)redhat.com>
PR c++/99850
* parser.c (cp_parser_constraint_requires_parens) <case CPP_DEREF>:
If lambda_p, return pce_ok instead of pce_maybe_postfix.
* g++.dg/cpp23/lambda-specifiers2.C: New test.
---
gcc/cp/parser.c | 13 +++++++++++++
gcc/testsuite/g++.dg/cpp23/lambda-specifiers2.C | 7 +++++++
2 files changed, 20 insertions(+)
diff --git a/gcc/cp/parser.c b/gcc/cp/parser.c
index 940751b5f05..dfc9b8251a7 100644
--- a/gcc/cp/parser.c
+++ b/gcc/cp/parser.c
@@ -28530,7 +28530,20 @@ cp_parser_constraint_requires_parens (cp_parser *parser, bool lambda_p)
case CPP_PLUS_PLUS:
case CPP_MINUS_MINUS:
case CPP_DOT:
+ /* Unenclosed postfix operator. */
+ return pce_maybe_postfix;
+
case CPP_DEREF:
+ /* A primary constraint that precedes the lambda-declarator of a
+ lambda expression is followed by trailing return type.
+
+ []<typename T> requires C -> void {}
+
+ Don't try to re-parse this as a postfix expression in
+ C++23 and later. In C++20 ( needs to come in between but we
+ allow it to be omitted with pedwarn. */
+ if (lambda_p)
+ return pce_ok;
/* Unenclosed postfix operator. */
return pce_maybe_postfix;
}
diff --git a/gcc/testsuite/g++.dg/cpp23/lambda-specifiers2.C b/gcc/testsuite/g++.dg/cpp23/lambda-specifiers2.C
new file mode 100644
index 00000000000..0cc69bebc64
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp23/lambda-specifiers2.C
@@ -0,0 +1,7 @@
+// PR c++/99850
+// P1102R2 - Down with ()!
+// { dg-do compile { target c++23 } }
+
+auto l = []<auto> requires true -> void {};
+template <typename...> concept C = true;
+auto m = []<typename... Ts> requires (C<Ts> && ...) -> void {};
</cut>
Successfully identified regression in *gcc* in CI configuration tcwg_bmk_gnu_tx1/gnu-master-aarch64-spec2k6-O2. So far, this commit has regressed CI configurations:
- tcwg_bmk_gnu_tx1/gnu-master-aarch64-spec2k6-O2
Culprit:
<cut>
commit d999d9b7e53b9a9cd2004a19e84c637e5e5013f5
Author: Patrick Palka <ppalka(a)redhat.com>
Date: Thu Jun 3 09:39:13 2021 -0400
c++: cv-qualified dependent name of alias tmpl [PR100592]
Here, the dependent template name in the return type of f() resolves to
an alias of int& after substitution, and we end up complaining about
qualifying this reference type with 'const' from cp_build_qualified_type
rather than just silently dropping the qualification as per [dcl.ref]/1.
The problem is ultimately that make_typename_type ignores the
tf_keep_type_decl flag when the dependent name is a template-id. This
in turn causes the TYPE_DECL check within tsubst <case TYPENAME_TYPE>
to fail, and so we end up not passing tf_ignore_bad_quals to
cp_build_qualified_type. This patch fixes this by making
make_typename_type respect the tf_keep_type_decl flag in this situation.
PR c++/100592
gcc/cp/ChangeLog:
* decl.c (make_typename_type): After calling
lookup_template_class, adjust the result to its TYPE_NAME and
then consider the tf_keep_type_decl flag.
gcc/testsuite/ChangeLog:
* g++.dg/cpp0x/alias-decl-71.C: New test.
</cut>
Results regressed to (for first_bad == d999d9b7e53b9a9cd2004a19e84c637e5e5013f5)
# 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
# true:
0
# benchmark -O2 -- artifacts/build-d999d9b7e53b9a9cd2004a19e84c637e5e5013f5/results_id:
1
# 447.dealII,dealII_base.default regressed by 103
# 447.dealII,[.] _ZNK8MappingQILi3EE19transform_covariantEP6Ten regressed by 117
from (for last_good == 69f517ac20566a645ff41a9bfca535822205a538)
# 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
# true:
0
# benchmark -O2 -- artifacts/build-69f517ac20566a645ff41a9bfca535822205a538/results_id:
1
Artifacts of last_good build: https://ci.linaro.org/job/tcwg_bmk_ci_gnu-bisect-tcwg_bmk_tx1-gnu-master-aa…
Results ID of last_good: tx1_64/tcwg_bmk_gnu_tx1/bisect-gnu-master-aarch64-spec2k6-O2/2208
Artifacts of first_bad build: https://ci.linaro.org/job/tcwg_bmk_ci_gnu-bisect-tcwg_bmk_tx1-gnu-master-aa…
Results ID of first_bad: tx1_64/tcwg_bmk_gnu_tx1/bisect-gnu-master-aarch64-spec2k6-O2/2248
Build top page/logs: https://ci.linaro.org/job/tcwg_bmk_ci_gnu-bisect-tcwg_bmk_tx1-gnu-master-aa…
Configuration details:
Reproduce builds:
<cut>
mkdir investigate-gcc-d999d9b7e53b9a9cd2004a19e84c637e5e5013f5
cd investigate-gcc-d999d9b7e53b9a9cd2004a19e84c637e5e5013f5
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_gnu-bisect-tcwg_bmk_tx1-gnu-master-aa… --fail
curl -o artifacts/manifests/build-parameters.sh https://ci.linaro.org/job/tcwg_bmk_ci_gnu-bisect-tcwg_bmk_tx1-gnu-master-aa… --fail
curl -o artifacts/test.sh https://ci.linaro.org/job/tcwg_bmk_ci_gnu-bisect-tcwg_bmk_tx1-gnu-master-aa… --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
# Save baseline build state (which is then restored in artifacts/test.sh)
mkdir -p ./bisect
rsync -a --del --delete-excluded --exclude /bisect/ --exclude /artifacts/ --exclude /gcc/ ./ ./bisect/baseline/
cd gcc
# Reproduce first_bad build
git checkout --detach d999d9b7e53b9a9cd2004a19e84c637e5e5013f5
../artifacts/test.sh
# Reproduce last_good build
git checkout --detach 69f517ac20566a645ff41a9bfca535822205a538
../artifacts/test.sh
cd ..
</cut>
History of pending regressions and results: https://git.linaro.org/toolchain/ci/base-artifacts.git/log/?h=linaro-local/…
Artifacts: https://ci.linaro.org/job/tcwg_bmk_ci_gnu-bisect-tcwg_bmk_tx1-gnu-master-aa…
Build log: https://ci.linaro.org/job/tcwg_bmk_ci_gnu-bisect-tcwg_bmk_tx1-gnu-master-aa…
Full commit (up to 1000 lines):
<cut>
commit d999d9b7e53b9a9cd2004a19e84c637e5e5013f5
Author: Patrick Palka <ppalka(a)redhat.com>
Date: Thu Jun 3 09:39:13 2021 -0400
c++: cv-qualified dependent name of alias tmpl [PR100592]
Here, the dependent template name in the return type of f() resolves to
an alias of int& after substitution, and we end up complaining about
qualifying this reference type with 'const' from cp_build_qualified_type
rather than just silently dropping the qualification as per [dcl.ref]/1.
The problem is ultimately that make_typename_type ignores the
tf_keep_type_decl flag when the dependent name is a template-id. This
in turn causes the TYPE_DECL check within tsubst <case TYPENAME_TYPE>
to fail, and so we end up not passing tf_ignore_bad_quals to
cp_build_qualified_type. This patch fixes this by making
make_typename_type respect the tf_keep_type_decl flag in this situation.
PR c++/100592
gcc/cp/ChangeLog:
* decl.c (make_typename_type): After calling
lookup_template_class, adjust the result to its TYPE_NAME and
then consider the tf_keep_type_decl flag.
gcc/testsuite/ChangeLog:
* g++.dg/cpp0x/alias-decl-71.C: New test.
---
gcc/cp/decl.c | 13 +++++++++----
gcc/testsuite/g++.dg/cpp0x/alias-decl-71.C | 13 +++++++++++++
2 files changed, 22 insertions(+), 4 deletions(-)
diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c
index fb21a3a1ae8..a3687dbb0dd 100644
--- a/gcc/cp/decl.c
+++ b/gcc/cp/decl.c
@@ -4136,10 +4136,15 @@ make_typename_type (tree context, tree name, enum tag_types tag_type,
return error_mark_node;
if (want_template)
- return lookup_template_class (t, TREE_OPERAND (fullname, 1),
- NULL_TREE, context,
- /*entering_scope=*/0,
- complain | tf_user);
+ {
+ t = lookup_template_class (t, TREE_OPERAND (fullname, 1),
+ NULL_TREE, context,
+ /*entering_scope=*/0,
+ complain | tf_user);
+ if (t == error_mark_node)
+ return error_mark_node;
+ t = TYPE_NAME (t);
+ }
if (DECL_ARTIFICIAL (t) || !(complain & tf_keep_type_decl))
t = TREE_TYPE (t);
diff --git a/gcc/testsuite/g++.dg/cpp0x/alias-decl-71.C b/gcc/testsuite/g++.dg/cpp0x/alias-decl-71.C
new file mode 100644
index 00000000000..6a61f93a0b0
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/alias-decl-71.C
@@ -0,0 +1,13 @@
+// PR c++/100592
+// { dg-do compile { target c++11 } }
+
+template<bool>
+struct meta {
+ template<class> using if_c = int&;
+};
+
+template<bool B>
+typename meta<B>::template if_c<void> const f();
+
+using type = decltype(f<true>());
+using type = int&;
</cut>
== This Week ==
* PR66791 (replace builtins with vector extensions in arm_neon.h intrinsics)
- vshl_n: Submitted patch for review and addressing comments by Richard.
- vmul_n fp: Investigated regression on arm-none-eabi and followed up
with Christophe.
- vmul_n int: Waiting for feedback.
- vld1: Created patch.
* Misc
- Fixed breakage in vect metric CI job due to type annotations.
* Off on thursday
- Public holiday
== Next Week ==
- Continue with PR66791
VirtIO Initiative ([STR-9])
===========================
VirtIO RPMB ([STR-5])
- posted [PATCH] virtio-rpmb: fix the description for multi-block
reads Message-Id: <20210722110903.8769-1-alex.bennee(a)linaro.org>
- Ruchika realised the spec didn't allow for multi-block reads
- she also suggested some [fixes for the C daemon]
- finally spent about 1/2 day on my [hacking branch] but making better
progress now trained ;-)
- create some sub-cards to track what we are doing
[STR-5] <https://projects.linaro.org/browse/STR-5>
[fixes for the C daemon]
<https://github.com/ruchi393/qemu/tree/vhost-user-rpmb-fixes>
[hacking branch] <https://github.com/stsquad/virtio-rpmb/tree/hacking>
QEMU Upstream Work ([UM-2])
===========================
- spent some time pulling together various maintainer trees for final
6.1 PRs
- hopefully [this is the last iteration before Monday]
- posted [PATCH for 6.1 v2 0/5] custom device configs Message-Id:
<20210707131744.26027-1-alex.bennee(a)linaro.org>
- chips away at the mega ARM re-factor patch set
- posted [PATCH v1 0/2] some device emulation documentation cleanup
Message-Id: <20210707184549.24436-1-alex.bennee(a)linaro.org>
- posted [PULL for 6.1 00/40] testing and plugin updates Message-Id:
<20210712122653.11354-1-alex.bennee(a)linaro.org>
- posted [PATCH for 6.1 v3 0/3] tricore fixes Message-Id:
<20210720114057.32053-1-alex.bennee(a)linaro.org>
- various iterations of review of rth's breakpoints
- posted [PULL for 6.1-rc1 00/28] doc, metadata, plugin and testing
updates Message-Id: <20210723170354.18975-1-alex.bennee(a)linaro.org>
[UM-2] <https://projects.linaro.org/browse/UM-2>
[this is the last iteration before Monday]
<https://patchew.org/QEMU/20210709143005.1554-1-alex.bennee@linaro.org/>
Enable plugins by default on TCG builds
- [X] clean-up testing matrix
Write a generic overview of vhost user usage for the manual
Other
=====
- preparing for [LOD discussion]
- some hackbox disk space admin
[LOD discussion]
<https://linaro.atlassian.net/wiki/spaces/LOD/pages/28544303418/2021-07-23+M…>
Completed Reviews [7/7]
=======================
[PATCH v6 0/4] GitLab Custom Runners and Jobs (was: QEMU Gating CI)
Message-Id: <20210608031425.833536-1-crosa(a)redhat.com>
[PATCH v4 00/22] tests/docker: start using libvirt-ci's "lcitool" for dockerfiles
Message-Id: <20210623142245.307776-1-berrange(a)redhat.com>
[PATCH v4 0/5] plugins: New TCG plugin for cache modelling
Message-Id: <20210623125458.450462-1-ma.mandourr(a)gmail.com>
[PATCH v3 0/2] execlog TCG plugin to log instructions
Message-Id: <20210702081307.1653644-1-erdnaxe(a)crans.org>
[PATCH 0/3] ci: use cirrus-run to utilize Cirrus CI from GitLab CI
Message-Id: <20210625172211.451010-1-berrange(a)redhat.com>
[PATCH v3 0/4] virtio: Add vhost-user based RNG
Message-Id: <20210710005929.1702431-1-mathieu.poirier(a)linaro.org>
[PATCH for-6.1 v6 00/17] tcg: breakpoint reorg
Message-Id: <20210720195439.626594-1-richard.henderson(a)linaro.org>
Absences
========
- several days of internet outages made things tricky
- July 26th-29th holiday
- On holiday for large chunks of August
Current Review Queue
====================
Needs reorganising ;-)
--
Alex Bennée
Progress:
* UM-2 [QEMU upstream maintainership]
+ Noticed we didn't enforce the M-profile "low 2 bits of SP are always 0"
rule, and wrote a patch to fix that
+ Found and fixed a handful of other corner-case M-profile bugs
+ Some minor docs improvements
* QEMU-406 [QEMU support for MVE (M-profile Vector Extension; Helium)]
+ Implemented the last 4 instruction patterns (VCVT, VRINT), bringing
us to Progress: 210/210 (100%)
+ Found and fixed a few bugs in already-implemented instructions
+ Started looking at how to make the MVE loads/stores correctly
raise alignment faults for unaligned addresses (this runs into
problems because QEMU doesn't currently have a good API for doing
the load/store the way we want to do it and also handling alignment
faults)
+ Remaining TODO list for this task:
- alignment fault behaviour, if not too difficult
- report MVE registers via the gdbstub (pending on the XML format being
fixed by gdb upstream)
- send out patches for code review
-- PMM
Successfully identified regression in *gcc* in CI configuration tcwg_bmk_llvm_tk1/llvm-master-arm-spec2k6-O3_LTO. So far, this commit has regressed CI configurations:
- tcwg_bmk_llvm_tk1/llvm-master-arm-spec2k6-O3_LTO
Culprit:
<cut>
commit c77230856eac2d28eb7bf10985846885c3c8727b
Author: Iain Buclaw <ibuclaw(a)gdcproject.org>
Date: Sat Jul 3 00:13:29 2021 +0200
d: RHS value lost when a target_expr modifies LHS in a cond_expr
To prevent the RHS of an assignment modifying the LHS before the
assignment proper, a target_expr is forced so that function calls that
return with slot optimization modify the temporary instead. This did
not work for conditional expressions however, to give one example. So
now the RHS is always forced to a temporary.
PR d/101282
gcc/d/ChangeLog:
* d-codegen.cc (build_assign): Force target_expr on RHS for non-POD
assignment expressions.
gcc/testsuite/ChangeLog:
* gdc.dg/torture/pr101282.d: New test.
</cut>
Results regressed to (for first_bad == c77230856eac2d28eb7bf10985846885c3c8727b)
# reset_artifacts:
-10
# build_abe binutils:
-9
# build_abe stage1 -- --set gcc_override_configure=--with-mode=arm --set gcc_override_configure=--disable-libsanitizer:
-8
# build_abe linux:
-7
# build_abe glibc:
-6
# build_abe stage2 -- --set gcc_override_configure=--with-mode=arm --set gcc_override_configure=--disable-libsanitizer:
-5
# build_llvm true:
-3
# true:
0
# benchmark -O3_LTO_marm -- artifacts/build-c77230856eac2d28eb7bf10985846885c3c8727b/results_id:
1
# 447.dealII,dealII_base.default regressed by 103
from (for last_good == 6feb628a706e86eb3f303aff388c74bdb29e7381)
# reset_artifacts:
-10
# build_abe binutils:
-9
# build_abe stage1 -- --set gcc_override_configure=--with-mode=arm --set gcc_override_configure=--disable-libsanitizer:
-8
# build_abe linux:
-7
# build_abe glibc:
-6
# build_abe stage2 -- --set gcc_override_configure=--with-mode=arm --set gcc_override_configure=--disable-libsanitizer:
-5
# build_llvm true:
-3
# true:
0
# benchmark -O3_LTO_marm -- artifacts/build-6feb628a706e86eb3f303aff388c74bdb29e7381/results_id:
1
Artifacts of last_good build: https://ci.linaro.org/job/tcwg_bmk_ci_llvm-bisect-tcwg_bmk_tk1-llvm-master-…
Results ID of last_good: tk1_32/tcwg_bmk_llvm_tk1/bisect-llvm-master-arm-spec2k6-O3_LTO/1951
Artifacts of first_bad build: https://ci.linaro.org/job/tcwg_bmk_ci_llvm-bisect-tcwg_bmk_tk1-llvm-master-…
Results ID of first_bad: tk1_32/tcwg_bmk_llvm_tk1/bisect-llvm-master-arm-spec2k6-O3_LTO/1938
Build top page/logs: https://ci.linaro.org/job/tcwg_bmk_ci_llvm-bisect-tcwg_bmk_tk1-llvm-master-…
Configuration details:
Reproduce builds:
<cut>
mkdir investigate-gcc-c77230856eac2d28eb7bf10985846885c3c8727b
cd investigate-gcc-c77230856eac2d28eb7bf10985846885c3c8727b
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_tk1-llvm-master-… --fail
curl -o artifacts/manifests/build-parameters.sh https://ci.linaro.org/job/tcwg_bmk_ci_llvm-bisect-tcwg_bmk_tk1-llvm-master-… --fail
curl -o artifacts/test.sh https://ci.linaro.org/job/tcwg_bmk_ci_llvm-bisect-tcwg_bmk_tk1-llvm-master-… --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
# Save baseline build state (which is then restored in artifacts/test.sh)
rsync -a --del --delete-excluded --exclude bisect/ --exclude artifacts/ --exclude gcc/ ./ ./bisect/baseline/
cd gcc
# Reproduce first_bad build
git checkout --detach c77230856eac2d28eb7bf10985846885c3c8727b
../artifacts/test.sh
# Reproduce last_good build
git checkout --detach 6feb628a706e86eb3f303aff388c74bdb29e7381
../artifacts/test.sh
cd ..
</cut>
History of pending regressions and results: https://git.linaro.org/toolchain/ci/base-artifacts.git/log/?h=linaro-local/…
Artifacts: https://ci.linaro.org/job/tcwg_bmk_ci_llvm-bisect-tcwg_bmk_tk1-llvm-master-…
Build log: https://ci.linaro.org/job/tcwg_bmk_ci_llvm-bisect-tcwg_bmk_tk1-llvm-master-…
Full commit (up to 1000 lines):
<cut>
commit c77230856eac2d28eb7bf10985846885c3c8727b
Author: Iain Buclaw <ibuclaw(a)gdcproject.org>
Date: Sat Jul 3 00:13:29 2021 +0200
d: RHS value lost when a target_expr modifies LHS in a cond_expr
To prevent the RHS of an assignment modifying the LHS before the
assignment proper, a target_expr is forced so that function calls that
return with slot optimization modify the temporary instead. This did
not work for conditional expressions however, to give one example. So
now the RHS is always forced to a temporary.
PR d/101282
gcc/d/ChangeLog:
* d-codegen.cc (build_assign): Force target_expr on RHS for non-POD
assignment expressions.
gcc/testsuite/ChangeLog:
* gdc.dg/torture/pr101282.d: New test.
---
gcc/d/d-codegen.cc | 7 +++++++
gcc/testsuite/gdc.dg/torture/pr101282.d | 23 +++++++++++++++++++++++
2 files changed, 30 insertions(+)
diff --git a/gcc/d/d-codegen.cc b/gcc/d/d-codegen.cc
index 9a9447371aa..ce7c17baaaf 100644
--- a/gcc/d/d-codegen.cc
+++ b/gcc/d/d-codegen.cc
@@ -1344,6 +1344,13 @@ build_assign (tree_code code, tree lhs, tree rhs)
d_mark_addressable (lhs);
CALL_EXPR_RETURN_SLOT_OPT (rhs) = true;
}
+ /* If modifying an LHS whose type is marked TREE_ADDRESSABLE. */
+ else if (code == MODIFY_EXPR && TREE_ADDRESSABLE (TREE_TYPE (lhs))
+ && TREE_SIDE_EFFECTS (rhs) && TREE_CODE (rhs) != TARGET_EXPR)
+ {
+ /* LHS may be referenced by the RHS expression, so force a temporary. */
+ rhs = force_target_expr (rhs);
+ }
/* The LHS assignment replaces the temporary in TARGET_EXPR_SLOT. */
if (TREE_CODE (rhs) == TARGET_EXPR)
diff --git a/gcc/testsuite/gdc.dg/torture/pr101282.d b/gcc/testsuite/gdc.dg/torture/pr101282.d
new file mode 100644
index 00000000000..b75d5fc678f
--- /dev/null
+++ b/gcc/testsuite/gdc.dg/torture/pr101282.d
@@ -0,0 +1,23 @@
+// https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101282
+// { dg-do run }
+
+void main()
+{
+ struct S101282
+ {
+ int impl;
+ S101282 opUnary(string op : "-")()
+ {
+ return S101282(-impl);
+ }
+ int opCmp(int i)
+ {
+ return (impl < i) ? -1 : (impl > i) ? 1 : 0;
+ }
+ }
+ auto a = S101282(120);
+ a = -a;
+ assert(a.impl == -120);
+ a = a >= 0 ? a : -a;
+ assert(a.impl == 120);
+}
</cut>
Successfully identified regression in *llvm* in CI configuration tcwg_bmk_llvm_tk1/llvm-release-arm-spec2k6-Os. So far, this commit has regressed CI configurations:
- tcwg_bmk_llvm_tk1/llvm-release-arm-spec2k6-Os
Culprit:
<cut>
commit ab97c9bdb747c873cd35a18229e2694156a7607d
Author: David Green <david.green(a)arm.com>
Date: Sat Dec 12 14:21:40 2020 +0000
[LV] Fix scalar cost for tail predicated loops
When it comes to the scalar cost of any predicated block, the loop
vectorizer by default regards this predication as a sign that it is
looking at an if-conversion and divides the scalar cost of the block by
2, assuming it would only be executed half the time. This however makes
no sense if the predication has been introduced to tail predicate the
loop.
Original patch by Anna Welker
Differential Revision: https://reviews.llvm.org/D86452
</cut>
Results regressed to (for first_bad == ab97c9bdb747c873cd35a18229e2694156a7607d)
# reset_artifacts:
-10
# build_abe binutils:
-9
# build_abe stage1 -- --set gcc_override_configure=--with-mode=thumb --set gcc_override_configure=--disable-libsanitizer:
-8
# build_abe linux:
-7
# build_abe glibc:
-6
# build_abe stage2 -- --set gcc_override_configure=--with-mode=thumb --set gcc_override_configure=--disable-libsanitizer:
-5
# build_llvm true:
-3
# true:
0
# benchmark -Os_mthumb -- artifacts/build-ab97c9bdb747c873cd35a18229e2694156a7607d/results_id:
1
# 401.bzip2,bzip2_base.default regressed by 103
# 401.bzip2,[.] BZ2_compressBlock regressed by 113
# 473.astar,astar_base.default regressed by 103
from (for last_good == d716eab197abec0b9aab4a76cd1a52b248b8c3b1)
# reset_artifacts:
-10
# build_abe binutils:
-9
# build_abe stage1 -- --set gcc_override_configure=--with-mode=thumb --set gcc_override_configure=--disable-libsanitizer:
-8
# build_abe linux:
-7
# build_abe glibc:
-6
# build_abe stage2 -- --set gcc_override_configure=--with-mode=thumb --set gcc_override_configure=--disable-libsanitizer:
-5
# build_llvm true:
-3
# true:
0
# benchmark -Os_mthumb -- artifacts/build-d716eab197abec0b9aab4a76cd1a52b248b8c3b1/results_id:
1
Artifacts of last_good build: https://ci.linaro.org/job/tcwg_bmk_ci_llvm-bisect-tcwg_bmk_tk1-llvm-release…
Results ID of last_good: tk1_32/tcwg_bmk_llvm_tk1/bisect-llvm-release-arm-spec2k6-Os/1878
Artifacts of first_bad build: https://ci.linaro.org/job/tcwg_bmk_ci_llvm-bisect-tcwg_bmk_tk1-llvm-release…
Results ID of first_bad: tk1_32/tcwg_bmk_llvm_tk1/bisect-llvm-release-arm-spec2k6-Os/1876
Build top page/logs: https://ci.linaro.org/job/tcwg_bmk_ci_llvm-bisect-tcwg_bmk_tk1-llvm-release…
Configuration details:
Reproduce builds:
<cut>
mkdir investigate-llvm-ab97c9bdb747c873cd35a18229e2694156a7607d
cd investigate-llvm-ab97c9bdb747c873cd35a18229e2694156a7607d
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_tk1-llvm-release… --fail
curl -o artifacts/manifests/build-parameters.sh https://ci.linaro.org/job/tcwg_bmk_ci_llvm-bisect-tcwg_bmk_tk1-llvm-release… --fail
curl -o artifacts/test.sh https://ci.linaro.org/job/tcwg_bmk_ci_llvm-bisect-tcwg_bmk_tk1-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
# Save baseline build state (which is then restored in artifacts/test.sh)
rsync -a --del --delete-excluded --exclude bisect/ --exclude artifacts/ --exclude llvm/ ./ ./bisect/baseline/
cd llvm
# Reproduce first_bad build
git checkout --detach ab97c9bdb747c873cd35a18229e2694156a7607d
../artifacts/test.sh
# Reproduce last_good build
git checkout --detach d716eab197abec0b9aab4a76cd1a52b248b8c3b1
../artifacts/test.sh
cd ..
</cut>
History of pending regressions and results: https://git.linaro.org/toolchain/ci/base-artifacts.git/log/?h=linaro-local/…
Artifacts: https://ci.linaro.org/job/tcwg_bmk_ci_llvm-bisect-tcwg_bmk_tk1-llvm-release…
Build log: https://ci.linaro.org/job/tcwg_bmk_ci_llvm-bisect-tcwg_bmk_tk1-llvm-release…
Full commit (up to 1000 lines):
<cut>
commit ab97c9bdb747c873cd35a18229e2694156a7607d
Author: David Green <david.green(a)arm.com>
Date: Sat Dec 12 14:21:40 2020 +0000
[LV] Fix scalar cost for tail predicated loops
When it comes to the scalar cost of any predicated block, the loop
vectorizer by default regards this predication as a sign that it is
looking at an if-conversion and divides the scalar cost of the block by
2, assuming it would only be executed half the time. This however makes
no sense if the predication has been introduced to tail predicate the
loop.
Original patch by Anna Welker
Differential Revision: https://reviews.llvm.org/D86452
---
llvm/lib/Transforms/Vectorize/LoopVectorize.cpp | 7 ++++---
llvm/test/Transforms/LoopVectorize/ARM/scalar-block-cost.ll | 2 +-
2 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp b/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
index c381377b67c9..663ea50c4c02 100644
--- a/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
+++ b/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
@@ -6483,9 +6483,10 @@ LoopVectorizationCostModel::expectedCost(ElementCount VF) {
// if-converted. This means that the block's instructions (aside from
// stores and instructions that may divide by zero) will now be
// unconditionally executed. For the scalar case, we may not always execute
- // the predicated block. Thus, scale the block's cost by the probability of
- // executing it.
- if (VF.isScalar() && blockNeedsPredication(BB))
+ // the predicated block, if it is an if-else block. Thus, scale the block's
+ // cost by the probability of executing it. blockNeedsPredication from
+ // Legal is used so as to not include all blocks in tail folded loops.
+ if (VF.isScalar() && Legal->blockNeedsPredication(BB))
BlockCost.first /= getReciprocalPredBlockProb();
Cost.first += BlockCost.first;
diff --git a/llvm/test/Transforms/LoopVectorize/ARM/scalar-block-cost.ll b/llvm/test/Transforms/LoopVectorize/ARM/scalar-block-cost.ll
index 959fbe676e67..fc8ea4fc938c 100644
--- a/llvm/test/Transforms/LoopVectorize/ARM/scalar-block-cost.ll
+++ b/llvm/test/Transforms/LoopVectorize/ARM/scalar-block-cost.ll
@@ -15,7 +15,7 @@ define void @pred_loop(i32* %off, i32* %data, i32* %dst, i32 %n) #0 {
; CHECK-COST-NEXT: LV: Found an estimated cost of 1 for VF 1 For instruction: store i32 %add1, i32* %arrayidx2, align 4
; CHECK-COST-NEXT: LV: Found an estimated cost of 1 for VF 1 For instruction: %exitcond.not = icmp eq i32 %add, %n
; CHECK-COST-NEXT: LV: Found an estimated cost of 0 for VF 1 For instruction: br i1 %exitcond.not, label %exit.loopexit, label %for.body
-; CHECK-COST-NEXT: LV: Scalar loop costs: 2.
+; CHECK-COST-NEXT: LV: Scalar loop costs: 5.
entry:
%cmp8 = icmp sgt i32 %n, 0
</cut>
Successfully identified regression in *llvm* in CI configuration tcwg_bmk_llvm_tk1/llvm-master-arm-spec2k6-O2. So far, this commit has regressed CI configurations:
- tcwg_bmk_llvm_tk1/llvm-master-arm-spec2k6-O2
Culprit:
<cut>
commit d181fd918d18cbd99768f025e14a69d35d275f14
Author: Simon Pilgrim <llvm-dev(a)redking.me.uk>
Date: Fri Jul 2 14:27:27 2021 +0100
[CostModel][X86] Drop some hard coded fp<->int scalarization costs
Scalarization costs handling is a lot better now, and the hard coded costs were higher than the worse case numbers from the script in D103695
</cut>
Results regressed to (for first_bad == d181fd918d18cbd99768f025e14a69d35d275f14)
# reset_artifacts:
-10
# build_abe binutils:
-9
# build_abe stage1 -- --set gcc_override_configure=--with-mode=arm --set gcc_override_configure=--disable-libsanitizer:
-8
# build_abe linux:
-7
# build_abe glibc:
-6
# build_abe stage2 -- --set gcc_override_configure=--with-mode=arm --set gcc_override_configure=--disable-libsanitizer:
-5
# build_llvm true:
-3
# true:
0
# benchmark -O2_marm -- artifacts/build-d181fd918d18cbd99768f025e14a69d35d275f14/results_id:
1
# 400.perlbench,libc-2.33.9000.so regressed by 113
from (for last_good == 5df556ac8bb8c5f4ef3dff1a2039dd389d1d27c0)
# reset_artifacts:
-10
# build_abe binutils:
-9
# build_abe stage1 -- --set gcc_override_configure=--with-mode=arm --set gcc_override_configure=--disable-libsanitizer:
-8
# build_abe linux:
-7
# build_abe glibc:
-6
# build_abe stage2 -- --set gcc_override_configure=--with-mode=arm --set gcc_override_configure=--disable-libsanitizer:
-5
# build_llvm true:
-3
# true:
0
# benchmark -O2_marm -- artifacts/build-5df556ac8bb8c5f4ef3dff1a2039dd389d1d27c0/results_id:
1
Artifacts of last_good build: https://ci.linaro.org/job/tcwg_bmk_ci_llvm-bisect-tcwg_bmk_tk1-llvm-master-…
Results ID of last_good: tk1_32/tcwg_bmk_llvm_tk1/bisect-llvm-master-arm-spec2k6-O2/1840
Artifacts of first_bad build: https://ci.linaro.org/job/tcwg_bmk_ci_llvm-bisect-tcwg_bmk_tk1-llvm-master-…
Results ID of first_bad: tk1_32/tcwg_bmk_llvm_tk1/bisect-llvm-master-arm-spec2k6-O2/1837
Build top page/logs: https://ci.linaro.org/job/tcwg_bmk_ci_llvm-bisect-tcwg_bmk_tk1-llvm-master-…
Configuration details:
Reproduce builds:
<cut>
mkdir investigate-llvm-d181fd918d18cbd99768f025e14a69d35d275f14
cd investigate-llvm-d181fd918d18cbd99768f025e14a69d35d275f14
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_tk1-llvm-master-… --fail
curl -o artifacts/manifests/build-parameters.sh https://ci.linaro.org/job/tcwg_bmk_ci_llvm-bisect-tcwg_bmk_tk1-llvm-master-… --fail
curl -o artifacts/test.sh https://ci.linaro.org/job/tcwg_bmk_ci_llvm-bisect-tcwg_bmk_tk1-llvm-master-… --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
# Save baseline build state (which is then restored in artifacts/test.sh)
rsync -a --del --delete-excluded --exclude bisect/ --exclude artifacts/ --exclude llvm/ ./ ./bisect/baseline/
cd llvm
# Reproduce first_bad build
git checkout --detach d181fd918d18cbd99768f025e14a69d35d275f14
../artifacts/test.sh
# Reproduce last_good build
git checkout --detach 5df556ac8bb8c5f4ef3dff1a2039dd389d1d27c0
../artifacts/test.sh
cd ..
</cut>
History of pending regressions and results: https://git.linaro.org/toolchain/ci/base-artifacts.git/log/?h=linaro-local/…
Artifacts: https://ci.linaro.org/job/tcwg_bmk_ci_llvm-bisect-tcwg_bmk_tk1-llvm-master-…
Build log: https://ci.linaro.org/job/tcwg_bmk_ci_llvm-bisect-tcwg_bmk_tk1-llvm-master-…
Full commit (up to 1000 lines):
<cut>
commit d181fd918d18cbd99768f025e14a69d35d275f14
Author: Simon Pilgrim <llvm-dev(a)redking.me.uk>
Date: Fri Jul 2 14:27:27 2021 +0100
[CostModel][X86] Drop some hard coded fp<->int scalarization costs
Scalarization costs handling is a lot better now, and the hard coded costs were higher than the worse case numbers from the script in D103695
---
llvm/lib/Target/X86/X86TargetTransformInfo.cpp | 13 -------------
llvm/test/Analysis/CostModel/X86/sitofp.ll | 6 +++---
2 files changed, 3 insertions(+), 16 deletions(-)
diff --git a/llvm/lib/Target/X86/X86TargetTransformInfo.cpp b/llvm/lib/Target/X86/X86TargetTransformInfo.cpp
index d55cd8a8c7a8..9eb5abe4dd9b 100644
--- a/llvm/lib/Target/X86/X86TargetTransformInfo.cpp
+++ b/llvm/lib/Target/X86/X86TargetTransformInfo.cpp
@@ -1977,13 +1977,6 @@ InstructionCost X86TTIImpl::getCastInstrCost(unsigned Opcode, Type *Dst,
{ ISD::UINT_TO_FP, MVT::v8f64, MVT::v8i32, 10 },
{ ISD::UINT_TO_FP, MVT::v2f64, MVT::v2i64, 5 },
{ ISD::UINT_TO_FP, MVT::v4f64, MVT::v4i64, 6 },
- // The generic code to compute the scalar overhead is currently broken.
- // Workaround this limitation by estimating the scalarization overhead
- // here. We have roughly 10 instructions per scalar element.
- // Multiply that by the vector width.
- // FIXME: remove that when PR19268 is fixed.
- { ISD::SINT_TO_FP, MVT::v4f64, MVT::v4i64, 13 },
- { ISD::SINT_TO_FP, MVT::v4f64, MVT::v4i64, 13 },
{ ISD::FP_TO_SINT, MVT::v8i8, MVT::v8f32, 4 },
{ ISD::FP_TO_SINT, MVT::v4i8, MVT::v4f64, 3 },
@@ -2003,12 +1996,6 @@ InstructionCost X86TTIImpl::getCastInstrCost(unsigned Opcode, Type *Dst,
{ ISD::FP_TO_UINT, MVT::v8i16, MVT::v8f32, 3 },
{ ISD::FP_TO_UINT, MVT::v8i32, MVT::v8f32, 9 },
{ ISD::FP_TO_UINT, MVT::v8i32, MVT::v8f64, 19 },
- // This node is expanded into scalarized operations but BasicTTI is overly
- // optimistic estimating its cost. It computes 3 per element (one
- // vector-extract, one scalar conversion and one vector-insert). The
- // problem is that the inserts form a read-modify-write chain so latency
- // should be factored in too. Inflating the cost per element by 1.
- { ISD::FP_TO_UINT, MVT::v4i32, MVT::v4f64, 4*4 },
{ ISD::FP_EXTEND, MVT::v4f64, MVT::v4f32, 1 },
{ ISD::FP_ROUND, MVT::v4f32, MVT::v4f64, 1 },
diff --git a/llvm/test/Analysis/CostModel/X86/sitofp.ll b/llvm/test/Analysis/CostModel/X86/sitofp.ll
index b3c400c93b9f..b327454c1d09 100644
--- a/llvm/test/Analysis/CostModel/X86/sitofp.ll
+++ b/llvm/test/Analysis/CostModel/X86/sitofp.ll
@@ -122,14 +122,14 @@ define i32 @sitofp_i64_double() {
; AVX-LABEL: 'sitofp_i64_double'
; AVX-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %cvt_i64_f64 = sitofp i64 undef to double
; AVX-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %cvt_v2i64_v2f64 = sitofp <2 x i64> undef to <2 x double>
-; AVX-NEXT: Cost Model: Found an estimated cost of 13 for instruction: %cvt_v4i64_v4f64 = sitofp <4 x i64> undef to <4 x double>
-; AVX-NEXT: Cost Model: Found an estimated cost of 26 for instruction: %cvt_v8i64_v8f64 = sitofp <8 x i64> undef to <8 x double>
+; AVX-NEXT: Cost Model: Found an estimated cost of 11 for instruction: %cvt_v4i64_v4f64 = sitofp <4 x i64> undef to <4 x double>
+; AVX-NEXT: Cost Model: Found an estimated cost of 22 for instruction: %cvt_v8i64_v8f64 = sitofp <8 x i64> undef to <8 x double>
; AVX-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef
;
; AVX512F-LABEL: 'sitofp_i64_double'
; AVX512F-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %cvt_i64_f64 = sitofp i64 undef to double
; AVX512F-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %cvt_v2i64_v2f64 = sitofp <2 x i64> undef to <2 x double>
-; AVX512F-NEXT: Cost Model: Found an estimated cost of 13 for instruction: %cvt_v4i64_v4f64 = sitofp <4 x i64> undef to <4 x double>
+; AVX512F-NEXT: Cost Model: Found an estimated cost of 11 for instruction: %cvt_v4i64_v4f64 = sitofp <4 x i64> undef to <4 x double>
; AVX512F-NEXT: Cost Model: Found an estimated cost of 25 for instruction: %cvt_v8i64_v8f64 = sitofp <8 x i64> undef to <8 x double>
; AVX512F-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef
;
</cut>
All,
During Connect the suggestion was made that each working group should have
its own IRC Channel for discussions and topics relating to the group in
particular (as opposed to #linaro which is 'generic' Linaro conversations).
Therefore I have just set up #linaro-tcwg on Freenode for the Toolchain
Working Group.
This channel is public and open to anyone who wants to talk with the TCWG
group about anything toolchain related.
Thanks,
Matt
--
Matthew Gretton-Dann
Toolchain Working Group, Linaro
Progress:
* UM-2 [QEMU upstream maintainership]
+ Code review:
- ITS patchset v6
- RTH's series to allow usermode emulation users to set default vector length
+ Arm pullreq; shepherding stuff in for softfreeze
* QEMU-406 [QEMU support for MVE (M-profile Vector Extension; Helium)]
+ Sent out patchset with the 3rd slice of MVE insns; I now have
all the non-floating-point insns done, I think. New insns:
scatter-gather loads/stores, interleaving loads/stores, VCTP,
realized I already did VMOVL as it is "VSHLL-by-0"
+ Implemented most of the floating point insns: implemented
VADD fp, VSUB fp, VABD fp, VMUL fp, VMAXNM, VMINNM, VCADD fp,
VFMA, VFMS, VCMUL, VCMLA, VMAXNMA, VMINNMA, VADD fp scalar,
VSUB fp scalar, VMUL fp scalar, VFMA fp scalar, VFMAS fp scalar,
VMAXNMV, VMAXNMAV, VMINNMV, VMINNMAV, VCMP and VPT fp vector and scalar,
VCVT fixed-point
+ Just 4 insns to go: three flavours of VCVT, plus VRINT (and then
all the other stuff that wasn't included in this simplistic
measure of progress :-))
+ Progress: 206/210 (98%)
-- PMM
Successfully identified regression in *gcc* in CI configuration tcwg_bmk_gnu_tk1/gnu-release-arm-spec2k6-O3_LTO. So far, this commit has regressed CI configurations:
- tcwg_bmk_gnu_tk1/gnu-release-arm-spec2k6-O3_LTO
Culprit:
<cut>
commit c7207339a7dbce5b68f872064e624dcf1639ba46
Author: Wilco Dijkstra <wdijkstr(a)arm.com>
Date: Mon Oct 14 12:21:14 2019 +0000
[ARM] Switch to default sched pressure algorithm
Currently the Arm backend selects the alternative sched pressure algorithm.
The issue is that this doesn't take register pressure into account, and so
it causes significant additional spilling on Arm where there are only 14
allocatable registers. Building SPEC2006 showed significant codesize gains
with the default pressure algorithm, so switch back to that. PR77308 shows
~800 fewer instructions.
SPECINT2006 is ~0.6% faster on Cortex-A57 together with the other DImode
patches. Overall SPEC codesize is 1.1% smaller.
gcc/
* config/arm/arm.c (arm_option_override): Don't override sched
pressure algorithm.
From-SVN: r276960
</cut>
Results regressed to (for first_bad == c7207339a7dbce5b68f872064e624dcf1639ba46)
# reset_artifacts:
-10
# build_abe binutils:
-9
# build_abe stage1 -- --set gcc_override_configure=--with-mode=arm --set gcc_override_configure=--disable-libsanitizer:
-8
# build_abe linux:
-7
# build_abe glibc:
-6
# build_abe stage2 -- --set gcc_override_configure=--with-mode=arm --set gcc_override_configure=--disable-libsanitizer:
-5
# true:
0
# benchmark -O3_LTO_marm -- artifacts/build-c7207339a7dbce5b68f872064e624dcf1639ba46/results_id:
1
# 410.bwaves,bwaves_base.default regressed by 108
# 454.calculix,calculix_base.default regressed by 105
# 482.sphinx3,sphinx_livepretend_base.default regressed by 104
# 436.cactusADM,cactusADM_base.default regressed by 116
# 444.namd,namd_base.default regressed by 103
# 435.gromacs,gromacs_base.default regressed by 106
from (for last_good == 7bd8bec53f0e43c7a7852c54650746e65324514b)
# reset_artifacts:
-10
# build_abe binutils:
-9
# build_abe stage1 -- --set gcc_override_configure=--with-mode=arm --set gcc_override_configure=--disable-libsanitizer:
-8
# build_abe linux:
-7
# build_abe glibc:
-6
# build_abe stage2 -- --set gcc_override_configure=--with-mode=arm --set gcc_override_configure=--disable-libsanitizer:
-5
# true:
0
# benchmark -O3_LTO_marm -- artifacts/build-7bd8bec53f0e43c7a7852c54650746e65324514b/results_id:
1
Artifacts of last_good build: https://ci.linaro.org/job/tcwg_bmk_ci_gnu-bisect-tcwg_bmk_tk1-gnu-release-a…
Results ID of last_good: tk1_32/tcwg_bmk_gnu_tk1/bisect-gnu-release-arm-spec2k6-O3_LTO/1468
Artifacts of first_bad build: https://ci.linaro.org/job/tcwg_bmk_ci_gnu-bisect-tcwg_bmk_tk1-gnu-release-a…
Results ID of first_bad: tk1_32/tcwg_bmk_gnu_tk1/bisect-gnu-release-arm-spec2k6-O3_LTO/1469
Build top page/logs: https://ci.linaro.org/job/tcwg_bmk_ci_gnu-bisect-tcwg_bmk_tk1-gnu-release-a…
Configuration details:
Reproduce builds:
<cut>
mkdir investigate-gcc-c7207339a7dbce5b68f872064e624dcf1639ba46
cd investigate-gcc-c7207339a7dbce5b68f872064e624dcf1639ba46
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_gnu-bisect-tcwg_bmk_tk1-gnu-release-a… --fail
curl -o artifacts/manifests/build-parameters.sh https://ci.linaro.org/job/tcwg_bmk_ci_gnu-bisect-tcwg_bmk_tk1-gnu-release-a… --fail
curl -o artifacts/test.sh https://ci.linaro.org/job/tcwg_bmk_ci_gnu-bisect-tcwg_bmk_tk1-gnu-release-a… --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 gcc
# Reproduce first_bad build
git checkout --detach c7207339a7dbce5b68f872064e624dcf1639ba46
../artifacts/test.sh
# Reproduce last_good build
git checkout --detach 7bd8bec53f0e43c7a7852c54650746e65324514b
../artifacts/test.sh
cd ..
</cut>
History of pending regressions and results: https://git.linaro.org/toolchain/ci/base-artifacts.git/log/?h=linaro-local/…
Artifacts: https://ci.linaro.org/job/tcwg_bmk_ci_gnu-bisect-tcwg_bmk_tk1-gnu-release-a…
Build log: https://ci.linaro.org/job/tcwg_bmk_ci_gnu-bisect-tcwg_bmk_tk1-gnu-release-a…
Full commit (up to 1000 lines):
<cut>
commit c7207339a7dbce5b68f872064e624dcf1639ba46
Author: Wilco Dijkstra <wdijkstr(a)arm.com>
Date: Mon Oct 14 12:21:14 2019 +0000
[ARM] Switch to default sched pressure algorithm
Currently the Arm backend selects the alternative sched pressure algorithm.
The issue is that this doesn't take register pressure into account, and so
it causes significant additional spilling on Arm where there are only 14
allocatable registers. Building SPEC2006 showed significant codesize gains
with the default pressure algorithm, so switch back to that. PR77308 shows
~800 fewer instructions.
SPECINT2006 is ~0.6% faster on Cortex-A57 together with the other DImode
patches. Overall SPEC codesize is 1.1% smaller.
gcc/
* config/arm/arm.c (arm_option_override): Don't override sched
pressure algorithm.
From-SVN: r276960
---
gcc/ChangeLog | 5 +++++
gcc/config/arm/arm.c | 5 -----
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index c2cbd4274ca..f07a0e61e6b 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+2019-10-14 Wilco Dijkstra <wdijkstr(a)arm.com>
+
+ * config/arm/arm.c (arm_option_override): Don't override sched
+ pressure algorithm.
+
2019-10-14 Richard Biener <rguenther(a)suse.de>
PR tree-optimization/92069
diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c
index 39e1a1ef9a2..394b1dd1902 100644
--- a/gcc/config/arm/arm.c
+++ b/gcc/config/arm/arm.c
@@ -3555,11 +3555,6 @@ arm_option_override (void)
global_options.x_param_values,
global_options_set.x_param_values);
- /* Use the alternative scheduling-pressure algorithm by default. */
- maybe_set_param_value (PARAM_SCHED_PRESSURE_ALGORITHM, SCHED_PRESSURE_MODEL,
- global_options.x_param_values,
- global_options_set.x_param_values);
-
/* Look through ready list and all of queue for instructions
relevant for L2 auto-prefetcher. */
int param_sched_autopref_queue_depth;
</cut>
Successfully identified regression in *gcc* in CI configuration tcwg_bmk_gnu_tk1/gnu-release-arm-spec2k6-O3_LTO. So far, this commit has regressed CI configurations:
- tcwg_bmk_gnu_tk1/gnu-release-arm-spec2k6-O3_LTO
Culprit:
<cut>
commit c7207339a7dbce5b68f872064e624dcf1639ba46
Author: Wilco Dijkstra <wdijkstr(a)arm.com>
Date: Mon Oct 14 12:21:14 2019 +0000
[ARM] Switch to default sched pressure algorithm
Currently the Arm backend selects the alternative sched pressure algorithm.
The issue is that this doesn't take register pressure into account, and so
it causes significant additional spilling on Arm where there are only 14
allocatable registers. Building SPEC2006 showed significant codesize gains
with the default pressure algorithm, so switch back to that. PR77308 shows
~800 fewer instructions.
SPECINT2006 is ~0.6% faster on Cortex-A57 together with the other DImode
patches. Overall SPEC codesize is 1.1% smaller.
gcc/
* config/arm/arm.c (arm_option_override): Don't override sched
pressure algorithm.
From-SVN: r276960
</cut>
Results regressed to (for first_bad == c7207339a7dbce5b68f872064e624dcf1639ba46)
# reset_artifacts:
-10
# build_abe binutils:
-9
# build_abe stage1 -- --set gcc_override_configure=--with-mode=arm --set gcc_override_configure=--disable-libsanitizer:
-8
# build_abe linux:
-7
# build_abe glibc:
-6
# build_abe stage2 -- --set gcc_override_configure=--with-mode=arm --set gcc_override_configure=--disable-libsanitizer:
-5
# true:
0
# benchmark -O3_LTO_marm -- artifacts/build-c7207339a7dbce5b68f872064e624dcf1639ba46/results_id:
1
# 435.gromacs,gromacs_base.default regressed by 106
# 459.GemsFDTD,GemsFDTD_base.default regressed by 103
# 436.cactusADM,cactusADM_base.default regressed by 115
# 444.namd,namd_base.default regressed by 103
# 482.sphinx3,sphinx_livepretend_base.default regressed by 103
# 410.bwaves,bwaves_base.default regressed by 107
# 454.calculix,calculix_base.default regressed by 105
from (for last_good == 7bd8bec53f0e43c7a7852c54650746e65324514b)
# reset_artifacts:
-10
# build_abe binutils:
-9
# build_abe stage1 -- --set gcc_override_configure=--with-mode=arm --set gcc_override_configure=--disable-libsanitizer:
-8
# build_abe linux:
-7
# build_abe glibc:
-6
# build_abe stage2 -- --set gcc_override_configure=--with-mode=arm --set gcc_override_configure=--disable-libsanitizer:
-5
# true:
0
# benchmark -O3_LTO_marm -- artifacts/build-7bd8bec53f0e43c7a7852c54650746e65324514b/results_id:
1
Artifacts of last_good build: https://ci.linaro.org/job/tcwg_bmk_ci_gnu-bisect-tcwg_bmk_tk1-gnu-release-a…
Results ID of last_good: tk1_32/tcwg_bmk_gnu_tk1/bisect-gnu-release-arm-spec2k6-O3_LTO/1638
Artifacts of first_bad build: https://ci.linaro.org/job/tcwg_bmk_ci_gnu-bisect-tcwg_bmk_tk1-gnu-release-a…
Results ID of first_bad: tk1_32/tcwg_bmk_gnu_tk1/bisect-gnu-release-arm-spec2k6-O3_LTO/1643
Build top page/logs: https://ci.linaro.org/job/tcwg_bmk_ci_gnu-bisect-tcwg_bmk_tk1-gnu-release-a…
Configuration details:
Reproduce builds:
<cut>
mkdir investigate-gcc-c7207339a7dbce5b68f872064e624dcf1639ba46
cd investigate-gcc-c7207339a7dbce5b68f872064e624dcf1639ba46
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_gnu-bisect-tcwg_bmk_tk1-gnu-release-a… --fail
curl -o artifacts/manifests/build-parameters.sh https://ci.linaro.org/job/tcwg_bmk_ci_gnu-bisect-tcwg_bmk_tk1-gnu-release-a… --fail
curl -o artifacts/test.sh https://ci.linaro.org/job/tcwg_bmk_ci_gnu-bisect-tcwg_bmk_tk1-gnu-release-a… --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
# Save baseline build state (which is then restored in artifacts/test.sh)
rsync -a --del --delete-excluded --exclude bisect/ --exclude artifacts/ --exclude gcc/ ./ ./bisect/baseline/
cd gcc
# Reproduce first_bad build
git checkout --detach c7207339a7dbce5b68f872064e624dcf1639ba46
../artifacts/test.sh
# Reproduce last_good build
git checkout --detach 7bd8bec53f0e43c7a7852c54650746e65324514b
../artifacts/test.sh
cd ..
</cut>
History of pending regressions and results: https://git.linaro.org/toolchain/ci/base-artifacts.git/log/?h=linaro-local/…
Artifacts: https://ci.linaro.org/job/tcwg_bmk_ci_gnu-bisect-tcwg_bmk_tk1-gnu-release-a…
Build log: https://ci.linaro.org/job/tcwg_bmk_ci_gnu-bisect-tcwg_bmk_tk1-gnu-release-a…
Full commit (up to 1000 lines):
<cut>
commit c7207339a7dbce5b68f872064e624dcf1639ba46
Author: Wilco Dijkstra <wdijkstr(a)arm.com>
Date: Mon Oct 14 12:21:14 2019 +0000
[ARM] Switch to default sched pressure algorithm
Currently the Arm backend selects the alternative sched pressure algorithm.
The issue is that this doesn't take register pressure into account, and so
it causes significant additional spilling on Arm where there are only 14
allocatable registers. Building SPEC2006 showed significant codesize gains
with the default pressure algorithm, so switch back to that. PR77308 shows
~800 fewer instructions.
SPECINT2006 is ~0.6% faster on Cortex-A57 together with the other DImode
patches. Overall SPEC codesize is 1.1% smaller.
gcc/
* config/arm/arm.c (arm_option_override): Don't override sched
pressure algorithm.
From-SVN: r276960
---
gcc/ChangeLog | 5 +++++
gcc/config/arm/arm.c | 5 -----
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index c2cbd4274ca..f07a0e61e6b 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+2019-10-14 Wilco Dijkstra <wdijkstr(a)arm.com>
+
+ * config/arm/arm.c (arm_option_override): Don't override sched
+ pressure algorithm.
+
2019-10-14 Richard Biener <rguenther(a)suse.de>
PR tree-optimization/92069
diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c
index 39e1a1ef9a2..394b1dd1902 100644
--- a/gcc/config/arm/arm.c
+++ b/gcc/config/arm/arm.c
@@ -3555,11 +3555,6 @@ arm_option_override (void)
global_options.x_param_values,
global_options_set.x_param_values);
- /* Use the alternative scheduling-pressure algorithm by default. */
- maybe_set_param_value (PARAM_SCHED_PRESSURE_ALGORITHM, SCHED_PRESSURE_MODEL,
- global_options.x_param_values,
- global_options_set.x_param_values);
-
/* Look through ready list and all of queue for instructions
relevant for L2 auto-prefetcher. */
int param_sched_autopref_queue_depth;
</cut>
Successfully identified regression in *gcc* in CI configuration tcwg_bmk_gnu_tx1/gnu-master-aarch64-spec2k6-O3_LTO. So far, this commit has regressed CI configurations:
- tcwg_bmk_gnu_tx1/gnu-master-aarch64-spec2k6-O3_LTO
Culprit:
<cut>
commit fedcf3c476aff7533741a1c61071200f0a38cf83
Author: Richard Biener <rguenther(a)suse.de>
Date: Thu Jul 8 09:52:49 2021 +0200
tree-optimization/101373 - avoid PRE across externally throwing call
PRE already tries to avoid hoisting possibly trapping expressions
across calls that might not return normally but fails to consider
const calls that throw externally. The following fixes that and
also plugs the hole of trapping references not pruned in case
they are not catched by the actuall call clobbering it.
At -Os we hit the same issue in RTL PRE and postreload-gcse has
even more incomplete checks so the patch adjusts both of those
as well.
2021-07-08 Richard Biener <rguenther(a)suse.de>
PR tree-optimization/101373
* tree-ssa-pre.c (prune_clobbered_mems): Also prune trapping
references when the BB may not return.
(compute_avail): Pass in the function we're working on and
replace cfun references with it. Externally throwing
const calls also possibly terminate the function.
(pass_pre::execute): Pass down the function we're working on.
* gcse.c (compute_hash_table_work): Externally throwing
const/pure calls also need record_last_mem_set_info.
* postreload-gcse.c (record_opr_changes): Looping or externally
throwing const/pure calls also need record_last_mem_set_info.
* g++.dg/torture/pr101373.C: New testcase, XFAILed.
* gnat.dg/opt95.adb: Likewise.
</cut>
Results regressed to (for first_bad == fedcf3c476aff7533741a1c61071200f0a38cf83)
# 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
# true:
0
# benchmark -O3_LTO -- artifacts/build-fedcf3c476aff7533741a1c61071200f0a38cf83/results_id:
1
# 429.mcf,mcf_base.default regressed by 106
from (for last_good == fe610051a803131822bd02a8842a67b573b8e46a)
# 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
# true:
0
# benchmark -O3_LTO -- artifacts/build-fe610051a803131822bd02a8842a67b573b8e46a/results_id:
1
Artifacts of last_good build: https://ci.linaro.org/job/tcwg_bmk_ci_gnu-bisect-tcwg_bmk_tx1-gnu-master-aa…
Results ID of last_good: tx1_64/tcwg_bmk_gnu_tx1/bisect-gnu-master-aarch64-spec2k6-O3_LTO/1618
Artifacts of first_bad build: https://ci.linaro.org/job/tcwg_bmk_ci_gnu-bisect-tcwg_bmk_tx1-gnu-master-aa…
Results ID of first_bad: tx1_64/tcwg_bmk_gnu_tx1/bisect-gnu-master-aarch64-spec2k6-O3_LTO/1613
Build top page/logs: https://ci.linaro.org/job/tcwg_bmk_ci_gnu-bisect-tcwg_bmk_tx1-gnu-master-aa…
Configuration details:
Reproduce builds:
<cut>
mkdir investigate-gcc-fedcf3c476aff7533741a1c61071200f0a38cf83
cd investigate-gcc-fedcf3c476aff7533741a1c61071200f0a38cf83
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_gnu-bisect-tcwg_bmk_tx1-gnu-master-aa… --fail
curl -o artifacts/manifests/build-parameters.sh https://ci.linaro.org/job/tcwg_bmk_ci_gnu-bisect-tcwg_bmk_tx1-gnu-master-aa… --fail
curl -o artifacts/test.sh https://ci.linaro.org/job/tcwg_bmk_ci_gnu-bisect-tcwg_bmk_tx1-gnu-master-aa… --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
# Save baseline build state (which is then restored in artifacts/test.sh)
rsync -a --del --delete-excluded --exclude bisect/ --exclude artifacts/ --exclude gcc/ ./ ./bisect/baseline/
cd gcc
# Reproduce first_bad build
git checkout --detach fedcf3c476aff7533741a1c61071200f0a38cf83
../artifacts/test.sh
# Reproduce last_good build
git checkout --detach fe610051a803131822bd02a8842a67b573b8e46a
../artifacts/test.sh
cd ..
</cut>
History of pending regressions and results: https://git.linaro.org/toolchain/ci/base-artifacts.git/log/?h=linaro-local/…
Artifacts: https://ci.linaro.org/job/tcwg_bmk_ci_gnu-bisect-tcwg_bmk_tx1-gnu-master-aa…
Build log: https://ci.linaro.org/job/tcwg_bmk_ci_gnu-bisect-tcwg_bmk_tx1-gnu-master-aa…
Full commit (up to 1000 lines):
<cut>
commit fedcf3c476aff7533741a1c61071200f0a38cf83
Author: Richard Biener <rguenther(a)suse.de>
Date: Thu Jul 8 09:52:49 2021 +0200
tree-optimization/101373 - avoid PRE across externally throwing call
PRE already tries to avoid hoisting possibly trapping expressions
across calls that might not return normally but fails to consider
const calls that throw externally. The following fixes that and
also plugs the hole of trapping references not pruned in case
they are not catched by the actuall call clobbering it.
At -Os we hit the same issue in RTL PRE and postreload-gcse has
even more incomplete checks so the patch adjusts both of those
as well.
2021-07-08 Richard Biener <rguenther(a)suse.de>
PR tree-optimization/101373
* tree-ssa-pre.c (prune_clobbered_mems): Also prune trapping
references when the BB may not return.
(compute_avail): Pass in the function we're working on and
replace cfun references with it. Externally throwing
const calls also possibly terminate the function.
(pass_pre::execute): Pass down the function we're working on.
* gcse.c (compute_hash_table_work): Externally throwing
const/pure calls also need record_last_mem_set_info.
* postreload-gcse.c (record_opr_changes): Looping or externally
throwing const/pure calls also need record_last_mem_set_info.
* g++.dg/torture/pr101373.C: New testcase, XFAILed.
* gnat.dg/opt95.adb: Likewise.
---
gcc/gcse.c | 3 ++-
gcc/postreload-gcse.c | 4 +++-
gcc/testsuite/g++.dg/torture/pr101373.C | 33 +++++++++++++++++++++++++++
gcc/testsuite/gnat.dg/opt95.adb | 40 +++++++++++++++++++++++++++++++++
gcc/tree-ssa-pre.c | 34 +++++++++++++++++-----------
5 files changed, 99 insertions(+), 15 deletions(-)
diff --git a/gcc/gcse.c b/gcc/gcse.c
index ecf7e51aac5..ccd33664af5 100644
--- a/gcc/gcse.c
+++ b/gcc/gcse.c
@@ -1537,7 +1537,8 @@ compute_hash_table_work (struct gcse_hash_table_d *table)
record_last_reg_set_info (insn, regno);
if (! RTL_CONST_OR_PURE_CALL_P (insn)
- || RTL_LOOPING_CONST_OR_PURE_CALL_P (insn))
+ || RTL_LOOPING_CONST_OR_PURE_CALL_P (insn)
+ || can_throw_external (insn))
record_last_mem_set_info (insn);
}
diff --git a/gcc/postreload-gcse.c b/gcc/postreload-gcse.c
index 0b28247e299..6c95d09a1e5 100644
--- a/gcc/postreload-gcse.c
+++ b/gcc/postreload-gcse.c
@@ -779,7 +779,9 @@ record_opr_changes (rtx_insn *insn)
EXECUTE_IF_SET_IN_HARD_REG_SET (callee_clobbers, 0, regno, hrsi)
record_last_reg_set_info_regno (insn, regno);
- if (! RTL_CONST_OR_PURE_CALL_P (insn))
+ if (! RTL_CONST_OR_PURE_CALL_P (insn)
+ || RTL_LOOPING_CONST_OR_PURE_CALL_P (insn)
+ || can_throw_external (insn))
record_last_mem_set_info (insn);
}
}
diff --git a/gcc/testsuite/g++.dg/torture/pr101373.C b/gcc/testsuite/g++.dg/torture/pr101373.C
new file mode 100644
index 00000000000..f8c809739e2
--- /dev/null
+++ b/gcc/testsuite/g++.dg/torture/pr101373.C
@@ -0,0 +1,33 @@
+// { dg-do run }
+// { dg-xfail-run-if "PR100409" { *-*-* } }
+
+int __attribute__((const,noipa)) foo (int j)
+{
+ if (j != 0)
+ throw 1;
+ return 0;
+}
+
+int __attribute__((noipa)) bar (int *p, int n)
+{
+ int ret = 0;
+ if (n)
+ {
+ foo (n);
+ ret = *p;
+ }
+ ret += *p;
+ return ret;
+}
+
+int main()
+{
+ try
+ {
+ return bar (nullptr, 1);
+ }
+ catch (...)
+ {
+ return 0;
+ }
+}
diff --git a/gcc/testsuite/gnat.dg/opt95.adb b/gcc/testsuite/gnat.dg/opt95.adb
new file mode 100644
index 00000000000..2c72582b3f1
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/opt95.adb
@@ -0,0 +1,40 @@
+-- { dg-do run }
+-- { dg-options "-O2 -gnatp" }
+
+procedure Opt95 is
+
+ function Foo (J : Integer) return Integer;
+ pragma Pure_Function (Foo);
+ pragma Machine_Attribute (Foo, "noipa");
+
+ function Foo (J : Integer) return Integer is
+ begin
+ if J /= 0 then
+ raise Constraint_Error;
+ end if;
+ return 0;
+ end;
+
+ function Bar (A : access Integer; N : Integer) return Integer;
+ pragma Machine_Attribute (Bar, "noipa");
+
+ function Bar (A : access Integer; N : Integer) return Integer is
+ Ret : Integer := 0;
+ Ret2 : Integer := 0;
+ begin
+ if N /= 0 then
+ Ret2 := Foo (N);
+ Ret := A.all;
+ end if;
+ Ret := Ret + A.all;
+ return Ret + Ret2;
+ end;
+
+ V : Integer;
+ pragma Volatile (V);
+
+begin
+ V := Bar (null, 1);
+exception
+ when Constraint_Error => null;
+end;
diff --git a/gcc/tree-ssa-pre.c b/gcc/tree-ssa-pre.c
index 69141c2f0c9..aa5244e678c 100644
--- a/gcc/tree-ssa-pre.c
+++ b/gcc/tree-ssa-pre.c
@@ -2071,6 +2071,13 @@ prune_clobbered_mems (bitmap_set_t set, basic_block block)
&& value_dies_in_block_x (expr, block))))
to_remove = i;
}
+ /* If the REFERENCE may trap make sure the block does not contain
+ a possible exit point.
+ ??? This is overly conservative if we translate AVAIL_OUT
+ as the available expression might be after the exit point. */
+ if (BB_MAY_NOTRETURN (block)
+ && vn_reference_may_trap (ref))
+ to_remove = i;
}
else if (expr->kind == NARY)
{
@@ -3860,7 +3867,7 @@ insert (void)
AVAIL_OUT[BLOCK] = AVAIL_IN[BLOCK] U PHI_GEN[BLOCK] U TMP_GEN[BLOCK]. */
static void
-compute_avail (void)
+compute_avail (function *fun)
{
basic_block block, son;
@@ -3871,7 +3878,7 @@ compute_avail (void)
/* We pretend that default definitions are defined in the entry block.
This includes function arguments and the static chain decl. */
- FOR_EACH_SSA_NAME (i, name, cfun)
+ FOR_EACH_SSA_NAME (i, name, fun)
{
pre_expr e;
if (!SSA_NAME_IS_DEFAULT_DEF (name)
@@ -3881,31 +3888,31 @@ compute_avail (void)
e = get_or_alloc_expr_for_name (name);
add_to_value (get_expr_value_id (e), e);
- bitmap_insert_into_set (TMP_GEN (ENTRY_BLOCK_PTR_FOR_FN (cfun)), e);
- bitmap_value_insert_into_set (AVAIL_OUT (ENTRY_BLOCK_PTR_FOR_FN (cfun)),
+ bitmap_insert_into_set (TMP_GEN (ENTRY_BLOCK_PTR_FOR_FN (fun)), e);
+ bitmap_value_insert_into_set (AVAIL_OUT (ENTRY_BLOCK_PTR_FOR_FN (fun)),
e);
}
if (dump_file && (dump_flags & TDF_DETAILS))
{
- print_bitmap_set (dump_file, TMP_GEN (ENTRY_BLOCK_PTR_FOR_FN (cfun)),
+ print_bitmap_set (dump_file, TMP_GEN (ENTRY_BLOCK_PTR_FOR_FN (fun)),
"tmp_gen", ENTRY_BLOCK);
- print_bitmap_set (dump_file, AVAIL_OUT (ENTRY_BLOCK_PTR_FOR_FN (cfun)),
+ print_bitmap_set (dump_file, AVAIL_OUT (ENTRY_BLOCK_PTR_FOR_FN (fun)),
"avail_out", ENTRY_BLOCK);
}
/* Allocate the worklist. */
- worklist = XNEWVEC (basic_block, n_basic_blocks_for_fn (cfun));
+ worklist = XNEWVEC (basic_block, n_basic_blocks_for_fn (fun));
/* Seed the algorithm by putting the dominator children of the entry
block on the worklist. */
- for (son = first_dom_son (CDI_DOMINATORS, ENTRY_BLOCK_PTR_FOR_FN (cfun));
+ for (son = first_dom_son (CDI_DOMINATORS, ENTRY_BLOCK_PTR_FOR_FN (fun));
son;
son = next_dom_son (CDI_DOMINATORS, son))
worklist[sp++] = son;
- BB_LIVE_VOP_ON_EXIT (ENTRY_BLOCK_PTR_FOR_FN (cfun))
- = ssa_default_def (cfun, gimple_vop (cfun));
+ BB_LIVE_VOP_ON_EXIT (ENTRY_BLOCK_PTR_FOR_FN (fun))
+ = ssa_default_def (fun, gimple_vop (fun));
/* Loop until the worklist is empty. */
while (sp)
@@ -3970,7 +3977,8 @@ compute_avail (void)
before it. */
int flags = gimple_call_flags (stmt);
if (!(flags & ECF_CONST)
- || (flags & ECF_LOOPING_CONST_OR_PURE))
+ || (flags & ECF_LOOPING_CONST_OR_PURE)
+ || stmt_can_throw_external (fun, stmt))
BB_MAY_NOTRETURN (block) = 1;
}
@@ -3987,7 +3995,7 @@ compute_avail (void)
BB_LIVE_VOP_ON_EXIT (block) = gimple_vdef (stmt);
if (gimple_has_side_effects (stmt)
- || stmt_could_throw_p (cfun, stmt)
+ || stmt_could_throw_p (fun, stmt)
|| is_gimple_debug (stmt))
continue;
@@ -4384,7 +4392,7 @@ pass_pre::execute (function *fun)
we require AVAIL. */
if (n_basic_blocks_for_fn (fun) < 4000)
{
- compute_avail ();
+ compute_avail (fun);
compute_antic ();
insert ();
}
</cut>
Successfully identified regression in *gcc* in CI configuration tcwg_bmk_gnu_tx1/gnu-release-aarch64-spec2k6-O2. So far, this commit has regressed CI configurations:
- tcwg_bmk_gnu_tx1/gnu-release-aarch64-spec2k6-O2
Culprit:
<cut>
commit a4dfaad2e5594d871fe00a1116005e28f95d644e
Author: Richard Sandiford <richard.sandiford(a)arm.com>
Date: Mon Sep 30 16:20:44 2019 +0000
Remove global call sets: gcse.c
This is another case in which we can conservatively treat partial
kills as full kills. Again this is in principle a bug fix for
TARGET_HARD_REGNO_CALL_PART_CLOBBERED targets, but in practice
it probably doesn't make a difference.
2019-09-30 Richard Sandiford <richard.sandiford(a)arm.com>
gcc/
* gcse.c: Include function-abi.h.
(compute_hash_table_work): Use insn_callee_abi to get the ABI of
the call insn target. Invalidate partially call-clobbered
registers as well as fully call-clobbered ones.
From-SVN: r276323
</cut>
Results regressed to (for first_bad == a4dfaad2e5594d871fe00a1116005e28f95d644e)
# 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
# true:
0
# benchmark -O2 -- artifacts/build-a4dfaad2e5594d871fe00a1116005e28f95d644e/results_id:
1
# 447.dealII,[.] _ZNK12SparseMatrixIdE5vmultI6VectorIdES3_EEvRT regressed by 112
from (for last_good == c1b582720a39c3cb944aaff0298f721cdd034e3f)
# 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
# true:
0
# benchmark -O2 -- artifacts/build-c1b582720a39c3cb944aaff0298f721cdd034e3f/results_id:
1
Artifacts of last_good build: https://ci.linaro.org/job/tcwg_bmk_ci_gnu-bisect-tcwg_bmk_tx1-gnu-release-a…
Results ID of last_good: tx1_64/tcwg_bmk_gnu_tx1/bisect-gnu-release-aarch64-spec2k6-O2/1425
Artifacts of first_bad build: https://ci.linaro.org/job/tcwg_bmk_ci_gnu-bisect-tcwg_bmk_tx1-gnu-release-a…
Results ID of first_bad: tx1_64/tcwg_bmk_gnu_tx1/bisect-gnu-release-aarch64-spec2k6-O2/1421
Build top page/logs: https://ci.linaro.org/job/tcwg_bmk_ci_gnu-bisect-tcwg_bmk_tx1-gnu-release-a…
Configuration details:
Reproduce builds:
<cut>
mkdir investigate-gcc-a4dfaad2e5594d871fe00a1116005e28f95d644e
cd investigate-gcc-a4dfaad2e5594d871fe00a1116005e28f95d644e
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_gnu-bisect-tcwg_bmk_tx1-gnu-release-a… --fail
curl -o artifacts/manifests/build-parameters.sh https://ci.linaro.org/job/tcwg_bmk_ci_gnu-bisect-tcwg_bmk_tx1-gnu-release-a… --fail
curl -o artifacts/test.sh https://ci.linaro.org/job/tcwg_bmk_ci_gnu-bisect-tcwg_bmk_tx1-gnu-release-a… --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 gcc
# Reproduce first_bad build
git checkout --detach a4dfaad2e5594d871fe00a1116005e28f95d644e
../artifacts/test.sh
# Reproduce last_good build
git checkout --detach c1b582720a39c3cb944aaff0298f721cdd034e3f
../artifacts/test.sh
cd ..
</cut>
History of pending regressions and results: https://git.linaro.org/toolchain/ci/base-artifacts.git/log/?h=linaro-local/…
Artifacts: https://ci.linaro.org/job/tcwg_bmk_ci_gnu-bisect-tcwg_bmk_tx1-gnu-release-a…
Build log: https://ci.linaro.org/job/tcwg_bmk_ci_gnu-bisect-tcwg_bmk_tx1-gnu-release-a…
Full commit (up to 1000 lines):
<cut>
commit a4dfaad2e5594d871fe00a1116005e28f95d644e
Author: Richard Sandiford <richard.sandiford(a)arm.com>
Date: Mon Sep 30 16:20:44 2019 +0000
Remove global call sets: gcse.c
This is another case in which we can conservatively treat partial
kills as full kills. Again this is in principle a bug fix for
TARGET_HARD_REGNO_CALL_PART_CLOBBERED targets, but in practice
it probably doesn't make a difference.
2019-09-30 Richard Sandiford <richard.sandiford(a)arm.com>
gcc/
* gcse.c: Include function-abi.h.
(compute_hash_table_work): Use insn_callee_abi to get the ABI of
the call insn target. Invalidate partially call-clobbered
registers as well as fully call-clobbered ones.
From-SVN: r276323
---
gcc/ChangeLog | 7 +++++++
gcc/gcse.c | 10 ++++++++--
2 files changed, 15 insertions(+), 2 deletions(-)
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 9d8b083d539..1b1c31cf009 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,10 @@
+2019-09-30 Richard Sandiford <richard.sandiford(a)arm.com>
+
+ * gcse.c: Include function-abi.h.
+ (compute_hash_table_work): Use insn_callee_abi to get the ABI of
+ the call insn target. Invalidate partially call-clobbered
+ registers as well as fully call-clobbered ones.
+
2019-09-30 Richard Sandiford <richard.sandiford(a)arm.com>
* function.c (aggregate_value_p): Work out which ABI the
diff --git a/gcc/gcse.c b/gcc/gcse.c
index 9bde8619b7b..aeb59c645e1 100644
--- a/gcc/gcse.c
+++ b/gcc/gcse.c
@@ -160,6 +160,7 @@ along with GCC; see the file COPYING3. If not see
#include "dbgcnt.h"
#include "gcse.h"
#include "gcse-common.h"
+#include "function-abi.h"
/* We support GCSE via Partial Redundancy Elimination. PRE optimizations
are a superset of those done by classic GCSE.
@@ -1528,8 +1529,13 @@ compute_hash_table_work (struct gcse_hash_table_d *table)
if (CALL_P (insn))
{
hard_reg_set_iterator hrsi;
- EXECUTE_IF_SET_IN_HARD_REG_SET (regs_invalidated_by_call,
- 0, regno, hrsi)
+
+ /* We don't track modes of hard registers, so we need
+ to be conservative and assume that partial kills
+ are full kills. */
+ HARD_REG_SET callee_clobbers
+ = insn_callee_abi (insn).full_and_partial_reg_clobbers ();
+ EXECUTE_IF_SET_IN_HARD_REG_SET (callee_clobbers, 0, regno, hrsi)
record_last_reg_set_info (insn, regno);
if (! RTL_CONST_OR_PURE_CALL_P (insn)
</cut>
Successfully identified regression in *glibc* in CI configuration tcwg_cross/gnu-master-aarch64-build_cross. So far, this commit has regressed CI configurations:
- tcwg_cross/gnu-master-aarch64-build_cross
Culprit:
<cut>
commit 6ec6c77867af4ddfec7323e0ac6ede89effca852
Author: liuhongt <hongtao.liu(a)intel.com>
Date: Wed Jul 7 10:07:59 2021 +0800
soft-fp: Add __extendhfsf2/__extendhfdf2, __truncsfhf2/__truncdfhf2, __eqhf2/__nehf2
1. Add __extendhfdf2/__extendhfsf2 to return an IEEE half converted to IEEE double/single.
2. Add __truncdfhf2/__extendsfhf2 to truncate IEEE double/single into IEEE half.
3. Add __eqhf2/__nehf2 to return 0 if a == b and a,b are not NAN, otherwise return 1.
These are needed by x86 _Float16:
https://software.intel.com/content/www/us/en/develop/download/intel-avx512-…
support in GCC.
</cut>
Results regressed to (for first_bad == 6ec6c77867af4ddfec7323e0ac6ede89effca852)
# reset_artifacts:
-10
# true:
0
# build_abe binutils:
1
# build_abe stage1:
2
# build_abe linux:
3
# First few build errors in logs:
# 00:00:14 make[2]: *** [/home/tcwg-buildslave/workspace/tcwg_gnu_0/abe/builds/x86_64-pc-linux-gnu/aarch64-linux-gnu/glibc-glibc.git~master/sysd-rules:483: /home/tcwg-buildslave/workspace/tcwg_gnu_0/abe/builds/x86_64-pc-linux-gnu/aarch64-linux-gnu/glibc-glibc.git~master/csu/start.o] Error 1
# 00:00:14 make[2]: *** [/home/tcwg-buildslave/workspace/tcwg_gnu_0/abe/builds/x86_64-pc-linux-gnu/aarch64-linux-gnu/glibc-glibc.git~master/sysd-rules:499: /home/tcwg-buildslave/workspace/tcwg_gnu_0/abe/builds/x86_64-pc-linux-gnu/aarch64-linux-gnu/glibc-glibc.git~master/csu/start.os] Error 1
# 00:00:14 make[2]: *** [/home/tcwg-buildslave/workspace/tcwg_gnu_0/abe/builds/x86_64-pc-linux-gnu/aarch64-linux-gnu/glibc-glibc.git~master/sysd-rules:483: /home/tcwg-buildslave/workspace/tcwg_gnu_0/abe/builds/x86_64-pc-linux-gnu/aarch64-linux-gnu/glibc-glibc.git~master/csu/crtn.o] Error 1
# 00:00:14 make[2]: *** [/home/tcwg-buildslave/workspace/tcwg_gnu_0/abe/builds/x86_64-pc-linux-gnu/aarch64-linux-gnu/glibc-glibc.git~master/sysd-rules:483: /home/tcwg-buildslave/workspace/tcwg_gnu_0/abe/builds/x86_64-pc-linux-gnu/aarch64-linux-gnu/glibc-glibc.git~master/csu/crti.o] Error 1
# 00:00:14 make[2]: *** [../o-iterator.mk:9: /home/tcwg-buildslave/workspace/tcwg_gnu_0/abe/builds/x86_64-pc-linux-gnu/aarch64-linux-gnu/glibc-glibc.git~master/csu/check_fds.o] Error 1
# 00:00:14 make[2]: *** [../o-iterator.mk:9: /home/tcwg-buildslave/workspace/tcwg_gnu_0/abe/builds/x86_64-pc-linux-gnu/aarch64-linux-gnu/glibc-glibc.git~master/csu/check_fds.os] Error 1
# 00:00:14 ../sysdeps/aarch64/nptl/tls.h:91:19: error: ‘__builtin_thread_pointer’ is not supported on this target
# 00:00:14 make[2]: *** [/home/tcwg-buildslave/workspace/tcwg_gnu_0/abe/builds/x86_64-pc-linux-gnu/aarch64-linux-gnu/glibc-glibc.git~master/sysd-rules:485: /home/tcwg-buildslave/workspace/tcwg_gnu_0/abe/builds/x86_64-pc-linux-gnu/aarch64-linux-gnu/glibc-glibc.git~master/csu/libc-tls.o] Error 1
# 00:00:14 ../sysdeps/unix/sysv/linux/aarch64/sysdep.h:190:17: error: invalid register name for ‘_x0’
# 00:00:14 ../sysdeps/unix/sysv/linux/aarch64/sysdep.h:174:22: error: invalid register name for ‘_x8’
from (for last_good == b46cfcef3f7dab8e90729c6616ac1420f2642245)
# reset_artifacts:
-10
# true:
0
# build_abe binutils:
1
# build_abe stage1:
2
# build_abe linux:
3
# build_abe glibc:
4
# build_abe stage2:
5
# build_abe qemu:
6
Artifacts of last_good build: https://ci.linaro.org/job/tcwg_cross-bisect-gnu-master-aarch64-build_cross/…
Artifacts of first_bad build: https://ci.linaro.org/job/tcwg_cross-bisect-gnu-master-aarch64-build_cross/…
Build top page/logs: https://ci.linaro.org/job/tcwg_cross-bisect-gnu-master-aarch64-build_cross/…
Configuration details:
Reproduce builds:
<cut>
mkdir investigate-glibc-6ec6c77867af4ddfec7323e0ac6ede89effca852
cd investigate-glibc-6ec6c77867af4ddfec7323e0ac6ede89effca852
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_cross-bisect-gnu-master-aarch64-build_cross/… --fail
curl -o artifacts/manifests/build-parameters.sh https://ci.linaro.org/job/tcwg_cross-bisect-gnu-master-aarch64-build_cross/… --fail
curl -o artifacts/test.sh https://ci.linaro.org/job/tcwg_cross-bisect-gnu-master-aarch64-build_cross/… --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 glibc
# Reproduce first_bad build
git checkout --detach 6ec6c77867af4ddfec7323e0ac6ede89effca852
../artifacts/test.sh
# Reproduce last_good build
git checkout --detach b46cfcef3f7dab8e90729c6616ac1420f2642245
../artifacts/test.sh
cd ..
</cut>
History of pending regressions and results: https://git.linaro.org/toolchain/ci/base-artifacts.git/log/?h=linaro-local/…
Artifacts: https://ci.linaro.org/job/tcwg_cross-bisect-gnu-master-aarch64-build_cross/…
Build log: https://ci.linaro.org/job/tcwg_cross-bisect-gnu-master-aarch64-build_cross/…
Full commit (up to 1000 lines):
<cut>
commit 6ec6c77867af4ddfec7323e0ac6ede89effca852
Author: liuhongt <hongtao.liu(a)intel.com>
Date: Wed Jul 7 10:07:59 2021 +0800
soft-fp: Add __extendhfsf2/__extendhfdf2, __truncsfhf2/__truncdfhf2, __eqhf2/__nehf2
1. Add __extendhfdf2/__extendhfsf2 to return an IEEE half converted to IEEE double/single.
2. Add __truncdfhf2/__extendsfhf2 to truncate IEEE double/single into IEEE half.
3. Add __eqhf2/__nehf2 to return 0 if a == b and a,b are not NAN, otherwise return 1.
These are needed by x86 _Float16:
https://software.intel.com/content/www/us/en/develop/download/intel-avx512-…
support in GCC.
---
soft-fp/eqhf2.c | 49 +++++++++++++++++++++++++++++++++++++++++++++++
soft-fp/extendhfdf2.c | 53 +++++++++++++++++++++++++++++++++++++++++++++++++++
soft-fp/extendhfsf2.c | 49 +++++++++++++++++++++++++++++++++++++++++++++++
soft-fp/half.h | 2 ++
soft-fp/truncdfhf2.c | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++
soft-fp/truncsfhf2.c | 48 ++++++++++++++++++++++++++++++++++++++++++++++
6 files changed, 253 insertions(+)
diff --git a/soft-fp/eqhf2.c b/soft-fp/eqhf2.c
new file mode 100644
index 0000000000..6d6634e5c5
--- /dev/null
+++ b/soft-fp/eqhf2.c
@@ -0,0 +1,49 @@
+/* Software floating-point emulation.
+ Return 0 iff a == b, 1 otherwise
+ Copyright (C) 2021 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ In addition to the permissions in the GNU Lesser General Public
+ License, the Free Software Foundation gives you unlimited
+ permission to link the compiled version of this file into
+ combinations with other programs, and to distribute those
+ combinations without any restriction coming from the use of this
+ file. (The Lesser General Public License restrictions do apply in
+ other respects; for example, they cover modification of the file,
+ and distribution when not linked into a combine executable.)
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+#include "soft-fp.h"
+#include "half.h"
+
+CMPtype
+__eqhf2 (HFtype a, HFtype b)
+{
+ FP_DECL_EX;
+ FP_DECL_H (A);
+ FP_DECL_H (B);
+ CMPtype r;
+
+ FP_INIT_EXCEPTIONS;
+ FP_UNPACK_RAW_H (A, a);
+ FP_UNPACK_RAW_H (B, b);
+ FP_CMP_EQ_H (r, A, B, 1);
+ FP_HANDLE_EXCEPTIONS;
+
+ return r;
+}
+
+strong_alias (__eqhf2, __nehf2);
diff --git a/soft-fp/extendhfdf2.c b/soft-fp/extendhfdf2.c
new file mode 100644
index 0000000000..337ba791d4
--- /dev/null
+++ b/soft-fp/extendhfdf2.c
@@ -0,0 +1,53 @@
+/* Software floating-point emulation.
+ Return an IEEE half converted to IEEE double
+ Copyright (C) 2021 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ In addition to the permissions in the GNU Lesser General Public
+ License, the Free Software Foundation gives you unlimited
+ permission to link the compiled version of this file into
+ combinations with other programs, and to distribute those
+ combinations without any restriction coming from the use of this
+ file. (The Lesser General Public License restrictions do apply in
+ other respects; for example, they cover modification of the file,
+ and distribution when not linked into a combine executable.)
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+#define FP_NO_EXACT_UNDERFLOW
+#include "soft-fp.h"
+#include "half.h"
+#include "double.h"
+
+DFtype
+__extendhfdf2 (HFtype a)
+{
+ FP_DECL_EX;
+ FP_DECL_H (A);
+ FP_DECL_D (R);
+ DFtype r;
+
+ FP_INIT_EXCEPTIONS;
+ FP_UNPACK_RAW_H (A, a);
+#if _FP_W_TYPE_SIZE < _FP_FRACBITS_D
+ FP_EXTEND (D, H, 2, 1, R, A);
+#else
+ FP_EXTEND (D, H, 1, 1, R, A);
+#endif
+ FP_PACK_RAW_D (r, R);
+ FP_HANDLE_EXCEPTIONS;
+
+ return r;
+}
diff --git a/soft-fp/extendhfsf2.c b/soft-fp/extendhfsf2.c
new file mode 100644
index 0000000000..a02f46d9a9
--- /dev/null
+++ b/soft-fp/extendhfsf2.c
@@ -0,0 +1,49 @@
+/* Software floating-point emulation.
+ Return an IEEE half converted to IEEE single
+ Copyright (C) 2021 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ In addition to the permissions in the GNU Lesser General Public
+ License, the Free Software Foundation gives you unlimited
+ permission to link the compiled version of this file into
+ combinations with other programs, and to distribute those
+ combinations without any restriction coming from the use of this
+ file. (The Lesser General Public License restrictions do apply in
+ other respects; for example, they cover modification of the file,
+ and distribution when not linked into a combine executable.)
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+#define FP_NO_EXACT_UNDERFLOW
+#include "soft-fp.h"
+#include "half.h"
+#include "single.h"
+
+SFtype
+__extendhfsf2 (HFtype a)
+{
+ FP_DECL_EX;
+ FP_DECL_H (A);
+ FP_DECL_S (R);
+ SFtype r;
+
+ FP_INIT_EXCEPTIONS;
+ FP_UNPACK_RAW_H (A, a);
+ FP_EXTEND (S, H, 1, 1, R, A);
+ FP_PACK_RAW_S (r, R);
+ FP_HANDLE_EXCEPTIONS;
+
+ return r;
+}
diff --git a/soft-fp/half.h b/soft-fp/half.h
index ca2c1fad03..70af2712fc 100644
--- a/soft-fp/half.h
+++ b/soft-fp/half.h
@@ -167,4 +167,6 @@ union _FP_UNION_H
#define _FP_FRAC_HIGH_RAW_H(X) _FP_FRAC_HIGH_1 (X)
#define _FP_FRAC_HIGH_DW_H(X) _FP_FRAC_HIGH_1 (X)
+#define FP_CMP_EQ_H(r, X, Y, ex) _FP_CMP_EQ (H, 1, (r), X, Y, (ex))
+
#endif /* !SOFT_FP_HALF_H */
diff --git a/soft-fp/truncdfhf2.c b/soft-fp/truncdfhf2.c
new file mode 100644
index 0000000000..8bcb278769
--- /dev/null
+++ b/soft-fp/truncdfhf2.c
@@ -0,0 +1,52 @@
+/* Software floating-point emulation.
+ Truncate IEEE double into IEEE half.
+ Copyright (C) 2021 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ In addition to the permissions in the GNU Lesser General Public
+ License, the Free Software Foundation gives you unlimited
+ permission to link the compiled version of this file into
+ combinations with other programs, and to distribute those
+ combinations without any restriction coming from the use of this
+ file. (The Lesser General Public License restrictions do apply in
+ other respects; for example, they cover modification of the file,
+ and distribution when not linked into a combine executable.)
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+#include "soft-fp.h"
+#include "half.h"
+#include "double.h"
+
+HFtype
+__truncdfhf2 (DFtype a)
+{
+ FP_DECL_EX;
+ FP_DECL_D (A);
+ FP_DECL_H (R);
+ HFtype r;
+
+ FP_INIT_ROUNDMODE;
+ FP_UNPACK_SEMIRAW_D (A, a);
+#if _FP_W_TYPE_SIZE < _FP_FRACBITS_D
+ FP_TRUNC (H, D, 1, 2, R, A);
+#else
+ FP_TRUNC (H, D, 1, 1, R, A);
+#endif
+ FP_PACK_SEMIRAW_H (r, R);
+ FP_HANDLE_EXCEPTIONS;
+
+ return r;
+}
diff --git a/soft-fp/truncsfhf2.c b/soft-fp/truncsfhf2.c
new file mode 100644
index 0000000000..25bee29f7f
--- /dev/null
+++ b/soft-fp/truncsfhf2.c
@@ -0,0 +1,48 @@
+/* Software floating-point emulation.
+ Truncate IEEE single into IEEE half.
+ Copyright (C) 2021 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ In addition to the permissions in the GNU Lesser General Public
+ License, the Free Software Foundation gives you unlimited
+ permission to link the compiled version of this file into
+ combinations with other programs, and to distribute those
+ combinations without any restriction coming from the use of this
+ file. (The Lesser General Public License restrictions do apply in
+ other respects; for example, they cover modification of the file,
+ and distribution when not linked into a combine executable.)
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+#include "soft-fp.h"
+#include "half.h"
+#include "single.h"
+
+HFtype
+__truncsfhf2 (SFtype a)
+{
+ FP_DECL_EX;
+ FP_DECL_S (A);
+ FP_DECL_H (R);
+ HFtype r;
+
+ FP_INIT_ROUNDMODE;
+ FP_UNPACK_SEMIRAW_S (A, a);
+ FP_TRUNC (H, S, 1, 1, R, A);
+ FP_PACK_SEMIRAW_H (r, R);
+ FP_HANDLE_EXCEPTIONS;
+
+ return r;
+}
</cut>
Successfully identified regression in *glibc* in CI configuration tcwg_cross/gnu-master-aarch64-build_cross. So far, this commit has regressed CI configurations:
- tcwg_cross/gnu-master-aarch64-build_cross
Culprit:
<cut>
commit b46cfcef3f7dab8e90729c6616ac1420f2642245
Author: Joseph Myers <joseph(a)codesourcery.com>
Date: Wed Jul 7 13:24:05 2021 +0000
Update kernel version to 5.13 in tst-mman-consts.py
This patch updates the kernel version in the test tst-mman-consts.py
to 5.13. (There are no new MAP_* constants covered by this test in
5.13 that need any other header changes.)
Tested with build-many-glibcs.py.
</cut>
Results regressed to (for first_bad == b46cfcef3f7dab8e90729c6616ac1420f2642245)
# reset_artifacts:
-10
# true:
0
# build_abe binutils:
1
# build_abe stage1:
2
# build_abe linux:
3
# First few build errors in logs:
# 00:00:18 ../sysdeps/unix/sysv/linux/aarch64/sysdep.h:190:17: error: invalid register name for ‘_x0’
# 00:00:18 ../sysdeps/unix/sysv/linux/aarch64/sysdep.h:174:22: error: invalid register name for ‘_x8’
# 00:00:18 ../sysdeps/aarch64/nptl/tls.h:95:21: error: ‘__builtin_thread_pointer’ is not supported on this target
# 00:00:18 ../sysdeps/aarch64/nptl/tls.h:91:19: error: ‘__builtin_thread_pointer’ is not supported on this target
# 00:00:18 make[2]: *** [/home/tcwg-buildslave/workspace/tcwg_gnu_1/abe/builds/x86_64-pc-linux-gnu/aarch64-linux-gnu/glibc-glibc.git~master/sysd-rules:483: /home/tcwg-buildslave/workspace/tcwg_gnu_1/abe/builds/x86_64-pc-linux-gnu/aarch64-linux-gnu/glibc-glibc.git~master/csu/crti.o] Error 1
# 00:00:18 make[2]: *** [/home/tcwg-buildslave/workspace/tcwg_gnu_1/abe/builds/x86_64-pc-linux-gnu/aarch64-linux-gnu/glibc-glibc.git~master/sysd-rules:9: /home/tcwg-buildslave/workspace/tcwg_gnu_1/abe/builds/x86_64-pc-linux-gnu/aarch64-linux-gnu/glibc-glibc.git~master/csu/libc-start.o] Error 1
# 00:00:18 make[2]: *** [/home/tcwg-buildslave/workspace/tcwg_gnu_1/abe/builds/x86_64-pc-linux-gnu/aarch64-linux-gnu/glibc-glibc.git~master/sysd-rules:483: /home/tcwg-buildslave/workspace/tcwg_gnu_1/abe/builds/x86_64-pc-linux-gnu/aarch64-linux-gnu/glibc-glibc.git~master/csu/start.o] Error 1
# 00:00:18 ../sysdeps/unix/sysv/linux/aarch64/sysdep.h:190:17: error: invalid register name for ‘_x0’
# 00:00:18 ../sysdeps/unix/sysv/linux/aarch64/sysdep.h:174:22: error: invalid register name for ‘_x8’
# 00:00:18 ../sysdeps/aarch64/nptl/tls.h:95:21: error: ‘__builtin_thread_pointer’ is not supported on this target
from (for last_good == fab3a6daf137c734e684471e197148aa058102e3)
# reset_artifacts:
-10
# true:
0
# build_abe binutils:
1
# build_abe stage1:
2
# build_abe linux:
3
# build_abe glibc:
4
# build_abe stage2:
5
# build_abe qemu:
6
Artifacts of last_good build: https://ci.linaro.org/job/tcwg_cross-bisect-gnu-master-aarch64-build_cross/…
Artifacts of first_bad build: https://ci.linaro.org/job/tcwg_cross-bisect-gnu-master-aarch64-build_cross/…
Build top page/logs: https://ci.linaro.org/job/tcwg_cross-bisect-gnu-master-aarch64-build_cross/…
Configuration details:
Reproduce builds:
<cut>
mkdir investigate-glibc-b46cfcef3f7dab8e90729c6616ac1420f2642245
cd investigate-glibc-b46cfcef3f7dab8e90729c6616ac1420f2642245
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_cross-bisect-gnu-master-aarch64-build_cross/… --fail
curl -o artifacts/manifests/build-parameters.sh https://ci.linaro.org/job/tcwg_cross-bisect-gnu-master-aarch64-build_cross/… --fail
curl -o artifacts/test.sh https://ci.linaro.org/job/tcwg_cross-bisect-gnu-master-aarch64-build_cross/… --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 glibc
# Reproduce first_bad build
git checkout --detach b46cfcef3f7dab8e90729c6616ac1420f2642245
../artifacts/test.sh
# Reproduce last_good build
git checkout --detach fab3a6daf137c734e684471e197148aa058102e3
../artifacts/test.sh
cd ..
</cut>
History of pending regressions and results: https://git.linaro.org/toolchain/ci/base-artifacts.git/log/?h=linaro-local/…
Artifacts: https://ci.linaro.org/job/tcwg_cross-bisect-gnu-master-aarch64-build_cross/…
Build log: https://ci.linaro.org/job/tcwg_cross-bisect-gnu-master-aarch64-build_cross/…
Full commit (up to 1000 lines):
<cut>
commit b46cfcef3f7dab8e90729c6616ac1420f2642245
Author: Joseph Myers <joseph(a)codesourcery.com>
Date: Wed Jul 7 13:24:05 2021 +0000
Update kernel version to 5.13 in tst-mman-consts.py
This patch updates the kernel version in the test tst-mman-consts.py
to 5.13. (There are no new MAP_* constants covered by this test in
5.13 that need any other header changes.)
Tested with build-many-glibcs.py.
---
sysdeps/unix/sysv/linux/tst-mman-consts.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sysdeps/unix/sysv/linux/tst-mman-consts.py b/sysdeps/unix/sysv/linux/tst-mman-consts.py
index fec7c9b8da..ee5b13ee12 100644
--- a/sysdeps/unix/sysv/linux/tst-mman-consts.py
+++ b/sysdeps/unix/sysv/linux/tst-mman-consts.py
@@ -33,7 +33,7 @@ def main():
help='C compiler (including options) to use')
args = parser.parse_args()
linux_version_headers = glibcsyscalls.linux_kernel_version(args.cc)
- linux_version_glibc = (5, 12)
+ linux_version_glibc = (5, 13)
sys.exit(glibcextract.compare_macro_consts(
'#define _GNU_SOURCE 1\n'
'#include <sys/mman.h>\n',
</cut>
Successfully identified regression in *glibc* in CI configuration tcwg_cross/gnu-master-aarch64-build_cross. So far, this commit has regressed CI configurations:
- tcwg_cross/gnu-master-aarch64-build_cross
Culprit:
<cut>
commit 7a5db2e82fbb6c3a6e3fdae02b7166c5d0e8c7a8
Author: Florian Weimer <fweimer(a)redhat.com>
Date: Wed Jul 7 08:40:41 2021 +0200
elf: Clean up GLIBC_PRIVATE exports of internal libdl symbols
They are no longer needed after everything has been moved into
libc. The _dl_vsym test has to be removed because the symbol
cannot be used outside libc anymore.
Reviewed-by: Adhemerval Zanella <adhemerval.zanella(a)linaro.org>
</cut>
Results regressed to (for first_bad == 7a5db2e82fbb6c3a6e3fdae02b7166c5d0e8c7a8)
# reset_artifacts:
-10
# true:
0
# build_abe binutils:
1
# build_abe stage1:
2
# build_abe linux:
3
# First few build errors in logs:
# 00:00:14 make[2]: *** [/home/tcwg-buildslave/workspace/tcwg_gnu_0/abe/builds/x86_64-pc-linux-gnu/aarch64-linux-gnu/glibc-glibc.git~master/sysd-rules:483: /home/tcwg-buildslave/workspace/tcwg_gnu_0/abe/builds/x86_64-pc-linux-gnu/aarch64-linux-gnu/glibc-glibc.git~master/csu/start.o] Error 1
# 00:00:14 make[2]: *** [/home/tcwg-buildslave/workspace/tcwg_gnu_0/abe/builds/x86_64-pc-linux-gnu/aarch64-linux-gnu/glibc-glibc.git~master/sysd-rules:499: /home/tcwg-buildslave/workspace/tcwg_gnu_0/abe/builds/x86_64-pc-linux-gnu/aarch64-linux-gnu/glibc-glibc.git~master/csu/start.os] Error 1
# 00:00:14 make[2]: *** [/home/tcwg-buildslave/workspace/tcwg_gnu_0/abe/builds/x86_64-pc-linux-gnu/aarch64-linux-gnu/glibc-glibc.git~master/sysd-rules:483: /home/tcwg-buildslave/workspace/tcwg_gnu_0/abe/builds/x86_64-pc-linux-gnu/aarch64-linux-gnu/glibc-glibc.git~master/csu/crtn.o] Error 1
# 00:00:14 make[2]: *** [/home/tcwg-buildslave/workspace/tcwg_gnu_0/abe/builds/x86_64-pc-linux-gnu/aarch64-linux-gnu/glibc-glibc.git~master/sysd-rules:483: /home/tcwg-buildslave/workspace/tcwg_gnu_0/abe/builds/x86_64-pc-linux-gnu/aarch64-linux-gnu/glibc-glibc.git~master/csu/crti.o] Error 1
# 00:00:14 make[2]: *** [../o-iterator.mk:9: /home/tcwg-buildslave/workspace/tcwg_gnu_0/abe/builds/x86_64-pc-linux-gnu/aarch64-linux-gnu/glibc-glibc.git~master/csu/check_fds.o] Error 1
# 00:00:14 make[2]: *** [../o-iterator.mk:9: /home/tcwg-buildslave/workspace/tcwg_gnu_0/abe/builds/x86_64-pc-linux-gnu/aarch64-linux-gnu/glibc-glibc.git~master/csu/check_fds.os] Error 1
# 00:00:14 ../sysdeps/aarch64/nptl/tls.h:91:19: error: ‘__builtin_thread_pointer’ is not supported on this target
# 00:00:14 make[2]: *** [/home/tcwg-buildslave/workspace/tcwg_gnu_0/abe/builds/x86_64-pc-linux-gnu/aarch64-linux-gnu/glibc-glibc.git~master/sysd-rules:485: /home/tcwg-buildslave/workspace/tcwg_gnu_0/abe/builds/x86_64-pc-linux-gnu/aarch64-linux-gnu/glibc-glibc.git~master/csu/libc-tls.o] Error 1
# 00:00:14 ../sysdeps/unix/sysv/linux/aarch64/sysdep.h:190:17: error: invalid register name for ‘_x0’
# 00:00:14 ../sysdeps/unix/sysv/linux/aarch64/sysdep.h:174:22: error: invalid register name for ‘_x8’
from (for last_good == ceda365fbac3083e16eed07892fbd5970b3839a0)
# reset_artifacts:
-10
# true:
0
# build_abe binutils:
1
# build_abe stage1:
2
# build_abe linux:
3
# build_abe glibc:
4
# build_abe stage2:
5
# build_abe qemu:
6
Artifacts of last_good build: https://ci.linaro.org/job/tcwg_cross-bisect-gnu-master-aarch64-build_cross/…
Artifacts of first_bad build: https://ci.linaro.org/job/tcwg_cross-bisect-gnu-master-aarch64-build_cross/…
Build top page/logs: https://ci.linaro.org/job/tcwg_cross-bisect-gnu-master-aarch64-build_cross/…
Configuration details:
Reproduce builds:
<cut>
mkdir investigate-glibc-7a5db2e82fbb6c3a6e3fdae02b7166c5d0e8c7a8
cd investigate-glibc-7a5db2e82fbb6c3a6e3fdae02b7166c5d0e8c7a8
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_cross-bisect-gnu-master-aarch64-build_cross/… --fail
curl -o artifacts/manifests/build-parameters.sh https://ci.linaro.org/job/tcwg_cross-bisect-gnu-master-aarch64-build_cross/… --fail
curl -o artifacts/test.sh https://ci.linaro.org/job/tcwg_cross-bisect-gnu-master-aarch64-build_cross/… --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 glibc
# Reproduce first_bad build
git checkout --detach 7a5db2e82fbb6c3a6e3fdae02b7166c5d0e8c7a8
../artifacts/test.sh
# Reproduce last_good build
git checkout --detach ceda365fbac3083e16eed07892fbd5970b3839a0
../artifacts/test.sh
cd ..
</cut>
History of pending regressions and results: https://git.linaro.org/toolchain/ci/base-artifacts.git/log/?h=linaro-local/…
Artifacts: https://ci.linaro.org/job/tcwg_cross-bisect-gnu-master-aarch64-build_cross/…
Build log: https://ci.linaro.org/job/tcwg_cross-bisect-gnu-master-aarch64-build_cross/…
Full commit (up to 1000 lines):
<cut>
commit 7a5db2e82fbb6c3a6e3fdae02b7166c5d0e8c7a8
Author: Florian Weimer <fweimer(a)redhat.com>
Date: Wed Jul 7 08:40:41 2021 +0200
elf: Clean up GLIBC_PRIVATE exports of internal libdl symbols
They are no longer needed after everything has been moved into
libc. The _dl_vsym test has to be removed because the symbol
cannot be used outside libc anymore.
Reviewed-by: Adhemerval Zanella <adhemerval.zanella(a)linaro.org>
---
dlfcn/dlerror.c | 1 -
elf/Makefile | 16 ++----
elf/Versions | 3 -
elf/dl-addr.c | 1 -
elf/dl-libc.c | 4 --
elf/dl-sym.c | 2 -
elf/tst-libc_dlvsym-dso.c | 25 ---------
elf/tst-libc_dlvsym-static.c | 32 -----------
elf/tst-libc_dlvsym.c | 34 -----------
elf/tst-libc_dlvsym.h | 130 -------------------------------------------
include/dlfcn.h | 30 +++++-----
11 files changed, 18 insertions(+), 260 deletions(-)
diff --git a/dlfcn/dlerror.c b/dlfcn/dlerror.c
index d0194a7cef..5047b14066 100644
--- a/dlfcn/dlerror.c
+++ b/dlfcn/dlerror.c
@@ -196,4 +196,3 @@ _dlerror_run (void (*operate) (void *), void *args)
return 1;
}
}
-libc_hidden_def (_dlerror_run)
diff --git a/elf/Makefile b/elf/Makefile
index 698a6ab985..b1e01d9516 100644
--- a/elf/Makefile
+++ b/elf/Makefile
@@ -165,7 +165,7 @@ tests-static-normal := tst-leaks1-static tst-array1-static tst-array5-static \
tests-static-internal := tst-tls1-static tst-tls2-static \
tst-ptrguard1-static tst-stackguard1-static \
- tst-tls1-static-non-pie tst-libc_dlvsym-static
+ tst-tls1-static-non-pie
CRT-tst-tls1-static-non-pie := $(csu-objpfx)crt1.o
tst-tls1-static-non-pie-no-pie = yes
@@ -229,7 +229,7 @@ tests += restest1 preloadtest loadfail multiload origtest resolvfail \
tests-internal += loadtest unload unload2 circleload1 \
neededtest neededtest2 neededtest3 neededtest4 \
tst-tls3 tst-tls6 tst-tls7 tst-tls8 tst-dlmopen2 \
- tst-ptrguard1 tst-stackguard1 tst-libc_dlvsym \
+ tst-ptrguard1 tst-stackguard1 \
tst-create_format1 tst-tls-surplus tst-dl-hwcaps_split
tests-container += tst-pldd tst-dlopen-tlsmodid-container \
tst-dlopen-self-container tst-preload-pthread-libc
@@ -326,7 +326,7 @@ modules-names = testobj1 testobj2 testobj3 testobj4 testobj5 testobj6 \
tst-audit12mod1 tst-audit12mod2 tst-audit12mod3 tst-auditmod12 \
tst-latepthreadmod $(tst-tls-many-dynamic-modules) \
tst-nodelete-dlclose-dso tst-nodelete-dlclose-plugin \
- tst-main1mod tst-libc_dlvsym-dso tst-absolute-sym-lib \
+ tst-main1mod tst-absolute-sym-lib \
tst-absolute-zero-lib tst-big-note-lib tst-unwind-ctor-lib \
tst-audit13mod1 tst-sonamemove-linkmod1 \
tst-sonamemove-runmod1 tst-sonamemove-runmod2 \
@@ -352,7 +352,7 @@ modules-names = testobj1 testobj2 testobj3 testobj4 testobj5 testobj6 \
# Most modules build with _ISOMAC defined, but those filtered out
# depend on internal headers.
-modules-names-tests = $(filter-out ifuncmod% tst-libc_dlvsym-dso tst-tlsmod%,\
+modules-names-tests = $(filter-out ifuncmod% tst-tlsmod%,\
$(modules-names))
ifeq (yes,$(have-mtls-dialect-gnu2))
@@ -1582,14 +1582,6 @@ LDLIBS-tst-absolute-zero-lib.so = tst-absolute-zero-lib.lds
$(objpfx)tst-absolute-zero-lib.so: $(LDLIBS-tst-absolute-zero-lib.so)
$(objpfx)tst-absolute-zero: $(objpfx)tst-absolute-zero-lib.so
-# Both the main program and the DSO for tst-libc_dlvsym need to link
-# against libdl.
-$(objpfx)tst-libc_dlvsym-dso.so: $(libsupport)
-$(objpfx)tst-libc_dlvsym.out: $(objpfx)tst-libc_dlvsym-dso.so
-tst-libc_dlvsym-static-ENV = \
- LD_LIBRARY_PATH=$(ld-library-path):$(common-objpfx)dlfcn
-$(objpfx)tst-libc_dlvsym-static.out: $(objpfx)tst-libc_dlvsym-dso.so
-
$(objpfx)tst-big-note: $(objpfx)tst-big-note-lib.so
# Avoid creating an ABI tag note, which may come before the
# artificial, large note in tst-big-note-lib.o and invalidate the
diff --git a/elf/Versions b/elf/Versions
index a12d64e8db..775aab62af 100644
--- a/elf/Versions
+++ b/elf/Versions
@@ -22,9 +22,6 @@ libc {
%endif
GLIBC_PRIVATE {
# functions used in other libraries
- _dl_addr;
- _dl_sym; _dl_vsym;
- __libc_dlclose; __libc_dlopen_mode; __libc_dlsym; __libc_dlvsym;
__libc_early_init;
# Internal error handling support. Interposes the functions in ld.so.
diff --git a/elf/dl-addr.c b/elf/dl-addr.c
index 70a60d5b91..3226880d48 100644
--- a/elf/dl-addr.c
+++ b/elf/dl-addr.c
@@ -142,4 +142,3 @@ _dl_addr (const void *address, Dl_info *info,
return result;
}
-libc_hidden_def (_dl_addr)
diff --git a/elf/dl-libc.c b/elf/dl-libc.c
index ba792e9589..d5bc4a277f 100644
--- a/elf/dl-libc.c
+++ b/elf/dl-libc.c
@@ -162,7 +162,6 @@ __libc_dlopen_mode (const char *name, int mode)
#endif
return dlerror_run (do_dlopen, &args) ? NULL : (void *) args.map;
}
-libc_hidden_def (__libc_dlopen_mode)
#ifndef SHARED
void *
@@ -192,7 +191,6 @@ __libc_dlsym (void *map, const char *name)
return (dlerror_run (do_dlsym, &args) ? NULL
: (void *) (DL_SYMBOL_ADDRESS (args.loadbase, args.ref)));
}
-libc_hidden_def (__libc_dlsym)
/* Replacement for dlvsym. MAP must be a real map. This function
returns NULL without setting the dlerror value in case of static
@@ -219,7 +217,6 @@ __libc_dlvsym (void *map, const char *name, const char *version)
: (void *) (DL_SYMBOL_ADDRESS (args.dlsym.loadbase,
args.dlsym.ref)));
}
-libc_hidden_def (__libc_dlvsym)
int
__libc_dlclose (void *map)
@@ -230,7 +227,6 @@ __libc_dlclose (void *map)
#endif
return dlerror_run (do_dlclose, map);
}
-libc_hidden_def (__libc_dlclose)
static bool __libc_freeres_fn_section
diff --git a/elf/dl-sym.c b/elf/dl-sym.c
index fa0cce678f..de5769f926 100644
--- a/elf/dl-sym.c
+++ b/elf/dl-sym.c
@@ -188,11 +188,9 @@ _dl_vsym (void *handle, const char *name, const char *version, void *who)
return do_sym (handle, name, who, &vers, 0);
}
-libc_hidden_def (_dl_vsym)
void *
_dl_sym (void *handle, const char *name, void *who)
{
return do_sym (handle, name, who, NULL, DL_LOOKUP_RETURN_NEWEST);
}
-libc_hidden_def (_dl_sym)
diff --git a/elf/tst-libc_dlvsym-dso.c b/elf/tst-libc_dlvsym-dso.c
deleted file mode 100644
index 19091ddb41..0000000000
--- a/elf/tst-libc_dlvsym-dso.c
+++ /dev/null
@@ -1,25 +0,0 @@
-/* Compare dlvsym and __libc_dlvsym results. Shared object code.
- Copyright (C) 2017-2021 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, see
- <https://www.gnu.org/licenses/>. */
-
-#include "tst-libc_dlvsym.h"
-
-void
-compare_vsyms_global (void)
-{
- compare_vsyms ();
-}
diff --git a/elf/tst-libc_dlvsym-static.c b/elf/tst-libc_dlvsym-static.c
deleted file mode 100644
index 19c438c3cd..0000000000
--- a/elf/tst-libc_dlvsym-static.c
+++ /dev/null
@@ -1,32 +0,0 @@
-/* Compare dlvsym and __libc_dlvsym results. Static version.
- Copyright (C) 2017-2021 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, see
- <https://www.gnu.org/licenses/>. */
-
-#include <support/xdlfcn.h>
-
-static int
-do_test (void)
-{
- void *handle = xdlopen ("tst-libc_dlvsym-dso.so", RTLD_LAZY);
- void (*compare) (void) = xdlsym (handle, "compare_vsyms_global");
- compare ();
- xdlclose (handle);
-
- return 0;
-}
-
-#include <support/test-driver.c>
diff --git a/elf/tst-libc_dlvsym.c b/elf/tst-libc_dlvsym.c
deleted file mode 100644
index 823643fb1c..0000000000
--- a/elf/tst-libc_dlvsym.c
+++ /dev/null
@@ -1,34 +0,0 @@
-/* Compare dlvsym and __libc_dlvsym results. Dynamic version.
- Copyright (C) 2017-2021 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, see
- <https://www.gnu.org/licenses/>. */
-
-#include "tst-libc_dlvsym.h"
-
-static int
-do_test (void)
-{
- compare_vsyms ();
-
- void *handle = xdlopen ("tst-libc_dlvsym-dso.so", RTLD_LAZY);
- void (*compare) (void) = xdlsym (handle, "compare_vsyms_global");
- compare ();
- xdlclose (handle);
-
- return 0;
-}
-
-#include <support/test-driver.c>
diff --git a/elf/tst-libc_dlvsym.h b/elf/tst-libc_dlvsym.h
deleted file mode 100644
index 1a8f2e9271..0000000000
--- a/elf/tst-libc_dlvsym.h
+++ /dev/null
@@ -1,130 +0,0 @@
-/* Compare dlvsym and __libc_dlvsym results. Common code.
- Copyright (C) 2017-2021 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, see
- <https://www.gnu.org/licenses/>. */
-
-/* compare_vsyms is the main entry point for these tests.
-
- Indirectly, It calls __libc_dlvsym (from libc.so; internal
- interface) and dlvsym (from libdl.so; public interface) to compare
- the results for a selected set of symbols in libc.so which
- typically have more than one symbol version. The two functions are
- implemented by somewhat different code, and this test checks that
- their results are the same.
-
- The versions are generated to range from GLIBC_2.0 to GLIBC_2.Y,
- with Y being the current __GLIBC_MINOR__ version plus two. In
- addition, there is a list of special symbol versions of the form
- GLIBC_2.Y.Z, which were used for some releases.
-
- Comparing the two dlvsym results at versions which do not actually
- exist does not test much, but it will not contribute to false test
- failures, either. */
-
-#include <array_length.h>
-#include <gnu/lib-names.h>
-#include <stdbool.h>
-#include <stdio.h>
-#include <support/check.h>
-#include <support/xdlfcn.h>
-
-/* Run consistency check for versioned symbol NAME@VERSION. NB: We
- may execute in a shared object, so exit on error for proper error
- reporting. */
-static void
-compare_vsyms_0 (void *libc_handle, const char *name, const char *version,
- bool *pfound)
-{
- void *dlvsym_address = dlvsym (libc_handle, name, version);
- void *libc_dlvsym_address
- = __libc_dlvsym (libc_handle, name, version);
- if (dlvsym_address != libc_dlvsym_address)
- FAIL_EXIT1 ("%s@%s mismatch: %p != %p",
- name, version, dlvsym_address, libc_dlvsym_address);
- if (dlvsym_address != NULL)
- *pfound = true;
-}
-
-
-/* Run consistency check for versioned symbol NAME at multiple symbol
- version. */
-static void
-compare_vsyms_1 (void *libc_handle, const char *name)
-{
- bool found = false;
-
- /* Historic versions which do not follow the usual GLIBC_2.Y
- pattern, to increase test coverage. Not all architectures have
- those, but probing additional versions does not hurt. */
- static const char special_versions[][12] =
- {
- "GLIBC_2.1.1",
- "GLIBC_2.1.2",
- "GLIBC_2.1.3",
- "GLIBC_2.1.4",
- "GLIBC_2.2.1",
- "GLIBC_2.2.2",
- "GLIBC_2.2.3",
- "GLIBC_2.2.4",
- "GLIBC_2.2.5",
- "GLIBC_2.2.6",
- "GLIBC_2.3.2",
- "GLIBC_2.3.3",
- "GLIBC_2.3.4",
- };
- for (int i = 0; i < array_length (special_versions); ++i)
- compare_vsyms_0 (libc_handle, name, special_versions[i], &found);
-
- /* Iterate to an out-of-range version, to cover some unused symbols
- as well. */
- for (int minor_version = 0; minor_version <= __GLIBC_MINOR__ + 2;
- ++minor_version)
- {
- char version[30];
- snprintf (version, sizeof (version), "GLIBC_%d.%d",
- __GLIBC__, minor_version);
- compare_vsyms_0 (libc_handle, name, version, &found);
- }
-
- if (!found)
- FAIL_EXIT1 ("symbol %s not found at any version", name);
-}
-
-/* Run consistency checks for various symbols which usually have
- multiple versions. */
-static void
-compare_vsyms (void)
-{
- /* The minor version loop in compare_vsyms_1 needs updating in case
- we ever switch to glibc 3.0. */
- if (__GLIBC__ != 2)
- FAIL_EXIT1 ("unexpected glibc major version: %d", __GLIBC__);
-
- /* __libc_dlvsym does not recognize the special RTLD_* handles, so
- obtain an explicit handle for libc.so. */
- void *libc_handle = xdlopen (LIBC_SO, RTLD_LAZY | RTLD_NOLOAD);
-
-
- /* sys_errlist and sys_siglist were deprecated in glibc 2.32 and they are
- not available on architectures with base ABI newer than 2.32. */
-#if TEST_COMPAT (libc, GLIBC_2_0, GLIBC_2_32)
- compare_vsyms_1 (libc_handle, "_sys_errlist");
- compare_vsyms_1 (libc_handle, "_sys_siglist");
-#endif
- compare_vsyms_1 (libc_handle, "quick_exit");
-
- xdlclose (libc_handle);
-}
diff --git a/include/dlfcn.h b/include/dlfcn.h
index d4440c567e..a4c283728f 100644
--- a/include/dlfcn.h
+++ b/include/dlfcn.h
@@ -45,20 +45,20 @@ extern char **__libc_argv attribute_hidden;
better error handling semantics for the library. */
#define __libc_dlopen(name) \
__libc_dlopen_mode (name, RTLD_NOW | __RTLD_DLOPEN)
-extern void *__libc_dlopen_mode (const char *__name, int __mode);
-extern void *__libc_dlsym (void *__map, const char *__name);
-extern void *__libc_dlvsym (void *map, const char *name, const char *version);
-extern int __libc_dlclose (void *__map);
-libc_hidden_proto (__libc_dlopen_mode)
-libc_hidden_proto (__libc_dlsym)
-libc_hidden_proto (__libc_dlvsym)
-libc_hidden_proto (__libc_dlclose)
+extern void *__libc_dlopen_mode (const char *__name, int __mode)
+ attribute_hidden;
+extern void *__libc_dlsym (void *__map, const char *__name)
+ attribute_hidden;
+extern void *__libc_dlvsym (void *map, const char *name, const char *version)
+ attribute_hidden;
+extern int __libc_dlclose (void *__map)
+ attribute_hidden;
/* Locate shared object containing the given address. */
#ifdef ElfW
extern int _dl_addr (const void *address, Dl_info *info,
- struct link_map **mapp, const ElfW(Sym) **symbolp);
-libc_hidden_proto (_dl_addr)
+ struct link_map **mapp, const ElfW(Sym) **symbolp)
+ attribute_hidden;
#endif
struct link_map;
@@ -73,23 +73,21 @@ extern void _dl_close_worker (struct link_map *map, bool force)
/* Look up NAME in shared object HANDLE (which may be RTLD_DEFAULT or
RTLD_NEXT). WHO is the calling function, for RTLD_NEXT. Returns
the symbol value, which may be NULL. */
-extern void *_dl_sym (void *handle, const char *name, void *who);
-libc_hidden_proto (_dl_sym)
+extern void *_dl_sym (void *handle, const char *name, void *who)
+ attribute_hidden;
/* Look up version VERSION of symbol NAME in shared object HANDLE
(which may be RTLD_DEFAULT or RTLD_NEXT). WHO is the calling
function, for RTLD_NEXT. Returns the symbol value, which may be
NULL. */
extern void *_dl_vsym (void *handle, const char *name, const char *version,
- void *who);
-libc_hidden_proto (_dl_vsym)
+ void *who) attribute_hidden;
/* Helper function for <dlfcn.h> functions. Runs the OPERATE function via
_dl_catch_error. Returns zero for success, nonzero for failure; and
arranges for `dlerror' to return the error details.
ARGS is passed as argument to OPERATE. */
-extern int _dlerror_run (void (*operate) (void *), void *args);
-libc_hidden_proto (_dlerror_run)
+extern int _dlerror_run (void (*operate) (void *), void *args) attribute_hidden;
/* This structure is used to make the outer (statically linked)
implementation of dlopen and related functions to the inner libc
</cut>
Successfully identified regression in *glibc* in CI configuration tcwg_cross/gnu-master-aarch64-build_cross. So far, this commit has regressed CI configurations:
- tcwg_cross/gnu-master-aarch64-build_cross
Culprit:
<cut>
commit 8ec022a037788cc540c5670b0c9b1aa137bfbf97
Author: Florian Weimer <fweimer(a)redhat.com>
Date: Wed Jul 7 08:40:41 2021 +0200
nptl: Remove GLIBC_2.34 versions of __pthread_mutex_lock, __pthread_mutex_unlock
Now that there are no internal users anymore, these new symbol
versions can be removed from the public ABI. The compatibility
symbols remain.
Reviewed-by: Adhemerval Zanella <adhemerval.zanella(a)linaro.org>
</cut>
Results regressed to (for first_bad == 8ec022a037788cc540c5670b0c9b1aa137bfbf97)
# reset_artifacts:
-10
# true:
0
# build_abe binutils:
1
# build_abe stage1:
2
# build_abe linux:
3
# First few build errors in logs:
# 00:00:16 make[2]: *** [/home/tcwg-buildslave/workspace/tcwg_gnu_0/abe/builds/x86_64-pc-linux-gnu/aarch64-linux-gnu/glibc-glibc.git~master/sysd-rules:483: /home/tcwg-buildslave/workspace/tcwg_gnu_0/abe/builds/x86_64-pc-linux-gnu/aarch64-linux-gnu/glibc-glibc.git~master/csu/start.o] Error 1
# 00:00:17 make[2]: *** [/home/tcwg-buildslave/workspace/tcwg_gnu_0/abe/builds/x86_64-pc-linux-gnu/aarch64-linux-gnu/glibc-glibc.git~master/sysd-rules:483: /home/tcwg-buildslave/workspace/tcwg_gnu_0/abe/builds/x86_64-pc-linux-gnu/aarch64-linux-gnu/glibc-glibc.git~master/csu/crti.o] Error 1
# 00:00:17 make[2]: *** [/home/tcwg-buildslave/workspace/tcwg_gnu_0/abe/builds/x86_64-pc-linux-gnu/aarch64-linux-gnu/glibc-glibc.git~master/sysd-rules:483: /home/tcwg-buildslave/workspace/tcwg_gnu_0/abe/builds/x86_64-pc-linux-gnu/aarch64-linux-gnu/glibc-glibc.git~master/csu/crtn.o] Error 1
# 00:00:17 make[2]: *** [/home/tcwg-buildslave/workspace/tcwg_gnu_0/abe/builds/x86_64-pc-linux-gnu/aarch64-linux-gnu/glibc-glibc.git~master/sysd-rules:499: /home/tcwg-buildslave/workspace/tcwg_gnu_0/abe/builds/x86_64-pc-linux-gnu/aarch64-linux-gnu/glibc-glibc.git~master/csu/start.os] Error 1
# 00:00:17 make[2]: *** [../o-iterator.mk:9: /home/tcwg-buildslave/workspace/tcwg_gnu_0/abe/builds/x86_64-pc-linux-gnu/aarch64-linux-gnu/glibc-glibc.git~master/csu/check_fds.o] Error 1
# 00:00:17 make[2]: *** [../o-iterator.mk:9: /home/tcwg-buildslave/workspace/tcwg_gnu_0/abe/builds/x86_64-pc-linux-gnu/aarch64-linux-gnu/glibc-glibc.git~master/csu/check_fds.os] Error 1
# 00:00:17 ../sysdeps/aarch64/nptl/tls.h:91:19: error: ‘__builtin_thread_pointer’ is not supported on this target
# 00:00:17 make[2]: *** [/home/tcwg-buildslave/workspace/tcwg_gnu_0/abe/builds/x86_64-pc-linux-gnu/aarch64-linux-gnu/glibc-glibc.git~master/sysd-rules:485: /home/tcwg-buildslave/workspace/tcwg_gnu_0/abe/builds/x86_64-pc-linux-gnu/aarch64-linux-gnu/glibc-glibc.git~master/csu/libc-tls.o] Error 1
# 00:00:17 ../sysdeps/unix/sysv/linux/aarch64/sysdep.h:190:17: error: invalid register name for ‘_x0’
# 00:00:17 ../sysdeps/unix/sysv/linux/aarch64/sysdep.h:174:22: error: invalid register name for ‘_x8’
from (for last_good == 1f9c804fbd699104adefbce9e56d2c8aa711b6b9)
# reset_artifacts:
-10
# true:
0
# build_abe binutils:
1
# build_abe stage1:
2
# build_abe linux:
3
# build_abe glibc:
4
# build_abe stage2:
5
# build_abe qemu:
6
Artifacts of last_good build: https://ci.linaro.org/job/tcwg_cross-bisect-gnu-master-aarch64-build_cross/…
Artifacts of first_bad build: https://ci.linaro.org/job/tcwg_cross-bisect-gnu-master-aarch64-build_cross/…
Build top page/logs: https://ci.linaro.org/job/tcwg_cross-bisect-gnu-master-aarch64-build_cross/…
Configuration details:
Reproduce builds:
<cut>
mkdir investigate-glibc-8ec022a037788cc540c5670b0c9b1aa137bfbf97
cd investigate-glibc-8ec022a037788cc540c5670b0c9b1aa137bfbf97
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_cross-bisect-gnu-master-aarch64-build_cross/… --fail
curl -o artifacts/manifests/build-parameters.sh https://ci.linaro.org/job/tcwg_cross-bisect-gnu-master-aarch64-build_cross/… --fail
curl -o artifacts/test.sh https://ci.linaro.org/job/tcwg_cross-bisect-gnu-master-aarch64-build_cross/… --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 glibc
# Reproduce first_bad build
git checkout --detach 8ec022a037788cc540c5670b0c9b1aa137bfbf97
../artifacts/test.sh
# Reproduce last_good build
git checkout --detach 1f9c804fbd699104adefbce9e56d2c8aa711b6b9
../artifacts/test.sh
cd ..
</cut>
History of pending regressions and results: https://git.linaro.org/toolchain/ci/base-artifacts.git/log/?h=linaro-local/…
Artifacts: https://ci.linaro.org/job/tcwg_cross-bisect-gnu-master-aarch64-build_cross/…
Build log: https://ci.linaro.org/job/tcwg_cross-bisect-gnu-master-aarch64-build_cross/…
Full commit (up to 1000 lines):
<cut>
commit 8ec022a037788cc540c5670b0c9b1aa137bfbf97
Author: Florian Weimer <fweimer(a)redhat.com>
Date: Wed Jul 7 08:40:41 2021 +0200
nptl: Remove GLIBC_2.34 versions of __pthread_mutex_lock, __pthread_mutex_unlock
Now that there are no internal users anymore, these new symbol
versions can be removed from the public ABI. The compatibility
symbols remain.
Reviewed-by: Adhemerval Zanella <adhemerval.zanella(a)linaro.org>
---
nptl/Versions | 2 --
nptl/pthread_mutex_lock.c | 5 +++--
nptl/pthread_mutex_unlock.c | 5 +++--
sysdeps/unix/sysv/linux/aarch64/libc.abilist | 2 --
sysdeps/unix/sysv/linux/alpha/libc.abilist | 2 --
sysdeps/unix/sysv/linux/arc/libc.abilist | 2 --
sysdeps/unix/sysv/linux/arm/be/libc.abilist | 2 --
sysdeps/unix/sysv/linux/arm/le/libc.abilist | 2 --
sysdeps/unix/sysv/linux/csky/libc.abilist | 2 --
sysdeps/unix/sysv/linux/hppa/libc.abilist | 2 --
sysdeps/unix/sysv/linux/i386/libc.abilist | 2 --
sysdeps/unix/sysv/linux/ia64/libc.abilist | 2 --
sysdeps/unix/sysv/linux/m68k/coldfire/libc.abilist | 2 --
sysdeps/unix/sysv/linux/m68k/m680x0/libc.abilist | 2 --
sysdeps/unix/sysv/linux/microblaze/be/libc.abilist | 2 --
sysdeps/unix/sysv/linux/microblaze/le/libc.abilist | 2 --
sysdeps/unix/sysv/linux/mips/mips32/fpu/libc.abilist | 2 --
sysdeps/unix/sysv/linux/mips/mips32/nofpu/libc.abilist | 2 --
sysdeps/unix/sysv/linux/mips/mips64/n32/libc.abilist | 2 --
sysdeps/unix/sysv/linux/mips/mips64/n64/libc.abilist | 2 --
sysdeps/unix/sysv/linux/nios2/libc.abilist | 2 --
sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libc.abilist | 2 --
sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libc.abilist | 2 --
sysdeps/unix/sysv/linux/powerpc/powerpc64/be/libc.abilist | 2 --
sysdeps/unix/sysv/linux/powerpc/powerpc64/le/libc.abilist | 2 --
sysdeps/unix/sysv/linux/riscv/rv32/libc.abilist | 2 --
sysdeps/unix/sysv/linux/riscv/rv64/libc.abilist | 2 --
sysdeps/unix/sysv/linux/s390/s390-32/libc.abilist | 2 --
sysdeps/unix/sysv/linux/s390/s390-64/libc.abilist | 2 --
sysdeps/unix/sysv/linux/sh/be/libc.abilist | 2 --
sysdeps/unix/sysv/linux/sh/le/libc.abilist | 2 --
sysdeps/unix/sysv/linux/sparc/sparc32/libc.abilist | 2 --
sysdeps/unix/sysv/linux/sparc/sparc64/libc.abilist | 2 --
sysdeps/unix/sysv/linux/x86_64/64/libc.abilist | 2 --
sysdeps/unix/sysv/linux/x86_64/x32/libc.abilist | 2 --
35 files changed, 6 insertions(+), 70 deletions(-)
diff --git a/nptl/Versions b/nptl/Versions
index 060d8d5dec..0a1c75509a 100644
--- a/nptl/Versions
+++ b/nptl/Versions
@@ -253,8 +253,6 @@ libc {
GLIBC_2.34 {
__pthread_cleanup_routine;
__pthread_key_create;
- __pthread_mutex_lock;
- __pthread_mutex_unlock;
__pthread_register_cancel;
__pthread_register_cancel_defer;
__pthread_unregister_cancel;
diff --git a/nptl/pthread_mutex_lock.c b/nptl/pthread_mutex_lock.c
index c9e438ef37..da624f322d 100644
--- a/nptl/pthread_mutex_lock.c
+++ b/nptl/pthread_mutex_lock.c
@@ -609,9 +609,10 @@ __pthread_mutex_lock_full (pthread_mutex_t *mutex)
}
#if PTHREAD_MUTEX_VERSIONS
-versioned_symbol (libpthread, ___pthread_mutex_lock, __pthread_mutex_lock,
- GLIBC_2_34);
libc_hidden_ver (___pthread_mutex_lock, __pthread_mutex_lock)
+# ifndef SHARED
+strong_alias (___pthread_mutex_lock, __pthread_mutex_lock)
+# endif
versioned_symbol (libpthread, ___pthread_mutex_lock, pthread_mutex_lock,
GLIBC_2_0);
diff --git a/nptl/pthread_mutex_unlock.c b/nptl/pthread_mutex_unlock.c
index ea88ba2986..7c15397572 100644
--- a/nptl/pthread_mutex_unlock.c
+++ b/nptl/pthread_mutex_unlock.c
@@ -368,9 +368,10 @@ ___pthread_mutex_unlock (pthread_mutex_t *mutex)
{
return __pthread_mutex_unlock_usercnt (mutex, 1);
}
-versioned_symbol (libpthread, ___pthread_mutex_unlock, __pthread_mutex_unlock,
- GLIBC_2_34);
libc_hidden_ver (___pthread_mutex_unlock, __pthread_mutex_unlock)
+#ifndef SHARED
+strong_alias (___pthread_mutex_unlock, __pthread_mutex_unlock)
+#endif
versioned_symbol (libpthread, ___pthread_mutex_unlock, pthread_mutex_unlock,
GLIBC_2_0);
diff --git a/sysdeps/unix/sysv/linux/aarch64/libc.abilist b/sysdeps/unix/sysv/linux/aarch64/libc.abilist
index 6730cbdd6b..6f19b07b47 100644
--- a/sysdeps/unix/sysv/linux/aarch64/libc.abilist
+++ b/sysdeps/unix/sysv/linux/aarch64/libc.abilist
@@ -2384,8 +2384,6 @@ GLIBC_2.34 __libc_start_main F
GLIBC_2.34 __mq_open_2 F
GLIBC_2.34 __pthread_cleanup_routine F
GLIBC_2.34 __pthread_key_create F
-GLIBC_2.34 __pthread_mutex_lock F
-GLIBC_2.34 __pthread_mutex_unlock F
GLIBC_2.34 __pthread_register_cancel F
GLIBC_2.34 __pthread_register_cancel_defer F
GLIBC_2.34 __pthread_unregister_cancel F
diff --git a/sysdeps/unix/sysv/linux/alpha/libc.abilist b/sysdeps/unix/sysv/linux/alpha/libc.abilist
index 63de4fadc3..6ece449d4b 100644
--- a/sysdeps/unix/sysv/linux/alpha/libc.abilist
+++ b/sysdeps/unix/sysv/linux/alpha/libc.abilist
@@ -2483,8 +2483,6 @@ GLIBC_2.34 __libc_start_main F
GLIBC_2.34 __mq_open_2 F
GLIBC_2.34 __pthread_cleanup_routine F
GLIBC_2.34 __pthread_key_create F
-GLIBC_2.34 __pthread_mutex_lock F
-GLIBC_2.34 __pthread_mutex_unlock F
GLIBC_2.34 __pthread_register_cancel F
GLIBC_2.34 __pthread_register_cancel_defer F
GLIBC_2.34 __pthread_unregister_cancel F
diff --git a/sysdeps/unix/sysv/linux/arc/libc.abilist b/sysdeps/unix/sysv/linux/arc/libc.abilist
index 2f13701fd7..3bf846349f 100644
--- a/sysdeps/unix/sysv/linux/arc/libc.abilist
+++ b/sysdeps/unix/sysv/linux/arc/libc.abilist
@@ -2143,8 +2143,6 @@ GLIBC_2.34 __libc_start_main F
GLIBC_2.34 __mq_open_2 F
GLIBC_2.34 __pthread_cleanup_routine F
GLIBC_2.34 __pthread_key_create F
-GLIBC_2.34 __pthread_mutex_lock F
-GLIBC_2.34 __pthread_mutex_unlock F
GLIBC_2.34 __pthread_register_cancel F
GLIBC_2.34 __pthread_register_cancel_defer F
GLIBC_2.34 __pthread_unregister_cancel F
diff --git a/sysdeps/unix/sysv/linux/arm/be/libc.abilist b/sysdeps/unix/sysv/linux/arm/be/libc.abilist
index 9b824f1605..08be998d35 100644
--- a/sysdeps/unix/sysv/linux/arm/be/libc.abilist
+++ b/sysdeps/unix/sysv/linux/arm/be/libc.abilist
@@ -245,9 +245,7 @@ GLIBC_2.34 __pthread_cond_clockwait64 F
GLIBC_2.34 __pthread_cond_timedwait64 F
GLIBC_2.34 __pthread_key_create F
GLIBC_2.34 __pthread_mutex_clocklock64 F
-GLIBC_2.34 __pthread_mutex_lock F
GLIBC_2.34 __pthread_mutex_timedlock64 F
-GLIBC_2.34 __pthread_mutex_unlock F
GLIBC_2.34 __pthread_register_cancel F
GLIBC_2.34 __pthread_register_cancel_defer F
GLIBC_2.34 __pthread_rwlock_clockrdlock64 F
diff --git a/sysdeps/unix/sysv/linux/arm/le/libc.abilist b/sysdeps/unix/sysv/linux/arm/le/libc.abilist
index 443a81b8f7..ebd767ed96 100644
--- a/sysdeps/unix/sysv/linux/arm/le/libc.abilist
+++ b/sysdeps/unix/sysv/linux/arm/le/libc.abilist
@@ -242,9 +242,7 @@ GLIBC_2.34 __pthread_cond_clockwait64 F
GLIBC_2.34 __pthread_cond_timedwait64 F
GLIBC_2.34 __pthread_key_create F
GLIBC_2.34 __pthread_mutex_clocklock64 F
-GLIBC_2.34 __pthread_mutex_lock F
GLIBC_2.34 __pthread_mutex_timedlock64 F
-GLIBC_2.34 __pthread_mutex_unlock F
GLIBC_2.34 __pthread_register_cancel F
GLIBC_2.34 __pthread_register_cancel_defer F
GLIBC_2.34 __pthread_rwlock_clockrdlock64 F
diff --git a/sysdeps/unix/sysv/linux/csky/libc.abilist b/sysdeps/unix/sysv/linux/csky/libc.abilist
index 243de3cf93..4a467e706e 100644
--- a/sysdeps/unix/sysv/linux/csky/libc.abilist
+++ b/sysdeps/unix/sysv/linux/csky/libc.abilist
@@ -2377,9 +2377,7 @@ GLIBC_2.34 __pthread_cond_clockwait64 F
GLIBC_2.34 __pthread_cond_timedwait64 F
GLIBC_2.34 __pthread_key_create F
GLIBC_2.34 __pthread_mutex_clocklock64 F
-GLIBC_2.34 __pthread_mutex_lock F
GLIBC_2.34 __pthread_mutex_timedlock64 F
-GLIBC_2.34 __pthread_mutex_unlock F
GLIBC_2.34 __pthread_register_cancel F
GLIBC_2.34 __pthread_register_cancel_defer F
GLIBC_2.34 __pthread_rwlock_clockrdlock64 F
diff --git a/sysdeps/unix/sysv/linux/hppa/libc.abilist b/sysdeps/unix/sysv/linux/hppa/libc.abilist
index 24ae58bb6f..bdef8d2a34 100644
--- a/sysdeps/unix/sysv/linux/hppa/libc.abilist
+++ b/sysdeps/unix/sysv/linux/hppa/libc.abilist
@@ -2330,9 +2330,7 @@ GLIBC_2.34 __pthread_cond_clockwait64 F
GLIBC_2.34 __pthread_cond_timedwait64 F
GLIBC_2.34 __pthread_key_create F
GLIBC_2.34 __pthread_mutex_clocklock64 F
-GLIBC_2.34 __pthread_mutex_lock F
GLIBC_2.34 __pthread_mutex_timedlock64 F
-GLIBC_2.34 __pthread_mutex_unlock F
GLIBC_2.34 __pthread_register_cancel F
GLIBC_2.34 __pthread_register_cancel_defer F
GLIBC_2.34 __pthread_rwlock_clockrdlock64 F
diff --git a/sysdeps/unix/sysv/linux/i386/libc.abilist b/sysdeps/unix/sysv/linux/i386/libc.abilist
index 09bebcd5a1..eba95a2cf0 100644
--- a/sysdeps/unix/sysv/linux/i386/libc.abilist
+++ b/sysdeps/unix/sysv/linux/i386/libc.abilist
@@ -2514,9 +2514,7 @@ GLIBC_2.34 __pthread_cond_clockwait64 F
GLIBC_2.34 __pthread_cond_timedwait64 F
GLIBC_2.34 __pthread_key_create F
GLIBC_2.34 __pthread_mutex_clocklock64 F
-GLIBC_2.34 __pthread_mutex_lock F
GLIBC_2.34 __pthread_mutex_timedlock64 F
-GLIBC_2.34 __pthread_mutex_unlock F
GLIBC_2.34 __pthread_register_cancel F
GLIBC_2.34 __pthread_register_cancel_defer F
GLIBC_2.34 __pthread_rwlock_clockrdlock64 F
diff --git a/sysdeps/unix/sysv/linux/ia64/libc.abilist b/sysdeps/unix/sysv/linux/ia64/libc.abilist
index 0bafe09253..3fbc5ae978 100644
--- a/sysdeps/unix/sysv/linux/ia64/libc.abilist
+++ b/sysdeps/unix/sysv/linux/ia64/libc.abilist
@@ -2321,8 +2321,6 @@ GLIBC_2.34 __libc_start_main F
GLIBC_2.34 __mq_open_2 F
GLIBC_2.34 __pthread_cleanup_routine F
GLIBC_2.34 __pthread_key_create F
-GLIBC_2.34 __pthread_mutex_lock F
-GLIBC_2.34 __pthread_mutex_unlock F
GLIBC_2.34 __pthread_register_cancel F
GLIBC_2.34 __pthread_register_cancel_defer F
GLIBC_2.34 __pthread_unregister_cancel F
diff --git a/sysdeps/unix/sysv/linux/m68k/coldfire/libc.abilist b/sysdeps/unix/sysv/linux/m68k/coldfire/libc.abilist
index c1fcde4c24..0aef2ec43a 100644
--- a/sysdeps/unix/sysv/linux/m68k/coldfire/libc.abilist
+++ b/sysdeps/unix/sysv/linux/m68k/coldfire/libc.abilist
@@ -246,9 +246,7 @@ GLIBC_2.34 __pthread_cond_clockwait64 F
GLIBC_2.34 __pthread_cond_timedwait64 F
GLIBC_2.34 __pthread_key_create F
GLIBC_2.34 __pthread_mutex_clocklock64 F
-GLIBC_2.34 __pthread_mutex_lock F
GLIBC_2.34 __pthread_mutex_timedlock64 F
-GLIBC_2.34 __pthread_mutex_unlock F
GLIBC_2.34 __pthread_register_cancel F
GLIBC_2.34 __pthread_register_cancel_defer F
GLIBC_2.34 __pthread_rwlock_clockrdlock64 F
diff --git a/sysdeps/unix/sysv/linux/m68k/m680x0/libc.abilist b/sysdeps/unix/sysv/linux/m68k/m680x0/libc.abilist
index 407651cfd7..a4704f7e96 100644
--- a/sysdeps/unix/sysv/linux/m68k/m680x0/libc.abilist
+++ b/sysdeps/unix/sysv/linux/m68k/m680x0/libc.abilist
@@ -2457,9 +2457,7 @@ GLIBC_2.34 __pthread_cond_clockwait64 F
GLIBC_2.34 __pthread_cond_timedwait64 F
GLIBC_2.34 __pthread_key_create F
GLIBC_2.34 __pthread_mutex_clocklock64 F
-GLIBC_2.34 __pthread_mutex_lock F
GLIBC_2.34 __pthread_mutex_timedlock64 F
-GLIBC_2.34 __pthread_mutex_unlock F
GLIBC_2.34 __pthread_register_cancel F
GLIBC_2.34 __pthread_register_cancel_defer F
GLIBC_2.34 __pthread_rwlock_clockrdlock64 F
diff --git a/sysdeps/unix/sysv/linux/microblaze/be/libc.abilist b/sysdeps/unix/sysv/linux/microblaze/be/libc.abilist
index 7da722a734..8f135f30c0 100644
--- a/sysdeps/unix/sysv/linux/microblaze/be/libc.abilist
+++ b/sysdeps/unix/sysv/linux/microblaze/be/libc.abilist
@@ -2428,9 +2428,7 @@ GLIBC_2.34 __pthread_cond_clockwait64 F
GLIBC_2.34 __pthread_cond_timedwait64 F
GLIBC_2.34 __pthread_key_create F
GLIBC_2.34 __pthread_mutex_clocklock64 F
-GLIBC_2.34 __pthread_mutex_lock F
GLIBC_2.34 __pthread_mutex_timedlock64 F
-GLIBC_2.34 __pthread_mutex_unlock F
GLIBC_2.34 __pthread_register_cancel F
GLIBC_2.34 __pthread_register_cancel_defer F
GLIBC_2.34 __pthread_rwlock_clockrdlock64 F
diff --git a/sysdeps/unix/sysv/linux/microblaze/le/libc.abilist b/sysdeps/unix/sysv/linux/microblaze/le/libc.abilist
index c374607b81..719609ac10 100644
--- a/sysdeps/unix/sysv/linux/microblaze/le/libc.abilist
+++ b/sysdeps/unix/sysv/linux/microblaze/le/libc.abilist
@@ -2425,9 +2425,7 @@ GLIBC_2.34 __pthread_cond_clockwait64 F
GLIBC_2.34 __pthread_cond_timedwait64 F
GLIBC_2.34 __pthread_key_create F
GLIBC_2.34 __pthread_mutex_clocklock64 F
-GLIBC_2.34 __pthread_mutex_lock F
GLIBC_2.34 __pthread_mutex_timedlock64 F
-GLIBC_2.34 __pthread_mutex_unlock F
GLIBC_2.34 __pthread_register_cancel F
GLIBC_2.34 __pthread_register_cancel_defer F
GLIBC_2.34 __pthread_rwlock_clockrdlock64 F
diff --git a/sysdeps/unix/sysv/linux/mips/mips32/fpu/libc.abilist b/sysdeps/unix/sysv/linux/mips/mips32/fpu/libc.abilist
index b1f426e053..f9a6bccdc5 100644
--- a/sysdeps/unix/sysv/linux/mips/mips32/fpu/libc.abilist
+++ b/sysdeps/unix/sysv/linux/mips/mips32/fpu/libc.abilist
@@ -2422,9 +2422,7 @@ GLIBC_2.34 __pthread_cond_clockwait64 F
GLIBC_2.34 __pthread_cond_timedwait64 F
GLIBC_2.34 __pthread_key_create F
GLIBC_2.34 __pthread_mutex_clocklock64 F
-GLIBC_2.34 __pthread_mutex_lock F
GLIBC_2.34 __pthread_mutex_timedlock64 F
-GLIBC_2.34 __pthread_mutex_unlock F
GLIBC_2.34 __pthread_register_cancel F
GLIBC_2.34 __pthread_register_cancel_defer F
GLIBC_2.34 __pthread_rwlock_clockrdlock64 F
diff --git a/sysdeps/unix/sysv/linux/mips/mips32/nofpu/libc.abilist b/sysdeps/unix/sysv/linux/mips/mips32/nofpu/libc.abilist
index 066ceb2258..cee02495c6 100644
--- a/sysdeps/unix/sysv/linux/mips/mips32/nofpu/libc.abilist
+++ b/sysdeps/unix/sysv/linux/mips/mips32/nofpu/libc.abilist
@@ -2420,9 +2420,7 @@ GLIBC_2.34 __pthread_cond_clockwait64 F
GLIBC_2.34 __pthread_cond_timedwait64 F
GLIBC_2.34 __pthread_key_create F
GLIBC_2.34 __pthread_mutex_clocklock64 F
-GLIBC_2.34 __pthread_mutex_lock F
GLIBC_2.34 __pthread_mutex_timedlock64 F
-GLIBC_2.34 __pthread_mutex_unlock F
GLIBC_2.34 __pthread_register_cancel F
GLIBC_2.34 __pthread_register_cancel_defer F
GLIBC_2.34 __pthread_rwlock_clockrdlock64 F
diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n32/libc.abilist b/sysdeps/unix/sysv/linux/mips/mips64/n32/libc.abilist
index 51c563ebbe..c9fdfe3a55 100644
--- a/sysdeps/unix/sysv/linux/mips/mips64/n32/libc.abilist
+++ b/sysdeps/unix/sysv/linux/mips/mips64/n32/libc.abilist
@@ -2428,9 +2428,7 @@ GLIBC_2.34 __pthread_cond_clockwait64 F
GLIBC_2.34 __pthread_cond_timedwait64 F
GLIBC_2.34 __pthread_key_create F
GLIBC_2.34 __pthread_mutex_clocklock64 F
-GLIBC_2.34 __pthread_mutex_lock F
GLIBC_2.34 __pthread_mutex_timedlock64 F
-GLIBC_2.34 __pthread_mutex_unlock F
GLIBC_2.34 __pthread_register_cancel F
GLIBC_2.34 __pthread_register_cancel_defer F
GLIBC_2.34 __pthread_rwlock_clockrdlock64 F
diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n64/libc.abilist b/sysdeps/unix/sysv/linux/mips/mips64/n64/libc.abilist
index 28db715d8a..d27c97094e 100644
--- a/sysdeps/unix/sysv/linux/mips/mips64/n64/libc.abilist
+++ b/sysdeps/unix/sysv/linux/mips/mips64/n64/libc.abilist
@@ -2372,8 +2372,6 @@ GLIBC_2.34 __libc_start_main F
GLIBC_2.34 __mq_open_2 F
GLIBC_2.34 __pthread_cleanup_routine F
GLIBC_2.34 __pthread_key_create F
-GLIBC_2.34 __pthread_mutex_lock F
-GLIBC_2.34 __pthread_mutex_unlock F
GLIBC_2.34 __pthread_register_cancel F
GLIBC_2.34 __pthread_register_cancel_defer F
GLIBC_2.34 __pthread_unregister_cancel F
diff --git a/sysdeps/unix/sysv/linux/nios2/libc.abilist b/sysdeps/unix/sysv/linux/nios2/libc.abilist
index ab9f2bd42c..25f270403f 100644
--- a/sysdeps/unix/sysv/linux/nios2/libc.abilist
+++ b/sysdeps/unix/sysv/linux/nios2/libc.abilist
@@ -2467,9 +2467,7 @@ GLIBC_2.34 __pthread_cond_clockwait64 F
GLIBC_2.34 __pthread_cond_timedwait64 F
GLIBC_2.34 __pthread_key_create F
GLIBC_2.34 __pthread_mutex_clocklock64 F
-GLIBC_2.34 __pthread_mutex_lock F
GLIBC_2.34 __pthread_mutex_timedlock64 F
-GLIBC_2.34 __pthread_mutex_unlock F
GLIBC_2.34 __pthread_register_cancel F
GLIBC_2.34 __pthread_register_cancel_defer F
GLIBC_2.34 __pthread_rwlock_clockrdlock64 F
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libc.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libc.abilist
index 83f8513e17..0256a272dd 100644
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libc.abilist
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libc.abilist
@@ -2484,9 +2484,7 @@ GLIBC_2.34 __pthread_cond_clockwait64 F
GLIBC_2.34 __pthread_cond_timedwait64 F
GLIBC_2.34 __pthread_key_create F
GLIBC_2.34 __pthread_mutex_clocklock64 F
-GLIBC_2.34 __pthread_mutex_lock F
GLIBC_2.34 __pthread_mutex_timedlock64 F
-GLIBC_2.34 __pthread_mutex_unlock F
GLIBC_2.34 __pthread_register_cancel F
GLIBC_2.34 __pthread_register_cancel_defer F
GLIBC_2.34 __pthread_rwlock_clockrdlock64 F
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libc.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libc.abilist
index 0fad357bf6..946f855c64 100644
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libc.abilist
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libc.abilist
@@ -2517,9 +2517,7 @@ GLIBC_2.34 __pthread_cond_clockwait64 F
GLIBC_2.34 __pthread_cond_timedwait64 F
GLIBC_2.34 __pthread_key_create F
GLIBC_2.34 __pthread_mutex_clocklock64 F
-GLIBC_2.34 __pthread_mutex_lock F
GLIBC_2.34 __pthread_mutex_timedlock64 F
-GLIBC_2.34 __pthread_mutex_unlock F
GLIBC_2.34 __pthread_register_cancel F
GLIBC_2.34 __pthread_register_cancel_defer F
GLIBC_2.34 __pthread_rwlock_clockrdlock64 F
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/be/libc.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc64/be/libc.abilist
index 424ec8d953..602da17327 100644
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/be/libc.abilist
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/be/libc.abilist
@@ -2285,8 +2285,6 @@ GLIBC_2.34 __libc_start_main F
GLIBC_2.34 __mq_open_2 F
GLIBC_2.34 __pthread_cleanup_routine F
GLIBC_2.34 __pthread_key_create F
-GLIBC_2.34 __pthread_mutex_lock F
-GLIBC_2.34 __pthread_mutex_unlock F
GLIBC_2.34 __pthread_register_cancel F
GLIBC_2.34 __pthread_register_cancel_defer F
GLIBC_2.34 __pthread_unregister_cancel F
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/le/libc.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc64/le/libc.abilist
index 9909fd0e9a..287285a21a 100644
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/le/libc.abilist
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/le/libc.abilist
@@ -2580,8 +2580,6 @@ GLIBC_2.34 __libc_start_main F
GLIBC_2.34 __mq_open_2 F
GLIBC_2.34 __pthread_cleanup_routine F
GLIBC_2.34 __pthread_key_create F
-GLIBC_2.34 __pthread_mutex_lock F
-GLIBC_2.34 __pthread_mutex_unlock F
GLIBC_2.34 __pthread_register_cancel F
GLIBC_2.34 __pthread_register_cancel_defer F
GLIBC_2.34 __pthread_unregister_cancel F
diff --git a/sysdeps/unix/sysv/linux/riscv/rv32/libc.abilist b/sysdeps/unix/sysv/linux/riscv/rv32/libc.abilist
index 7085989b16..cdeee28d0f 100644
--- a/sysdeps/unix/sysv/linux/riscv/rv32/libc.abilist
+++ b/sysdeps/unix/sysv/linux/riscv/rv32/libc.abilist
@@ -2145,8 +2145,6 @@ GLIBC_2.34 __libc_start_main F
GLIBC_2.34 __mq_open_2 F
GLIBC_2.34 __pthread_cleanup_routine F
GLIBC_2.34 __pthread_key_create F
-GLIBC_2.34 __pthread_mutex_lock F
-GLIBC_2.34 __pthread_mutex_unlock F
GLIBC_2.34 __pthread_register_cancel F
GLIBC_2.34 __pthread_register_cancel_defer F
GLIBC_2.34 __pthread_unregister_cancel F
diff --git a/sysdeps/unix/sysv/linux/riscv/rv64/libc.abilist b/sysdeps/unix/sysv/linux/riscv/rv64/libc.abilist
index a855997957..a74b54d6bb 100644
--- a/sysdeps/unix/sysv/linux/riscv/rv64/libc.abilist
+++ b/sysdeps/unix/sysv/linux/riscv/rv64/libc.abilist
@@ -2345,8 +2345,6 @@ GLIBC_2.34 __libc_start_main F
GLIBC_2.34 __mq_open_2 F
GLIBC_2.34 __pthread_cleanup_routine F
GLIBC_2.34 __pthread_key_create F
-GLIBC_2.34 __pthread_mutex_lock F
-GLIBC_2.34 __pthread_mutex_unlock F
GLIBC_2.34 __pthread_register_cancel F
GLIBC_2.34 __pthread_register_cancel_defer F
GLIBC_2.34 __pthread_unregister_cancel F
diff --git a/sysdeps/unix/sysv/linux/s390/s390-32/libc.abilist b/sysdeps/unix/sysv/linux/s390/s390-32/libc.abilist
index 12aeb82520..e96371317c 100644
--- a/sysdeps/unix/sysv/linux/s390/s390-32/libc.abilist
+++ b/sysdeps/unix/sysv/linux/s390/s390-32/libc.abilist
@@ -2482,9 +2482,7 @@ GLIBC_2.34 __pthread_cond_clockwait64 F
GLIBC_2.34 __pthread_cond_timedwait64 F
GLIBC_2.34 __pthread_key_create F
GLIBC_2.34 __pthread_mutex_clocklock64 F
-GLIBC_2.34 __pthread_mutex_lock F
GLIBC_2.34 __pthread_mutex_timedlock64 F
-GLIBC_2.34 __pthread_mutex_unlock F
GLIBC_2.34 __pthread_register_cancel F
GLIBC_2.34 __pthread_register_cancel_defer F
GLIBC_2.34 __pthread_rwlock_clockrdlock64 F
diff --git a/sysdeps/unix/sysv/linux/s390/s390-64/libc.abilist b/sysdeps/unix/sysv/linux/s390/s390-64/libc.abilist
index e2d746ad5f..aadc7c1d66 100644
--- a/sysdeps/unix/sysv/linux/s390/s390-64/libc.abilist
+++ b/sysdeps/unix/sysv/linux/s390/s390-64/libc.abilist
@@ -2322,8 +2322,6 @@ GLIBC_2.34 __libc_start_main F
GLIBC_2.34 __mq_open_2 F
GLIBC_2.34 __pthread_cleanup_routine F
GLIBC_2.34 __pthread_key_create F
-GLIBC_2.34 __pthread_mutex_lock F
-GLIBC_2.34 __pthread_mutex_unlock F
GLIBC_2.34 __pthread_register_cancel F
GLIBC_2.34 __pthread_register_cancel_defer F
GLIBC_2.34 __pthread_unregister_cancel F
diff --git a/sysdeps/unix/sysv/linux/sh/be/libc.abilist b/sysdeps/unix/sysv/linux/sh/be/libc.abilist
index 1ce4b54bf2..cc4a625cb4 100644
--- a/sysdeps/unix/sysv/linux/sh/be/libc.abilist
+++ b/sysdeps/unix/sysv/linux/sh/be/libc.abilist
@@ -2337,9 +2337,7 @@ GLIBC_2.34 __pthread_cond_clockwait64 F
GLIBC_2.34 __pthread_cond_timedwait64 F
GLIBC_2.34 __pthread_key_create F
GLIBC_2.34 __pthread_mutex_clocklock64 F
-GLIBC_2.34 __pthread_mutex_lock F
GLIBC_2.34 __pthread_mutex_timedlock64 F
-GLIBC_2.34 __pthread_mutex_unlock F
GLIBC_2.34 __pthread_register_cancel F
GLIBC_2.34 __pthread_register_cancel_defer F
GLIBC_2.34 __pthread_rwlock_clockrdlock64 F
diff --git a/sysdeps/unix/sysv/linux/sh/le/libc.abilist b/sysdeps/unix/sysv/linux/sh/le/libc.abilist
index 7d01add713..163d2cd613 100644
--- a/sysdeps/unix/sysv/linux/sh/le/libc.abilist
+++ b/sysdeps/unix/sysv/linux/sh/le/libc.abilist
@@ -2334,9 +2334,7 @@ GLIBC_2.34 __pthread_cond_clockwait64 F
GLIBC_2.34 __pthread_cond_timedwait64 F
GLIBC_2.34 __pthread_key_create F
GLIBC_2.34 __pthread_mutex_clocklock64 F
-GLIBC_2.34 __pthread_mutex_lock F
GLIBC_2.34 __pthread_mutex_timedlock64 F
-GLIBC_2.34 __pthread_mutex_unlock F
GLIBC_2.34 __pthread_register_cancel F
GLIBC_2.34 __pthread_register_cancel_defer F
GLIBC_2.34 __pthread_rwlock_clockrdlock64 F
diff --git a/sysdeps/unix/sysv/linux/sparc/sparc32/libc.abilist b/sysdeps/unix/sysv/linux/sparc/sparc32/libc.abilist
index b5ef3247d7..6eceee6b88 100644
--- a/sysdeps/unix/sysv/linux/sparc/sparc32/libc.abilist
+++ b/sysdeps/unix/sysv/linux/sparc/sparc32/libc.abilist
@@ -2477,9 +2477,7 @@ GLIBC_2.34 __pthread_cond_clockwait64 F
GLIBC_2.34 __pthread_cond_timedwait64 F
GLIBC_2.34 __pthread_key_create F
GLIBC_2.34 __pthread_mutex_clocklock64 F
-GLIBC_2.34 __pthread_mutex_lock F
GLIBC_2.34 __pthread_mutex_timedlock64 F
-GLIBC_2.34 __pthread_mutex_unlock F
GLIBC_2.34 __pthread_register_cancel F
GLIBC_2.34 __pthread_register_cancel_defer F
GLIBC_2.34 __pthread_rwlock_clockrdlock64 F
diff --git a/sysdeps/unix/sysv/linux/sparc/sparc64/libc.abilist b/sysdeps/unix/sysv/linux/sparc/sparc64/libc.abilist
index 14ae7c8417..e6bac469ba 100644
--- a/sysdeps/unix/sysv/linux/sparc/sparc64/libc.abilist
+++ b/sysdeps/unix/sysv/linux/sparc/sparc64/libc.abilist
@@ -2344,8 +2344,6 @@ GLIBC_2.34 __libc_start_main F
GLIBC_2.34 __mq_open_2 F
GLIBC_2.34 __pthread_cleanup_routine F
GLIBC_2.34 __pthread_key_create F
-GLIBC_2.34 __pthread_mutex_lock F
-GLIBC_2.34 __pthread_mutex_unlock F
GLIBC_2.34 __pthread_register_cancel F
GLIBC_2.34 __pthread_register_cancel_defer F
GLIBC_2.34 __pthread_unregister_cancel F
diff --git a/sysdeps/unix/sysv/linux/x86_64/64/libc.abilist b/sysdeps/unix/sysv/linux/x86_64/64/libc.abilist
index 57c4f28d17..e90f3e54c0 100644
--- a/sysdeps/unix/sysv/linux/x86_64/64/libc.abilist
+++ b/sysdeps/unix/sysv/linux/x86_64/64/libc.abilist
@@ -2300,8 +2300,6 @@ GLIBC_2.34 __libc_start_main F
GLIBC_2.34 __mq_open_2 F
GLIBC_2.34 __pthread_cleanup_routine F
GLIBC_2.34 __pthread_key_create F
-GLIBC_2.34 __pthread_mutex_lock F
-GLIBC_2.34 __pthread_mutex_unlock F
GLIBC_2.34 __pthread_register_cancel F
GLIBC_2.34 __pthread_register_cancel_defer F
GLIBC_2.34 __pthread_unregister_cancel F
diff --git a/sysdeps/unix/sysv/linux/x86_64/x32/libc.abilist b/sysdeps/unix/sysv/linux/x86_64/x32/libc.abilist
index 47211abe4e..792f681bba 100644
--- a/sysdeps/unix/sysv/linux/x86_64/x32/libc.abilist
+++ b/sysdeps/unix/sysv/linux/x86_64/x32/libc.abilist
@@ -2399,8 +2399,6 @@ GLIBC_2.34 __libc_start_main F
GLIBC_2.34 __mq_open_2 F
GLIBC_2.34 __pthread_cleanup_routine F
GLIBC_2.34 __pthread_key_create F
-GLIBC_2.34 __pthread_mutex_lock F
-GLIBC_2.34 __pthread_mutex_unlock F
GLIBC_2.34 __pthread_register_cancel F
GLIBC_2.34 __pthread_register_cancel_defer F
GLIBC_2.34 __pthread_unregister_cancel F
</cut>
Successfully identified regression in *glibc* in CI configuration tcwg_cross/gnu-master-aarch64-build_cross. So far, this commit has regressed CI configurations:
- tcwg_cross/gnu-master-aarch64-build_cross
Culprit:
<cut>
commit 83e55c982ffcf42185254cff5ac16377672ae32e
Author: Siddhesh Poyarekar <siddhesh(a)sourceware.org>
Date: Wed Jul 7 07:02:13 2021 +0530
glibc.malloc.check: Fix nit in documentation
The tunable will not work with *any* non-zero tunable value since its
list of allowed values is 0-3. Fix the documentation to reflect that.
Reviewed-by: Adhemerval Zanella <adhemerval.zanella(a)linaro.org>
</cut>
Results regressed to (for first_bad == 83e55c982ffcf42185254cff5ac16377672ae32e)
# reset_artifacts:
-10
# true:
0
# build_abe binutils:
1
# build_abe stage1:
2
# build_abe linux:
3
# First few build errors in logs:
# 00:00:19 make[2]: *** [/home/tcwg-buildslave/workspace/tcwg_gnu_0/abe/builds/x86_64-pc-linux-gnu/aarch64-linux-gnu/glibc-glibc.git~master/sysd-rules:483: /home/tcwg-buildslave/workspace/tcwg_gnu_0/abe/builds/x86_64-pc-linux-gnu/aarch64-linux-gnu/glibc-glibc.git~master/csu/start.o] Error 1
# 00:00:19 make[2]: *** [/home/tcwg-buildslave/workspace/tcwg_gnu_0/abe/builds/x86_64-pc-linux-gnu/aarch64-linux-gnu/glibc-glibc.git~master/sysd-rules:499: /home/tcwg-buildslave/workspace/tcwg_gnu_0/abe/builds/x86_64-pc-linux-gnu/aarch64-linux-gnu/glibc-glibc.git~master/csu/start.os] Error 1
# 00:00:19 make[2]: *** [/home/tcwg-buildslave/workspace/tcwg_gnu_0/abe/builds/x86_64-pc-linux-gnu/aarch64-linux-gnu/glibc-glibc.git~master/sysd-rules:483: /home/tcwg-buildslave/workspace/tcwg_gnu_0/abe/builds/x86_64-pc-linux-gnu/aarch64-linux-gnu/glibc-glibc.git~master/csu/crtn.o] Error 1
# 00:00:19 make[2]: *** [/home/tcwg-buildslave/workspace/tcwg_gnu_0/abe/builds/x86_64-pc-linux-gnu/aarch64-linux-gnu/glibc-glibc.git~master/sysd-rules:483: /home/tcwg-buildslave/workspace/tcwg_gnu_0/abe/builds/x86_64-pc-linux-gnu/aarch64-linux-gnu/glibc-glibc.git~master/csu/crti.o] Error 1
# 00:00:19 make[2]: *** [../o-iterator.mk:9: /home/tcwg-buildslave/workspace/tcwg_gnu_0/abe/builds/x86_64-pc-linux-gnu/aarch64-linux-gnu/glibc-glibc.git~master/csu/check_fds.os] Error 1
# 00:00:19 make[2]: *** [../o-iterator.mk:9: /home/tcwg-buildslave/workspace/tcwg_gnu_0/abe/builds/x86_64-pc-linux-gnu/aarch64-linux-gnu/glibc-glibc.git~master/csu/check_fds.o] Error 1
# 00:00:19 ../sysdeps/aarch64/nptl/tls.h:91:19: error: ‘__builtin_thread_pointer’ is not supported on this target
# 00:00:19 make[2]: *** [/home/tcwg-buildslave/workspace/tcwg_gnu_0/abe/builds/x86_64-pc-linux-gnu/aarch64-linux-gnu/glibc-glibc.git~master/sysd-rules:485: /home/tcwg-buildslave/workspace/tcwg_gnu_0/abe/builds/x86_64-pc-linux-gnu/aarch64-linux-gnu/glibc-glibc.git~master/csu/libc-tls.o] Error 1
# 00:00:19 ../sysdeps/unix/sysv/linux/aarch64/sysdep.h:190:17: error: invalid register name for ‘_x0’
# 00:00:19 ../sysdeps/unix/sysv/linux/aarch64/sysdep.h:174:22: error: invalid register name for ‘_x8’
from (for last_good == 7042b53f11339bc286270cd1a48eebf7989d198b)
# reset_artifacts:
-10
# true:
0
# build_abe binutils:
1
# build_abe stage1:
2
# build_abe linux:
3
# build_abe glibc:
4
# build_abe stage2:
5
# build_abe qemu:
6
Artifacts of last_good build: https://ci.linaro.org/job/tcwg_cross-bisect-gnu-master-aarch64-build_cross/…
Artifacts of first_bad build: https://ci.linaro.org/job/tcwg_cross-bisect-gnu-master-aarch64-build_cross/…
Build top page/logs: https://ci.linaro.org/job/tcwg_cross-bisect-gnu-master-aarch64-build_cross/…
Configuration details:
Reproduce builds:
<cut>
mkdir investigate-glibc-83e55c982ffcf42185254cff5ac16377672ae32e
cd investigate-glibc-83e55c982ffcf42185254cff5ac16377672ae32e
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_cross-bisect-gnu-master-aarch64-build_cross/… --fail
curl -o artifacts/manifests/build-parameters.sh https://ci.linaro.org/job/tcwg_cross-bisect-gnu-master-aarch64-build_cross/… --fail
curl -o artifacts/test.sh https://ci.linaro.org/job/tcwg_cross-bisect-gnu-master-aarch64-build_cross/… --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 glibc
# Reproduce first_bad build
git checkout --detach 83e55c982ffcf42185254cff5ac16377672ae32e
../artifacts/test.sh
# Reproduce last_good build
git checkout --detach 7042b53f11339bc286270cd1a48eebf7989d198b
../artifacts/test.sh
cd ..
</cut>
History of pending regressions and results: https://git.linaro.org/toolchain/ci/base-artifacts.git/log/?h=linaro-local/…
Artifacts: https://ci.linaro.org/job/tcwg_cross-bisect-gnu-master-aarch64-build_cross/…
Build log: https://ci.linaro.org/job/tcwg_cross-bisect-gnu-master-aarch64-build_cross/…
Full commit (up to 1000 lines):
<cut>
commit 83e55c982ffcf42185254cff5ac16377672ae32e
Author: Siddhesh Poyarekar <siddhesh(a)sourceware.org>
Date: Wed Jul 7 07:02:13 2021 +0530
glibc.malloc.check: Fix nit in documentation
The tunable will not work with *any* non-zero tunable value since its
list of allowed values is 0-3. Fix the documentation to reflect that.
Reviewed-by: Adhemerval Zanella <adhemerval.zanella(a)linaro.org>
---
manual/memory.texi | 10 +++++-----
manual/tunables.texi | 2 +-
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/manual/memory.texi b/manual/memory.texi
index 28ec2e4e63..31ee36be8c 100644
--- a/manual/memory.texi
+++ b/manual/memory.texi
@@ -1364,11 +1364,11 @@ The block was already freed.
Another possibility to check for and guard against bugs in the use of
@code{malloc}, @code{realloc} and @code{free} is to set the environment
variable @code{MALLOC_CHECK_}. When @code{MALLOC_CHECK_} is set to a
-non-zero value, a special (less efficient) implementation is used which
-is designed to be tolerant against simple errors, such as double calls
-of @code{free} with the same argument, or overruns of a single byte
-(off-by-one bugs). Not all such errors can be protected against,
-however, and memory leaks can result.
+non-zero value less than 4, a special (less efficient) implementation is
+used which is designed to be tolerant against simple errors, such as
+double calls of @code{free} with the same argument, or overruns of a
+single byte (off-by-one bugs). Not all such errors can be protected
+against, however, and memory leaks can result.
Any detected heap corruption results in immediate termination of the
process.
diff --git a/manual/tunables.texi b/manual/tunables.texi
index d5d957fb5b..ebdb562e36 100644
--- a/manual/tunables.texi
+++ b/manual/tunables.texi
@@ -115,7 +115,7 @@ following tunables in the @code{malloc} namespace:
This tunable supersedes the @env{MALLOC_CHECK_} environment variable and is
identical in features.
-Setting this tunable to a non-zero value enables a special (less
+Setting this tunable to a non-zero value less than 4 enables a special (less
efficient) memory allocator for the @code{malloc} family of functions that is
designed to be tolerant against simple errors such as double calls of
free with the same argument, or overruns of a single byte (off-by-one
</cut>
Successfully identified regression in *glibc* in CI configuration tcwg_cross/gnu-master-aarch64-build_cross. So far, this commit has regressed CI configurations:
- tcwg_cross/gnu-master-aarch64-build_cross
Culprit:
<cut>
commit b156c5f0a72eca8b28e1e5a5e51f29cf5ffb3bfb
Author: Armin Brauns <armin.brauns(a)gmail.com>
Date: Tue Jul 6 12:54:48 2021 +0200
manual: fix description for preadv()
</cut>
Results regressed to (for first_bad == b156c5f0a72eca8b28e1e5a5e51f29cf5ffb3bfb)
# reset_artifacts:
-10
# true:
0
# build_abe binutils:
1
# build_abe stage1:
2
# build_abe linux:
3
# First few build errors in logs:
# 00:00:17 make[2]: *** [/home/tcwg-buildslave/workspace/tcwg_gnu_0/abe/builds/x86_64-pc-linux-gnu/aarch64-linux-gnu/glibc-glibc.git~master/sysd-rules:483: /home/tcwg-buildslave/workspace/tcwg_gnu_0/abe/builds/x86_64-pc-linux-gnu/aarch64-linux-gnu/glibc-glibc.git~master/csu/start.o] Error 1
# 00:00:17 make[2]: *** [/home/tcwg-buildslave/workspace/tcwg_gnu_0/abe/builds/x86_64-pc-linux-gnu/aarch64-linux-gnu/glibc-glibc.git~master/sysd-rules:499: /home/tcwg-buildslave/workspace/tcwg_gnu_0/abe/builds/x86_64-pc-linux-gnu/aarch64-linux-gnu/glibc-glibc.git~master/csu/start.os] Error 1
# 00:00:17 make[2]: *** [/home/tcwg-buildslave/workspace/tcwg_gnu_0/abe/builds/x86_64-pc-linux-gnu/aarch64-linux-gnu/glibc-glibc.git~master/sysd-rules:483: /home/tcwg-buildslave/workspace/tcwg_gnu_0/abe/builds/x86_64-pc-linux-gnu/aarch64-linux-gnu/glibc-glibc.git~master/csu/crtn.o] Error 1
# 00:00:17 make[2]: *** [/home/tcwg-buildslave/workspace/tcwg_gnu_0/abe/builds/x86_64-pc-linux-gnu/aarch64-linux-gnu/glibc-glibc.git~master/sysd-rules:483: /home/tcwg-buildslave/workspace/tcwg_gnu_0/abe/builds/x86_64-pc-linux-gnu/aarch64-linux-gnu/glibc-glibc.git~master/csu/crti.o] Error 1
# 00:00:17 make[2]: *** [../o-iterator.mk:9: /home/tcwg-buildslave/workspace/tcwg_gnu_0/abe/builds/x86_64-pc-linux-gnu/aarch64-linux-gnu/glibc-glibc.git~master/csu/check_fds.o] Error 1
# 00:00:17 ../sysdeps/unix/sysv/linux/aarch64/sysdep.h:190:17: error: invalid register name for ‘_x0’
# 00:00:17 ../sysdeps/unix/sysv/linux/aarch64/sysdep.h:174:22: error: invalid register name for ‘_x8’
# 00:00:17 ../sysdeps/aarch64/nptl/tls.h:95:21: error: ‘__builtin_thread_pointer’ is not supported on this target
# 00:00:17 make[2]: *** [/home/tcwg-buildslave/workspace/tcwg_gnu_0/abe/builds/x86_64-pc-linux-gnu/aarch64-linux-gnu/glibc-glibc.git~master/sysd-rules:9: /home/tcwg-buildslave/workspace/tcwg_gnu_0/abe/builds/x86_64-pc-linux-gnu/aarch64-linux-gnu/glibc-glibc.git~master/csu/libc-start.o] Error 1
# 00:00:17 make[2]: *** [../o-iterator.mk:9: /home/tcwg-buildslave/workspace/tcwg_gnu_0/abe/builds/x86_64-pc-linux-gnu/aarch64-linux-gnu/glibc-glibc.git~master/csu/check_fds.os] Error 1
from (for last_good == 832f50be6c9c010e46180d14126bbb81f35e808c)
# reset_artifacts:
-10
# true:
0
# build_abe binutils:
1
# build_abe stage1:
2
# build_abe linux:
3
# build_abe glibc:
4
# build_abe stage2:
5
# build_abe qemu:
6
Artifacts of last_good build: https://ci.linaro.org/job/tcwg_cross-bisect-gnu-master-aarch64-build_cross/…
Artifacts of first_bad build: https://ci.linaro.org/job/tcwg_cross-bisect-gnu-master-aarch64-build_cross/…
Build top page/logs: https://ci.linaro.org/job/tcwg_cross-bisect-gnu-master-aarch64-build_cross/…
Configuration details:
Reproduce builds:
<cut>
mkdir investigate-glibc-b156c5f0a72eca8b28e1e5a5e51f29cf5ffb3bfb
cd investigate-glibc-b156c5f0a72eca8b28e1e5a5e51f29cf5ffb3bfb
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_cross-bisect-gnu-master-aarch64-build_cross/… --fail
curl -o artifacts/manifests/build-parameters.sh https://ci.linaro.org/job/tcwg_cross-bisect-gnu-master-aarch64-build_cross/… --fail
curl -o artifacts/test.sh https://ci.linaro.org/job/tcwg_cross-bisect-gnu-master-aarch64-build_cross/… --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 glibc
# Reproduce first_bad build
git checkout --detach b156c5f0a72eca8b28e1e5a5e51f29cf5ffb3bfb
../artifacts/test.sh
# Reproduce last_good build
git checkout --detach 832f50be6c9c010e46180d14126bbb81f35e808c
../artifacts/test.sh
cd ..
</cut>
History of pending regressions and results: https://git.linaro.org/toolchain/ci/base-artifacts.git/log/?h=linaro-local/…
Artifacts: https://ci.linaro.org/job/tcwg_cross-bisect-gnu-master-aarch64-build_cross/…
Build log: https://ci.linaro.org/job/tcwg_cross-bisect-gnu-master-aarch64-build_cross/…
Full commit (up to 1000 lines):
<cut>
commit b156c5f0a72eca8b28e1e5a5e51f29cf5ffb3bfb
Author: Armin Brauns <armin.brauns(a)gmail.com>
Date: Tue Jul 6 12:54:48 2021 +0200
manual: fix description for preadv()
---
manual/llio.texi | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/manual/llio.texi b/manual/llio.texi
index cbc4909fd5..eafc27120d 100644
--- a/manual/llio.texi
+++ b/manual/llio.texi
@@ -1161,7 +1161,7 @@ error. The possible errors are the same as in @code{write}.
This function is similar to the @code{readv} function, with the difference
it adds an extra @var{offset} parameter of type @code{off_t} similar to
-@code{pread}. The data is written to the file starting at position
+@code{pread}. The data is read from the file starting at position
@var{offset}. The position of the file descriptor itself is not affected
by the operation. The value is the same as before the call.
</cut>