forked from OSchip/llvm-project
[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%. llvm-svn: 294894
This commit is contained in:
parent
9fe37df27c
commit
288c450cf6
|
@ -443,7 +443,7 @@ std::string ReportAlias::formatInvalidAlias(std::string Prefix,
|
|||
assert(V && "Diagnostic info does not match found LLVM-IR anymore.");
|
||||
|
||||
if (V->getName().size() == 0)
|
||||
OS << "\"" << *V << "\"";
|
||||
OS << "\" <unknown> \"";
|
||||
else
|
||||
OS << "\"" << V->getName() << "\"";
|
||||
|
||||
|
|
Loading…
Reference in New Issue