summaryrefslogtreecommitdiff
path: root/source/slang/slang-artifact-output-util.cpp
diff options
context:
space:
mode:
authorYong He <yonghe@outlook.com>2024-05-29 18:01:11 -0700
committerGitHub <noreply@github.com>2024-05-29 18:01:11 -0700
commitefdbb954c57b89362e390f955d45f90e59d66878 (patch)
tree7b47d6e52d2de666af99f66a2fd3a5dc387ca5cc /source/slang/slang-artifact-output-util.cpp
parent83f176ba8a3bae5533470aed6a90663653f894b8 (diff)
Improve compile time performance. (#3857)
* Handle type check cache update on extensions more gracefully. * Correctness fix. * Cache implcit cast overload resolution results. * Fix. * More optimizations. * Cache implicit default ctor resolution. * Disable redundancy removal. * Fix. * Fix test. * Fix. * Correctness fix. * Fix. * Fix, * Fix test. * Small tweak.
Diffstat (limited to 'source/slang/slang-artifact-output-util.cpp')
-rw-r--r--source/slang/slang-artifact-output-util.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/source/slang/slang-artifact-output-util.cpp b/source/slang/slang-artifact-output-util.cpp
index 2c560e236..3cb0e6c93 100644
--- a/source/slang/slang-artifact-output-util.cpp
+++ b/source/slang/slang-artifact-output-util.cpp
@@ -58,9 +58,11 @@ namespace Slang
}
return SLANG_FAIL;
}
-
+ auto downstreamStartTime = std::chrono::high_resolution_clock::now();
SLANG_RETURN_ON_FAIL(compiler->convert(artifact, assemblyDesc, outArtifact));
-
+ auto downstreamElapsedTime =
+ (std::chrono::high_resolution_clock::now() - downstreamStartTime).count() * 0.000000001;
+ session->addDownstreamCompileTime(downstreamElapsedTime);
return SLANG_OK;
}