This is an archive of the discontinued LLVM Phabricator instance.

[clang] Convert several OpenMP tests to opaque pointers
ClosedPublic

Authored by barannikov88 on May 15 2023, 1:35 PM.

Diff Detail

Event Timeline

barannikov88 created this revision.May 15 2023, 1:35 PM
barannikov88 requested review of this revision.May 15 2023, 1:35 PM
Herald added a project: Restricted Project. · View Herald Transcript
barannikov88 added inline comments.May 15 2023, 1:38 PM
clang/test/OpenMP/task_firstprivate_codegen.cpp
264–271

There is a bunch of alloca ptr, before the next CHECK lines. The exect number differs between tests.
I couldn't find a better solution than to rely on the name of one of them.

barannikov88 added inline comments.May 15 2023, 1:43 PM
clang/test/OpenMP/task_firstprivate_codegen.cpp
264–271

E.g.:

%.part_id..addr.i = alloca ptr, align 8
%.privates..addr.i = alloca ptr, align 8
%.copy_fn..addr.i = alloca ptr, align 8
%.task_t..addr.i = alloca ptr, align 8
%__context.addr.i = alloca ptr, align 8
%.firstpriv.ptr.addr.i = alloca ptr, align 8
%.firstpriv.ptr.addr1.i = alloca ptr, align 8
%.firstpriv.ptr.addr2.i = alloca ptr, align 8
%ref.tmp.i = alloca %class.anon.0, align 8

and we need to match the firstpriv ones. It so happens that in all tests %__context precedes the interesting lines.

Throw in a few more tests

Did you manually update these tests?

I first manually converted a few tests (mostly with regexes), then I checked that the script produces the same result. The result was identical to the letter.
The rest of the tests were converted using the script. There were a few issues that I had to resolve manually, one of them is mentioned above.

jdoerfert accepted this revision.May 15 2023, 4:36 PM

LG, assuming these are stable now.

We should move them to the update scripts though...

This revision is now accepted and ready to land.May 15 2023, 4:36 PM

LG, assuming these are stable now.

We should move them to the update scripts though...

I'm not sure what you mean by this?