Page MenuHomePhabricator

[IR,AArch64] Add a new "ptrauth(...)" Constant to represent signed pointers
Needs ReviewPublic

Authored by t.p.northover on Dec 8 2020, 4:30 AM.

Details

Reviewers
ab
deadalnix
Summary

This is a largeish change so I'm posting it together with an RFC on llvm-dev, where we should probably talk about the design related aspects. I'll put a link here when I post it but one had to come first.

This adds IR support (essentially bitcode roundtripping) for a new kind of Constant to represent an ARMv8.3 signed pointer. Its main use is to represent the kinds of signed pointers that can be represented in the MachO binary format (used for vtables etc), so it folds in functionality from @llvm.ptrauth.blend and @llvm.ptrauth.sign and that has guided the fields present.

Diff Detail

Event Timeline

t.p.northover created this revision.Dec 8 2020, 4:30 AM
t.p.northover requested review of this revision.Dec 8 2020, 4:30 AM
Herald added a project: Restricted Project. · View Herald TranscriptDec 8 2020, 4:30 AM
tschuett added a subscriber: tschuett.EditedDec 8 2020, 10:18 AM

It might well be better to give up on intrinsic orthogonality and add one for this case though. It would simplify the changes to lib/IR etc.

If there is more gain then costs, I would go for it.
https://reviews.llvm.org/D90868 also seems to want to move sequences of operations
into a single intrinsic.

zzheng added a subscriber: zzheng.Jun 15 2021, 2:34 PM
ormris removed a subscriber: ormris.Jun 16 2021, 11:49 AM