Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 5821b05faa72aa3be5a4e4af7d2e39e0339736aa
      
https://github.com/WebKit/WebKit/commit/5821b05faa72aa3be5a4e4af7d2e39e0339736aa
  Author: Yusuke Suzuki <[email protected]>
  Date:   2026-08-12 (Wed, 12 Aug 2026)

  Changed paths:
    M Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj
    M Source/JavaScriptCore/b3/air/AirAllocateRegistersByGreedy.cpp
    A Source/JavaScriptCore/b3/air/AirInstAnalyzer.h
    M Source/JavaScriptCore/b3/air/AirTmpWidth.cpp
    M Source/JavaScriptCore/b3/air/AirTmpWidth.h
    M Source/JavaScriptCore/b3/air/AirTmpWidthInlines.h
    M Source/JavaScriptCore/b3/air/AirUseCounts.h

  Log Message:
  -----------
  [JSC] Introduce AirInstAnalyzer
https://bugs.webkit.org/show_bug.cgi?id=321637
rdar://184764993

Reviewed by Yijia Huang.

We have several analysis which scans entire Air graph and populating the
analysis result. But scanning the graph multiple times is really costly
since typically Air graph is large so each analysis blows out the cache.

This patch decouples analysis and data and introducing Air::InstAnalyzer
mechanism. Now TmpWidth and UseCounts are having TmpWidth::Builder and
UseCounts::Builder, and each builder implements InstAnalyzer interface
e.g. visitTmp. And then analyzeCode scans the graph once and invoking
each analyzer to populate the information.

This patterns is currently designed for the analysis which does not
mutate the Air::Graph in the middle (as it is saying "analyzer", not
"reducer" etc.).

* Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj:
* Source/JavaScriptCore/b3/air/AirAllocateRegistersByGreedy.cpp:
(JSC::B3::Air::Greedy::GreedyAllocator::m_insertionSets):
(JSC::B3::Air::Greedy::GreedyAllocator::validateFusedAnalyses):
(JSC::B3::Air::Greedy::GreedyAllocator::m_tmpWidth): Deleted.
* Source/JavaScriptCore/b3/air/AirInstAnalyzer.h: Added.
(JSC::B3::Air::InstAnalyzer::run):
(JSC::B3::Air::InstAnalyzer::prepare):
(JSC::B3::Air::InstAnalyzer::startBlock):
(JSC::B3::Air::InstAnalyzer::visitInst):
(JSC::B3::Air::InstAnalyzer::visitTmp):
(JSC::B3::Air::InstAnalyzer::finish):
(JSC::B3::Air::analyzeCode):
* Source/JavaScriptCore/b3/air/AirTmpWidth.cpp:
(JSC::B3::Air::TmpWidth::TmpWidth):
(JSC::B3::Air::TmpWidth::recompute):
(JSC::B3::Air::TmpWidth::fixpointMoves):
(JSC::B3::Air::TmpWidth::recomputeBoth): Deleted.
* Source/JavaScriptCore/b3/air/AirTmpWidth.h:
* Source/JavaScriptCore/b3/air/AirTmpWidthInlines.h:
* Source/JavaScriptCore/b3/air/AirUseCounts.h:
(JSC::B3::Air::UseCounts::UseCounts):

Canonical link: https://commits.webkit.org/319088@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications

Reply via email to