Changeset 207408 in webkit
- Timestamp:
- Oct 17, 2016 9:19:10 AM (8 years ago)
- Location:
- trunk/Source/JavaScriptCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/ChangeLog
r207387 r207408 1 2016-10-16 Filip Pizlo <fpizlo@apple.com> 2 3 Air::IRC needs to place all Tmps on some worklist, even if they have no interference edges 4 https://bugs.webkit.org/show_bug.cgi?id=163509 5 6 Reviewed by Mark Lam. 7 8 The worklist building function in IRC skips temporaries that have no degree. This doesn't appear 9 to be necessary. This has been there since the original IRC commit. It hasn't caused bugs because 10 ordinarily, the only way to have a tmp with no degree is to not have any mention of that tmp. But 11 while working on bug 163371, I hit a crazy corner case where a temporary would have no 12 interference edges (i.e. no degree). Here's how it happens: 13 14 A spill tmp from a previous iteration of IRC may have no degree: imagine a tmp that is live 15 everywhere and interferes with everyone, but has one use like: 16 17 Move %ourTmp, %someOtherTmp 18 19 Where there are no other tmps live. After spill conversion, this may look like: 20 21 Move (ourSpill), %newTmp 22 Move %newTmp, %someOtherTmp 23 24 Of course, we'd rather not get this kind of spill code but it's totally possible because we now 25 have a bunch of random conditions under which we won't slap the spill address directly into the 26 Move. 27 28 After this happens, assuming that the only thing live was %someOtherTmp, we will have zero degree 29 for %newTmp because the Move is coalescable and does not contribute to interference. 30 31 Then, we might coalesce %someOtherTmp with %newTmp. Once this happens, if we make the %newTmp be 32 the master, we're in deep trouble because %newTmp is not on any worklist. 33 34 I don't know how to reproduce this except through the patch in bug 163371. Removing the two lines 35 of code that skipped no-degree tmps causes no regressions, and resolves the problem I was having. 36 37 * b3/air/AirIteratedRegisterCoalescing.cpp: 38 1 39 2016-10-15 Mark Lam <mark.lam@apple.com> 2 40 -
trunk/Source/JavaScriptCore/b3/air/AirIteratedRegisterCoalescing.cpp
r207004 r207408 89 89 for (IndexType i = firstNonRegIndex; i < m_degrees.size(); ++i) { 90 90 unsigned degree = m_degrees[i]; 91 if (!degree)92 continue;93 94 91 if (degree >= m_regsInPriorityOrder.size()) 95 92 addToSpill(i);
Note: See TracChangeset
for help on using the changeset viewer.