This is an archive of the discontinued LLVM Phabricator instance.

[AssumeBundles] Enforce constraints on the operand bundle of llvm.assume
ClosedPublic

Authored by Tyker on Feb 27 2020, 8:53 AM.

Details

Summary

Add verification that operand bundles on an llvm.assume are well formed to the verify pass.

Diff Detail

Event Timeline

Tyker created this revision.Feb 27 2020, 8:53 AM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 27 2020, 8:53 AM
Tyker updated this revision to Diff 248998.Mar 8 2020, 9:06 AM

rebased

This is cool, thx!

I added two comments below.

llvm/include/llvm/IR/Attributes.h
119

Documentation, please.

Tyker updated this revision to Diff 249459.Mar 10 2020, 11:24 AM

Added documentation

jdoerfert added inline comments.Mar 10 2020, 11:30 AM
llvm/lib/IR/Verifier.cpp
4326

When we drop uses, should we go to none as a tag so it is actually a valid attribute or do we want to allow a special tag here?

Tyker marked an inline comment as done.Mar 10 2020, 12:52 PM
Tyker added inline comments.
llvm/lib/IR/Verifier.cpp
4326

in D73404 i named the tag to "ignore" and adapted the verifier to treat is as valid.
but putting a "none" could be another solution if it is a valid attribute.
but it doesn't seem to be considered as a valid by opt and isn't considered valid by isExistingAttribute. it is just the hard coded first value of the enum.

This revision is now accepted and ready to land.Mar 10 2020, 2:18 PM
This revision was automatically updated to reflect the committed changes.