Goog test-cases for a new register allocator

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

Goog test-cases for a new register allocator

Leo Romanoff
Hi,

As I mentioned some time ago on the mailing list, I'm working on the
implementation of the Sarkar's Extended Linear Scan algorithm for LLVM.

For testing and debugging of this algorithm, I need some good
test-cases that check different functionalities of the register
allocator, e.g.:
 - test-cases involving a lot of spilling
 - test-cases using pre-colored registers, e.g. like the EAX register
used by the division instruction on X86
 - test-cases making use of different (partially aliasing)
register-classes at the same-time
 - test-cases where the caller-save vs callee-save choices of registers
play a big role.
 
I think these requirements are not specific for my allocator only, but
are important for checking any register allocator. May be someone
(Fernando? David? Evan?) who was working on register allocators has
found a good set of examples covering some of the topics? Or may be
someone knows good examples due to the fact that current register
allocators perform too bad on it? ;-)

Any help and ideas are appreciated!

Thanks,
- Roman



      Lesen Sie Ihre E-Mails jetzt einfach von unterwegs.
www.yahoo.de/go
_______________________________________________
LLVM Developers mailing list
[hidden email]         http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
Reply | Threaded
Open this post in threaded view
|

Re: Goog test-cases for a new register allocator

Fernando Magno Quintao Pereira

Hey, Roman,

     I have some tests that I used to debug my allocator. I will send them
to you in a separate e-mail.

best,

Fernando

> Hi,
>
> As I mentioned some time ago on the mailing list, I'm working on the
> implementation of the Sarkar's Extended Linear Scan algorithm for LLVM.
>
> For testing and debugging of this algorithm, I need some good
> test-cases that check different functionalities of the register
> allocator, e.g.:
> - test-cases involving a lot of spilling
> - test-cases using pre-colored registers, e.g. like the EAX register
> used by the division instruction on X86
> - test-cases making use of different (partially aliasing)
> register-classes at the same-time
> - test-cases where the caller-save vs callee-save choices of registers
> play a big role.
>
> I think these requirements are not specific for my allocator only, but
> are important for checking any register allocator. May be someone
> (Fernando? David? Evan?) who was working on register allocators has
> found a good set of examples covering some of the topics? Or may be
> someone knows good examples due to the fact that current register
> allocators perform too bad on it? ;-)
>
> Any help and ideas are appreciated!
>
> Thanks,
> - Roman
>
>
>
>      Lesen Sie Ihre E-Mails jetzt einfach von unterwegs.
> www.yahoo.de/go
> _______________________________________________
> LLVM Developers mailing list
> [hidden email]         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>
_______________________________________________
LLVM Developers mailing list
[hidden email]         http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
Reply | Threaded
Open this post in threaded view
|

Re: Goog test-cases for a new register allocator

dag-7
In reply to this post by Leo Romanoff
On Wednesday 02 April 2008 03:06, Roman Levenstein wrote:
> Hi,
>
> As I mentioned some time ago on the mailing list, I'm working on the
> implementation of the Sarkar's Extended Linear Scan algorithm for LLVM.

Cool!

> For testing and debugging of this algorithm, I need some good
> test-cases that check different functionalities of the register
> allocator, e.g.:
>  - test-cases involving a lot of spilling
>  - test-cases using pre-colored registers, e.g. like the EAX register
> used by the division instruction on X86
>  - test-cases making use of different (partially aliasing)
> register-classes at the same-time
>  - test-cases where the caller-save vs callee-save choices of registers
> play a big role.
>
> I think these requirements are not specific for my allocator only, but
> are important for checking any register allocator. May be someone
> (Fernando? David? Evan?) who was working on register allocators has
> found a good set of examples covering some of the topics? Or may be
> someone knows good examples due to the fact that current register
> allocators perform too bad on it? ;-)

I've found the NAS Parallel Benchmarks to be quite a good workout:

http://www.nas.nasa.gov/Resources/Software/npb.html

They are medium-sized benchmarks, so substantial without being totally
overwhelming.  They manifest pretty much all of your points above.  The
basic linear scan algorithm seems to do fairly well on them so it makes
for a good comparison.

I use version 2.3, the serial flavor (yes, I understand the irony :) ).

                                                 -Dave
_______________________________________________
LLVM Developers mailing list
[hidden email]         http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
Reply | Threaded
Open this post in threaded view
|

Re: Goog test-cases for a new register allocator

dag-7
On Wednesday 02 April 2008 18:47, David Greene wrote:

> I've found the NAS Parallel Benchmarks to be quite a good workout:

Of course, this is with our optimizer, which does an amazingly good job
of creating register pressure.  :)

YMMV.

                                                   -Dave
_______________________________________________
LLVM Developers mailing list
[hidden email]         http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
Reply | Threaded
Open this post in threaded view
|

Re: Goog test-cases for a new register allocator

Chris Lattner
In reply to this post by dag-7
On Apr 2, 2008, at 4:47 PM, David Greene wrote:

>> I think these requirements are not specific for my allocator only,  
>> but
>> are important for checking any register allocator. May be someone
>> (Fernando? David? Evan?) who was working on register allocators has
>> found a good set of examples covering some of the topics? Or may be
>> someone knows good examples due to the fact that current register
>> allocators perform too bad on it? ;-)
>
> I've found the NAS Parallel Benchmarks to be quite a good workout:
>
> http://www.nas.nasa.gov/Resources/Software/npb.html
>
> They are medium-sized benchmarks, so substantial without being totally
> overwhelming.  They manifest pretty much all of your points above.  
> The
> basic linear scan algorithm seems to do fairly well on them so it  
> makes
> for a good comparison.
>
> I use version 2.3, the serial flavor (yes, I understand the  
> irony :) ).

Could these be added to llvm-test?

-Chris
_______________________________________________
LLVM Developers mailing list
[hidden email]         http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
Reply | Threaded
Open this post in threaded view
|

Re: Goog test-cases for a new register allocator

Owen Anderson-2
On Apr 2, 2008, at 9:58 PM, Chris Lattner wrote:
>
> Could these be added to llvm-test?
>
> -Chris

I just added the two C benchmarks as MultiSource/Benchmarks/NPB-serial.

--Owen
_______________________________________________
LLVM Developers mailing list
[hidden email]         http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev

smime.p7s (3K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Goog test-cases for a new register allocator

Chris Lattner

On Apr 2, 2008, at 10:00 PM, Owen Anderson wrote:

> On Apr 2, 2008, at 9:58 PM, Chris Lattner wrote:
>>
>> Could these be added to llvm-test?
>>
>> -Chris
>
> I just added the two C benchmarks as MultiSource/Benchmarks/NPB-
> serial.

Nice, thanks!

-Chris
_______________________________________________
LLVM Developers mailing list
[hidden email]         http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
Reply | Threaded
Open this post in threaded view
|

Re: Goog test-cases for a new register allocator

Duncan Sands
In reply to this post by Owen Anderson-2
> I just added the two C benchmarks as MultiSource/Benchmarks/NPB-serial.

Since llvm-gcc can compile fortran now, how about adding the rest of
the benchmarks too?

Ciao,

Duncan.
_______________________________________________
LLVM Developers mailing list
[hidden email]         http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
Reply | Threaded
Open this post in threaded view
|

Re: Goog test-cases for a new register allocator

Leo Romanoff
In reply to this post by dag-7
Hi everyone,

Thanks for all answers, proposals and test-cases I got for testing my
Extended Linear Scan register allocator.

Special thanks to Fernando and David for providing very concrete
test-cases and scripts!

-Roman

--- David Greene <[hidden email]> schrieb:

> On Wednesday 02 April 2008 03:06, Roman Levenstein wrote:
> > Hi,
> >
> > As I mentioned some time ago on the mailing list, I'm working on
> the
> > implementation of the Sarkar's Extended Linear Scan algorithm for
> LLVM.
>
> Cool!
>
> > For testing and debugging of this algorithm, I need some good
> > test-cases that check different functionalities of the register
> > allocator, e.g.:
> >  - test-cases involving a lot of spilling
> >  - test-cases using pre-colored registers, e.g. like the EAX
> register
> > used by the division instruction on X86
> >  - test-cases making use of different (partially aliasing)
> > register-classes at the same-time
> >  - test-cases where the caller-save vs callee-save choices of
> registers
> > play a big role.
> >
> > I think these requirements are not specific for my allocator only,
> but
> > are important for checking any register allocator. May be someone
> > (Fernando? David? Evan?) who was working on register allocators has
> > found a good set of examples covering some of the topics? Or may be
> > someone knows good examples due to the fact that current register
> > allocators perform too bad on it? ;-)
>
> I've found the NAS Parallel Benchmarks to be quite a good workout:
>
> http://www.nas.nasa.gov/Resources/Software/npb.html
>
> They are medium-sized benchmarks, so substantial without being
> totally
> overwhelming.  They manifest pretty much all of your points above.
> The
> basic linear scan algorithm seems to do fairly well on them so it
> makes
> for a good comparison.
>
> I use version 2.3, the serial flavor (yes, I understand the irony :)
> ).
>
>                                                  -Dave
> _______________________________________________
> LLVM Developers mailing list
> [hidden email]         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>



      Lesen Sie Ihre E-Mails jetzt einfach von unterwegs.
www.yahoo.de/go
_______________________________________________
LLVM Developers mailing list
[hidden email]         http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev