Mercurial > hg > CbC > CbC_gcc
comparison gcc/ira-lives.c @ 63:b7f97abdc517 gcc-4.6-20100522
update gcc from gcc-4.5.0 to gcc-4.6
author | ryoma <e075725@ie.u-ryukyu.ac.jp> |
---|---|
date | Mon, 24 May 2010 12:47:05 +0900 |
parents | 77e2b8dfacca |
children | f6334be47118 |
comparison
equal
deleted
inserted
replaced
56:3c8a44c06a95 | 63:b7f97abdc517 |
---|---|
1 /* IRA processing allocno lives to build allocno live ranges. | 1 /* IRA processing allocno lives to build allocno live ranges. |
2 Copyright (C) 2006, 2007, 2008, 2009 | 2 Copyright (C) 2006, 2007, 2008, 2009, 2010 |
3 Free Software Foundation, Inc. | 3 Free Software Foundation, Inc. |
4 Contributed by Vladimir Makarov <vmakarov@redhat.com>. | 4 Contributed by Vladimir Makarov <vmakarov@redhat.com>. |
5 | 5 |
6 This file is part of GCC. | 6 This file is part of GCC. |
7 | 7 |
454 have to take both orderings into account. The | 454 have to take both orderings into account. The |
455 constraints for the two operands can be completely | 455 constraints for the two operands can be completely |
456 different. (Indeed, if the constraints for the two | 456 different. (Indeed, if the constraints for the two |
457 operands are the same for all alternatives, there's no | 457 operands are the same for all alternatives, there's no |
458 point marking them as commutative.) */ | 458 point marking them as commutative.) */ |
459 if (use < recog_data.n_operands + 1 | 459 if (use < recog_data.n_operands - 1 |
460 && recog_data.constraints[use][0] == '%') | 460 && recog_data.constraints[use][0] == '%') |
461 advance_p | 461 advance_p |
462 = make_pseudo_conflict (recog_data.operand[use + 1], | 462 = make_pseudo_conflict (recog_data.operand[use + 1], |
463 use_cl, dreg, advance_p); | 463 use_cl, dreg, advance_p); |
464 if (use >= 1 | 464 if (use >= 1 |
497 | 497 |
498 advance_p = true; | 498 advance_p = true; |
499 | 499 |
500 for (use = 0; use < recog_data.n_operands; use++) | 500 for (use = 0; use < recog_data.n_operands; use++) |
501 { | 501 { |
502 int alt1; | |
503 | |
502 if (use == def || recog_data.operand_type[use] == OP_OUT) | 504 if (use == def || recog_data.operand_type[use] == OP_OUT) |
503 continue; | 505 continue; |
504 | 506 |
505 if (recog_op_alt[use][alt].anything_ok) | 507 if (recog_op_alt[use][alt].anything_ok) |
506 use_cl = ALL_REGS; | 508 use_cl = ALL_REGS; |
507 else | 509 else |
508 use_cl = recog_op_alt[use][alt].cl; | 510 use_cl = recog_op_alt[use][alt].cl; |
511 | |
512 /* If there's any alternative that allows USE to match DEF, do not | |
513 record a conflict. If that causes us to create an invalid | |
514 instruction due to the earlyclobber, reload must fix it up. */ | |
515 for (alt1 = 0; alt1 < recog_data.n_alternatives; alt1++) | |
516 if (recog_op_alt[use][alt1].matches == def | |
517 || (use < recog_data.n_operands - 1 | |
518 && recog_data.constraints[use][0] == '%' | |
519 && recog_op_alt[use + 1][alt1].matches == def) | |
520 || (use >= 1 | |
521 && recog_data.constraints[use - 1][0] == '%' | |
522 && recog_op_alt[use - 1][alt1].matches == def)) | |
523 break; | |
524 | |
525 if (alt1 < recog_data.n_alternatives) | |
526 continue; | |
509 | 527 |
510 advance_p = check_and_make_def_use_conflict (dreg, def_cl, use, | 528 advance_p = check_and_make_def_use_conflict (dreg, def_cl, use, |
511 use_cl, advance_p); | 529 use_cl, advance_p); |
512 | 530 |
513 if ((use_match = recog_op_alt[use][alt].matches) >= 0) | 531 if ((use_match = recog_op_alt[use][alt].matches) >= 0) |
785 case 'W': case 'Y': case 'Z': | 803 case 'W': case 'Y': case 'Z': |
786 cl = (c == 'r' | 804 cl = (c == 'r' |
787 ? GENERAL_REGS | 805 ? GENERAL_REGS |
788 : REG_CLASS_FROM_CONSTRAINT (c, p)); | 806 : REG_CLASS_FROM_CONSTRAINT (c, p)); |
789 if (cl != NO_REGS | 807 if (cl != NO_REGS |
808 /* There is no register pressure problem if all of the | |
809 regs in this class are fixed. */ | |
810 && ira_available_class_regs[cl] != 0 | |
790 && (ira_available_class_regs[cl] | 811 && (ira_available_class_regs[cl] |
791 <= ira_reg_class_nregs[cl][mode])) | 812 <= ira_reg_class_nregs[cl][mode])) |
792 IOR_HARD_REG_SET (*set, reg_class_contents[cl]); | 813 IOR_HARD_REG_SET (*set, reg_class_contents[cl]); |
793 break; | 814 break; |
794 } | 815 } |