Include spliced inst value in fingerprint while lowering. (#7739)

This prevents different template instantiations from getting
over-eagerly merged. Unfortunately we don't have a good middle-ground
yet, and this effectively disables all merging for templates. We may be
able to find some smart way to fingerprint spliced instructions so that
we can still merge template instantiations, but for now this change is
just fixing the wrong-code bug.
This commit is contained in:
Richard Smith
2026-09-09 17:54:10 +00:00
committed by GitHub
parent a9fee27bbb
commit 49c6f488b6
4 changed files with 529 additions and 0 deletions
+4
View File
@@ -226,6 +226,10 @@ class FunctionContext {
// When fingerprinting for a specific, adds the type.
auto AddTypeToCurrentFingerprint(llvm::Type* type) -> void;
// When fingerprinting for a specific of a template, adds the given
// instruction.
auto AddInstToCurrentFingerprint(SemIR::InstId inst_id) -> void;
// Emits the final function fingerprints. Only called when function lowering
// is complete.
auto EmitFinalFingerprint() -> void;