This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re-haifa-sched.c for SPARC
- To: gcc-bugs at gcc dot gnu dot org
- Subject: Re-haifa-sched.c for SPARC
- From: "phani narasimhan venkata sesha myreddy" <phani dot sesha at wipro dot com>
- Date: Tue, 20 Jun 2000 15:05:34 +0530
- Organization: WIPRO
hai all,
i am using the haifa-sched.c to generated the optimal code for
ultrasparcs.
The program is loop.c
The test program i was using is:-
-------------------------------------------
#include<stdio.h>
void main(){
int i=1;
int a[]={0,1,4,6,5,3,2};
int max=a[0];
do{
if(a[i] > max) max = a[i];
i++;
} while(i<7);
printf("%d\n",max);
}
---------------------------------------------
The output of loop.c.sched
i am cut and pasting the bock 0 visualisation:
;; Function main
;; ======================================================
;; -- basic block 0 from 91 to 106 -- before reload
;; ======================================================
;; UltraSPARC Looking at [IEUN(8) IEUN(19) IEUN(22) IEUN(25)
IEUN(28) IEUN(31) IEUN
(35) IEUN(105) IEUN(106)]
;; UltraSPARC Launched [IEUN(8) IEUN(19)]
;; Ready list (t = 1): 106 105 35 31 28 25 22 19 8 12
;; UltraSPARC Looking at [IEUN(22) IEUN(25) IEUN(28) IEUN(31)
LSU(20) LSU(14) LSU(17) IEUN(35) IEUN(105) IEUN(106)]
;; UltraSPARC Launched [IEUN(22) IEUN(25) LSU(20)]
;; Ready list (t = 2): 106 105 35 17 14 28 31 20 25 22
;; UltraSPARC Looking at [IEUN(28) IEUN(31) LSU(23) LSU(26) LSU(14)
LSU(17) IEUN(35
) IEUN(105) IEUN(106)]
;; UltraSPARC Launched [IEUN(28) IEUN(31) LSU(23)]
;; Ready list (t = 3): 106 105 35 17 14 26 23 31 28
;; UltraSPARC Looking at [LSU(26) LSU(29) LSU(32) LSU(14) LSU(17)
IEUN(35) IEUN(105
) IEUN(106)]
;; UltraSPARC Launched [IEUN(35) IEUN(105) LSU(32)]
;; Ready list (t = 4): 106 29 26 17 14 32 105 35
;; UltraSPARC Looking at [LSU(26) LSU(29) LSU(14) LSU(17)
IEUN(106)]
;; UltraSPARC Launched [IEUN(106) LSU(29)]
;; Ready list (t = 5): 26 17 14 29 106
;; UltraSPARC Looking at [LSU(26) LSU(14) LSU(17)]
;; UltraSPARC Launched [LSU(26)]
;; Ready list (t = 6): 17 14 26
;; UltraSPARC Looking at [LSU(14) LSU(17)]
;; UltraSPARC Launched [LSU(14)]
;; Ready list (t = 7): 17 14
;; UltraSPARC Looking at [LSU(17)]
;; UltraSPARC Launched [LSU(17)]
;; Ready list (t = 8): 17
;; Ready list (final):
--------------------------------------------------------------------------
Consider the ready list at t=2
;; UltraSPARC Looking at [IEUN(22) IEUN(25) IEUN(28) IEUN(31)
LSU(20) LSU(14) LSU(17) IEUN(35) IEUN(105) IEUN(106)]
;; UltraSPARC Launched [IEUN(22) IEUN(25) LSU(20)]
;; Ready list (t = 2): 106 105 35 17 14 28 31 20 25 22
Here the insn 20 got swapped with insn 28. My concern here instead of
swapping
the insn should be pushed down the list. Then only we are respecting the
order
generated by the rank_of_schedule while doing the qsort().
Eventhoug the current exaple doesn't strongly defect the generation, as
the bundle
ends with the 3 insns. consider a case where x1,x2,x3 are there in the
order and
x1 got swapped with x3, so the order becomes x3,x2,x1 and assume
in the next slot in the bundle both x1 and x2 can go but we select x2
and leave
x1. My concen is that in such senario x1 should be slected before x2, so
that
we repect the incoming order.
Execuse me if i am wrong. Hope somebody working on ultrasparc
CPU reply to my question at the earliest.
ThankYou,
phani.
begin:vcard
n:M.V.S;Phani Narasimham
tel;work:5530053 ext 1053
x-mozilla-html:FALSE
org:Wipro Global R&D;NSBU
version:2.1
email;internet:phani.sesha@wipro.com
title:Sr. Software Engineer
adr;quoted-printable:;;Office Addr:=0D=0A1 st Block, 7 th Main Road,N0.8=0D=0AKoramangala, Banglore - 36=0D=0AHouse Addr=0D=0AH.No 78,34 th A cross,=0D=0A11 th main, Jayanagar 4th T block;Banglore;Karnataka;;INDIA
note;quoted-printable:The deepest hunger of a faithful heart is faithfulness =0D=0A -Geo.Eliot.
fn:M.V.S Phani Narasimham
end:vcard