[cfe-dev] Help with OpenMP pragmas source to source translation.

Hamilton Tobón Mosquera via cfe-dev cfe-dev at lists.llvm.org
Thu Sep 26 16:06:18 PDT 2019


Hello guys,
I'm a Clang newcomer. To make my travel through Clang interesting, I'm trying to solve this bug https://bugs.llvm.org/show_bug.cgi?id=40253. I've spend many many hours debugging Clang using gdb. To fully understand how "#pragma target" works, I started debbuging this simple program:

int main() {
  #pragma omp parallel
  {
    int a;
  }
  return 0;
}

I tracked the compilation up to this function https://clang.llvm.org/doxygen/CGOpenMPRuntime_8cpp_source.html#l01716. I'm kind of lost, I don't know if this is the proper way of learning how OpenMP works in Clang. There's a huge amount of code and I don't know which functions to understand and which ones to skip.

Could someone please guide me, or just give me some advice?. If it helps, I have Clang compiled in Debug mode and with shared libraries.

Thanks.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20190926/f9f2cfe2/attachment.html>


More information about the cfe-dev mailing list