This is an archive of the discontinued LLVM Phabricator instance.

Update llvm.experimental.patchpoint to use opaque pointer for target.
ClosedPublic

Authored by vext01 on Aug 5 2022, 8:06 AM.

Details

Summary

I wanted to check that patchpoints still work with opaque pointers, since there is (was) an i8* function pointer in the signature. They do work!

This change updates the stackmaps/patchpoints documentation so that it doesn't mention old-style pointers. Note that some of the varargs type qualifiers erroneously had a trailing *. e.g. call void (i64, i32, ...)* @... shouldn't have a star.

I've also made changes to the tests so that the target operand of patchpoint calls is now a ptr. I've not touched any other pointers in those tests unless strictly necessary (sometimes I had to change other pointers due to the "you can only use ptr in opaque pointers mode" error. It's not clear to me why sometimes it's ok to mix typed and opaque pointers, and other times not...)

Diff Detail

Event Timeline

vext01 created this revision.Aug 5 2022, 8:06 AM
Herald added a project: Restricted Project. · View Herald TranscriptAug 5 2022, 8:06 AM
vext01 requested review of this revision.Aug 5 2022, 8:06 AM
Herald added a project: Restricted Project. · View Herald TranscriptAug 5 2022, 8:06 AM
nikic added a subscriber: nikic.Aug 5 2022, 8:14 AM

I've also made changes to the tests so that the target operand of patchpoint calls is now a ptr. I've not touched any other pointers in those tests unless strictly necessary (sometimes I had to change other pointers due to the "you can only use ptr in opaque pointers mode" error. It's not clear to me why sometimes it's ok to mix typed and opaque pointers, and other times not...)

Please always update all pointers in the file. It happens to work if the first used pointer type is opaque, but tests really shouldn't mix different pointers...

vext01 updated this revision to Diff 451385.Aug 10 2022, 1:49 AM

As requested, revised diff updates all pointers to opaque pointers in the test files that I've touched.

All tests passing locally.

nikic accepted this revision.Aug 10 2022, 2:31 AM

LGTM

This revision is now accepted and ready to land.Aug 10 2022, 2:31 AM
This revision was landed with ongoing or failed builds.Aug 10 2022, 5:18 AM
This revision was automatically updated to reflect the committed changes.