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] |
On 11/24/13 00:30, Wei Mi wrote:
I think this is showing up because this is the first time we have used SCHED_GROUP_P in cases where we merely want to keep two instructions consecutive vs cases where we are required to keep certain instructions consecutive. For example, all the RTL passes already know they need to keep a cc0 setter and cc0 user consecutive on a HAVE_cc0 target.Sorry about the problem. For the failed testcase, it was compiled using -fmodulo-sched. modulo-sched phase set SCHED_GROUP_P of a jump insn to be true, which means the jump insn should be scheduled with prev insn as a group. When modulo scheduling is finished, the flag of SCHED_GROUP_P is not cleaned up. After that, pass_jump2 phase split the bb and move the prev insn to another bb. Then pass_sched2 see the flag and mistakenly try to bind the jump insn with a code label. I am thinking other cases setting SCHED_GROUP_P should have the same problem because SCHED_GROUP_P is not cleaned up after scheduling is done. The flag may become inconsistent after some optimizations and may cause problem if it is used by later scheduling passes. I don't know why similar problem was never exposed before. The fix is to simply cleanup SCHED_GROUP_P flag in sched_finish.
In the latter case passes should already be doing what is necessary to keep those instructions consecutive. In the former case, we'd have to audit & fix passes to honor the desire to keep certain instructions consecutive.
I'll note you're doing an extra pass over all the RTL here. Is there any clean way you can clean SCHED_GROUP_P without that extra pass over the RTL? Perhaps when the group actually gets scheduled?bootstrap is ok. regression test is going on. Is it ok if regression passes? Thanks, Wei. 2013-11-23 Wei Mi <wmi@google.com> PR rtl-optimization/59020 * haifa-sched.c (cleanup_sched_group): New function. (sched_finish): Call cleanup_sched_group to cleanup SCHED_GROUP_P. 2013-11-23 Wei Mi <wmi@google.com> PR rtl-optimization/59020 * testsuite/gcc.dg/pr59020.c (void f):
jeff
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |