This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] rtl-optimization/64935: Sorting of ready list is different with/without DEBUG_INSNs.


Hi,

This patch fixes PR64935, which is triggered when ready list at the start of a basic block is greater than --param=max-sched-ready-insns.  Sorting the ready list when it has more than max-sched-ready-insns elements is special in that we want to sort normal insns even if there are debug insns in the list.  This is due to code for max-sched-ready-insns ignoring debug insns on purpose.

The problem in the bug can be fixed with a smallish patch (see https://gcc.gnu.org/bugzilla/attachment.cgi?id=34674), but it makes code look ugly and non-intuitive.  The second version of the patch (the one attached here) is a bit bigger, but it gives functions definitive and clear purpose, and makes code easier to understand.

While reviewing the patch I suggest using context diff mode (in emacs C-c C-d).  I couldn't convince git to generate context diff.

Bootstrapped/tested on x86_64-linux-gnu and cross-tested on arm-linux-gnueabihf.  Markus also tested this patch on powerpc64-linux-gnu.

OK for trunk?

Thank you,

--
Maxim Kuvyrkov
www.linaro.org


Attachment: 0001-Fix-PR64935.patch
Description: Binary data


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]