Re: [perl #36045] [PATCH]Loop Improvements

0 views
Skip to first unread message

Leopold Toetsch

unread,
May 31, 2005, 4:19:05 AM5/31/05
to perl6-i...@perl.org
Curtis Rawls (via RT) wrote:

> This patch makes improvements to the loop struct.

Thanks, applied - r8219

BTW: would you like to take a look at the register allocator?

It works but consumes enormous amounts of resources for e.g. Dan's Evil
Subs[1]. I've here an IIRC slightly modfied version of Bill's original
patch, which I could sync to current Parrot.

I think that first we should split (for some register count bigger then
a threshold) the register allocation into 4 passes, one for each
register kind. That should reduce resource usage immediately. But I'm
not an expert here.

[1] See e.g. [perl #32418] ff - original patch by Bill Coffman

leo

Dan Sugalski

unread,
May 31, 2005, 12:09:05 PM5/31/05
to perl6-i...@perl.org
At 10:19 AM +0200 5/31/05, Leopold Toetsch wrote:
>Curtis Rawls (via RT) wrote:
>
>>This patch makes improvements to the loop struct.
>
>Thanks, applied - r8219
>
>BTW: would you like to take a look at the register allocator?
>
>It works but consumes enormous amounts of resources for e.g. Dan's
>Evil Subs[1]. I've here an IIRC slightly modfied version of Bill's
>original patch, which I could sync to current Parrot.

When patches that improve assembly time of Big Evil code go in, feel
free to ping me and I'll give things a whirl. I'm not generally
keeping up to date with parrot builds on the system I'm doing my dev
work on, so it can be a while before I notice. ("While" here being a
month or more sometimes)

Believe me, speeding up compile times would make Dan a Happy Camper(tm) :)
--
Dan

--------------------------------------it's like this-------------------
Dan Sugalski even samurai
d...@sidhe.org have teddy bears and even
teddy bears get drunk

Bob Rogers

unread,
May 31, 2005, 7:46:22 PM5/31/05
to Dan Sugalski, perl6-i...@perl.org
From: Dan Sugalski <d...@sidhe.org>
Date: Tue, 31 May 2005 12:09:05 -0400

At 10:19 AM +0200 5/31/05, Leopold Toetsch wrote:
>Curtis Rawls (via RT) wrote:
>
>>This patch makes improvements to the loop struct.
>
>Thanks, applied - r8219
>
>BTW: would you like to take a look at the register allocator?
>
>It works but consumes enormous amounts of resources for e.g. Dan's
>Evil Subs[1]. I've here an IIRC slightly modfied version of Bill's
>original patch, which I could sync to current Parrot.

I've noticed quadratic (or worse) compile speed, too. I have a hairy
case of only 1000 lines that takes around 5sec to compile; it includes a
700-line @load sub with 450+ $Pxx variables. It goes around the
compute_spilling_costs / order_spilling loop in imc_reg_alloc some 120
times before it decides it's done, but I didn't have the time to look
farther. (r8203.)

Believe me, speeding up compile times would make Dan a Happy Camper(tm) :)
--
Dan

Me, too. ;-}

-- Bob Rogers
http://rgrjr.dyndns.org/

Curtis Rawls

unread,
May 31, 2005, 11:28:40 PM5/31/05
to perl6-i...@perl.org
At 10:19 AM +0200 5/31/05, Leopold Toetsch wrote:
>Curtis Rawls (via RT) wrote:
>
>>This patch makes improvements to the loop struct.
>
>Thanks, applied - r8219
>
>BTW: would you like to take a look at the register allocator?
>
>It works but consumes enormous amounts of resources for e.g. Dan's
>Evil Subs[1]. I've here an IIRC slightly modfied version of Bill's
>original patch, which I could sync to current Parrot.

Yeah, I'd like to take a crack or two at it. Could someone(s) send me
some tests, such as Dan's Evil code? And also any in-progress
patches? Thanks!

-Curtis Rawls

Leopold Toetsch

unread,
Jun 1, 2005, 4:50:10 AM6/1/05
to Curtis Rawls, perl6-i...@perl.org
Curtis Rawls <cgr...@gmail.com> wrote:
> At 10:19 AM +0200 5/31/05, Leopold Toetsch wrote:

>>BTW: would you like to take a look at the register allocator?

> Yeah, I'd like to take a crack or two at it. Could someone(s) send me


> some tests, such as Dan's Evil code?

Great. Dan is AFAIK following this thread. If he missed this mail,
please mail directly to him.

> ... And also any in-progress
> patches? Thanks!

I've checked in the resynced work of Bill Coffman as:

imcc/reg_alloc_bc.c

You can adjust the Makefile locally or just swap the 2 files. I didn't
look further at the two failing tests - could be some semi-illegal
explicit register usage around sub calls.

> -Curtis Rawls

leo

Dan Sugalski

unread,
Jun 1, 2005, 8:28:56 AM6/1/05
to Curtis Rawls, perl6-i...@perl.org

Let me double-check at work to make sure it's OK, and if so I'll send
it on. (There was a program to generate test programs posted a few
months back that you might want to go digging in the archives for. I
think Clint Pierce did it, but it's early and my memory's not
cooperating at the moment)

Reply all
Reply to author
Forward
0 new messages