[webkit-changes] [WebKit/WebKit] a64941: Add a hasTraps() check in B3::Value::effects()

Keith Miller noreply at github.com
Fri May 3 12:31:48 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: a649419b8cf4bc2d1b95dfc5c2ba17bf4310de8c
      https://github.com/WebKit/WebKit/commit/a649419b8cf4bc2d1b95dfc5c2ba17bf4310de8c
  Author: Keith Miller <keith_miller at apple.com>
  Date:   2024-05-03 (Fri, 03 May 2024)

  Changed paths:
    M Source/JavaScriptCore/b3/B3EliminateDeadCode.cpp
    M Source/JavaScriptCore/b3/B3Value.cpp

  Log Message:
  -----------
  Add a hasTraps() check in B3::Value::effects()
https://bugs.webkit.org/show_bug.cgi?id=273648
rdar://127458113

Reviewed by Yusuke Suzuki.

Some profiling of reduceStrength showed we spent a number of samples
in B3::Value::effects() checking traps(). But most B3 Kinds don't
ever have traps(). Since we just switched on the Kind we can use
`hasTraps()` hoist the traps() check into the cases that actually
use it.

* Source/JavaScriptCore/b3/B3EliminateDeadCode.cpp:
(JSC::B3::eliminateDeadCodeImpl):
* Source/JavaScriptCore/b3/B3Value.cpp:
(JSC::B3::Value::effects const):

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



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


More information about the webkit-changes mailing list