As it currently stands Clang’s OpenMP CodeGen assigns the same name to all OpenMP outlined functions (“.omp_outlined.”). This is customizable targets, but it’s still completely static, which leads to a meaningless dot + running index being appended to all but the first outlined function (“.omp_outlined…150”). This stems from LLVM’s ValueSymbolTable::makeUniqueName machinery.
I was wondering whether it would be considered a nice readability improvement to pass the enclosing function’s name as a parameter to CGOpenMPRuntime::getOutlinedHelperName (and perhaps also CGOpenMPTaskOutlinedRegionInfo::getHelperName), such that it could be appended to the generated identifier. There will still be conflicts when there are multiple outlined regions in the same function, but at least it will be much more pleasant to inspect the IR.
I think in general that’s something I would find quite useful when looking at the IR.
One thing I wonder though: What does that mean for size? If you think of heavily templated code, the function names can become quite large. So I would assume that for certain codes this may lead to quite some increases. Any chance you have looked into this already, or someone more knowledgeable than me can comment on that?