[llvm] Add option to dump IR to files intstead of stderr (PR #66412)
via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 14 16:26:00 PDT 2023
================
@@ -684,9 +686,64 @@ PrintIRInstrumentation::~PrintIRInstrumentation() {
assert(ModuleDescStack.empty() && "ModuleDescStack is not empty at exit");
}
-void PrintIRInstrumentation::pushModuleDesc(StringRef PassID, Any IR) {
+static SmallString<32> getIRDisplayName(Any IR) {
+
+ auto hashName = [](StringRef name) {
----------------
kyulee-com wrote:
> Note hashing is not guaranteed to be stable between executions
I thought hashing strings are stable unless the seed for hashing is changed. If so, can we use a stable hash like `stable_hash_combine_string`? Unless the module name is changed, I'd like to get a stable file name.
https://github.com/llvm/llvm-project/pull/66412
More information about the llvm-commits
mailing list