This is an archive of the discontinued LLVM Phabricator instance.

[WIP][IR] Make `llvm.assume` `readnone`
Needs ReviewPublic

Authored by jdoerfert on Oct 8 2020, 9:20 AM.
This revision needs review, but there are no reviewers specified.



Note: This is not a full commit. No tests were changed. Used for discussion

The llvm.assume intrinsic was historically not readnone because
control dependences need to be preserved. However, the intrinsic can
nowadays be represented as what it is, potentially UB if the condition
is false (or an operand bundle is violated). No effect but potentially
UB is readnone (in contrast to speculatable). While here we add
nosync and nofree to llvm.assume.

Diff Detail

Event Timeline

jdoerfert created this revision.Oct 8 2020, 9:20 AM
Herald added a project: Restricted Project. · View Herald TranscriptOct 8 2020, 9:20 AM
Herald added a subscriber: bollu. · View Herald Transcript
jdoerfert requested review of this revision.Oct 8 2020, 9:20 AM
jdoerfert edited the summary of this revision. (Show Details)
jdoerfert added a subscriber: llvm-commits.
nikic added a comment.Oct 8 2020, 9:55 AM

This looks like a very reasonable change to me, but I can't say that I understand the full consequences :)

I think this approach makes sense.

Tyker added a comment.Oct 8 2020, 10:33 AM

This change makes a lot of sense, but i don't understand all the consequences either.

I will (try to) do some testing with this and report back.