From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31469 invoked by alias); 21 Mar 2005 08:47:55 -0000 Mailing-List: contact gcc-help-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-help-owner@gcc.gnu.org Received: (qmail 31417 invoked from network); 21 Mar 2005 08:47:50 -0000 Received: from unknown (HELO wproxy.gmail.com) (64.233.184.195) by sourceware.org with SMTP; 21 Mar 2005 08:47:50 -0000 Received: by wproxy.gmail.com with SMTP id 55so1055008wri for ; Mon, 21 Mar 2005 00:47:50 -0800 (PST) Received: by 10.54.3.32 with SMTP id 32mr2716482wrc; Mon, 21 Mar 2005 00:47:46 -0800 (PST) Received: by 10.54.57.54 with HTTP; Mon, 21 Mar 2005 00:47:39 -0800 (PST) Message-ID: <600bd08a0503210047fdb42f@mail.gmail.com> Date: Mon, 21 Mar 2005 08:54:00 -0000 From: arul kumaran Reply-To: arul kumaran To: gcc-help@gcc.gnu.org Subject: need help....... Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-SW-Source: 2005-03/txt/msg00163.txt.bz2 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