This is the mail archive of the gcc@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]

Confused about rtl generation


I'm trying to track the named instuction patterns used by the compiler when first building the insn list.  I've managed to modify GEN_FCN to track when insns are first created however this method does not work for jumps / calls etc. as they don't seem to use GEN_FCN to create the insn.  Ideally I would like to find a centralised point through which all standard instruction patterns are first created.  Any thoughts ....?

Also..
I have modified print-rtl() to print out the insn id and code before each rtl statement dumped into the rtl dump files (code below).  I was hoping that the insn code would identify the name of the standard instruction pattern used to generate the insn.  Unfortunately this is not so - all of the insn codes seem to be set to -1 (UNMATCHED) in the initial (.00.rtl) dump file so I can't tell what standard pattern was used to create them.  Can anyone help.

Code for printing insn details:
...
      case BARRIER:
	{
	for (tmp_rtx = rtx_first; tmp_rtx != 0; tmp_rtx = NEXT_INSN (tmp_rtx))
	  if (! flag_dump_unnumbered
	      || GET_CODE (tmp_rtx) != NOTE || NOTE_LINE_NUMBER (tmp_rtx) < 0)
	    {
	      fputs (print_rtx_head, outfile);
	      /* MAH 25/6/03 START */
	      fprintf (outfile,"\nINSN id: %d, code: %d", \
			   INSN_UID(tmp_rtx), \
			   INSN_CODE(tmp_rtx) );
	      /* MAH 25/6/03 END */
	      print_rtx (tmp_rtx);
	      fprintf (outfile, "\n");
	    }
	break;
	}
  ...


Marty Moose


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