This is an archive of the discontinued LLVM Phabricator instance.

[clang][OpenMP] Make IR function names for OpenMP-outlined blocks slightly less awful
AbandonedPublic

Authored by lebedev.ri on Sep 6 2021, 2:52 PM.

Details

Summary

I've recently had to stare at the LLVM IR for a C++ source that contained OpenMP Tasks,
and it was *really* *extremely* painful to piece together which @omp_outlined function
was related to what original source code, because their names are rather obfuscated.

Example: https://godbolt.org/z/rTo6js8nx

I don't believe the exact name that will be used for these helpers matters (for ABI purposes)?

So i think we can do better.
This doesn't fix everything, i only touched Tasks.
There are likely other places that could use better names.

Diff Detail

Event Timeline

lebedev.ri created this revision.Sep 6 2021, 2:52 PM
lebedev.ri requested review of this revision.Sep 6 2021, 2:52 PM

Maybe use something close to target entries format? Encode function name and line number of the region. This would help if there are several omp regions in a function.

Maybe use something close to target entries format? Encode function name and line number of the region. This would help if there are several omp regions in a function.

Sure, i can do that.

lebedev.ri abandoned this revision.Jan 17 2022, 2:37 PM