This is an archive of the discontinued LLVM Phabricator instance.

[DebugInfo] Mark OpenMP generated functions as artificial
ClosedPublic

Authored by alok on Oct 10 2021, 11:03 PM.

Details

Summary

The OpenMP generates many functions which are not in user program.

Example: "captured_stmt_debug_", "captured_stmt", ".omp_outlined._debug__",
".omp_task_entry.", ".omp_outlined.", ".omp_outlined..1"

Current patch marks these all as artificial.

Diff Detail

Event Timeline

alok created this revision.Oct 10 2021, 11:03 PM
alok requested review of this revision.Oct 10 2021, 11:03 PM
Herald added a project: Restricted Project. · View Herald Transcript

This looks reasonable to me.

Might not hurt to have some negative test cases too - like something that is a VarDecl but has NoStub DynamicInitKind?

alok updated this revision to Diff 437064.Jun 15 2022, 1:00 AM

Re-based and updated to include one negative testcase.
I could not find a test for VarDecl with DynamicInitKind::NoStub. There are constructors for other DynamicInitKind but not for NoStub. Please help me in case you are aware of the condition when it is produced.

Herald added a project: Restricted Project. · View Herald TranscriptJun 15 2022, 1:00 AM

Re-based and updated to include one negative testcase.
I could not find a test for VarDecl with DynamicInitKind::NoStub. There are constructors for other DynamicInitKind but not for NoStub. Please help me in case you are aware of the condition when it is produced.

I've got no particular knowledge of OpenMP unfortunately - the suggestion was based on looking at the conditions in the code & wanting them to all be tested.

If it can't be tested, could the test in the code be replaced with an assertion that it never happens?

alok updated this revision to Diff 449239.Aug 2 2022, 3:05 AM

Re-based and updated to incorporate comments from @dblaikie

aprantl accepted this revision.Aug 2 2022, 8:02 AM
This revision is now accepted and ready to land.Aug 2 2022, 8:02 AM
This revision was landed with ongoing or failed builds.Aug 2 2022, 9:04 AM
This revision was automatically updated to reflect the committed changes.