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]

Help modifying an existing port.


Hello all,

 How's it going? I am using an existing GCC Port to an
embedded opensource architecture called OpenRISC
(www.opencores.org/or1k). It's a simple RISC
architecture and the compiler + binutils have already
been ported over to this new architecture.

For a certain project I want to modify the compiler
for this architecture so that it generates code which
always contains two independent instructions next to
each other. If the compiler does not find independent
instructions it should insert a no-op instead. 

One of the modifications I made was to assign the
variable "issue_rate" a value of 2", this ensures that
in the scheduler pass in haifa-sched.c in the function
schedule_block() the compiler always "tries" to
schedule two instructions together..the loop that does
this is:
" 
    /* Issue insns from ready list.  */
      while (ready.n_ready != 0
        && can_issue_more
        && (*current_sched_info->schedule_more_p) ())
{

  ....
  can_issue_more--;
  ...
"

where can_issue_more is initalized to "issue_rate"

When it breaks out of the this loop a non-zero value
in can_issue_more indicates that two independent
instructions were not found and it is at this point
that I need to insert no-op.

I really need help with this part as there are a
couple of things I am not really able to figure out:
1. Creating a new rtx for a NOP instruction
2. How do I add this new NOP instruction into the
existing RTX list.


Any help would be really appreciated.. I would also
like comments on whether my approach of modifying the
function schedule_block() is right or not..at this
point I don't want to do code motion across
basic-blocks to find independent instructions..so my
region is a basic-block

Thanks!
LEARNER


	
		
__________________________________
Do you Yahoo!?
Yahoo! Photos: High-quality 4x6 digital prints for 25¢
http://photos.yahoo.com/ph/print_splash


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