diff options
| author | 2025-01-30 06:02:08 -0800 | |
|---|---|---|
| committer | 2025-01-30 06:02:08 -0800 | |
| commit | 15e3ad2439d0cc1ebe9d786087df6331e6bf1d34 (patch) | |
| tree | a6f7b2888c73b1dc52ded90f285a324349178128 /compiler/optimizing | |
| parent | d20301c26ba3058774f03cbb28dbae084a625206 (diff) | |
| parent | 63cde047113755a1de777120b68a42039e335868 (diff) | |
Optimize ValueSet::Kill am: 63cde04711
Original change: https://android-review.googlesource.com/c/platform/art/+/3469228
Change-Id: Ic6e8c8c89ee6b62d54b8a7bb88fe1742403a9c1d
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
Diffstat (limited to 'compiler/optimizing')
| -rw-r--r-- | compiler/optimizing/gvn.cc | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/compiler/optimizing/gvn.cc b/compiler/optimizing/gvn.cc index 8a5a4742ba..d088e02132 100644 --- a/compiler/optimizing/gvn.cc +++ b/compiler/optimizing/gvn.cc @@ -125,9 +125,13 @@ class ValueSet : public ArenaObject<kArenaAllocGvn> { // Removes all instructions in the set affected by the given side effects. void Kill(SideEffects side_effects) { - DeleteAllImpureWhich([side_effects](Node* node) { - return node->GetSideEffects().MayDependOn(side_effects); - }); + // Nothing to do if the side effects don't have any change bit set, as MayDependOn will always + // return false. + if (side_effects.HasSideEffects()) { + DeleteAllImpureWhich([side_effects](Node* node) { + return node->GetSideEffects().MayDependOn(side_effects); + }); + } } void Clear() { |