|
4 | 4 | <meta name="viewport" content="width=device-width, initial-scale=1.0">
|
5 | 5 | <title>AArch64 Cost model tests</title>
|
6 | 6 | <script>
|
7 |
| - document.addEventListener("DOMContentLoaded", function() { |
8 |
| - fetch("data-int.json") |
9 |
| - .then(response => response.json()) |
10 |
| - .then(json => drawTable(json, 'int')) |
11 |
| - .catch(reason => console.log(reason)); |
12 |
| - fetch("data-fp.json") |
13 |
| - .then(response => response.json()) |
14 |
| - .then(json => drawTable(json, 'fp')) |
15 |
| - .catch(reason => console.log(reason)); |
16 |
| - fetch("data-cast.json") |
17 |
| - .then(response => response.json()) |
18 |
| - .then(json => drawTable(json, 'cast')) |
19 |
| - .catch(reason => console.log(reason)); |
20 |
| - fetch("data-vec.json") |
21 |
| - .then(response => response.json()) |
22 |
| - .then(json => drawTable(json, 'vec')) |
| 7 | + function load(label, type) { |
| 8 | + fetch("data-" + label + type + ".json") |
| 9 | + .then(response => { |
| 10 | + if (!response.ok) { |
| 11 | + fetch("data-" + label + ".json") |
| 12 | + .then(reposonse => reposonse.json()) |
| 13 | + .then(json => drawTable(json, label)) |
| 14 | + .catch(reason => console.log(reason)); |
| 15 | + return Promise.reject() |
| 16 | + } |
| 17 | + return response.json() |
| 18 | + }) |
| 19 | + .then(json => drawTable(json, label)) |
23 | 20 | .catch(reason => console.log(reason));
|
| 21 | + } |
| 22 | + |
| 23 | + function reload(type) { |
| 24 | + load("int", type) |
| 25 | + load("fp", type) |
| 26 | + load("cast", type) |
| 27 | + load("vec", type) |
| 28 | + } |
| 29 | + |
| 30 | + document.addEventListener("DOMContentLoaded", function() { |
| 31 | + reload('') |
24 | 32 | });
|
25 | 33 |
|
26 | 34 | function drawTable(json, label) {
|
|
34 | 42 | tys.push(j.ty);
|
35 | 43 | });
|
36 | 44 |
|
37 |
| - var table = document.getElementById('table-'+label) |
| 45 | + const table = document.getElementById('table-'+label) |
38 | 46 | while (table.childNodes.length != 0)
|
39 | 47 | table.removeChild(table.childNodes[0]);
|
40 | 48 |
|
|
125 | 133 | code {
|
126 | 134 | font-family: Consolas,"courier new";
|
127 | 135 | }
|
| 136 | + button:focus { |
| 137 | + background: #c3c3c3; |
| 138 | + } |
128 | 139 | </style>
|
129 | 140 | </head>
|
130 | 141 | <body>
|
131 | 142 | <h1>Cost model tests</h1>
|
132 | 143 | <p>This attempts to compare the first-order output of the cost model compared to the measured codesize. It generates simple snippets of IR and compares the output of opt -passes=print<cost-model> -cost-kind=codesize and the assembly generated from llc. The assembly output of llc is sometimes filtered to remove loop invariant instructions.</p>
|
133 | 144 | <p>The table lists the difference between the two cost models (i.e. zero is good). Not all the scores are expected to match exactly. More details and the costs can be found by clicking on a table entry.</p>
|
| 145 | + <div style="display: flex border=10px;"> |
| 146 | + <button onclick="reload('')">Base</button> |
| 147 | + <button onclick="reload('-fullfp16')">FP16</button> |
| 148 | + <button onclick="reload('-sve2')">SVE</button> |
| 149 | + </div> |
134 | 150 | <h3>Integer diffs</h3>
|
135 | 151 | <div style="display: flex;">
|
136 | 152 | <div width="60%" style="flex: 0 0 60%;"><table id="table-int" class="dataframe" border="1"><th>Loading</th></table></div>
|
|
0 commit comments