ScopDetect: Only track detection failures if actually needed.
authorTobias Grosser <tobias@grosser.es>
Thu, 25 Jul 2013 03:02:29 +0000 (03:02 +0000)
committerTobias Grosser <tobias@grosser.es>
Thu, 25 Jul 2013 03:02:29 +0000 (03:02 +0000)
commitc7d3fc5547159b8d8cd40dcd50d2de879991180c
tree0f5e48220c93450e69bd2a31fb27561a366da61b
parent8002201fd65ac1e07ca8967ce660ca7c4758d0af
ScopDetect: Only track detection failures if actually needed.

String operations resulted by raw_string_ostream in the INVALID macro can lead
to significant compile-time overhead when compiling large size source code.
This is because raw_string_ostream relies on TypeFinder class, whose
compile-time cost increases as the size of the module increases. This patch
targets to ensure that it only track detection failures if actually needed.
In this way, we can avoid expensive string operations in normal execution.

With this patch file, the relative compile-time cost of Polly-detect pass does
not increase even when compiling very large size source code.

Contributed-by: Star Tan <tanmx_star@yeah.net>
llvm-svn: 187102
polly/include/polly/ScopDetection.h
polly/lib/Analysis/ScopDetection.cpp
polly/lib/RegisterPasses.cpp