Re: Tools for instruction scheduling of POWER4 assembler code

Michael Meissner <mrmnews@the-meissners.org>
16 Jan 2004 22:54:40 -0500

          From comp.compilers

Related articles
Tools for instruction scheduling of POWER4 assembler code tommy.hoffner@ericsson.com (Tommy Hoffner) (2004-01-09)
Re: Tools for instruction scheduling of POWER4 assembler code mrmnews@the-meissners.org (Michael Meissner) (2004-01-16)
| List of all articles for this month |
From: Michael Meissner <mrmnews@the-meissners.org>
Newsgroups: comp.compilers
Date: 16 Jan 2004 22:54:40 -0500
Organization: Compilers Central
References: 04-01-032
Keywords: optimize, assembler
Posted-Date: 16 Jan 2004 22:54:39 EST

Tommy Hoffner <tommy.hoffner@ericsson.com> writes:


> Hey,
> I have a tool that generates assembler code that I use to evaluate some
> 64 bit platforms.
> I would like to schedule the code that comes out from my tool to get a
> feeling for what kind of perfomance gains I can get from scheduling the
> code. Making my tool generate scheduled code isn't really an option and
> all tools I found that does instruction scheduling assumes high level
> langueges as input. GNU as does no instruction scheduling and I doubt
> that gcc schedules inline assembler, so making my tool generate inline
> assembler statements will not help either.


Actually GCC 3.3 can schedule builtin functions. I see in looking at
the GCC sources, that there are builtin functions for the SPE and
Alitvec instructions. If your app is mostly using these instructions
as well as generic instructions, you could model it:


                int a, b, c;


                a = __builtin_spe_brinc (b, c);


Whether all of the instructions you use (generic instructions could
just be done with the standard C sequences), I don't know, but you
could always hack in any instructions you use. You will have to make
sure that all of the outputs are used, but that can be done with a
simple __asm__ that takes these as inputs, and produces an output,
used elsewhere and has no instructions.


> My tool generates thousands of lines of assembler so manually scheduling
> is definetly out of the question.
>
> I do not need the best scheduler possible, just something that could
> give a good hint on how much scheduling can give us in performance gains
> for our applications.
>
> It may not be combined with other optimizations/transformations (if they
> cannot be turned of or ripped out) since my generated code isn't
> modelling every aspect of our applications (it generates some defs
> without uses for instance, and I don't want those removed etc.)
>
> Anyone out there who knows of any tools that can help me schedule
> assembler (or machine code) for POWER4 for some quick and dirty tests.


Obviously a tool that does the assembler would be the best for your
app, but you might be able to retrofit gcc to do it.
--
Michael Meissner
email: mrmnews@the-meissners.org
http://www.the-meissners.org


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.