This is an archive of the discontinued LLVM Phabricator instance.

[llvm[NFC] Adjust mem fn auto upgrade detection
ClosedPublic

Authored by urnathan on Jul 28 2023, 3:06 PM.

Details

Reviewers
jroelofs
echristo
Summary

In working on how to augment llvm.memcpy and friends to distingish src from dst volatility I noticed the auto upgrade processing was somewhat duplicative. This commonizes the memcpy and memmove detection. In addition to being general goodness, this will make it easier to do the change I want to make.

This change itself is NFC

Diff Detail

Event Timeline

urnathan created this revision.Jul 28 2023, 3:06 PM
Herald added a project: Restricted Project. · View Herald TranscriptJul 28 2023, 3:06 PM
Herald added a subscriber: hiraditya. · View Herald Transcript
urnathan requested review of this revision.Jul 28 2023, 3:06 PM
Herald added a project: Restricted Project. · View Herald TranscriptJul 28 2023, 3:06 PM
jroelofs accepted this revision.Jul 28 2023, 3:20 PM

LGTM

llvm/lib/IR/AutoUpgrade.cpp
1105–1116

llvm::StringSwitch might be a touch nicer for this

This revision is now accepted and ready to land.Jul 28 2023, 3:20 PM
urnathan updated this revision to Diff 546592.Aug 2 2023, 1:48 PM

let's try with StringSwitch ... will commit if tests pass

llvm/lib/IR/AutoUpgrade.cpp
1105–1116

Sounds good

jroelofs accepted this revision.Aug 2 2023, 2:01 PM
urnathan closed this revision.Aug 5 2023, 2:34 PM

b6c220da0219 2023-07-28 | [llvm][NFC] Adjust mem fn auto upgrade detection