Skip to content

Commit d6cc5ea

Browse files
committed
[JSC] Avoid calling hasNonArgEffects when unnecessary
https://bugs.webkit.org/show_bug.cgi?id=324716 rdar://188002873 Reviewed by Dan Hecht. hasNonArgEffects is costly operation. So calling it only when necessary. * Source/JavaScriptCore/b3/air/AirAllocateStackByGraphColoring.cpp: Canonical link: https://commits.webkit.org/321535@main
1 parent 7423b20 commit d6cc5ea

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎Source/JavaScriptCore/b3/air/AirAllocateStackByGraphColoring.cpp‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ class StackSlotActions {
149149
// A dead store candidate has no effects beyond its arguments and defines only spill
150150
// slots, late. That is the only kind of dead stack store this phase will see.
151151
// Later, we will check whether this spill is alive or not. And if it is dead, we will remove this Inst.
152-
bool isKillCandidate = !inst.hasNonArgEffects();
152+
bool isKillCandidate = true;
153153
lateActions.shrink(0);
154154
inst.forEachArg(
155155
[&](Arg& arg, Arg::Role role, Bank, Width) {
@@ -174,7 +174,7 @@ class StackSlotActions {
174174
});
175175
m_actions.appendVector(lateActions);
176176

177-
if (isKillCandidate)
177+
if (isKillCandidate && !inst.hasNonArgEffects())
178178
m_killCandidates.append(instIndex);
179179

180180
if (isCoalescableMove(inst, coalesceSpillSlots)) {

0 commit comments

Comments
 (0)