← Back to Pull requests

[Snippets][CPU][ARM] Remove unused callee saved register #38609

Merged
aobolensk merged 2 files (21 lines) on Oct 10, 2026 02:31 UTC
View on GitHub
aobolensk aobolensk commented on Oct 05, 2026 19:21 UTC
Author

Details:


Dead code removal

Tickets:


- N/A

AI Assistance:


- AI assistance used: yes
- Dead code detection was performed by AI and then verified manually

Diff: 21 lines (+1 / -20) across 2 files Reviewer: v-Golubev Review duration: 6190m
All Vouch review confidence checks passed
Residual risk 0.04 = Change Risk (0.23) × (1 − Review Confidence (0.82)). Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.23 · 21 lines diff across 2 files
0.23
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.80 · 5 substantive comment(s)
0.80
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 50%
82%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size diff_size
0.185
Real PR Conversation Timeline
9 items
aobolensk aobolensk commented on Oct 05, 2026 19:21 UTC
Author

@v-Golubev please take a look

v-Golubev v-Golubev commented on code on Oct 06, 2026 16:22 UTC
Code Review
src/plugins/intel_cpu/src/emitters/snippets/aarch64/jit_binary_call_emitter.cpp:1
@@ -99,14 +94,6 @@ void jit_binary_call_emitter::init_binary_call_regs(size_t num_binary_args,
         m_regs_to_spill.emplace(snippets::RegType::gpr, call_reg);
     }
 
-    // Allocate callee-saved register (X19-X28) for stack alignment
-    auto callee_reg = find_available(19, 29);
-    OV_CPU_JIT_EMITTER_ASSERT(callee_reg != SIZE_MAX, "No available callee-saved register");
-    m_callee_saved_reg = Xbyak_aarch64::XReg(static_cast<int>(callee_reg));
-    if (m_regs_to_spill.find({snippets::RegType::gpr, callee_reg}) == m_regs_to_spill.end()) {
-        m_regs_to_spill.emplace(snippets::RegType::gpr, callee_reg);
-    }

Could you explain why we don't need this code anymore? It is a part of the existing method, which is used across the codebase

allnes allnes commented on Oct 06, 2026 19:21 UTC
Contributor

build_jenkins

aobolensk aobolensk commented on code on Oct 08, 2026 03:04 UTC
Code Review
src/plugins/intel_cpu/src/emitters/snippets/aarch64/jit_binary_call_emitter.cpp:1
@@ -99,14 +94,6 @@ void jit_binary_call_emitter::init_binary_call_regs(size_t num_binary_args,
         m_regs_to_spill.emplace(snippets::RegType::gpr, call_reg);
     }
 
-    // Allocate callee-saved register (X19-X28) for stack alignment
-    auto callee_reg = find_available(19, 29);
-    OV_CPU_JIT_EMITTER_ASSERT(callee_reg != SIZE_MAX, "No available callee-saved register");
-    m_callee_saved_reg = Xbyak_aarch64::XReg(static_cast<int>(callee_reg));
-    if (m_regs_to_spill.find({snippets::RegType::gpr, callee_reg}) == m_regs_to_spill.end()) {
-        m_regs_to_spill.emplace(snippets::RegType::gpr, callee_reg);
-    }

no aarch64 caller used get_callee_saved_reg() and we don't use these registers (anymore? I'm not sure if we were using them before). Stack alignment is done through SP

v-Golubev v-Golubev commented on code on Oct 09, 2026 13:26 UTC
Code Review
src/plugins/intel_cpu/src/emitters/snippets/aarch64/jit_binary_call_emitter.cpp:1
@@ -99,14 +94,6 @@ void jit_binary_call_emitter::init_binary_call_regs(size_t num_binary_args,
         m_regs_to_spill.emplace(snippets::RegType::gpr, call_reg);
     }
 
-    // Allocate callee-saved register (X19-X28) for stack alignment
-    auto callee_reg = find_available(19, 29);
-    OV_CPU_JIT_EMITTER_ASSERT(callee_reg != SIZE_MAX, "No available callee-saved register");
-    m_callee_saved_reg = Xbyak_aarch64::XReg(static_cast<int>(callee_reg));
-    if (m_regs_to_spill.find({snippets::RegType::gpr, callee_reg}) == m_regs_to_spill.end()) {
-        m_regs_to_spill.emplace(snippets::RegType::gpr, callee_reg);
-    }

We didn't use them before, this code appeared as copy-paste from X64 arch where callee_saved reg is used for rsp align. We do not need it for ARM, so I agree to remove it from here

v-Golubev v-Golubev approved these changes on Oct 09, 2026 13:26 UTC
Approved Reviewer

Approved these changes.

v-Golubev v-Golubev commented on Oct 09, 2026 14:23 UTC
Contributor

build_jenkins

v-Golubev v-Golubev commented on Oct 09, 2026 22:50 UTC
Contributor

build_jenkins

Reviewers
Assignees
aobolensk aobolensk
Labels
risk: low confidence: 82.1% reviewed
Vouch Risk Breakdown
AI-powered review risk analysis
Change Risk
Change Risk · Model 1 (XGBoost)
Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
Score: 22.9% (LOW) · Higher = larger blast radius
22.9%
Review Confidence
Review Confidence · Models 2 & 3
Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
Score: 82.1% · Lower = rushed or shallow review
82.1%
Residual Risk
Residual Risk · Core Equation
Residual = Change × (1 − Confidence)
Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
Score: 4.1% · Safe to merge
4.1%