This is an archive of the discontinued LLVM Phabricator instance.

Overload all llvm.annotation intrinsics for globals argument
ClosedPublic

Authored by arichardson on Nov 25 2022, 8:07 AM.

Details

Summary

The global constant arguments could be in a different address space
than the first argument, so we have to add another overloaded argument.
This patch was originally made for CHERI LLVM (where globals can be in
address space 200), but it also appears to be useful for in-tree targets
as can be seen from the test diffs.

Diff Detail

Event Timeline

arichardson created this revision.Nov 25 2022, 8:07 AM
Herald added a project: Restricted Project. · View Herald TranscriptNov 25 2022, 8:07 AM
arichardson requested review of this revision.Nov 25 2022, 8:07 AM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptNov 25 2022, 8:07 AM
arsenm added inline comments.Dec 2 2022, 10:53 AM
llvm/test/Bitcode/upgrade-annotation.ll
14

New tests should use opaque pointers. For autoupgrade we may want and need both test copies

nikic accepted this revision.Dec 6 2022, 2:58 AM

LGTM

llvm/test/Bitcode/upgrade-annotation.ll
14

I think this is fine for now. We'll deal with this when we remove the typed pointer auto-detection from the bitcode reader, at which point all existing typed pointer bitcode will get upgraded to opaque pointer bitcode.

This revision is now accepted and ready to land.Dec 6 2022, 2:58 AM

use opaque pointers in the new test

arsenm accepted this revision.Dec 7 2022, 7:14 AM
This revision was landed with ongoing or failed builds.Dec 7 2022, 10:29 AM
This revision was automatically updated to reflect the committed changes.
arichardson marked 2 inline comments as done.
jrtc27 added inline comments.Dec 7 2022, 10:33 AM
clang/test/CodeGen/annotations-field.c
5

All these CHECK lines aren't getting consulted?