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

need help.......


Hi,
         I am Arul Kumaran, a student from India. I
went through the instruction scheduling pass of the
GNU Compiler Collection(GCC 3.4.3 core). I tried to
get the instruction UID( I suppose it is the macro
INSN_UID(insn)) and the UIDs of other instructions on
which this instruction is dependent on, using the
macros LOG_LINKS or INSN_DEPEND in a basic block
before instruction scheduling. The dependencies I
expect is the data dependency. I used the following
code to do this:

basic_block b;
rtx instr;

FOR_EACH_BB(b)
        for(instr=BB_HEAD(b);;instr=NEXT_INSN(instr))
        {
                if(instr == BB_END(b))
                        break;
               
printf("<<<<%d>>>>\n",INSN_UID(instr));
        }

     I inserted this code in the file "sched-rgn.c" in
the function "schedule_region(int rgn)" as shown
below:

/* Compute LOG_LINKS.  */
  for (bb = 0; bb < current_nr_blocks; bb++)
    compute_block_backward_dependences (bb);

/* This is the inserted code shown above */
FOR_EACH_BB(b)
        for(instr=BB_HEAD(b);;instr=NEXT_INSN(instr))
        {
                if(instr == BB_END(b))
                        break;
               
printf("<<<<%d>>>>\n",INSN_UID(instr));
        }
/* end of the code */

  /* Compute INSN_DEPEND.  */
  for (bb = current_nr_blocks - 1; bb >= 0; bb--)
    {
      rtx head, tail;
      get_block_head_tail (BB...........
...........
...........
       
         When I compile the GCC using "make", I found
the instruction IDs are printed!! But when I compiled
my other test programs using the xgcc in the objdir directory, I did
not get the UIDs of the instructions. So, please suggest a way to get
the instruction UID of an instruction in that basic block and the UIDs
of other instructions on which this instruction is dependent on
in the same basic block. It will be of great use if
you suggest a way.
                                            Thanks,
                                             Arul


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