8262465: Very long compilation times and high memory consumption in C2 debug builds #3119
I tracked down the cause of the compilation times to a assert guarded block in reg_split.cpp.
The test method that causes this behaviour is a main method with an outer iteration loop, and inner loops that iterates over a value array. The inner loops is filled with about 40 calls to a verify() method but with different tests of rotate. Every call to verify is also accompanied by a string concatenation that expands with indy-string-concat.
The result IR has a huge number of live ranges and the index set are very large.
In reg_split there is some code that validate that any liveout isn't compressible to defidx. For all spills - all liveouts a searched for the def. But the lrgs are not compressed yet - so they will scan a chain of renames. To add insult to injury the indexset is huge. Fortunately this is only in debug builds.
I have posted some compile time numbers and IndexSet statistics in the bug.
I propose to guard the assert code with VerifyRegisterAllocation. This isn't optimal since we don't test with that flag regularly, but I think it might be an ok trade off. Bugs in split would still be caught - but later, and then VerifyRegisterAllocation can be turned on.
To checkout this PR locally:
To update a local copy of the PR:
The text was updated successfully, but these errors were encountered:
@neliasso This change now passes all automated pre-integration checks.
After integration, the commit message for the final commit will be:
At the time when this comment was updated there had been 76 new commits pushed to the
As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details.
@neliasso Since your change was applied there have been 82 commits pushed to the
Your commit was automatically rebased without conflicts.
Pushed as commit 2da882c.