[PATCH] D21449: Target independent codesize heuristics for Loop Idiom Recognition

Sunita Marathe via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 16 19:34:38 PDT 2016


Sunita_Marathe added a comment.

The SPEC2000 results were obtained on Intel-64, SSE2.

There were 37 instances of
LIR avoidance:

  Idiom-unrelated    : 15   // Presence of idiom-unrelated non-stores in loop
  Large idiom count : 18
  Multi-block loop    :  1
  Non-legal stores    :  3   // Presence of non-legal stores in loop

Following are the Before/After code sizes of the affected functions in the affected benchmarks.

EQUAKE:

  main: 4508
  main: 4369

MESA:

  gl_read_index_span: 268
  gl_read_index_span: 182
  
  gl_depth_stencil_span: 368
  gl_depth_stencil_span: 302
  
  gl_depth_stencil_pixels: 371
  gl_depth_stencil_pixels: 304
  
  general_textured_triangle: 5437
  general_textured_triangle: 5329

GZIP:

  ct_init: 563
  ct_init: 467
  
  read_pt_len: 355
  read_pt_len: 328
  
  unlzh: 1035
  unlzh:  998

CRAFTY:

  Ponder: 1062
  Ponder: 1002
  
  SetBoard: 1202
  SetBoard: 1178
  
  InitializePieceMasks : 586
  InitializePieceMasks : 575

PARSER:

  stick_in_one_connector: 145
  stick_in_one_connector: 120

GCC:

  bc_init_mode_to_opcode_maps: 421
  bc_init_mode_to_opcode_maps: 288
  
  find_reg: 2774
  find_reg: 2748
  
  reload_as_needed: 12725
  reload_as_needed: 12642
  
  constrain_operands: 1892
  constrain_operands: 1881
  
  reload: 9678
  reload: 9650
  
  find_reloads: 11404

*find_reloads: 11418

PERLBMK:

  Perl_pp_formline: 3835
  Perl_pp_formline: 3732

GAP:

  SyHelp: 8054
  SyHelp: 7963
  
  InitList: 1306
  InitList: 1304
  
  FunTzSearchC: 4636

*FunTzSearchC: 4750

AMMP:

  eval: 6675
  eval: 6638
  
  bstrot: 2134

*bstrot: 2143

Could not compute codesize delta for following since these functions appear to
be optimized away in the code produced by both the reference and exprimental compilers:

GCC:

  ???? emit_reload_insns (MS 0, IC 4, NL n) : LIR avoided: large idiom count 4

GZIP:

  ???? read_c_len (MS 0, IC 1, NL y) : LIR avoided: idiom-unrelated instrs
  ???? decode_c (MS 0, IC 1, NL y) : LIR avoided: idiom-unrelated instrs
  ???? decode (MS 0, IC 1, NL y) : LIR avoided: idiom-unrelated instrs

NOTE: There were 3 cases where applying the heuristics had the effect of increasing,
instead of decreasing codesize, with GAP:FunTzSearchC showing the largest, +2.4%,
effect (the other 2 are +0.42% and +0.12%).
For GAP I did a brief analysis which seemed to show increased spilling.
The extra code size results primarily from extra spill/fill code, and
more memrefs involving rsp offsets >128 bytes.


Repository:
  rL LLVM

http://reviews.llvm.org/D21449





More information about the llvm-commits mailing list