[Webkit-unassigned] [Bug 151146] Air::spillEverything and Air::iteratedRegisterCoalescing don't take into account Inst::extraClobberedRegs()
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Wed Nov 11 11:58:09 PST 2015
https://bugs.webkit.org/show_bug.cgi?id=151146
--- Comment #1 from Filip Pizlo <fpizlo at apple.com> ---
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.
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-unassigned/attachments/20151111/df3863ec/attachment-0001.html>
More information about the webkit-unassigned
mailing list