Skip to content

Commit

Permalink
[BOLT] Verify exceptions action table equivalence in ICF
Browse files Browse the repository at this point in the history
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)
  • Loading branch information
maksfb committed Mar 31, 2020
1 parent 58b0d9e commit b08d82d
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions bolt/src/Passes/IdenticalCodeFolding.cpp
Expand Up @@ -289,6 +289,13 @@ bool isIdenticalWith(const BinaryFunction &A, const BinaryFunction &B,
++BBI;
}

// Compare exceptions action tables.
if (A.getLSDAActionTable() != B.getLSDAActionTable() ||
A.getLSDATypeTable() != B.getLSDATypeTable() ||
A.getLSDATypeIndexTable() != B.getLSDATypeIndexTable()) {
return false;
}

return true;
}

Expand Down

0 comments on commit b08d82d

Please sign in to comment.