[BOLT] Fix pseudo calculation in BinaryBasicBlock

Summary:
A recent commit broke our tests because it was depending on
getNumNonPseudos() at a very late stage of our optimization pipeline.
The problem was in a instruction deletion member function in
BinaryBasicBlock that was not updating the number of pseudos after
deletion. Fix this.

(cherry picked from FBD9305972)
This commit is contained in:
Rafael Auler 2018-08-13 14:36:38 -07:00 committed by Maksim Panchenko
parent b2382dc552
commit b10d4724c3
1 changed files with 1 additions and 0 deletions

View File

@ -669,6 +669,7 @@ public:
/// Erase non-pseudo instruction at a given iterator \p II.
iterator eraseInstruction(iterator II) {
adjustNumPseudos(*II, -1);
return Instructions.erase(II);
}