Page MenuHomePhabricator

Add pass to turn function into Unreachable and script to find UB. (WIP)
Needs ReviewPublic

Authored by fhahn on Jun 12 2022, 2:28 PM.
This revision needs review, but there are no reviewers specified.

Details

Reviewers
None
Summary

This adds a pass to replace function bodies with 'unreachable' and a
script that checks if the result still verifies.

This can be used to find functions in llvm-lit tests that have
unconditional UB using

llvm-lit -j4 -sv -Dopt=~/find-ub-in-test.sh

Examples of found & fixed UB:

Diff Detail

Event Timeline

fhahn created this revision.Jun 12 2022, 2:28 PM
Herald added a project: Restricted Project. · View Herald TranscriptJun 12 2022, 2:28 PM
fhahn requested review of this revision.Jun 12 2022, 2:28 PM
Herald added a project: Restricted Project. · View Herald TranscriptJun 12 2022, 2:28 PM