Remove unused code from the post NNUE accumulator merge

After merging the HalfKA and Threats accumulators (7c7fe322) and the
subsequent removal of the double-incremental/fused update, a number of
NNUE helpers and fields became unreachable. Each was verified to have
zero callers/readers across the source tree:

- FusedUpdateData logic in FullThreats: the fused-update branch of
  append_changed_indices and the FusedUpdateData parameter are unused;
  the accumulator update no longer passes fused data.
- FullThreats::requires_refresh: never called. The live king-bucket
  refresh check is HalfKAv2_hm::requires_refresh (PSQFeatureSet), used
  in nnue_accumulator.
- HalfKAv2_hm::append_active_indices: never called. The live
  active-index builder is FullThreats::append_active_indices
  (ThreatFeatureSet).
- DirtyThreats::us, prevKsq and ksq: written in do_move but only read by
  the now-removed FullThreats::requires_refresh. Removing them also
  drops three stores from the do_move path.
- Unused feature Name constants and the unused FtOneVal / HiddenMaxVal
  constants in nnue_common.h.
- Two stale feature-header banner comments.

closes https://github.com/official-stockfish/Stockfish/pull/6898

No functional change
This commit is contained in:
zungur
2026-06-14 09:58:13 +02:00
committed by Disservin
parent 6e4e03fd28
commit ed8e35d759
8 changed files with 12 additions and 93 deletions
+4 -8
View File
@@ -862,12 +862,10 @@ void Position::do_move(Move m,
Piece pc = piece_on(from);
Piece captured = m.type_of() == EN_PASSANT ? make_piece(them, PAWN) : piece_on(to);
dp.pc = pc;
dp.from = from;
dp.to = to;
dp.add_sq = SQ_NONE;
dts.us = us;
dts.prevKsq = square<KING>(us);
dp.pc = pc;
dp.from = from;
dp.to = to;
dp.add_sq = SQ_NONE;
assert(color_of(pc) == us);
assert(captured == NO_PIECE || color_of(captured) == (m.type_of() != CASTLING ? them : us));
@@ -1080,8 +1078,6 @@ void Position::do_move(Move m,
}
}
dts.ksq = square<KING>(us);
assert(pos_is_ok());
assert(dp.pc != NO_PIECE);