Pentium and second pipeline

Jan Hubicka hubicka@atrey.karlin.mff.cuni.cz
Tue Sep 15 07:06:00 GMT 1998


Hi
After looking at define_function_unit definitions in i386.md, it looks
like the old definition was wrong, since it didn't tell scheduler nothing
about second pipeline.
New definition seems to be very optimistic, since it tells scheduler,
that Pentium has two identical pipelines.
So I've decided that I should try to improve this definition and tell
scheduler more closely, how does the second pipeline look like just to
learn how does scheduling in gcc work.
It should force sheduler to interleave prefixed instructions with non
prefixed, so both pipelines are used.
I've decided to add attribute "simple" wich tells, whether instruction
is simple enought to go into second pipeline.

I've run into two problems. First is definition of pipeline. It looks
like there are two solutions:
define two integer units and set collision list for non-simple instructions
(so non-simple instructions colides with other non-simple, but don't with simple) 
This don't model the situation correctly, but should force scheduler to
interleave code. I've tried this at small example and it seems to sometimes
interleave and sometimes not, don't have idea why.

Another idea I got is to define two units (integeru and integerv)
and set some colision between (as far as I know, imul blocks both units)
but don't have any idea, if two units accepting same sort of instructions are
alowed and how will scheduler handle this.

Latest problem is the attribute "simple". It is quite easy to define for
SI aritmetic. Maybe it should be defined as "maybesimple" atribute, wich
is later set to "simple" in case instruction uses maximally one memory operand.
But problem is, that some instruction patterns (addhi3) sometimes generates
"simple" instructions and sometimes not with probability half to half.
Is there any way to avoid this? (use define_expand and rewrite this patterns
into multiple ones or use some constrains in set_attr part?)

Is there any other architecture with similar problems?

Honza
-- 
                       OK. Lets make a signature file.
+-------------------------------------------------------------------------+
|        Jan Hubicka (Jan Hubi\v{c}ka in TeX) hubicka@freesoft.cz         |
|         Czech free software foundation: http://www.freesoft.cz          |
|AA project - the new way for computer graphics - http://www.ta.jcu.cz/aa |
|  homepage: http://www.paru.cas.cz/~hubicka/ , games koules, Xonix, fast  |
|  fractal zoomer XaoS, index of Czech GNU/Linux/UN*X documentation etc.  | 
+-------------------------------------------------------------------------+



More information about the Gcc mailing list