mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-11-27 15:14:31 +00: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:
1 parent
a9fee27bbb
commit
49c6f488b6
4 files changed
+529
No files matched your search
@@ -375,6 +375,7 @@ auto HandleInst(FunctionContext& context, SemIR::InstId inst_id,
|
||||
inst_ir->constant_values().GetInstAs<SemIR::InstValue>(inst_value_id);
|
||||
if (inst_ir == &context.sem_ir()) {
|
||||
// Easy case: same file. Just emit the spliced instruction.
|
||||
context.AddInstToCurrentFingerprint(inst_value.inst_id);
|
||||
context.LowerInst(inst_value.inst_id);
|
||||
context.SetLocal(inst_id, context.GetValue(inst_value.inst_id));
|
||||
} else {
|
||||
|
||||
Reference in new issue
Block a user