This is an archive of the discontinued LLVM Phabricator instance.

Attributes: Check declarations for dereferenceable bytes
ClosedPublic

Authored by arsenm on Jan 13 2023, 12:53 PM.

Details

Summary

This will allow tablegen to start directly marking intrinsics as
dereferenceable in a useful way. Not sure if callsites should override
or use the max.

Diff Detail

Event Timeline

arsenm created this revision.Jan 13 2023, 12:53 PM
Herald added a project: Restricted Project. · View Herald TranscriptJan 13 2023, 12:53 PM
arsenm requested review of this revision.Jan 13 2023, 12:53 PM
Herald added a project: Restricted Project. · View Herald TranscriptJan 13 2023, 12:53 PM
Herald added a subscriber: wdng. · View Herald Transcript
jdoerfert accepted this revision.Jan 15 2023, 10:54 AM

Pretty canonical. We should use maximum though. And can you do this for all deref getters please.

llvm/include/llvm/IR/InstrTypes.h
1813

Yes, maximum please.

1832

Can you fix all 4 deref getters while you are here?

This revision is now accepted and ready to land.Jan 15 2023, 10:54 AM
arsenm added inline comments.Jan 16 2023, 10:24 AM
llvm/include/llvm/IR/InstrTypes.h
1813

Alternatively we could require callsite attributes be greater than the declaration but I could see that being mildly annoying

arsenm added inline comments.Jan 28 2023, 5:22 AM
llvm/include/llvm/IR/InstrTypes.h
1832

I got the return ones, I'd need to find a new testing strategy for the parameters