This is an archive of the discontinued LLVM Phabricator instance.

[ARM] Use DefaultAttrsIntrinsics
ClosedPublic

Authored by nikic on Oct 26 2022, 5:05 AM.

Details

Summary

Use DefaultAttrsIntrinsics for most ARM intrinsics. This adds the WillReturn, NoSync, NoFree and NoCallback attributes and is needed to avoid regressions in the future.

I've switched to DefaultAttrIntrinsics for everything doing arithmetic and load/store. I've left some TODOs in cases where all DefaultsAttrs are not correct (e.g. ldrex etc are clearly not nosync) or it wasn't entirely obvious to me (e.g. stuff interacting with a coprocessor).

Diff Detail

Event Timeline

nikic created this revision.Oct 26 2022, 5:05 AM
Herald added a project: Restricted Project. · View Herald TranscriptOct 26 2022, 5:05 AM
nikic requested review of this revision.Oct 26 2022, 5:05 AM
Herald added a project: Restricted Project. · View Herald TranscriptOct 26 2022, 5:05 AM
dmgreen accepted this revision.Oct 26 2022, 10:55 AM
dmgreen added reviewers: efriedma, simon_tatham, miyuki.

Thanks for doing this. I have left some comments but as far as I understand the changes LGTM.

llvm/include/llvm/IR/IntrinsicsARM.td
318

Given [WillReturn, NoSync, NoFree and NoCallback], these FP intrinsics sounds OK.

500

This will continue to work? It looks like the default flags are added through a different means.

1398

CDE should be fine - there are limits to what a valid CDE instruction can do which should mean the default flags are all OK.

This revision is now accepted and ready to land.Oct 26 2022, 10:55 AM
nikic updated this revision to Diff 471068.Oct 27 2022, 1:49 AM
nikic marked 2 inline comments as done.

Use default attrs for VFP and CDE as well.

nikic added inline comments.Oct 27 2022, 1:50 AM
llvm/include/llvm/IR/IntrinsicsARM.td
500

Yeah, this should still work.

dmgreen accepted this revision.Oct 27 2022, 11:45 AM

Thanks. LGTM

This revision was automatically updated to reflect the committed changes.