On 04/11/2018 06:19 AM, Andrey Belevantsev wrote:
On 10.04.2018 13:40, Alexander Monakov wrote:
this fixes a simple "regression" under the qsort_chk umbrella: sched-deps
analysis has deps->readonly flag, but macro-fusion code does not respect it
and mutates instructions. This breaks an assumption in sel_rank_for_schedule
and manifests as qsort checking error.
Since sched_macro_fuse_insns is only called to set SCHED_GROUP_P on suitable
insns, guard the call with !deps->readonly.
Bootstrapped/regtested on x86_64 with sel-sched active and
--with-cpu=sandybridge to exercise macro-fusion code and verified on aarch64
cross-compiler that the failing testcase given in the PR is fixed.
OK to apply?
Fine with me but you need a scheduler maintainer approval.
Ok with me. Thanks for the patch.