From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (qmail 12368 invoked from network); 22 Mar 1999 17:18:33 -0000 Received: from mail.redhat.com (199.183.24.239) by lists.redhat.com with SMTP; 22 Mar 1999 17:18:33 -0000 Received: from paralleldata.com (smtp.paralleldata.com [38.153.145.2]) by mail.redhat.com (8.8.7/8.8.7) with ESMTP id MAA14995 for ; Mon, 22 Mar 1999 12:06:08 -0500 Received: by paralleldata.com from localhost (router,SLMail V2.5); Mon, 22 Mar 1999 11:09:13 -0600 Received: by paralleldata.com from paralleldata.com (207.158.127.17::mail daemon; unverified,SLMail V2.5); Mon, 22 Mar 1999 11:09:10 -0600 Sender: "Wsb" Message-ID: <36F677D9.52FF8544@paralleldata.com> Date: Mon, 22 Mar 1999 11:03:21 -0600 From: "Wes Bauske" Organization: Parallel Data Systems X-Mailer: Mozilla 4.07 [en] (X11; I; Linux 2.0.36 i686) MIME-Version: 1.0 To: axp-list@redhat.com Subject: Re: XP1000 and Linux References: <199903221438.JAA07994@adder.cs.Virginia.EDU> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Greg Lindahl wrote: > > > Looks like it uses conditionals to decide when to do wh64. > > It has to. You don't know the alignment of the variables at the start > of the loop, so you'd have to test and have a leader and trailer > instead of just a trailer. But if you were writing multiple variables, > undoubtedly they'd have different alignment. So the easiest trick is > to use 1 conditional for each wh64. I don't know if the 21264's branch > prediction is good enough to avoid a bubble for a branch which is > taken 1/8 of the time, but avoiding extra main memory traffic is a > huge win. > One would assume so if their compiler uses that style of code. > We could easily figure out a bit of code that has an if() and one > asm() statement that allows us to do this by hand in egcs-compiled > codes. In order for egcs to generate this automatically, it would have > to know that the loop was big enough to make it worthwhile, and also > that the array in question was not read-before-written in the loop. > Figuring out whether the data is read should be easier for simple cases. The harder cases require the compiler to runtime check for array overlap to decide when to use the wh64 opcode. So, then it starts to become clear why they chose the method they did. Their style would allow use of wh64 on any non-overlapped sections of the array. Need to see about cvs access to the latest egcs for the unroll loop stuff Richard mentioned. Wes