[BOLT] Verify exceptions action table equivalence in ICF

Summary:
Some functions may have exactly the same code and exception handlers.
However, their action tables could be different leading to mismatching
semantics. We should verify their equivalence while running ICF.

(cherry picked from FBD20889035)
This commit is contained in:
Maksim Panchenko 2020-03-30 19:08:24 -07:00
parent 58b0d9e7b0
commit b08d82d91b
1 changed files with 7 additions and 0 deletions

View File

@ -289,6 +289,13 @@ bool isIdenticalWith(const BinaryFunction &A, const BinaryFunction &B,
++BBI; ++BBI;
} }
// Compare exceptions action tables.
if (A.getLSDAActionTable() != B.getLSDAActionTable() ||
A.getLSDATypeTable() != B.getLSDATypeTable() ||
A.getLSDATypeIndexTable() != B.getLSDATypeIndexTable()) {
return false;
}
return true; return true;
} }