This is an archive of the discontinued LLVM Phabricator instance.

[UpdateCCTestChecks] Implement --global-hex-value-regex
ClosedPublic

Authored by jdenny on Jun 22 2021, 1:40 PM.

Details

Summary

For example, in OpenMP offload codegen tests, global variables like
.offload_maptypes* are much easier to read in hex.

Diff Detail

Event Timeline

jdenny requested review of this revision.Jun 22 2021, 1:40 PM
jdenny created this revision.
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptJun 22 2021, 1:40 PM
Herald added a subscriber: sstefan1. · View Herald Transcript
jdenny updated this revision to Diff 355582.Jun 30 2021, 9:12 AM

Fix the new test for the race discussed at D104714#2841465.

I don't understand what we do before, and how this work, is [[# special in lit? Also, why i32/64 only, that seems arbitrary, no?

I don't understand what we do before, and how this work,

Maybe part of the confusion is that --global-hex-value-regex does not change how the value is expected to appear in LLVM IR: decimal is still expected. It only changes how the value is represented in the FileCheck directive: hex is the representation. The only point is to make the FileCheck directives more readable because, at least in my OpenMP use case, we're dealing with flags.

is [[# special in lit?

No, it starts a FileCheck numeric.

Also, why i32/64 only, that seems arbitrary, no?

Good point. I suppose it should be any integer. I'll work on that.

Thanks for the reviews.

jdenny updated this revision to Diff 360131.Jul 20 2021, 7:46 AM

Applied @jdoerfert's suggestion: generalize to all integer values.

jdoerfert accepted this revision.Jul 20 2021, 7:58 AM

LG, sure why not.

This revision is now accepted and ready to land.Jul 20 2021, 7:58 AM
This revision was landed with ongoing or failed builds.Jul 20 2021, 8:24 AM
This revision was automatically updated to reflect the committed changes.