public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
From: kripa shankar <kripa82@yahoo.com>
To: gcc@gnu.org, gcc-help@gcc.gnu.org
Cc: gcc-help@gnu.org
Subject: Fwd: Re: your mail
Date: Mon, 23 Feb 2004 21:08:00 -0000	[thread overview]
Message-ID: <20040223210813.56579.qmail@web41607.mail.yahoo.com> (raw)


--- kripa shankar <kripa82@yahoo.com> wrote:
> Date: Mon, 23 Feb 2004 10:10:19 -0800 (PST)
> From: kripa shankar <kripa82@yahoo.com>
> Subject: Re: your mail
> To: Michael Matz <matz@suse.de>
> CC: gcc@gnu.org, gcc-help@gcc.gnu.org,
> crossgcc@sources.redhat.com
> 
> Hey Thanks for the reply.. 
> The compiler version is 2.95.I have added the dump
> file name ".greg2" after the "jump2" optimization
> and ".stack" optimization in the toplev.c file which
> is shown below.
> if (greg2_dump)
> open_dump_file(".greg2", decl_printable_name
> (decl,2));
> r1_greg2(config_info);
> dump_rtl(".greg2", decl, print_rtl_with_bb, insns);
> Also how can i update the lifeness of the register
> ???. I think thts the problem..the function call
> r1_greg2(config_info);
> calls my file "greg2mod.c" in which iam retrieving
> the head [first instruction] of the basic block 2
> and then inserting the two instructions which i have
> mentioned earlier using the macros at the end..after
> the pass , these are the codes that gets executed
> 
>  /* Now turn the rtl into assembler code.  */       
>                                                     
>                                                     
>           
> TIMEVAR (final_time,
>            {             rtx x;             char
> *fnname;                                            
>                                                     
>               
> /* Get the function's name, as described by its RTL.
>   This may be different from the DECL_NAME name used
>   in the source file.  */
>                                                     
>                                                     
>                           x = DECL_RTL (decl);br>   
>          if (GET_CODE (x) != MEM)   
>                abort ();   
>              x = XEXP (x, 0);   
>              if (GET_CODE (x) != SYMBOL_REF)   
>                abort ();   
>              fnname = XSTR (x, 0);   
> //This is where the call to the final.c file is done
>   
>              assemble_start_function (decl, fnname);
>   
>              final_start_function (insns,
> asm_out_file, optimize);   
>              final (insns, asm_out_file, optimize,
> 0);   
>              final_end_function (insns,
> asm_out_file, optimize);   
>              assemble_end_function (decl, fnname);  
> 
>              if (! quiet_flag)  
>              fflush (asm_out_file);   
> ......
> So how can i make the registers live??? pls help me
> kripa
> --- Michael Matz  wrote:> Hi,> > On Mon, 23 Feb
> 2004, kripa shankar wrote:> > > ;; Start of basic
> block 2, registers live: 11 [fp]> 13 [sp]> > (note
> 62 41 45 [bb 2] NOTE_INSN_BASIC_BLOCK)> > (insn 45
> 62 46 (set (reg/i:SI 0 r0)       > (const_int 0
> [0x0])) 176 {*movsi_insn} (nil)   >
> (expr_list:REG_EQUAL (const_int 0 [0x0])       >
> (nil)))> > (insn 46 45 76 (use (reg/i:SI 0 r0)) -1
> (insn_list> 45 (nil))    (nil))> > (insn 76 46 77
> (set (reg:SI 7 r7)        (plus:SI> (reg:SI 5 r5)   
>         (const_int 2 [0x2]))) -1> (nil)    (nil))> >
> (insn 77 76 50 (set (reg:SI 6 r6)        (plus:SI>
> (reg:SI 4 r4)            (const_int 2 [0x2]))) -1>
> (nil)    (nil))> > ;; End of basic block 2> > (note
> 50 77 63 0 NOTE_INSN_BLOCK_END)> > (note 63 50 0 ""
> NOTE_INSN_DELETED)> > > > The instructions inserted
> are r7 = r5 + 2;r6 = r4> + 2; But the problem> > is
> that the inserted instructions are not present> in
> both asm file> > (fourth.s) and the output binary
> file (fourth.o)..> I have inserted these> >
>  instructions right after all the optimization>
> passess and before the> > final pass (final.c) where
> RTL gets converted into> Assembly. Kindly help> >
> me.> > There is not enough information.  Where
> exactly have> you added the code to> add those
> insns?  About which compiler version do> you speak? 
> Produce all > dump files (-da) and look which dump
> misses them> first.  The problem is, > that you
> include those instructions without updating>
> lifeness (i.e. the > compiler doesn't see, that r6
> and r7 really are> required after you've set > them.
>  So, if there is any pass deleting useless> insns
> after you inserted > them, they will get deleted.> >
> > Ciao,> Michael.> > ------> Want more information? 
> See the CrossGCC FAQ,>
> http://www.objsw.com/CrossGCC/> Want to unsubscribe?
> Send a note to>
> crossgcc-unsubscribe@sources.redhat.com> > 
> 
> ---------------------------------
> Do you Yahoo!?
> Yahoo! Mail SpamGuard - Read only the mail you want.


__________________________________
Do you Yahoo!?
Yahoo! Mail SpamGuard - Read only the mail you want.
http://antispam.yahoo.com/tools

WARNING: multiple messages have this Message-ID
From: kripa shankar <kripa82@yahoo.com>
To: gcc@gnu.org, gcc-help@gcc.gnu.org
Cc: gcc-help@gnu.org
Subject: Fwd: Re: your mail
Date: Mon, 23 Feb 2004 21:21:00 -0000	[thread overview]
Message-ID: <20040223210813.56579.qmail@web41607.mail.yahoo.com> (raw)
Message-ID: <20040223212100.RyleDPy8mlKCv9p29nHQ9hdUYmuBOiacSDz0d4SLgeo@z> (raw)


--- kripa shankar <kripa82@yahoo.com> wrote:
> Date: Mon, 23 Feb 2004 10:10:19 -0800 (PST)
> From: kripa shankar <kripa82@yahoo.com>
> Subject: Re: your mail
> To: Michael Matz <matz@suse.de>
> CC: gcc@gnu.org, gcc-help@gcc.gnu.org,
> crossgcc@sources.redhat.com
> 
> Hey Thanks for the reply.. 
> The compiler version is 2.95.I have added the dump
> file name ".greg2" after the "jump2" optimization
> and ".stack" optimization in the toplev.c file which
> is shown below.
> if (greg2_dump)
> open_dump_file(".greg2", decl_printable_name
> (decl,2));
> r1_greg2(config_info);
> dump_rtl(".greg2", decl, print_rtl_with_bb, insns);
> Also how can i update the lifeness of the register
> ???. I think thts the problem..the function call
> r1_greg2(config_info);
> calls my file "greg2mod.c" in which iam retrieving
> the head [first instruction] of the basic block 2
> and then inserting the two instructions which i have
> mentioned earlier using the macros at the end..after
> the pass , these are the codes that gets executed
> 
>  /* Now turn the rtl into assembler code.  */       
>                                                     
>                                                     
>           
> TIMEVAR (final_time,
>            {             rtx x;             char
> *fnname;                                            
>                                                     
>               
> /* Get the function's name, as described by its RTL.
>   This may be different from the DECL_NAME name used
>   in the source file.  */
>                                                     
>                                                     
>                           x = DECL_RTL (decl);br>   
>          if (GET_CODE (x) != MEM)   
>                abort ();   
>              x = XEXP (x, 0);   
>              if (GET_CODE (x) != SYMBOL_REF)   
>                abort ();   
>              fnname = XSTR (x, 0);   
> //This is where the call to the final.c file is done
>   
>              assemble_start_function (decl, fnname);
>   
>              final_start_function (insns,
> asm_out_file, optimize);   
>              final (insns, asm_out_file, optimize,
> 0);   
>              final_end_function (insns,
> asm_out_file, optimize);   
>              assemble_end_function (decl, fnname);  
> 
>              if (! quiet_flag)  
>              fflush (asm_out_file);   
> ......
> So how can i make the registers live??? pls help me
> kripa
> --- Michael Matz  wrote:> Hi,> > On Mon, 23 Feb
> 2004, kripa shankar wrote:> > > ;; Start of basic
> block 2, registers live: 11 [fp]> 13 [sp]> > (note
> 62 41 45 [bb 2] NOTE_INSN_BASIC_BLOCK)> > (insn 45
> 62 46 (set (reg/i:SI 0 r0)       > (const_int 0
> [0x0])) 176 {*movsi_insn} (nil)   >
> (expr_list:REG_EQUAL (const_int 0 [0x0])       >
> (nil)))> > (insn 46 45 76 (use (reg/i:SI 0 r0)) -1
> (insn_list> 45 (nil))    (nil))> > (insn 76 46 77
> (set (reg:SI 7 r7)        (plus:SI> (reg:SI 5 r5)   
>         (const_int 2 [0x2]))) -1> (nil)    (nil))> >
> (insn 77 76 50 (set (reg:SI 6 r6)        (plus:SI>
> (reg:SI 4 r4)            (const_int 2 [0x2]))) -1>
> (nil)    (nil))> > ;; End of basic block 2> > (note
> 50 77 63 0 NOTE_INSN_BLOCK_END)> > (note 63 50 0 ""
> NOTE_INSN_DELETED)> > > > The instructions inserted
> are r7 = r5 + 2;r6 = r4> + 2; But the problem> > is
> that the inserted instructions are not present> in
> both asm file> > (fourth.s) and the output binary
> file (fourth.o)..> I have inserted these> >
>  instructions right after all the optimization>
> passess and before the> > final pass (final.c) where
> RTL gets converted into> Assembly. Kindly help> >
> me.> > There is not enough information.  Where
> exactly have> you added the code to> add those
> insns?  About which compiler version do> you speak? 
> Produce all > dump files (-da) and look which dump
> misses them> first.  The problem is, > that you
> include those instructions without updating>
> lifeness (i.e. the > compiler doesn't see, that r6
> and r7 really are> required after you've set > them.
>  So, if there is any pass deleting useless> insns
> after you inserted > them, they will get deleted.> >
> > Ciao,> Michael.> > ------> Want more information? 
> See the CrossGCC FAQ,>
> http://www.objsw.com/CrossGCC/> Want to unsubscribe?
> Send a note to>
> crossgcc-unsubscribe@sources.redhat.com> > 
> 
> ---------------------------------
> Do you Yahoo!?
> Yahoo! Mail SpamGuard - Read only the mail you want.


__________________________________
Do you Yahoo!?
Yahoo! Mail SpamGuard - Read only the mail you want.
http://antispam.yahoo.com/tools

             reply	other threads:[~2004-02-23 21:08 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-02-23 21:08 kripa shankar [this message]
2004-02-23 21:21 ` kripa shankar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20040223210813.56579.qmail@web41607.mail.yahoo.com \
    --to=kripa82@yahoo.com \
    --cc=gcc-help@gcc.gnu.org \
    --cc=gcc-help@gnu.org \
    --cc=gcc@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).