]> git.sesse.net Git - stockfish/commitdiff
Remove unneeded bitboard from MP
authorMiguel Lahoz <miguel_lahoz@protonmail.com>
Sun, 2 Apr 2023 09:28:39 +0000 (17:28 +0800)
committerJoost VandeVondele <Joost.VandeVondele@gmail.com>
Wed, 5 Apr 2023 06:10:34 +0000 (08:10 +0200)
Recent simplification has removed the need for an extra bitboard in MP struct.
Use a local variable instead.

STC: Passed Non-regression test
https://tests.stockfishchess.org/tests/view/64294ae677ff3301150cba16
LLR: 2.96 (-2.94,2.94) <-1.75,0.25>
Total: 64872 W: 17383 L: 17203 D: 30286
Ptnml(0-2): 179, 6675, 18546, 6859, 177

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

No functional change.

src/movepick.cpp
src/movepick.h

index 36ee46b50f08302a52e2fc22b6aff8a03c887cd8..6fbcb2c3d2fec925078b7a9717080d0a3dd6f90b 100644 (file)
@@ -69,7 +69,6 @@ MovePicker::MovePicker(const Position& p, Move ttm, Depth d, const ButterflyHist
 
   stage = (pos.checkers() ? EVASION_TT : MAIN_TT) +
           !(ttm && pos.pseudo_legal(ttm));
-  threatenedPieces = 0;
 }
 
 /// MovePicker constructor for quiescence search
@@ -106,7 +105,7 @@ void MovePicker::score() {
 
   static_assert(Type == CAPTURES || Type == QUIETS || Type == EVASIONS, "Wrong type");
 
-  [[maybe_unused]] Bitboard threatenedByPawn, threatenedByMinor, threatenedByRook;
+  [[maybe_unused]] Bitboard threatenedByPawn, threatenedByMinor, threatenedByRook, threatenedPieces;
   if constexpr (Type == QUIETS)
   {
       Color us = pos.side_to_move();
index b6c073782408e9b730bd8bd2c006f748ec4c1a29..0b44557f1989c8f5df287551a033379192bd14f9 100644 (file)
@@ -131,8 +131,6 @@ public:
   MovePicker(const Position&, Move, Value, const CapturePieceToHistory*);
   Move next_move(bool skipQuiets = false);
 
-  Bitboard threatenedPieces;
-
 private:
   template<PickType T, typename Pred> Move select(Pred);
   template<GenType> void score();