This is an archive of the discontinued LLVM Phabricator instance.

[clang][CFG] Fix 2 memory errors in interval computation.
ClosedPublic

Authored by ymandel on Aug 3 2023, 2:05 PM.

Details

Summary

This fixes 2 bugs and adds corresponding tests. Both related to unreachable
blocks. One occured in the WTOCompare construction, which assumed the size of
the order was the same as the number of blocks in the CFG, which isn't true when
some blocks are unreachable. The other assumed predecessor pointers were
non-null, which can be false for blocks with unreachable predecessors.

Diff Detail

Event Timeline

ymandel created this revision.Aug 3 2023, 2:05 PM
Herald added a project: Restricted Project. · View Herald Transcript
ymandel requested review of this revision.Aug 3 2023, 2:05 PM
Herald added a project: Restricted Project. · View Herald TranscriptAug 3 2023, 2:05 PM
xazax.hun accepted this revision.Aug 3 2023, 2:20 PM
This revision is now accepted and ready to land.Aug 3 2023, 2:20 PM
ymandel updated this revision to Diff 547305.Aug 4 2023, 12:10 PM

rebase onto main

This revision was automatically updated to reflect the committed changes.