public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
From: <john.gill@quadrics.com>
To: <gcc-help@gcc.gnu.org>
Subject: scheduling inline assembler when interlaced with C
Date: Wed, 21 Sep 2005 11:19:00 -0000	[thread overview]
Message-ID: <30062B7EA51A9045B9F605FAAC1B4F62170E66@exch01.quadrics.com> (raw)

I'm working on a port of gcc (3.3.3) for an embedded processor.

In my md file I have defined:

(define_asm_attributes
  [(set_attr "length" "1")
   (set_attr "type" "ialu")])

and

(define_insn_reservation "iarith" 1
  (eq_attr "type" "ialu")
  "AnyInsn+Arith4")


But the dfa scheduler doesn't pick up the scheduling resources
assocatiated with attribute ialu indicated via my 
define_insn_reservation statements. This is only a problem
for inline asm, it still schedules the C.

Below is some output from the sched2 pass. When using inline
asm the scheduler currently is noting that asm_operands
use no resources and as a consequence the scheduling could
be better. How can I get the scheduler to note what attributes
inline asm uses? 


Cheers for any help

John


;;   ======================================================
;;   -- basic block 0 from 15 to 61 -- after reload
;;   ======================================================

;;	  0--> 15   %w7=asm_operands                   :nothing            <<<<<<< No reservations
;;	  0--> 77   %w10=0x0|0x1                       :(BothInsn+Arith8)
;;	  1--> 26   %w3=high(`val')                    :(AnyInsn+Arith4)
;;	  1--> 37   %w8=0x0                            :(AnyInsn+Arith4)
;;	  2--> 28   %w4=[%w3+low(`val')]               :(AnyInsn+Memory+AnyPort),AnyPort,AnyPort,AnyPort
;;	  2--> 38   %w6=%w7^0x1                        :(AnyInsn+Arith4)
;;	  3--> 35   %w3=%w3+low(`val')                 :(AnyInsn+Arith4)
;;	  6--> 30   %w4=%w4+%w10                       :(BothInsn+Arith8)
;;	  7--> 42   asm_operands                       :nothing            <<<<<<< No reservations
;;	  8--> 46   %w2=asm_operands                   :nothing            <<<<<<< No reservations
;;	  8--> 48   %w2=%w2+0x1                        :(AnyInsn+Arith4)
;;	  9--> 50   asm_operands                       :nothing            <<<<<<< No reservations
;;	  9--> 72   %w3=high(`val')                    :(AnyInsn+Arith4)
;;	 10--> 74   %w2=high(`fired')                  :(AnyInsn+Arith4)
;;	 10--> 55   %w7=%w7<<0x2                       :(AnyInsn+Arith4)
;;	 11--> 56   %w6=0x1                            :(AnyInsn+Arith4)
;;	 11--> 73   %w2=%w2+low(`fired')               :(AnyInsn+Arith4)
;;	 12--> 57   [%w2+%w7]=%w6                      :(AnyInsn+Memory+StorePort)
;;	 13--> 61   [%w3+low(`val')]=%w4               :(AnyInsn+Memory+StorePort)
;;	Ready list (final):  
;;   total time = 13
;;   new head = 15
;;   new tail = 61


                 reply	other threads:[~2005-09-21 11:19 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=30062B7EA51A9045B9F605FAAC1B4F62170E66@exch01.quadrics.com \
    --to=john.gill@quadrics.com \
    --cc=gcc-help@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).