This is an archive of the discontinued LLVM Phabricator instance.

[Mem2Reg] !nonnull and !noundef are enough for creating assume
Needs RevisionPublic

Authored by StephenFan on Apr 25 2023, 11:26 PM.

Details

Summary

The behavior of violating !nonnull and !noundef is immediate undefined
behavior, that's enough to create a non-null assumption.

Diff Detail

Event Timeline

StephenFan created this revision.Apr 25 2023, 11:26 PM
Herald added a project: Restricted Project. · View Herald TranscriptApr 25 2023, 11:26 PM
Herald added subscribers: hoy, hiraditya. · View Herald Transcript
StephenFan requested review of this revision.Apr 25 2023, 11:26 PM
Herald added a project: Restricted Project. · View Herald TranscriptApr 25 2023, 11:26 PM
nikic requested changes to this revision.Apr 26 2023, 12:00 AM

The isKnownNonZero() check ensures that no assumptions are generated for facts that are already known through other means anyway. This will result in the generation of many unnecessary assumes.

This revision now requires changes to proceed.Apr 26 2023, 12:00 AM