mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-05 22:02:55 +01:00
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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user