comparison gcc/sched-vis.c @ 55:77e2b8dfacca gcc-4.4.5

update it from 4.4.3 to 4.5.0
author ryoma <e075725@ie.u-ryukyu.ac.jp>
date Fri, 12 Feb 2010 23:39:51 +0900
parents a06113de4d67
children b7f97abdc517
comparison
equal deleted inserted replaced
52:c156f1bd5cd9 55:77e2b8dfacca
79 79
80 switch (GET_CODE (x)) 80 switch (GET_CODE (x))
81 { 81 {
82 case PLUS: 82 case PLUS:
83 op[0] = XEXP (x, 0); 83 op[0] = XEXP (x, 0);
84 if (GET_CODE (XEXP (x, 1)) == CONST_INT 84 if (CONST_INT_P (XEXP (x, 1))
85 && INTVAL (XEXP (x, 1)) < 0) 85 && INTVAL (XEXP (x, 1)) < 0)
86 { 86 {
87 st[1] = "-"; 87 st[1] = "-";
88 op[1] = GEN_INT (-INTVAL (XEXP (x, 1))); 88 op[1] = GEN_INT (-INTVAL (XEXP (x, 1)));
89 } 89 }
519 print_value (t, XEXP (x, 0), verbose); 519 print_value (t, XEXP (x, 0), verbose);
520 cur = safe_concat (buf, cur, "["); 520 cur = safe_concat (buf, cur, "[");
521 cur = safe_concat (buf, cur, t); 521 cur = safe_concat (buf, cur, t);
522 cur = safe_concat (buf, cur, "]"); 522 cur = safe_concat (buf, cur, "]");
523 break; 523 break;
524 case DEBUG_EXPR:
525 sprintf (t, "D#%i", DEBUG_TEMP_UID (DEBUG_EXPR_TREE_DECL (x)));
526 cur = safe_concat (buf, cur, t);
527 break;
524 default: 528 default:
525 print_exp (t, x, verbose); 529 print_exp (t, x, verbose);
526 cur = safe_concat (buf, cur, t); 530 cur = safe_concat (buf, cur, t);
527 break; 531 break;
528 } 532 }
553 sprintf (buf, "clobber %s", t1); 557 sprintf (buf, "clobber %s", t1);
554 break; 558 break;
555 case USE: 559 case USE:
556 print_value (t1, XEXP (x, 0), verbose); 560 print_value (t1, XEXP (x, 0), verbose);
557 sprintf (buf, "use %s", t1); 561 sprintf (buf, "use %s", t1);
562 break;
563 case VAR_LOCATION:
564 print_value (t1, PAT_VAR_LOCATION_LOC (x), verbose);
565 sprintf (buf, "loc %s", t1);
558 break; 566 break;
559 case COND_EXEC: 567 case COND_EXEC:
560 if (GET_CODE (COND_EXEC_TEST (x)) == NE 568 if (GET_CODE (COND_EXEC_TEST (x)) == NE
561 && XEXP (COND_EXEC_TEST (x), 1) == const0_rtx) 569 && XEXP (COND_EXEC_TEST (x), 1) == const0_rtx)
562 print_value (t1, XEXP (COND_EXEC_TEST (x), 0), verbose); 570 print_value (t1, XEXP (COND_EXEC_TEST (x), 0), verbose);
656 t); 664 t);
657 else 665 else
658 #endif 666 #endif
659 sprintf (buf, " %4d %s", INSN_UID (x), t); 667 sprintf (buf, " %4d %s", INSN_UID (x), t);
660 break; 668 break;
669
670 case DEBUG_INSN:
671 {
672 const char *name = "?";
673
674 if (DECL_P (INSN_VAR_LOCATION_DECL (insn)))
675 {
676 tree id = DECL_NAME (INSN_VAR_LOCATION_DECL (insn));
677 char idbuf[32];
678 if (id)
679 name = IDENTIFIER_POINTER (id);
680 else if (TREE_CODE (INSN_VAR_LOCATION_DECL (insn))
681 == DEBUG_EXPR_DECL)
682 {
683 sprintf (idbuf, "D#%i",
684 DEBUG_TEMP_UID (INSN_VAR_LOCATION_DECL (insn)));
685 name = idbuf;
686 }
687 else
688 {
689 sprintf (idbuf, "D.%i",
690 DECL_UID (INSN_VAR_LOCATION_DECL (insn)));
691 name = idbuf;
692 }
693 }
694 if (VAR_LOC_UNKNOWN_P (INSN_VAR_LOCATION_LOC (insn)))
695 sprintf (buf, " %4d: debug %s optimized away", INSN_UID (insn), name);
696 else
697 {
698 print_pattern (t, INSN_VAR_LOCATION_LOC (insn), verbose);
699 sprintf (buf, " %4d: debug %s => %s", INSN_UID (insn), name, t);
700 }
701 }
702 break;
703
661 case JUMP_INSN: 704 case JUMP_INSN:
662 print_pattern (t, PATTERN (x), verbose); 705 print_pattern (t, PATTERN (x), verbose);
663 #ifdef INSN_SCHEDULING 706 #ifdef INSN_SCHEDULING
664 if (verbose && current_sched_info) 707 if (verbose && current_sched_info)
665 sprintf (buf, "%s: jump %s", (*current_sched_info->print_insn) (x, 1), 708 sprintf (buf, "%s: jump %s", (*current_sched_info->print_insn) (x, 1),
734 print_rtl_slim_with_bb (FILE *f, rtx first, int flags) 777 print_rtl_slim_with_bb (FILE *f, rtx first, int flags)
735 { 778 {
736 print_rtl_slim (f, first, NULL, -1, flags); 779 print_rtl_slim (f, first, NULL, -1, flags);
737 } 780 }
738 781
739 /* Same as above, but stop at LAST or when COUNT == 0. 782 /* Same as above, but stop at LAST or when COUNT == 0.
740 If COUNT < 0 it will stop only at LAST or NULL rtx. */ 783 If COUNT < 0 it will stop only at LAST or NULL rtx. */
741 void 784 void
742 print_rtl_slim (FILE *f, rtx first, rtx last, int count, int flags) 785 print_rtl_slim (FILE *f, rtx first, rtx last, int count, int flags)
743 { 786 {
744 basic_block current_bb = NULL; 787 basic_block current_bb = NULL;
745 rtx insn, tail; 788 rtx insn, tail;
746 789
747 tail = last ? NEXT_INSN (last) : NULL_RTX; 790 tail = last ? NEXT_INSN (last) : NULL_RTX;
748 for (insn = first; 791 for (insn = first;
749 (insn != NULL) && (insn != tail) && (count != 0); 792 (insn != NULL) && (insn != tail) && (count != 0);
750 insn = NEXT_INSN (insn)) 793 insn = NEXT_INSN (insn))
751 { 794 {
752 if ((flags & TDF_BLOCKS) 795 if ((flags & TDF_BLOCKS)
753 && (INSN_P (insn) || GET_CODE (insn) == NOTE) 796 && (INSN_P (insn) || NOTE_P (insn))
754 && BLOCK_FOR_INSN (insn) 797 && BLOCK_FOR_INSN (insn)
755 && !current_bb) 798 && !current_bb)
756 { 799 {
757 current_bb = BLOCK_FOR_INSN (insn); 800 current_bb = BLOCK_FOR_INSN (insn);
758 dump_bb_info (current_bb, true, false, flags, ";; ", f); 801 dump_bb_info (current_bb, true, false, flags, ";; ", f);
770 if (count > 0) 813 if (count > 0)
771 count--; 814 count--;
772 } 815 }
773 } 816 }
774 817
775 void 818 void
776 debug_bb_slim (struct basic_block_def *bb) 819 debug_bb_slim (struct basic_block_def *bb)
777 { 820 {
778 print_rtl_slim (stderr, BB_HEAD (bb), BB_END (bb), -1, 32); 821 print_rtl_slim (stderr, BB_HEAD (bb), BB_END (bb), -1, 32);
779 } 822 }
780 823