This is an archive of the discontinued LLVM Phabricator instance.

[llvm][NFC] Refactor AutoUpdater experimental case
ClosedPublic

Authored by urnathan on Aug 14 2023, 2:55 PM.

Details

Summary

Containing overhaul of the AutoUpdater intrinsic detector, here's the 'e' case.

It's more efficient to gate on the prefix, before diving into more specificity. Also, the regexps weren't consistent about escaping '.', so could trigger on unintended (and weird) cases.

Matt, thanks for pointing out consume_front!, Nikita, thanks for your guidance too!

Diff Detail

Event Timeline

urnathan created this revision.Aug 14 2023, 2:55 PM
Herald added a project: Restricted Project. · View Herald TranscriptAug 14 2023, 2:55 PM
urnathan requested review of this revision.Aug 14 2023, 2:55 PM
Herald added a project: Restricted Project. · View Herald TranscriptAug 14 2023, 2:55 PM
arsenm accepted this revision.Aug 14 2023, 2:57 PM
arsenm added inline comments.
llvm/lib/IR/AutoUpgrade.cpp
989

Braces

This revision is now accepted and ready to land.Aug 14 2023, 2:57 PM
urnathan updated this revision to Diff 550808.Aug 16 2023, 10:52 AM
urnathan marked an inline comment as not done.Aug 16 2023, 10:55 AM
urnathan added inline comments.
llvm/lib/IR/AutoUpgrade.cpp
989

It doesn't actually matter if V2 is set to true only in the R2.match true case or anywhere in this whole block. (I presume this is what you're querying?)
We're distinguishing whether we got to try the second regexp, and only care about it's value if ID != not_intrinsic.

Do you prefer this placement before the if, so it's clearer we've not missed some bracing?

urnathan marked an inline comment as done.Aug 17 2023, 3:12 PM
This revision was automatically updated to reflect the committed changes.