This is an archive of the discontinued LLVM Phabricator instance.

[BPF] Avoid checking for intrinsics using string comparisons. NFC
ClosedPublic

Authored by arichardson on Nov 23 2022, 4:31 AM.

Details

Summary

Use a dyn_cast<> to IntrinsicInst and an enum compare instead.
While touching this code also re-generate the test to use positive check
lines instead of negative ones and remove some unneeded metadata.

Diff Detail

Event Timeline

arichardson created this revision.Nov 23 2022, 4:31 AM
Herald added a project: Restricted Project. · View Herald TranscriptNov 23 2022, 4:31 AM
Herald added a subscriber: hiraditya. · View Herald Transcript
arichardson requested review of this revision.Nov 23 2022, 4:31 AM
Herald added a project: Restricted Project. · View Herald TranscriptNov 23 2022, 4:31 AM
yonghong-song accepted this revision.Nov 23 2022, 11:34 AM

Thanks for the code simplification. LGTM.

This revision is now accepted and ready to land.Nov 23 2022, 11:34 AM
This revision was landed with ongoing or failed builds.Nov 25 2022, 3:35 AM
This revision was automatically updated to reflect the committed changes.