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, IRA] Fix PR46002


Hi Vladimir,
Thanks for reviewing my other patch for PR46178. Although you mentioned
the priority algorithm is bound for removal, I still have another
related patch.

This fix is for PR46002: during update_copy_costs(), when we obtain the
cover class for a copy-related allocno, it is not sufficient to test if
the two reg-classes intersect; the assigned register in the current
allocno must be *in* in the intersection. Otherwise the classes may
intersect, but the currently assigned register is not valid for
assigning to the other allocno (then ICE in the index >= 0 assertion).

This patch changes the copy skipping test, from testing cover class
intersection, into a test of if 'hard_regno' is within the cover class
of 'another_allocno'.

Bootstrapped and tested on x86_64 with no regressions. Comparing test
results under -fira-algorithm=priority also shows many fewer FAILs. Okay
for trunk?


Thanks,
Chung-Lin

2011-02-19  Chung-Lin Tang  <cltang@codesourcery.com>

	PR rtl-optimization/46002
	* ira-color.c (update_copy_costs): Change class intersection
	test to reg_class_contents[] test of 'hard_regno'.

Attachment: pr46002.diff
Description: Text document


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