RFA: patch modifying ColdFire, power4, an power5 pipeline descriptions

Vladimir Makarov vmakarov@redhat.com
Mon Mar 30 22:36:00 GMT 2009


  Alex Turjan found that genautomata.c can generate 2 and more
automata which behaves inequivalently to single automaton.  If you
need more details please look at the thread starting with

http://gcc.gnu.org/ml/gcc/2009-02/msg00396.html

  The patch adds correct unit distribution checking.  After checking
all pipeline descriptions in the trunk, I found that 3
descriptions are incorrect:

  coldfire
  power4
  power5

Coldfire description is fixed very easy by removing one automata.
Unfortunately power descriptions can not be fixed this way because
removing any automaton and assigning its units to the rest automata
would generate a huge automata (I stoped their building after half
hour).  Therefore I modified some insn reservations focusing on most
important pipeline hazards (like insn issuing or long unit
reservations e.g. for multiplications and divisions).  I've checked
the result on SPEC2000 benchmark and

o I did not find code difference for power5 (-mtune=power5).

o The code for power4 (-mtune=power4) was different but the resulted
  SPEC score was practically the same.  SPEC2000 score was obtained on
  a 1GHz power4 server.

Here is the patch.  The patch also fixes a lot of formating issues and
a bug which permitted correct genautomata exit code when an error is
found in checking unit distribution.

I just need an approval for coldfire, power4, power5 descriptions.  Is 
it ok?


2009-03-30 Vladimir Makarov <vmakarov@redhat.com>

    * genautomata.c: Put blank after comma.
    (automaton_decls): New.
    (struct unit_usage): Add comments to member next.
    (store_alt_unit_usage): Keep the list ordered.
    (unit_present_on_list_p, equal_alternatives_p): New.
    (check_regexp_units_distribution): Check units distribution
    correctness correctly.
    (main): Don't write automata if error is found.  Return correct
    exit code.
    
    * config/m68k/cf.md (cfv4_ds): Remove.
    (cfv4_pOEP1, cfv4_sOEP1, cfv4_pOEP2,cfv4_sOEP2, cfv4_pOEP3,
    cfv4_sOEP3): Assign to cfv4_oep instead of cfv4_ds.

    * config/rs6000/power4.md (lsuq_power4, iq_power4, fpq_power4,
    power4-load-ext, power4-store, power4-store-update,
    power4-fpstore, power4-fpstore-update, power4-two, power4-three,
    power4-insert, power4-compare, power4-lmul-cmp, power4-imul-cmp,
    power4-lmul, , power4-imul, power4-imul3, power4-sdiv,
    power4-sqrt, power4-isync): Modify reservation to make correct
    unit distribution to automata.

    * config/rs6000/power5.md (iq_power5, fpq_power5, power5-store,
    power5-store-update, power5-two, power5-three, power5-lmul,
    power5-imul, power5-imul3, power5-sdiv, power5-sqrt): Ditto.
    

-------------- next part --------------
A non-text attachment was scrubbed...
Name: unit-automata-distribution-check.patch
Type: text/x-patch
Size: 52516 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20090330/9518f3c7/attachment.bin>


More information about the Gcc-patches mailing list