[polly] r294894 - [ScopDetectDiagnostics] Do not format unnamed array names

Tobias Grosser via llvm-commits llvm-commits at lists.llvm.org
Sun Feb 12 02:53:03 PST 2017


Author: grosser
Date: Sun Feb 12 04:53:02 2017
New Revision: 294894

URL: http://llvm.org/viewvc/llvm-project?rev=294894&view=rev
Log:
[ScopDetectDiagnostics] Do not format unnamed array names

Formatting unnamed array names is expensive in LLVM as the this requires
deriving the numbered virtual instruction name (e.g., %12) for an llvm::Value,
which is currently not implemented efficiently. As instruction numberes anyhow
do not really carry a lot of information for the user, we just print 'unknown'
instead.

This change reduces the scop detection time from 24 to 19 seconds, for one of
our large-scale inputs. This is a reduction by 21%.

Modified:
    polly/trunk/lib/Analysis/ScopDetectionDiagnostic.cpp

Modified: polly/trunk/lib/Analysis/ScopDetectionDiagnostic.cpp
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/lib/Analysis/ScopDetectionDiagnostic.cpp?rev=294894&r1=294893&r2=294894&view=diff
==============================================================================
--- polly/trunk/lib/Analysis/ScopDetectionDiagnostic.cpp (original)
+++ polly/trunk/lib/Analysis/ScopDetectionDiagnostic.cpp Sun Feb 12 04:53:02 2017
@@ -443,7 +443,7 @@ std::string ReportAlias::formatInvalidAl
     assert(V && "Diagnostic info does not match found LLVM-IR anymore.");
 
     if (V->getName().size() == 0)
-      OS << "\"" << *V << "\"";
+      OS << "\" <unknown> \"";
     else
       OS << "\"" << V->getName() << "\"";
 




More information about the llvm-commits mailing list