[PATCH] D29870: [InlineCost] Increase the cost of Switch

Haicheng Wu via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Feb 12 12:48:02 PST 2017


haicheng added a comment.

Here is the data I have for the current implementation collected from AArch64.  Only benchmarks impacted are listed.

SPEC2000

|         | Performance (+ is better) | Code Size (- is better) |
| vortex  | +8.22%                    | -7.63%                  |
| perlbmk | +2.39%                    | 0.00%                   |
| twolf   | +1.46%                    | 0.00%                   |
| crafty  | +1.42%                    | 0.00%                   |
| gcc     | -0.52%                    | +0.01%                  |
| mesa    | -0.92%                    | 0.00%                   |

SPEC2006

|           | Performance (+ is better) | Code Size (- is better) |
| povray    | +1.09%                    | 0.00%                   |
| soplex    | +0.75%                    | 0.00%                   |
| xalancbmk | +0.41%                    | 0.00%                   |
| hmmer     | +0.09%                    | -1.21%                  |
| dealII    | +0.06%                    | 0.00%                   |
| omnetpp   | 0.00%                     | 0.00%                   |
| sjeng     | -0.08%                    | 0.00%                   |
| h264ref   | -0.10%                    | 0.00%                   |
| gcc       | -0.20%                    | -0.70%                  |
| perlbench | -0.31%                    | 0.00%                   |

LLVM Test suite

|                  | Performance (+ is better) | Code Size (- is better) |
| kc               | +3.00%                    | 0.00%                   |
| sqlite3          | +2.80%                    | 0.00%                   |
| siod             | +1.44%                    | 0.00%                   |
| consumer-typeset | 0.85%                     | 0.00%                   |
| SIBsim4          | +0.73%                    | 0.00%                   |
| lua              | +0.28%                    | 0.00%                   |
| automotive-susan | 0.00%                     | 0.00%                   |
| consumer-jpeg    | 0.00%                     | 0.00%                   |
| cjpeg            | 0.00%                     | 0.00%                   |
| 7zip             | -0.20%                    | 0.00%                   |
| lencod           | -0.25%                    | 0.00%                   |

It seems give switch bigger penalty is a good thing.


Repository:
  rL LLVM

https://reviews.llvm.org/D29870





More information about the llvm-commits mailing list