<html>
<head>
<base href="https://llvm.org/bugs/" />
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW --- - Investigate re-enabling GlobalMerge at -O<3"
href="https://llvm.org/bugs/show_bug.cgi?id=23579">23579</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Investigate re-enabling GlobalMerge at -O<3
</td>
</tr>
<tr>
<th>Product</th>
<td>libraries
</td>
</tr>
<tr>
<th>Version</th>
<td>trunk
</td>
</tr>
<tr>
<th>Hardware</th>
<td>PC
</td>
</tr>
<tr>
<th>OS</th>
<td>All
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>normal
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>Common Code Generator Code
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>ahmed.bougacha@gmail.com
</td>
</tr>
<tr>
<th>CC</th>
<td>llvmbugs@cs.uiuc.edu
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr></table>
<p>
<div>
<pre>Some time ago, I downgraded GlobalMerge to only run at
-O3/CodeGenOpt::Aggressive, pending improvements.
Let's use this as the umbrella PR for said improvements:
- The first landed in r235249; it conservatively avoided merging globals that
were never used with other globals (and that are obviously unprofitable to
merge).
- One of the other changes I looked into was to group globals by use in
functions or basic blocks, with a cost model that takes into account usage
count. Neither was good enough, so this needs more investigation.
- Also, the cost model should take into account optsize/minsize (on ARM more
than on AArch64).
- Recently, as part of the subtarget changes, the maximum offset was changed to
the most conservative value (127 on ARM); similarly to minsize, this should
also take into account the per-function subtarget.
- On the implementation side, GlobalMerge runs in its initialization, because
of debug info issues. We should also fix that, to un-block the const global
merging flag.
- Yet another issue is the lack of proper option-passing machinery, especially
for LTO.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are on the CC list for the bug.</li>
</ul>
</body>
</html>