Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Polly] Introduce caching for the isErrorBlock function. NFC.
Compilation of the file insn-attrtab.c of the SPEC CPU 2017 502.gcc_r benchmark takes excessive time (> 30min) with Polly enabled. Most time is spent in the isErrorBlock function querying the DominatorTree. The isErrorBlock is invoked redundantly over the course of ScopDetection and ScopBuilder. This patch introduces a caching mechanism for its result. Instead of a free function, isErrorBlock is moved to ScopDetection where its cache map resides. This also means that many functions directly or indirectly calling isErrorBlock are not "const" anymore. The DetectionContextMap was marked as "mutable", but IMHO it never should have been since it stores the detection result. 502.gcc_r only takes excessive time with the new pass manager. The reason seeams to be that it invalidates the ScopDetection analysis more often than the legacy pass manager, for unknown reasons.
- Loading branch information
1 parent
cc7bcef
commit 58e4e71
Showing
8 changed files
with
139 additions
and
134 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.