[flang-commits] [PATCH] D122441: [flang] Add & use a better visit()
Mats Petersson via Phabricator via flang-commits
flang-commits at lists.llvm.org
Tue Mar 29 11:53:49 PDT 2022
Leporacanthicus added a comment.
> We did some more digging and it looks like a Clang 13 issue. On AArch64, both Clang 12 and Clang 14 are fine. I believe that @Leporacanthicus was also able to reproduce this with Clang 13 on X86.
I have indeed reproduced this, both an older Clang-14 (from early November, not picked for any other reason than "I happen to have it compiled") and a Clang-13 from about a year back (again, not a specific release, just "a build I had sitting around"). I stopped compiling at around 25-30 minutes of CPU time in PFTBuilder.cpp.
I suspect this is a bug in Clang (or performance issue), exposed by this change. I ran `perf record clang++ ...`, but it's not showing an obvious "it hangs in one function" - it may well still hang, just that it's calling many different functions within the loop that it is stuck in. I have not tried to debug using for example gdb. This has been a background task while I was working on other things, trying to help Andrzej understand the issue.
Changing the logic to disable the new visit function works fine, so one option might be to commit this with it default disabled, and add some CMake code to enable it where it is beneficial (or not exposing the bug at least). I'm not entirely sure what those conditions are, however.
I have left my machine to compile that file over night, to see if it's a genuine hang or just "takes a very long time" - if it's not finished by tomorrow morning, I'm definitely calling it a hang. I will report back tomorrow on the result of that.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D122441/new/
https://reviews.llvm.org/D122441
More information about the flang-commits
mailing list