Changeset 244579 in webkit for trunk/Source/JavaScriptCore/dfg/DFGLICMPhase.cpp
- Timestamp:
- Apr 23, 2019, 7:14:23 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/dfg/DFGLICMPhase.cpp
r242276 r244579 243 243 244 244 m_state.initializeTo(data.preHeader); 245 ASSERT(m_state.isValid()); 245 246 NodeOrigin originalOrigin = node->origin; 246 247 bool canSpeculateBlindly = !m_graph.hasGlobalExitSite(originalOrigin.semantic, HoistingFailed); … … 264 265 265 266 auto updateAbstractState = [&] { 267 auto invalidate = [&] (const NaturalLoop* loop) { 268 LoopData& data = m_data[loop->index()]; 269 data.preHeader->cfaDidFinish = false; 270 271 for (unsigned bodyIndex = loop->size(); bodyIndex--;) { 272 BasicBlock* block = loop->at(bodyIndex); 273 if (block != data.preHeader) 274 block->cfaHasVisited = false; 275 block->cfaDidFinish = false; 276 } 277 }; 278 266 279 // We can trust what AI proves about edge proof statuses when hoisting to the preheader. 267 280 m_state.trustEdgeProofs(); 268 for (unsigned i = 0; i < hoistedNodes.size(); ++i) 269 m_interpreter.execute(hoistedNodes[i]); 281 for (unsigned i = 0; i < hoistedNodes.size(); ++i) { 282 if (!m_interpreter.execute(hoistedNodes[i])) { 283 invalidate(loop); 284 return; 285 } 286 } 287 270 288 // However, when walking various inner loops below, the proof status of 271 289 // an edge may be trivially true, even if it's not true in the preheader … … 301 319 continue; 302 320 m_state.initializeTo(subPreHeader); 303 for (unsigned i = 0; i < hoistedNodes.size(); ++i) 304 m_interpreter.execute(hoistedNodes[i]); 321 for (unsigned i = 0; i < hoistedNodes.size(); ++i) { 322 if (!m_interpreter.execute(hoistedNodes[i])) { 323 invalidate(subLoop); 324 break; 325 } 326 } 305 327 } 306 328 };
Note:
See TracChangeset
for help on using the changeset viewer.