Changeset 250999 in webkit for trunk/Source/JavaScriptCore/b3
- Timestamp:
- Oct 10, 2019, 7:23:37 PM (6 years ago)
- Location:
- trunk/Source/JavaScriptCore/b3
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/b3/B3Bank.h
r250005 r250999 29 29 30 30 #include "B3Type.h" 31 #include "Reg.h" 31 32 32 33 namespace JSC { namespace B3 { … … 64 65 } 65 66 67 inline Bank bankForReg(Reg reg) 68 { 69 return reg.isGPR() ? GP : FP; 70 } 71 66 72 } } // namespace JSC::B3 67 73 -
trunk/Source/JavaScriptCore/b3/air/AirAllocateRegistersAndStackAndGenerateCode.cpp
r250176 r250999 46 46 { } 47 47 48 ALWAYS_INLINE void GenerateAndAllocateRegisters::checkConsistency() 49 { 50 #if !ASSERT_DISABLED 51 m_code.forEachTmp([&] (Tmp tmp) { 52 Reg reg = m_map[tmp].reg; 53 if (!reg) 54 return; 55 56 ASSERT(!m_availableRegs[tmp.bank()].contains(reg)); 57 ASSERT(m_currentAllocation->at(reg) == tmp); 58 }); 59 60 for (Reg reg : RegisterSet::allRegisters()) { 61 if (isDisallowedRegister(reg)) 62 continue; 63 64 Tmp tmp = m_currentAllocation->at(reg); 65 if (!tmp) { 66 ASSERT(m_availableRegs[bankForReg(reg)].contains(reg)); 67 continue; 68 } 69 70 ASSERT(!m_availableRegs[tmp.bank()].contains(reg)); 71 ASSERT(m_map[tmp].reg == reg); 72 } 73 #endif 74 } 75 48 76 void GenerateAndAllocateRegisters::buildLiveRanges(UnifiedTmpLiveness& liveness) 49 77 { … … 417 445 bool isReplayingSameInst = false; 418 446 for (size_t instIndex = 0; instIndex < block->size(); ++instIndex) { 447 checkConsistency(); 448 419 449 if (instIndex && !isReplayingSameInst) 420 450 startLabel = m_jit->labelIgnoringWatchpoints(); … … 445 475 return true; 446 476 477 // If we are doing a self move at the end of the temps liveness we can trivially elide the move. 478 if (source == dest) 479 return false; 480 447 481 Reg sourceReg = m_map[source.tmp()].reg; 448 482 // If the value is not already materialized into a register we may still move it into one so let the normal generation code run. … … 463 497 return false; 464 498 })(); 499 checkConsistency(); 465 500 466 501 inst.forEachArg([&] (Arg& arg, Arg::Role role, Bank, Width) { -
trunk/Source/JavaScriptCore/b3/air/AirAllocateRegistersAndStackAndGenerateCode.h
r250176 r250999 65 65 bool isDisallowedRegister(Reg); 66 66 67 void checkConsistency(); 68 67 69 Code& m_code; 68 70 CCallHelpers* m_jit { nullptr };
Note:
See TracChangeset
for help on using the changeset viewer.