<html>
<head>
<base href="https://bugs.webkit.org/" />
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW - Air::spillEverything and Air::iteratedRegisterCoalescing don't take into account Inst::extraClobberedRegs()"
href="https://bugs.webkit.org/show_bug.cgi?id=151146#c1">Comment # 1</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW - Air::spillEverything and Air::iteratedRegisterCoalescing don't take into account Inst::extraClobberedRegs()"
href="https://bugs.webkit.org/show_bug.cgi?id=151146">bug 151146</a>
from <span class="vcard"><a class="email" href="mailto:fpizlo@apple.com" title="Filip Pizlo <fpizlo@apple.com>"> <span class="fn">Filip Pizlo</span></a>
</span></b>
<pre>I think that both allocators want an abstraction like:
inst.forEachTmpIncludingExtra(
[&] (Tmp tmp, Arg::Role role, Arg::Type type) {
// tmp is not a reference, since we cannot edit an extraClobberedReg.
});
This could be implemented as:
template<typename Functor>
void forEachTmpIncludingExtra(const Functor& functor)
{
forEachTmp(
[&] (Tmp& tmp, Arg::Role role, Arg::Type type) {
functor(tmp, role, type);
});
if (hasSpecial()) {
extraClobberedRegs().forEach(
[&] (Reg reg) {
functor(Tmp(reg), Arg::Def, reg.isGPR() ? Arg::GP : Arg::FP);
});
}
}
Armed with such an abstraction, we could fix the bug by just changing which method the register allocators call when handling Def-to-Def interference.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>