All of lore.kernel.org
 help / color / mirror / Atom feed
From: Hans Boehm <Hans.Boehm@hp.com>
To: linux-ia64@vger.kernel.org
Subject: Re: [Linux-ia64] IA64 software pipelining
Date: Mon, 21 Apr 2003 03:42:33 +0000	[thread overview]
Message-ID: <marc-linux-ia64-105590723705576@msgid-missing> (raw)
In-Reply-To: <marc-linux-ia64-105590723705574@msgid-missing>

The compiler has no way to tell whether a a and b point into the same
array, in which case it might not be correct to pipeline the loop.

Try using

int swp(int m,int * restrict a,int * restrict b)

instead.

Hans

On Sun, 20 Apr 2003, dai yiyang wrote:

> 
> Hi all,
> 
>    I am trying to test the software pipelining with the following code ,
> ----------------------------------
> int swp(int m,int *a,int *b){
>         int i;
> #pragma swp
>         for (i=0; i<m ; i++)
>         {
>                     b[i]=a[i]+1;
> 
>          }
>         return i;
> }
> ------------------------------------
> I expect , for better performence , the code should be compiled somewhat 
> like this:
> ------------------------
>       mov ar.lc=r32
>       mov ar.ec=4
>       mov pr.rot=0x1000
> loop:
> (p16) ld8 r35=[r9],8
> (p18) add r37=r36,r0,1
> (p19) st8 [r6]=r38,8
>       br.ctop loop;;
> -------------------------
> but it seems the Intel compiler7.1 can not produce software pipelining for 
> this code like what I expected .
> with -opt_report_file option , I got such tip:
> -----------------------------
> 
> Swp report for loop at line 6 in swp in file swp.c
> 
>          Modulo scheduling failed. Most likely, this was
>          caused by loop-carried memory dependences.
> 
>          Following are the loop-carried memory dependence edges:
>          Store  at line     6 --> Load   at line     6
> 
> -----------------------------
> any advice ?
> 
> Regards,
> Yiyang
> 
> 
> 
> _________________________________________________________________
> 与联机的朋友进行交流,请使用 MSN Messenger:  http://messenger.msn.com/cn  
> 
> 
> _______________________________________________
> Linux-IA64 mailing list
> Linux-IA64@linuxia64.org
> http://lists.linuxia64.org/lists/listinfo/linux-ia64
> 

-- 
Hans Boehm
(hboehm@hpl.hp.com)



      reply	other threads:[~2003-04-21  3:42 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-04-20  9:40 [Linux-ia64] IA64 software pipelining dai yiyang
2003-04-21  3:42 ` Hans Boehm [this message]

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=marc-linux-ia64-105590723705576@msgid-missing \
    --to=hans.boehm@hp.com \
    --cc=linux-ia64@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.