From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jeffrey A Law To: "Jerry Quinn" Cc: Richard Henderson , egcs@egcs.cygnus.com Subject: Re: Fwd: Questions on PA machine description? Date: Thu, 25 Mar 1999 01:01:00 -0000 Message-id: <4324.922351870@upchuck> In-reply-to: Your message of Wed, 24 Mar 1999 17:43:09 EST. < 36F96A7D.F0DBDF47@americasm01.nt.com > References: <36F96A7D.F0DBDF47@americasm01.nt.com> X-SW-Source: 1999-03/msg00805.html In message < 36F96A7D.F0DBDF47@americasm01.nt.com >you write: > So the ready list for a cycle starts out with insns with no > dependencies. Right. The only insns on the ready list should have had all their dependencies resolved already. > Then when we pick an insn off the ready list, it's placed > into the scheduled chain and schedule_insn is called. Yes. > OK, now I'm confused, because in my head it looks like the code should > already do what you want. Hmmm, you're right. Hmmm, now I'm not sure why I saw the undesired behavior. > If the alu has 0 delay, insn_cost would return 0? Then, INSN_TICK would > be unchanged. And effective_cost would end up 0, causing the dependent > insn to be placed into ready. Maybe that was the problem -- maybe I had a ready delay of 1 cycle or something like that. I agree the code should do what we want. Maybe we need to tweak the ready delay to be zero for the cases where we want to issue a dependent insn in the same cycle. Anyway, here's the testcase. Look at the .sched dump and you'll see that the two insns which compute the address of the global variable are issued in different cycles. It doesn't make a difference in this example, but does in some more complex code I looked at for the PA8000. int a; int * blah () { return &a; } ;; ==================== scheduling visualization for block 0 ;; clock pa8000alu pa8000alu no-unit ;; ===== ============================== ============================ ;; 1 7 r95=high(`a') ---------------------------- ;; 2 8 %r28=r95+low(`a') ---------------------------- ;; 3 ------------------------------ ---------------------------- From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jeffrey A Law To: "Jerry Quinn" Cc: Richard Henderson , egcs@egcs.cygnus.com Subject: Re: Fwd: Questions on PA machine description? Date: Wed, 31 Mar 1999 23:46:00 -0000 Message-ID: <4324.922351870@upchuck> References: <36F96A7D.F0DBDF47@americasm01.nt.com> X-SW-Source: 1999-03n/msg00810.html Message-ID: <19990331234600.Y6um8hsYaWPOP19Hh_N9AUYCoM6FhLNmEZjPnbAuKE0@z> In message < 36F96A7D.F0DBDF47@americasm01.nt.com >you write: > So the ready list for a cycle starts out with insns with no > dependencies. Right. The only insns on the ready list should have had all their dependencies resolved already. > Then when we pick an insn off the ready list, it's placed > into the scheduled chain and schedule_insn is called. Yes. > OK, now I'm confused, because in my head it looks like the code should > already do what you want. Hmmm, you're right. Hmmm, now I'm not sure why I saw the undesired behavior. > If the alu has 0 delay, insn_cost would return 0? Then, INSN_TICK would > be unchanged. And effective_cost would end up 0, causing the dependent > insn to be placed into ready. Maybe that was the problem -- maybe I had a ready delay of 1 cycle or something like that. I agree the code should do what we want. Maybe we need to tweak the ready delay to be zero for the cases where we want to issue a dependent insn in the same cycle. Anyway, here's the testcase. Look at the .sched dump and you'll see that the two insns which compute the address of the global variable are issued in different cycles. It doesn't make a difference in this example, but does in some more complex code I looked at for the PA8000. int a; int * blah () { return &a; } ;; ==================== scheduling visualization for block 0 ;; clock pa8000alu pa8000alu no-unit ;; ===== ============================== ============================ ;; 1 7 r95=high(`a') ---------------------------- ;; 2 8 %r28=r95+low(`a') ---------------------------- ;; 3 ------------------------------ ----------------------------