Summary: | Air::spillEverything and Air::iteratedRegisterCoalescing don't take into account Inst::extraClobberedRegs() | ||
---|---|---|---|
Product: | WebKit | Reporter: | Filip Pizlo <fpizlo> |
Component: | JavaScriptCore | Assignee: | Nobody <webkit-unassigned> |
Status: | RESOLVED DUPLICATE | ||
Severity: | Normal | CC: | barraclough, benjamin, ggaren, mark.lam, mhahnenb, msaboff, nrotem, oliver, saam, sam |
Priority: | P2 | ||
Version: | WebKit Nightly Build | ||
Hardware: | All | ||
OS: | All | ||
Bug Depends on: | |||
Bug Blocks: | 150279 |
Description
Filip Pizlo
2015-11-11 11:48:08 PST
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. Fixed in https://bugs.webkit.org/show_bug.cgi?id=151246 *** This bug has been marked as a duplicate of bug 151246 *** |