Bladeren bron

Abbreviate "Reference" -> "Ref", "Dereference" -> "Deref" (#3425)

Part of switching to the [abbreviations we've decided to
use](https://docs.google.com/document/d/1RRYMm42osyqhI2LyjrjockYCutQ5dOf8Abu50kTrkX0/edit?resourcekey=0-kHyqOESbOHmzZphUbtLrTw#heading=h.pph7i5m5un7q).

File renames will be done separately.
josh11b 2 jaren geleden
bovenliggende
commit
c89c452579
100 gewijzigde bestanden met toevoegingen van 370 en 376 verwijderingen
  1. 17 19
      toolchain/check/context.cpp
  2. 4 5
      toolchain/check/context.h
  3. 13 13
      toolchain/check/convert.cpp
  4. 2 2
      toolchain/check/convert.h
  5. 4 4
      toolchain/check/handle_index.cpp
  6. 10 13
      toolchain/check/handle_name.cpp
  7. 12 12
      toolchain/check/handle_operator.cpp
  8. 2 2
      toolchain/check/testdata/array/array_in_place.carbon
  9. 1 1
      toolchain/check/testdata/array/assign_return_value.carbon
  10. 1 1
      toolchain/check/testdata/array/assign_var.carbon
  11. 3 3
      toolchain/check/testdata/array/fail_incomplete_element.carbon
  12. 2 2
      toolchain/check/testdata/array/fail_type_mismatch.carbon
  13. 4 4
      toolchain/check/testdata/array/function_param.carbon
  14. 10 10
      toolchain/check/testdata/as/identity.carbon
  15. 12 12
      toolchain/check/testdata/as/tuple.carbon
  16. 10 10
      toolchain/check/testdata/basics/builtin_insts.carbon
  17. 1 1
      toolchain/check/testdata/basics/fail_name_lookup.carbon
  18. 1 1
      toolchain/check/testdata/basics/fail_qualifier_unsupported.carbon
  19. 2 2
      toolchain/check/testdata/basics/multifile_raw_and_textual_ir.carbon
  20. 2 2
      toolchain/check/testdata/basics/multifile_raw_ir.carbon
  21. 3 3
      toolchain/check/testdata/basics/raw_and_textual_ir.carbon
  22. 3 3
      toolchain/check/testdata/basics/raw_identifier.carbon
  23. 2 2
      toolchain/check/testdata/basics/raw_ir.carbon
  24. 1 1
      toolchain/check/testdata/basics/textual_ir.carbon
  25. 4 4
      toolchain/check/testdata/class/basic.carbon
  26. 6 6
      toolchain/check/testdata/class/fail_addr_self.carbon
  27. 15 15
      toolchain/check/testdata/class/fail_incomplete.carbon
  28. 3 3
      toolchain/check/testdata/class/fail_init.carbon
  29. 4 4
      toolchain/check/testdata/class/fail_init_as_inplace.carbon
  30. 3 3
      toolchain/check/testdata/class/fail_memaccess_category.carbon
  31. 1 1
      toolchain/check/testdata/class/fail_member_of_let.carbon
  32. 10 10
      toolchain/check/testdata/class/fail_method.carbon
  33. 2 2
      toolchain/check/testdata/class/fail_reorder.carbon
  34. 1 1
      toolchain/check/testdata/class/fail_scope.carbon
  35. 3 3
      toolchain/check/testdata/class/fail_self.carbon
  36. 3 3
      toolchain/check/testdata/class/fail_unbound_field.carbon
  37. 2 2
      toolchain/check/testdata/class/fail_unknown_member.carbon
  38. 5 5
      toolchain/check/testdata/class/field_access.carbon
  39. 7 7
      toolchain/check/testdata/class/field_access_in_value.carbon
  40. 1 1
      toolchain/check/testdata/class/forward_declared.carbon
  41. 5 5
      toolchain/check/testdata/class/init.carbon
  42. 1 1
      toolchain/check/testdata/class/init_as.carbon
  43. 4 4
      toolchain/check/testdata/class/init_nested.carbon
  44. 10 10
      toolchain/check/testdata/class/method.carbon
  45. 30 30
      toolchain/check/testdata/class/nested.carbon
  46. 3 3
      toolchain/check/testdata/class/nested_name.carbon
  47. 5 5
      toolchain/check/testdata/class/raw_self.carbon
  48. 3 3
      toolchain/check/testdata/class/raw_self_type.carbon
  49. 1 1
      toolchain/check/testdata/class/reenter_scope.carbon
  50. 4 4
      toolchain/check/testdata/class/scope.carbon
  51. 3 3
      toolchain/check/testdata/class/self.carbon
  52. 3 3
      toolchain/check/testdata/class/self_type.carbon
  53. 3 3
      toolchain/check/testdata/class/static_method.carbon
  54. 1 1
      toolchain/check/testdata/const/collapse.carbon
  55. 1 1
      toolchain/check/testdata/const/fail_collapse.carbon
  56. 5 5
      toolchain/check/testdata/expression_category/in_place_tuple_init.carbon
  57. 2 2
      toolchain/check/testdata/function/call/empty_struct.carbon
  58. 2 2
      toolchain/check/testdata/function/call/empty_tuple.carbon
  59. 6 6
      toolchain/check/testdata/function/call/fail_param_count.carbon
  60. 1 1
      toolchain/check/testdata/function/call/fail_param_type.carbon
  61. 1 1
      toolchain/check/testdata/function/call/fail_return_type_mismatch.carbon
  62. 2 2
      toolchain/check/testdata/function/call/i32.carbon
  63. 1 1
      toolchain/check/testdata/function/call/more_param_ir.carbon
  64. 1 1
      toolchain/check/testdata/function/call/params_one.carbon
  65. 2 2
      toolchain/check/testdata/function/call/params_one_comma.carbon
  66. 1 1
      toolchain/check/testdata/function/call/params_two.carbon
  67. 2 2
      toolchain/check/testdata/function/call/params_two_comma.carbon
  68. 1 1
      toolchain/check/testdata/function/call/params_zero.carbon
  69. 1 1
      toolchain/check/testdata/function/call/return_implicit.carbon
  70. 1 1
      toolchain/check/testdata/function/declaration/simple.carbon
  71. 4 4
      toolchain/check/testdata/if/else.carbon
  72. 3 3
      toolchain/check/testdata/if/fail_reachable_fallthrough.carbon
  73. 3 3
      toolchain/check/testdata/if/fail_scope.carbon
  74. 3 3
      toolchain/check/testdata/if/no_else.carbon
  75. 1 1
      toolchain/check/testdata/if/unreachable_fallthrough.carbon
  76. 5 5
      toolchain/check/testdata/if_expression/basic.carbon
  77. 4 4
      toolchain/check/testdata/if_expression/constant_condition.carbon
  78. 3 3
      toolchain/check/testdata/if_expression/control_flow.carbon
  79. 3 3
      toolchain/check/testdata/if_expression/nested.carbon
  80. 4 4
      toolchain/check/testdata/if_expression/struct.carbon
  81. 3 3
      toolchain/check/testdata/index/array_element_access.carbon
  82. 6 6
      toolchain/check/testdata/index/expression_category.carbon
  83. 1 1
      toolchain/check/testdata/index/fail_array_large_index.carbon
  84. 1 1
      toolchain/check/testdata/index/fail_array_non_int_indexing.carbon
  85. 1 1
      toolchain/check/testdata/index/fail_array_out_of_bound_access.carbon
  86. 1 1
      toolchain/check/testdata/index/fail_empty_tuple_access.carbon
  87. 6 6
      toolchain/check/testdata/index/fail_expression_category.carbon
  88. 2 2
      toolchain/check/testdata/index/fail_invalid_base.carbon
  89. 1 1
      toolchain/check/testdata/index/fail_name_not_found.carbon
  90. 2 2
      toolchain/check/testdata/index/fail_non_deterministic_type.carbon
  91. 2 2
      toolchain/check/testdata/index/fail_tuple_index_error.carbon
  92. 2 2
      toolchain/check/testdata/index/fail_tuple_large_index.carbon
  93. 1 1
      toolchain/check/testdata/index/fail_tuple_non_int_indexing.carbon
  94. 1 1
      toolchain/check/testdata/index/fail_tuple_out_of_bound_access.carbon
  95. 2 2
      toolchain/check/testdata/index/tuple_element_access.carbon
  96. 1 1
      toolchain/check/testdata/index/tuple_return_value_access.carbon
  97. 2 2
      toolchain/check/testdata/let/convert.carbon
  98. 1 1
      toolchain/check/testdata/let/fail_use_in_init.carbon
  99. 1 1
      toolchain/check/testdata/let/global.carbon
  100. 2 2
      toolchain/check/testdata/let/local.carbon

+ 17 - 19
toolchain/check/context.cpp

@@ -297,8 +297,8 @@ auto Context::SetReturnedVarOrGetExisting(SemIR::InstId inst_id)
   return SemIR::InstId::Invalid;
 }
 
-auto Context::FollowNameReferences(SemIR::InstId inst_id) -> SemIR::InstId {
-  while (auto name_ref = insts().Get(inst_id).TryAs<SemIR::NameReference>()) {
+auto Context::FollowNameRefs(SemIR::InstId inst_id) -> SemIR::InstId {
+  while (auto name_ref = insts().Get(inst_id).TryAs<SemIR::NameRef>()) {
     inst_id = name_ref->value_id;
   }
   return inst_id;
@@ -310,8 +310,8 @@ auto Context::GetConstantValue(SemIR::InstId inst_id) -> SemIR::InstId {
   while (true) {
     auto inst = insts().Get(inst_id);
     switch (inst.kind()) {
-      case SemIR::NameReference::Kind:
-        inst_id = inst.As<SemIR::NameReference>().value_id;
+      case SemIR::NameRef::Kind:
+        inst_id = inst.As<SemIR::NameRef>().value_id;
         break;
 
       case SemIR::BindName::Kind:
@@ -655,13 +655,11 @@ class TypeCompleter {
     return value_rep;
   };
 
-  auto BuildCrossReferenceValueRepresentation(SemIR::TypeId type_id,
-                                              SemIR::CrossReference xref) const
+  auto BuildCrossRefValueRepresentation(SemIR::TypeId type_id,
+                                        SemIR::CrossRef xref) const
       -> SemIR::ValueRepresentation {
-    auto xref_inst = context_.cross_reference_irs()
-                         .Get(xref.ir_id)
-                         ->insts()
-                         .Get(xref.inst_id);
+    auto xref_inst =
+        context_.cross_ref_irs().Get(xref.ir_id)->insts().Get(xref.inst_id);
 
     // The canonical description of a type should only have cross-references
     // for entities owned by another File, such as builtins, which are owned
@@ -810,12 +808,12 @@ class TypeCompleter {
       case SemIR::ClassFieldAccess::Kind:
       case SemIR::ClassInit::Kind:
       case SemIR::Converted::Kind:
-      case SemIR::Dereference::Kind:
+      case SemIR::Deref::Kind:
       case SemIR::Field::Kind:
       case SemIR::FunctionDecl::Kind:
       case SemIR::InitializeFrom::Kind:
       case SemIR::IntegerLiteral::Kind:
-      case SemIR::NameReference::Kind:
+      case SemIR::NameRef::Kind:
       case SemIR::Namespace::Kind:
       case SemIR::NoOp::Kind:
       case SemIR::Param::Kind:
@@ -838,14 +836,14 @@ class TypeCompleter {
       case SemIR::TupleInit::Kind:
       case SemIR::TupleValue::Kind:
       case SemIR::UnaryOperatorNot::Kind:
-      case SemIR::ValueAsReference::Kind:
+      case SemIR::ValueAsRef::Kind:
       case SemIR::ValueOfInitializer::Kind:
       case SemIR::VarStorage::Kind:
         CARBON_FATAL() << "Type refers to non-type inst " << inst;
 
-      case SemIR::CrossReference::Kind:
-        return BuildCrossReferenceValueRepresentation(
-            type_id, inst.As<SemIR::CrossReference>());
+      case SemIR::CrossRef::Kind:
+        return BuildCrossRefValueRepresentation(type_id,
+                                                inst.As<SemIR::CrossRef>());
 
       case SemIR::ArrayType::Kind: {
         // For arrays, it's convenient to always use a pointer representation,
@@ -983,10 +981,10 @@ static auto ProfileType(Context& semantics_context, SemIR::Inst inst,
     case SemIR::ClassType::Kind:
       canonical_id.AddInteger(inst.As<SemIR::ClassType>().class_id.index);
       break;
-    case SemIR::CrossReference::Kind: {
+    case SemIR::CrossRef::Kind: {
       // TODO: Cross-references should be canonicalized by looking at their
       // target rather than treating them as new unique types.
-      auto xref = inst.As<SemIR::CrossReference>();
+      auto xref = inst.As<SemIR::CrossRef>();
       canonical_id.AddInteger(xref.ir_id.index);
       canonical_id.AddInteger(xref.inst_id.index);
       break;
@@ -1044,7 +1042,7 @@ auto Context::CanonicalizeType(SemIR::InstId inst_id) -> SemIR::TypeId {
   while (auto converted = insts().Get(inst_id).TryAs<SemIR::Converted>()) {
     inst_id = converted->result_id;
   }
-  inst_id = FollowNameReferences(inst_id);
+  inst_id = FollowNameRefs(inst_id);
 
   auto it = canonical_types_.find(inst_id);
   if (it != canonical_types_.end()) {

+ 4 - 5
toolchain/check/context.h

@@ -131,9 +131,9 @@ class Context {
   // is already a `returned var`, returns it instead.
   auto SetReturnedVarOrGetExisting(SemIR::InstId bind_id) -> SemIR::InstId;
 
-  // Follows NameReference instructions to find the value named by a given
+  // Follows NameRef instructions to find the value named by a given
   // instruction.
-  auto FollowNameReferences(SemIR::InstId inst_id) -> SemIR::InstId;
+  auto FollowNameRefs(SemIR::InstId inst_id) -> SemIR::InstId;
 
   // Gets the constant value of the given instruction, if it has one.
   auto GetConstantValue(SemIR::InstId inst_id) -> SemIR::InstId;
@@ -300,9 +300,8 @@ class Context {
   auto classes() -> ValueStore<SemIR::ClassId, SemIR::Class>& {
     return sem_ir().classes();
   }
-  auto cross_reference_irs()
-      -> ValueStore<SemIR::CrossReferenceIRId, const SemIR::File*>& {
-    return sem_ir().cross_reference_irs();
+  auto cross_ref_irs() -> ValueStore<SemIR::CrossRefIRId, const SemIR::File*>& {
+    return sem_ir().cross_ref_irs();
   }
   auto names() -> SemIR::NameStoreWrapper { return sem_ir().names(); }
   auto name_scopes() -> SemIR::NameScopeStore& {

+ 13 - 13
toolchain/check/convert.cpp

@@ -584,11 +584,11 @@ static bool IsValidExprCategoryForConversionTarget(
   switch (target_kind) {
     case ConversionTarget::Value:
       return category == SemIR::ExprCategory::Value;
-    case ConversionTarget::ValueOrReference:
+    case ConversionTarget::ValueOrRef:
     case ConversionTarget::Discarded:
       return category == SemIR::ExprCategory::Value ||
-             category == SemIR::ExprCategory::DurableReference ||
-             category == SemIR::ExprCategory::EphemeralReference ||
+             category == SemIR::ExprCategory::DurableRef ||
+             category == SemIR::ExprCategory::EphemeralRef ||
              category == SemIR::ExprCategory::Initializing;
     case ConversionTarget::ExplicitAs:
       return true;
@@ -884,10 +884,10 @@ auto Convert(Context& context, Parse::Node parse_node, SemIR::InstId expr_id,
       // We now have an ephemeral reference.
       [[fallthrough]];
 
-    case SemIR::ExprCategory::DurableReference:
-    case SemIR::ExprCategory::EphemeralReference:
+    case SemIR::ExprCategory::DurableRef:
+    case SemIR::ExprCategory::EphemeralRef:
       // If a reference expression is an acceptable result, we're done.
-      if (target.kind == ConversionTarget::ValueOrReference ||
+      if (target.kind == ConversionTarget::ValueOrRef ||
           target.kind == ConversionTarget::Discarded) {
         break;
       }
@@ -939,12 +939,12 @@ auto ConvertToValueExpr(Context& context, SemIR::InstId expr_id)
                  {.kind = ConversionTarget::Value, .type_id = expr.type_id()});
 }
 
-auto ConvertToValueOrReferenceExpr(Context& context, SemIR::InstId expr_id)
+auto ConvertToValueOrRefExpr(Context& context, SemIR::InstId expr_id)
     -> SemIR::InstId {
   auto expr = context.sem_ir().insts().Get(expr_id);
   return Convert(
       context, expr.parse_node(), expr_id,
-      {.kind = ConversionTarget::ValueOrReference, .type_id = expr.type_id()});
+      {.kind = ConversionTarget::ValueOrRef, .type_id = expr.type_id()});
 }
 
 auto ConvertToValueOfType(Context& context, Parse::Node parse_node,
@@ -1000,17 +1000,17 @@ static auto ConvertSelf(Context& context, Parse::Node call_parse_node,
   // For `addr self`, take the address of the object argument.
   auto self_or_addr_id = self_id;
   if (self_param.is_addr_self.index) {
-    self_or_addr_id = ConvertToValueOrReferenceExpr(context, self_or_addr_id);
+    self_or_addr_id = ConvertToValueOrRefExpr(context, self_or_addr_id);
     auto self = context.insts().Get(self_or_addr_id);
     switch (SemIR::GetExprCategory(context.sem_ir(), self_id)) {
       case SemIR::ExprCategory::Error:
-      case SemIR::ExprCategory::DurableReference:
-      case SemIR::ExprCategory::EphemeralReference:
+      case SemIR::ExprCategory::DurableRef:
+      case SemIR::ExprCategory::EphemeralRef:
         break;
       default:
-        CARBON_DIAGNOSTIC(AddrSelfIsNonReference, Error,
+        CARBON_DIAGNOSTIC(AddrSelfIsNonRef, Error,
                           "`addr self` method cannot be invoked on a value.");
-        context.emitter().Emit(call_parse_node, AddrSelfIsNonReference);
+        context.emitter().Emit(call_parse_node, AddrSelfIsNonRef);
         return SemIR::InstId::BuiltinError;
     }
     self_or_addr_id = context.AddInst(SemIR::AddressOf{

+ 2 - 2
toolchain/check/convert.h

@@ -18,7 +18,7 @@ struct ConversionTarget {
     // Convert to a value of type `type`.
     Value,
     // Convert to either a value or a reference of type `type`.
-    ValueOrReference,
+    ValueOrRef,
     // Convert for an explicit `as` cast. This allows any expression category
     // as the result, and uses the `As` interface instead of the `ImplicitAs`
     // interface.
@@ -68,7 +68,7 @@ auto ConvertToValueExpr(Context& context, SemIR::InstId expr_id)
 
 // Convert the given expression to a value or reference expression of the same
 // type.
-auto ConvertToValueOrReferenceExpr(Context& context, SemIR::InstId expr_id)
+auto ConvertToValueOrRefExpr(Context& context, SemIR::InstId expr_id)
     -> SemIR::InstId;
 
 // Converts `value_id` to a value expression of type `type_id`.

+ 4 - 4
toolchain/check/handle_index.cpp

@@ -41,7 +41,7 @@ auto HandleIndexExpr(Context& context, Parse::Node parse_node) -> bool {
   auto index_inst_id = context.node_stack().PopExpr();
   auto index_inst = context.insts().Get(index_inst_id);
   auto operand_inst_id = context.node_stack().PopExpr();
-  operand_inst_id = ConvertToValueOrReferenceExpr(context, operand_inst_id);
+  operand_inst_id = ConvertToValueOrRefExpr(context, operand_inst_id);
   auto operand_inst = context.insts().Get(operand_inst_id);
   auto operand_type_id = operand_inst.type_id();
   auto operand_type_inst = context.insts().Get(
@@ -67,13 +67,13 @@ auto HandleIndexExpr(Context& context, Parse::Node parse_node) -> bool {
       if (array_cat == SemIR::ExprCategory::Value) {
         // If the operand is an array value, convert it to an ephemeral
         // reference to an array so we can perform a primitive indexing into it.
-        operand_inst_id = context.AddInst(SemIR::ValueAsReference{
-            parse_node, operand_type_id, operand_inst_id});
+        operand_inst_id = context.AddInst(
+            SemIR::ValueAsRef{parse_node, operand_type_id, operand_inst_id});
       }
       auto elem_id = context.AddInst(
           SemIR::ArrayIndex{parse_node, array_type.element_type_id,
                             operand_inst_id, cast_index_id});
-      if (array_cat != SemIR::ExprCategory::DurableReference) {
+      if (array_cat != SemIR::ExprCategory::DurableRef) {
         // Indexing a durable reference gives a durable reference expression.
         // Indexing anything else gives a value expression.
         // TODO: This should be replaced by a choice between using `IndexWith`

+ 10 - 13
toolchain/check/handle_name.cpp

@@ -14,7 +14,7 @@ namespace Carbon::Check {
 // On invalid scopes, prints a diagnostic and still returns the scope.
 static auto GetAsNameScope(Context& context, SemIR::InstId base_id)
     -> std::optional<SemIR::NameScopeId> {
-  auto base = context.insts().Get(context.FollowNameReferences(base_id));
+  auto base = context.insts().Get(context.FollowNameRefs(base_id));
   if (auto base_as_namespace = base.TryAs<SemIR::Namespace>()) {
     return base_as_namespace->name_scope_id;
   }
@@ -70,7 +70,7 @@ auto HandleMemberAccessExpr(Context& context, Parse::Node parse_node) -> bool {
     // TODO: Track that this instruction was named within `base_id`.
     context.AddInstAndPush(
         parse_node,
-        SemIR::NameReference{parse_node, inst.type_id(), name_id, inst_id});
+        SemIR::NameRef{parse_node, inst.type_id(), name_id, inst_id});
     return true;
   }
 
@@ -90,7 +90,7 @@ auto HandleMemberAccessExpr(Context& context, Parse::Node parse_node) -> bool {
   }
 
   // Materialize a temporary for the base expression if necessary.
-  base_id = ConvertToValueOrReferenceExpr(context, base_id);
+  base_id = ConvertToValueOrRefExpr(context, base_id);
   base_type_id = context.insts().Get(base_id).type_id();
 
   auto base_type = context.insts().Get(
@@ -172,7 +172,7 @@ auto HandleMemberAccessExpr(Context& context, Parse::Node parse_node) -> bool {
       // TODO: Track that this was named within `base_id`.
       context.AddInstAndPush(
           parse_node,
-          SemIR::NameReference{parse_node, member_type_id, name_id, member_id});
+          SemIR::NameRef{parse_node, member_type_id, name_id, member_id});
       return true;
     }
     case SemIR::StructType::Kind: {
@@ -235,9 +235,8 @@ auto HandleNameExpr(Context& context, Parse::Node parse_node) -> bool {
   auto value_id = context.LookupUnqualifiedName(parse_node, name_id);
   value_id = GetExprValueForLookupResult(context, value_id);
   auto value = context.insts().Get(value_id);
-  context.AddInstAndPush(
-      parse_node,
-      SemIR::NameReference{parse_node, value.type_id(), name_id, value_id});
+  context.AddInstAndPush(parse_node, SemIR::NameRef{parse_node, value.type_id(),
+                                                    name_id, value_id});
   return true;
 }
 
@@ -276,9 +275,8 @@ auto HandleSelfTypeNameExpr(Context& context, Parse::Node parse_node) -> bool {
   auto name_id = SemIR::NameId::SelfType;
   auto value_id = context.LookupUnqualifiedName(parse_node, name_id);
   auto value = context.insts().Get(value_id);
-  context.AddInstAndPush(
-      parse_node,
-      SemIR::NameReference{parse_node, value.type_id(), name_id, value_id});
+  context.AddInstAndPush(parse_node, SemIR::NameRef{parse_node, value.type_id(),
+                                                    name_id, value_id});
   return true;
 }
 
@@ -291,9 +289,8 @@ auto HandleSelfValueNameExpr(Context& context, Parse::Node parse_node) -> bool {
   auto name_id = SemIR::NameId::SelfValue;
   auto value_id = context.LookupUnqualifiedName(parse_node, name_id);
   auto value = context.insts().Get(value_id);
-  context.AddInstAndPush(
-      parse_node,
-      SemIR::NameReference{parse_node, value.type_id(), name_id, value_id});
+  context.AddInstAndPush(parse_node, SemIR::NameRef{parse_node, value.type_id(),
+                                                    name_id, value_id});
   return true;
 }
 

+ 12 - 12
toolchain/check/handle_operator.cpp

@@ -59,7 +59,7 @@ auto HandleInfixOperator(Context& context, Parse::Node parse_node) -> bool {
     case Lex::TokenKind::Equal: {
       // TODO: handle complex assignment expression such as `a += 1`.
       if (auto lhs_cat = SemIR::GetExprCategory(context.sem_ir(), lhs_id);
-          lhs_cat != SemIR::ExprCategory::DurableReference &&
+          lhs_cat != SemIR::ExprCategory::DurableRef &&
           lhs_cat != SemIR::ExprCategory::Error) {
         CARBON_DIAGNOSTIC(AssignmentToNonAssignable, Error,
                           "Expression is not assignable.");
@@ -109,19 +109,19 @@ auto HandlePrefixOperator(Context& context, Parse::Node parse_node) -> bool {
     case Lex::TokenKind::Amp: {
       // Only durable reference expressions can have their address taken.
       switch (SemIR::GetExprCategory(context.sem_ir(), value_id)) {
-        case SemIR::ExprCategory::DurableReference:
+        case SemIR::ExprCategory::DurableRef:
         case SemIR::ExprCategory::Error:
           break;
-        case SemIR::ExprCategory::EphemeralReference:
-          CARBON_DIAGNOSTIC(AddressOfEphemeralReference, Error,
+        case SemIR::ExprCategory::EphemeralRef:
+          CARBON_DIAGNOSTIC(AddressOfEphemeralRef, Error,
                             "Cannot take the address of a temporary object.");
-          context.emitter().Emit(parse_node, AddressOfEphemeralReference);
+          context.emitter().Emit(parse_node, AddressOfEphemeralRef);
           break;
         default:
           CARBON_DIAGNOSTIC(
-              AddressOfNonReference, Error,
+              AddressOfNonRef, Error,
               "Cannot take the address of non-reference expression.");
-          context.emitter().Emit(parse_node, AddressOfNonReference);
+          context.emitter().Emit(parse_node, AddressOfNonRef);
           break;
       }
       context.AddInstAndPush(
@@ -170,23 +170,23 @@ auto HandlePrefixOperator(Context& context, Parse::Node parse_node) -> bool {
         result_type_id = pointer_type->pointee_id;
       } else if (type_id != SemIR::TypeId::Error) {
         CARBON_DIAGNOSTIC(
-            DereferenceOfNonPointer, Error,
+            DerefOfNonPointer, Error,
             "Cannot dereference operand of non-pointer type `{0}`.",
             std::string);
         auto builder =
-            context.emitter().Build(parse_node, DereferenceOfNonPointer,
+            context.emitter().Build(parse_node, DerefOfNonPointer,
                                     context.sem_ir().StringifyType(type_id));
         // TODO: Check for any facet here, rather than only a type.
         if (type_id == SemIR::TypeId::TypeType) {
           CARBON_DIAGNOSTIC(
-              DereferenceOfType, Note,
+              DerefOfType, Note,
               "To form a pointer type, write the `*` after the pointee type.");
-          builder.Note(parse_node, DereferenceOfType);
+          builder.Note(parse_node, DerefOfType);
         }
         builder.Emit();
       }
       context.AddInstAndPush(
-          parse_node, SemIR::Dereference{parse_node, result_type_id, value_id});
+          parse_node, SemIR::Deref{parse_node, result_type_id, value_id});
       return true;
     }
 

+ 2 - 2
toolchain/check/testdata/array/array_in_place.carbon

@@ -33,13 +33,13 @@ fn G() {
 // CHECK:STDOUT:   %.loc10_29: type = array_type %.loc10_28, (i32, i32, i32)
 // CHECK:STDOUT:   %v.var: ref [(i32, i32, i32); 2] = var v
 // CHECK:STDOUT:   %v: ref [(i32, i32, i32); 2] = bind_name v, %v.var
-// CHECK:STDOUT:   %F.ref.loc10_34: <function> = name_reference F, file.%F
+// CHECK:STDOUT:   %F.ref.loc10_34: <function> = name_ref F, file.%F
 // CHECK:STDOUT:   %.loc10_42.3: ref (i32, i32, i32) = splice_block %.loc10_42.2 {
 // CHECK:STDOUT:     %.loc10_42.1: i32 = int_literal 0
 // CHECK:STDOUT:     %.loc10_42.2: ref (i32, i32, i32) = array_index %v.var, %.loc10_42.1
 // CHECK:STDOUT:   }
 // CHECK:STDOUT:   %.loc10_35: init (i32, i32, i32) = call %F.ref.loc10_34() to %.loc10_42.3
-// CHECK:STDOUT:   %F.ref.loc10_39: <function> = name_reference F, file.%F
+// CHECK:STDOUT:   %F.ref.loc10_39: <function> = name_ref F, file.%F
 // CHECK:STDOUT:   %.loc10_42.6: ref (i32, i32, i32) = splice_block %.loc10_42.5 {
 // CHECK:STDOUT:     %.loc10_42.4: i32 = int_literal 1
 // CHECK:STDOUT:     %.loc10_42.5: ref (i32, i32, i32) = array_index %v.var, %.loc10_42.4

+ 1 - 1
toolchain/check/testdata/array/assign_return_value.carbon

@@ -36,7 +36,7 @@ fn Run() {
 // CHECK:STDOUT:   %.loc10_17: type = array_type %.loc10_16, i32
 // CHECK:STDOUT:   %t.var: ref [i32; 1] = var t
 // CHECK:STDOUT:   %t: ref [i32; 1] = bind_name t, %t.var
-// CHECK:STDOUT:   %F.ref: <function> = name_reference F, file.%F
+// CHECK:STDOUT:   %F.ref: <function> = name_ref F, file.%F
 // CHECK:STDOUT:   %.loc10_22.1: init (i32,) = call %F.ref()
 // CHECK:STDOUT:   %.loc10_22.2: ref (i32,) = temporary_storage
 // CHECK:STDOUT:   %.loc10_22.3: ref (i32,) = temporary %.loc10_22.2, %.loc10_22.1

+ 1 - 1
toolchain/check/testdata/array/assign_var.carbon

@@ -36,7 +36,7 @@ var b: [i32; 3] = a;
 // CHECK:STDOUT:   %.loc8_15: type = array_type %.loc8_14, i32
 // CHECK:STDOUT:   %b.var: ref [i32; 3] = var b
 // CHECK:STDOUT:   %b: ref [i32; 3] = bind_name b, %b.var
-// CHECK:STDOUT:   %a.ref: ref (i32, i32, i32) = name_reference a, %a
+// CHECK:STDOUT:   %a.ref: ref (i32, i32, i32) = name_ref a, %a
 // CHECK:STDOUT:   %.loc8_19.1: ref i32 = tuple_access %a.ref, member0
 // CHECK:STDOUT:   %.loc8_19.2: i32 = bind_value %.loc8_19.1
 // CHECK:STDOUT:   %.loc8_19.3: i32 = int_literal 0

+ 3 - 3
toolchain/check/testdata/array/fail_incomplete_element.carbon

@@ -26,16 +26,16 @@ var p: Incomplete* = &a[0];
 // CHECK:STDOUT: file "fail_incomplete_element.carbon" {
 // CHECK:STDOUT:   class_decl @Incomplete, ()
 // CHECK:STDOUT:   %Incomplete: type = class_type @Incomplete
-// CHECK:STDOUT:   %Incomplete.ref.loc15: type = name_reference Incomplete, %Incomplete
+// CHECK:STDOUT:   %Incomplete.ref.loc15: type = name_ref Incomplete, %Incomplete
 // CHECK:STDOUT:   %.loc15_21: i32 = int_literal 1
 // CHECK:STDOUT:   %.loc15_22: type = array_type %.loc15_21, Incomplete
 // CHECK:STDOUT:   %a.var: ref <error> = var a
 // CHECK:STDOUT:   %a: ref <error> = bind_name a, %a.var
-// CHECK:STDOUT:   %Incomplete.ref.loc20: type = name_reference Incomplete, %Incomplete
+// CHECK:STDOUT:   %Incomplete.ref.loc20: type = name_ref Incomplete, %Incomplete
 // CHECK:STDOUT:   %.loc20_18: type = ptr_type Incomplete
 // CHECK:STDOUT:   %p.var: ref Incomplete* = var p
 // CHECK:STDOUT:   %p: ref Incomplete* = bind_name p, %p.var
-// CHECK:STDOUT:   %a.ref: ref <error> = name_reference a, %a
+// CHECK:STDOUT:   %a.ref: ref <error> = name_ref a, %a
 // CHECK:STDOUT:   %.loc20_25: i32 = int_literal 0
 // CHECK:STDOUT:   %.loc20_22: <error>* = address_of <error>
 // CHECK:STDOUT:   assign %p.var, <error>

+ 2 - 2
toolchain/check/testdata/array/fail_type_mismatch.carbon

@@ -59,7 +59,7 @@ var d: [i32; 3] = t2;
 // CHECK:STDOUT:   %.loc16_15: type = array_type %.loc16_14, i32
 // CHECK:STDOUT:   %b.var: ref [i32; 3] = var b
 // CHECK:STDOUT:   %b: ref [i32; 3] = bind_name b, %b.var
-// CHECK:STDOUT:   %t1.ref: ref (i32, String, String) = name_reference t1, %t1
+// CHECK:STDOUT:   %t1.ref: ref (i32, String, String) = name_ref t1, %t1
 // CHECK:STDOUT:   %.loc16_19.1: ref i32 = tuple_access %t1.ref, member0
 // CHECK:STDOUT:   %.loc16_19.2: i32 = bind_value %.loc16_19.1
 // CHECK:STDOUT:   %.loc16_19.3: i32 = int_literal 0
@@ -83,6 +83,6 @@ var d: [i32; 3] = t2;
 // CHECK:STDOUT:   %.loc27_15: type = array_type %.loc27_14, i32
 // CHECK:STDOUT:   %d.var: ref [i32; 3] = var d
 // CHECK:STDOUT:   %d: ref [i32; 3] = bind_name d, %d.var
-// CHECK:STDOUT:   %t2.ref: ref (i32, i32) = name_reference t2, %t2
+// CHECK:STDOUT:   %t2.ref: ref (i32, i32) = name_ref t2, %t2
 // CHECK:STDOUT:   assign %d.var, <error>
 // CHECK:STDOUT: }

+ 4 - 4
toolchain/check/testdata/array/function_param.carbon

@@ -24,9 +24,9 @@ fn G() -> i32 {
 // CHECK:STDOUT:
 // CHECK:STDOUT: fn @F(%arr: [i32; 3], %i: i32) -> i32 {
 // CHECK:STDOUT: !entry:
-// CHECK:STDOUT:   %arr.ref: [i32; 3] = name_reference arr, %arr
-// CHECK:STDOUT:   %i.ref: i32 = name_reference i, %i
-// CHECK:STDOUT:   %.loc8_15.1: ref [i32; 3] = value_as_reference %arr.ref
+// CHECK:STDOUT:   %arr.ref: [i32; 3] = name_ref arr, %arr
+// CHECK:STDOUT:   %i.ref: i32 = name_ref i, %i
+// CHECK:STDOUT:   %.loc8_15.1: ref [i32; 3] = value_as_ref %arr.ref
 // CHECK:STDOUT:   %.loc8_15.2: ref i32 = array_index %.loc8_15.1, %i.ref
 // CHECK:STDOUT:   %.loc8_15.3: i32 = bind_value %.loc8_15.2
 // CHECK:STDOUT:   return %.loc8_15.3
@@ -34,7 +34,7 @@ fn G() -> i32 {
 // CHECK:STDOUT:
 // CHECK:STDOUT: fn @G() -> i32 {
 // CHECK:STDOUT: !entry:
-// CHECK:STDOUT:   %F.ref: <function> = name_reference F, file.%F
+// CHECK:STDOUT:   %F.ref: <function> = name_ref F, file.%F
 // CHECK:STDOUT:   %.loc12_13: i32 = int_literal 1
 // CHECK:STDOUT:   %.loc12_16: i32 = int_literal 2
 // CHECK:STDOUT:   %.loc12_19: i32 = int_literal 3

+ 10 - 10
toolchain/check/testdata/as/identity.carbon

@@ -46,20 +46,20 @@ fn Initializing() {
 // CHECK:STDOUT:
 // CHECK:STDOUT: fn @Value(%n: X) {
 // CHECK:STDOUT: !entry:
-// CHECK:STDOUT:   %X.ref.loc14_10: type = name_reference X, file.%X
-// CHECK:STDOUT:   %n.ref: X = name_reference n, %n
-// CHECK:STDOUT:   %X.ref.loc14_19: type = name_reference X, file.%X
+// CHECK:STDOUT:   %X.ref.loc14_10: type = name_ref X, file.%X
+// CHECK:STDOUT:   %n.ref: X = name_ref n, %n
+// CHECK:STDOUT:   %X.ref.loc14_19: type = name_ref X, file.%X
 // CHECK:STDOUT:   %m: X = bind_name m, %n.ref
 // CHECK:STDOUT:   return
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
 // CHECK:STDOUT: fn @Reference(%p: X*) {
 // CHECK:STDOUT: !entry:
-// CHECK:STDOUT:   %X.ref.loc18_10: type = name_reference X, file.%X
+// CHECK:STDOUT:   %X.ref.loc18_10: type = name_ref X, file.%X
 // CHECK:STDOUT:   %.loc18_11: type = ptr_type X
-// CHECK:STDOUT:   %p.ref: X* = name_reference p, %p
-// CHECK:STDOUT:   %.loc18_17: ref X = dereference %p.ref
-// CHECK:STDOUT:   %X.ref.loc18_23: type = name_reference X, file.%X
+// CHECK:STDOUT:   %p.ref: X* = name_ref p, %p
+// CHECK:STDOUT:   %.loc18_17: ref X = deref %p.ref
+// CHECK:STDOUT:   %X.ref.loc18_23: type = name_ref X, file.%X
 // CHECK:STDOUT:   %.loc18_15: X* = address_of %.loc18_17
 // CHECK:STDOUT:   %q: X* = bind_name q, %.loc18_15
 // CHECK:STDOUT:   return
@@ -69,13 +69,13 @@ fn Initializing() {
 // CHECK:STDOUT:
 // CHECK:STDOUT: fn @Initializing() {
 // CHECK:STDOUT: !entry:
-// CHECK:STDOUT:   %X.ref.loc24_10: type = name_reference X, file.%X
+// CHECK:STDOUT:   %X.ref.loc24_10: type = name_ref X, file.%X
 // CHECK:STDOUT:   %x.var: ref X = var x
 // CHECK:STDOUT:   %x: ref X = bind_name x, %x.var
-// CHECK:STDOUT:   %Make.ref: <function> = name_reference Make, file.%Make
+// CHECK:STDOUT:   %Make.ref: <function> = name_ref Make, file.%Make
 // CHECK:STDOUT:   %.loc24_7: ref X = splice_block %x.var {}
 // CHECK:STDOUT:   %.loc24_19: init X = call %Make.ref() to %.loc24_7
-// CHECK:STDOUT:   %X.ref.loc24_25: type = name_reference X, file.%X
+// CHECK:STDOUT:   %X.ref.loc24_25: type = name_ref X, file.%X
 // CHECK:STDOUT:   assign %x.var, %.loc24_19
 // CHECK:STDOUT:   return
 // CHECK:STDOUT: }

+ 12 - 12
toolchain/check/testdata/as/tuple.carbon

@@ -47,19 +47,19 @@ fn Var() {
 // CHECK:STDOUT:
 // CHECK:STDOUT: fn @Let() {
 // CHECK:STDOUT: !entry:
-// CHECK:STDOUT:   %X.ref.loc15_11: type = name_reference X, file.%X
-// CHECK:STDOUT:   %X.ref.loc15_14: type = name_reference X, file.%X
+// CHECK:STDOUT:   %X.ref.loc15_11: type = name_ref X, file.%X
+// CHECK:STDOUT:   %X.ref.loc15_14: type = name_ref X, file.%X
 // CHECK:STDOUT:   %.loc15_15.1: (type, type) = tuple_literal (%X.ref.loc15_11, %X.ref.loc15_14)
 // CHECK:STDOUT:   %.loc15_15.2: type = converted %.loc15_15.1, constants.%.loc15_15.2
-// CHECK:STDOUT:   %Make.ref.loc15_20: <function> = name_reference Make, file.%Make
+// CHECK:STDOUT:   %Make.ref.loc15_20: <function> = name_ref Make, file.%Make
 // CHECK:STDOUT:   %.loc15_24.1: ref X = temporary_storage
 // CHECK:STDOUT:   %.loc15_24.2: init X = call %Make.ref.loc15_20() to %.loc15_24.1
-// CHECK:STDOUT:   %Make.ref.loc15_28: <function> = name_reference Make, file.%Make
+// CHECK:STDOUT:   %Make.ref.loc15_28: <function> = name_ref Make, file.%Make
 // CHECK:STDOUT:   %.loc15_32.1: ref X = temporary_storage
 // CHECK:STDOUT:   %.loc15_32.2: init X = call %Make.ref.loc15_28() to %.loc15_32.1
 // CHECK:STDOUT:   %.loc15_34.1: (X, X) = tuple_literal (%.loc15_24.2, %.loc15_32.2)
-// CHECK:STDOUT:   %X.ref.loc15_40: type = name_reference X, file.%X
-// CHECK:STDOUT:   %X.ref.loc15_43: type = name_reference X, file.%X
+// CHECK:STDOUT:   %X.ref.loc15_40: type = name_ref X, file.%X
+// CHECK:STDOUT:   %X.ref.loc15_43: type = name_ref X, file.%X
 // CHECK:STDOUT:   %.loc15_44: (type, type) = tuple_literal (%X.ref.loc15_40, %X.ref.loc15_43)
 // CHECK:STDOUT:   %.loc15_15.3: type = converted %.loc15_44, constants.%.loc15_15.2
 // CHECK:STDOUT:   %.loc15_24.3: ref X = temporary %.loc15_24.1, %.loc15_24.2
@@ -74,21 +74,21 @@ fn Var() {
 // CHECK:STDOUT:
 // CHECK:STDOUT: fn @Var() {
 // CHECK:STDOUT: !entry:
-// CHECK:STDOUT:   %X.ref.loc20_11: type = name_reference X, file.%X
-// CHECK:STDOUT:   %X.ref.loc20_14: type = name_reference X, file.%X
+// CHECK:STDOUT:   %X.ref.loc20_11: type = name_ref X, file.%X
+// CHECK:STDOUT:   %X.ref.loc20_14: type = name_ref X, file.%X
 // CHECK:STDOUT:   %.loc20_15: (type, type) = tuple_literal (%X.ref.loc20_11, %X.ref.loc20_14)
 // CHECK:STDOUT:   %.loc15_15.1: type = converted %.loc20_15, constants.%.loc15_15.2
 // CHECK:STDOUT:   %b.var: ref (X, X) = var b
 // CHECK:STDOUT:   %b: ref (X, X) = bind_name b, %b.var
-// CHECK:STDOUT:   %Make.ref.loc20_20: <function> = name_reference Make, file.%Make
+// CHECK:STDOUT:   %Make.ref.loc20_20: <function> = name_ref Make, file.%Make
 // CHECK:STDOUT:   %.loc20_34.1: ref X = tuple_access %b.var, member0
 // CHECK:STDOUT:   %.loc20_24: init X = call %Make.ref.loc20_20() to %.loc20_34.1
-// CHECK:STDOUT:   %Make.ref.loc20_28: <function> = name_reference Make, file.%Make
+// CHECK:STDOUT:   %Make.ref.loc20_28: <function> = name_ref Make, file.%Make
 // CHECK:STDOUT:   %.loc20_34.2: ref X = tuple_access %b.var, member1
 // CHECK:STDOUT:   %.loc20_32: init X = call %Make.ref.loc20_28() to %.loc20_34.2
 // CHECK:STDOUT:   %.loc20_34.3: (X, X) = tuple_literal (%.loc20_24, %.loc20_32)
-// CHECK:STDOUT:   %X.ref.loc20_40: type = name_reference X, file.%X
-// CHECK:STDOUT:   %X.ref.loc20_43: type = name_reference X, file.%X
+// CHECK:STDOUT:   %X.ref.loc20_40: type = name_ref X, file.%X
+// CHECK:STDOUT:   %X.ref.loc20_43: type = name_ref X, file.%X
 // CHECK:STDOUT:   %.loc20_44: (type, type) = tuple_literal (%X.ref.loc20_40, %X.ref.loc20_43)
 // CHECK:STDOUT:   %.loc15_15.2: type = converted %.loc20_44, constants.%.loc15_15.2
 // CHECK:STDOUT:   %.loc20_34.4: init (X, X) = tuple_init (%.loc20_24, %.loc20_32) to %b.var

+ 10 - 10
toolchain/check/testdata/basics/builtin_insts.carbon

@@ -9,21 +9,21 @@
 // CHECK:STDOUT: ---
 // CHECK:STDOUT: filename:        builtin_insts.carbon
 // CHECK:STDOUT: sem_ir:
-// CHECK:STDOUT:   cross_reference_irs_size: 1
+// CHECK:STDOUT:   cross_ref_irs_size: 1
 // CHECK:STDOUT:   functions:       {}
 // CHECK:STDOUT:   classes:         {}
 // CHECK:STDOUT:   types:           {}
 // CHECK:STDOUT:   type_blocks:     {}
 // CHECK:STDOUT:   insts:
-// CHECK:STDOUT:     instTypeType:    {kind: CrossReference, arg0: ir0, arg1: instTypeType, type: typeTypeType}
-// CHECK:STDOUT:     instError:       {kind: CrossReference, arg0: ir0, arg1: instError, type: typeError}
-// CHECK:STDOUT:     instBoolType:    {kind: CrossReference, arg0: ir0, arg1: instBoolType, type: typeTypeType}
-// CHECK:STDOUT:     instIntegerType: {kind: CrossReference, arg0: ir0, arg1: instIntegerType, type: typeTypeType}
-// CHECK:STDOUT:     instFloatingPointType: {kind: CrossReference, arg0: ir0, arg1: instFloatingPointType, type: typeTypeType}
-// CHECK:STDOUT:     instStringType:  {kind: CrossReference, arg0: ir0, arg1: instStringType, type: typeTypeType}
-// CHECK:STDOUT:     instFunctionType: {kind: CrossReference, arg0: ir0, arg1: instFunctionType, type: typeTypeType}
-// CHECK:STDOUT:     instBoundMethodType: {kind: CrossReference, arg0: ir0, arg1: instBoundMethodType, type: typeTypeType}
-// CHECK:STDOUT:     instNamespaceType: {kind: CrossReference, arg0: ir0, arg1: instNamespaceType, type: typeTypeType}
+// CHECK:STDOUT:     instTypeType:    {kind: CrossRef, arg0: ir0, arg1: instTypeType, type: typeTypeType}
+// CHECK:STDOUT:     instError:       {kind: CrossRef, arg0: ir0, arg1: instError, type: typeError}
+// CHECK:STDOUT:     instBoolType:    {kind: CrossRef, arg0: ir0, arg1: instBoolType, type: typeTypeType}
+// CHECK:STDOUT:     instIntegerType: {kind: CrossRef, arg0: ir0, arg1: instIntegerType, type: typeTypeType}
+// CHECK:STDOUT:     instFloatingPointType: {kind: CrossRef, arg0: ir0, arg1: instFloatingPointType, type: typeTypeType}
+// CHECK:STDOUT:     instStringType:  {kind: CrossRef, arg0: ir0, arg1: instStringType, type: typeTypeType}
+// CHECK:STDOUT:     instFunctionType: {kind: CrossRef, arg0: ir0, arg1: instFunctionType, type: typeTypeType}
+// CHECK:STDOUT:     instBoundMethodType: {kind: CrossRef, arg0: ir0, arg1: instBoundMethodType, type: typeTypeType}
+// CHECK:STDOUT:     instNamespaceType: {kind: CrossRef, arg0: ir0, arg1: instNamespaceType, type: typeTypeType}
 // CHECK:STDOUT:   inst_blocks:
 // CHECK:STDOUT:     block0:          {}
 // CHECK:STDOUT: ...

+ 1 - 1
toolchain/check/testdata/basics/fail_name_lookup.carbon

@@ -17,6 +17,6 @@ fn Main() {
 // CHECK:STDOUT:
 // CHECK:STDOUT: fn @Main() {
 // CHECK:STDOUT: !entry:
-// CHECK:STDOUT:   %x.ref: <error> = name_reference x, <error>
+// CHECK:STDOUT:   %x.ref: <error> = name_ref x, <error>
 // CHECK:STDOUT:   return
 // CHECK:STDOUT: }

+ 1 - 1
toolchain/check/testdata/basics/fail_qualifier_unsupported.carbon

@@ -15,6 +15,6 @@ var y: i32 = x.b;
 // CHECK:STDOUT:   %x: ref i32 = bind_name x, %x.var
 // CHECK:STDOUT:   %y.var: ref i32 = var y
 // CHECK:STDOUT:   %y: ref i32 = bind_name y, %y.var
-// CHECK:STDOUT:   %x.ref: ref i32 = name_reference x, %x
+// CHECK:STDOUT:   %x.ref: ref i32 = name_ref x, %x
 // CHECK:STDOUT:   assign %y.var, <error>
 // CHECK:STDOUT: }

+ 2 - 2
toolchain/check/testdata/basics/multifile_raw_and_textual_ir.carbon

@@ -21,7 +21,7 @@ fn B() {}
 // CHECK:STDOUT: ---
 // CHECK:STDOUT: filename:        a.carbon
 // CHECK:STDOUT: sem_ir:
-// CHECK:STDOUT:   cross_reference_irs_size: 1
+// CHECK:STDOUT:   cross_ref_irs_size: 1
 // CHECK:STDOUT:   functions:
 // CHECK:STDOUT:     function0:       {name: name0, param_refs: block0, body: [block1]}
 // CHECK:STDOUT:   classes:         {}
@@ -50,7 +50,7 @@ fn B() {}
 // CHECK:STDOUT: ---
 // CHECK:STDOUT: filename:        b.carbon
 // CHECK:STDOUT: sem_ir:
-// CHECK:STDOUT:   cross_reference_irs_size: 1
+// CHECK:STDOUT:   cross_ref_irs_size: 1
 // CHECK:STDOUT:   functions:
 // CHECK:STDOUT:     function0:       {name: name0, param_refs: block0, body: [block1]}
 // CHECK:STDOUT:   classes:         {}

+ 2 - 2
toolchain/check/testdata/basics/multifile_raw_ir.carbon

@@ -21,7 +21,7 @@ fn B() {}
 // CHECK:STDOUT: ---
 // CHECK:STDOUT: filename:        a.carbon
 // CHECK:STDOUT: sem_ir:
-// CHECK:STDOUT:   cross_reference_irs_size: 1
+// CHECK:STDOUT:   cross_ref_irs_size: 1
 // CHECK:STDOUT:   functions:
 // CHECK:STDOUT:     function0:       {name: name0, param_refs: block0, body: [block1]}
 // CHECK:STDOUT:   classes:         {}
@@ -41,7 +41,7 @@ fn B() {}
 // CHECK:STDOUT: ---
 // CHECK:STDOUT: filename:        b.carbon
 // CHECK:STDOUT: sem_ir:
-// CHECK:STDOUT:   cross_reference_irs_size: 1
+// CHECK:STDOUT:   cross_ref_irs_size: 1
 // CHECK:STDOUT:   functions:
 // CHECK:STDOUT:     function0:       {name: name0, param_refs: block0, body: [block1]}
 // CHECK:STDOUT:   classes:         {}

+ 3 - 3
toolchain/check/testdata/basics/raw_and_textual_ir.carbon

@@ -15,7 +15,7 @@ fn Foo(n: i32) -> (i32, f64) {
 // CHECK:STDOUT: ---
 // CHECK:STDOUT: filename:        raw_and_textual_ir.carbon
 // CHECK:STDOUT: sem_ir:
-// CHECK:STDOUT:   cross_reference_irs_size: 1
+// CHECK:STDOUT:   cross_ref_irs_size: 1
 // CHECK:STDOUT:   functions:
 // CHECK:STDOUT:     function0:       {name: name0, param_refs: block1, return_type: type3, return_slot: inst+5, body: [block4]}
 // CHECK:STDOUT:   classes:         {}
@@ -42,7 +42,7 @@ fn Foo(n: i32) -> (i32, f64) {
 // CHECK:STDOUT:     inst+5:          {kind: VarStorage, arg0: nameReturnSlot, type: type3}
 // CHECK:STDOUT:     inst+6:          {kind: PointerType, arg0: type3, type: typeTypeType}
 // CHECK:STDOUT:     inst+7:          {kind: FunctionDecl, arg0: function0, type: type5}
-// CHECK:STDOUT:     inst+8:          {kind: NameReference, arg0: name1, arg1: inst+0, type: type0}
+// CHECK:STDOUT:     inst+8:          {kind: NameRef, arg0: name1, arg1: inst+0, type: type0}
 // CHECK:STDOUT:     inst+9:          {kind: IntegerLiteral, arg0: int3, type: type0}
 // CHECK:STDOUT:     inst+10:         {kind: BinaryOperatorAdd, arg0: inst+8, arg1: inst+9, type: type0}
 // CHECK:STDOUT:     inst+11:         {kind: RealLiteral, arg0: real0, type: type2}
@@ -101,7 +101,7 @@ fn Foo(n: i32) -> (i32, f64) {
 // CHECK:STDOUT:
 // CHECK:STDOUT: fn @Foo(%n: i32) -> %return: (i32, f64) {
 // CHECK:STDOUT: !entry:
-// CHECK:STDOUT:   %n.ref: i32 = name_reference n, %n
+// CHECK:STDOUT:   %n.ref: i32 = name_ref n, %n
 // CHECK:STDOUT:   %.loc12_15: i32 = int_literal 2
 // CHECK:STDOUT:   %.loc12_13: i32 = add %n.ref, %.loc12_15
 // CHECK:STDOUT:   %.loc12_18: f64 = real_literal 34e-1

+ 3 - 3
toolchain/check/testdata/basics/raw_identifier.carbon

@@ -28,18 +28,18 @@ fn C(r#if: i32) -> i32 {
 // CHECK:STDOUT:
 // CHECK:STDOUT: fn @A(%n: i32) -> i32 {
 // CHECK:STDOUT: !entry:
-// CHECK:STDOUT:   %n.ref: i32 = name_reference n, %n
+// CHECK:STDOUT:   %n.ref: i32 = name_ref n, %n
 // CHECK:STDOUT:   return %n.ref
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
 // CHECK:STDOUT: fn @B(%n: i32) -> i32 {
 // CHECK:STDOUT: !entry:
-// CHECK:STDOUT:   %n.ref: i32 = name_reference n, %n
+// CHECK:STDOUT:   %n.ref: i32 = name_ref n, %n
 // CHECK:STDOUT:   return %n.ref
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
 // CHECK:STDOUT: fn @C(%if: i32) -> i32 {
 // CHECK:STDOUT: !entry:
-// CHECK:STDOUT:   %if.ref: i32 = name_reference r#if, %if
+// CHECK:STDOUT:   %if.ref: i32 = name_ref r#if, %if
 // CHECK:STDOUT:   return %if.ref
 // CHECK:STDOUT: }

+ 2 - 2
toolchain/check/testdata/basics/raw_ir.carbon

@@ -15,7 +15,7 @@ fn Foo(n: i32) -> (i32, f64) {
 // CHECK:STDOUT: ---
 // CHECK:STDOUT: filename:        raw_ir.carbon
 // CHECK:STDOUT: sem_ir:
-// CHECK:STDOUT:   cross_reference_irs_size: 1
+// CHECK:STDOUT:   cross_ref_irs_size: 1
 // CHECK:STDOUT:   functions:
 // CHECK:STDOUT:     function0:       {name: name0, param_refs: block1, return_type: type3, return_slot: inst+5, body: [block4]}
 // CHECK:STDOUT:   classes:         {}
@@ -42,7 +42,7 @@ fn Foo(n: i32) -> (i32, f64) {
 // CHECK:STDOUT:     inst+5:          {kind: VarStorage, arg0: nameReturnSlot, type: type3}
 // CHECK:STDOUT:     inst+6:          {kind: PointerType, arg0: type3, type: typeTypeType}
 // CHECK:STDOUT:     inst+7:          {kind: FunctionDecl, arg0: function0, type: type5}
-// CHECK:STDOUT:     inst+8:          {kind: NameReference, arg0: name1, arg1: inst+0, type: type0}
+// CHECK:STDOUT:     inst+8:          {kind: NameRef, arg0: name1, arg1: inst+0, type: type0}
 // CHECK:STDOUT:     inst+9:          {kind: IntegerLiteral, arg0: int3, type: type0}
 // CHECK:STDOUT:     inst+10:         {kind: BinaryOperatorAdd, arg0: inst+8, arg1: inst+9, type: type0}
 // CHECK:STDOUT:     inst+11:         {kind: RealLiteral, arg0: real0, type: type2}

+ 1 - 1
toolchain/check/testdata/basics/textual_ir.carbon

@@ -24,7 +24,7 @@ fn Foo(n: i32) -> (i32, f64) {
 // CHECK:STDOUT:
 // CHECK:STDOUT: fn @Foo(%n: i32) -> %return: (i32, f64) {
 // CHECK:STDOUT: !entry:
-// CHECK:STDOUT:   %n.ref: i32 = name_reference n, %n
+// CHECK:STDOUT:   %n.ref: i32 = name_ref n, %n
 // CHECK:STDOUT:   %.loc12_15: i32 = int_literal 2
 // CHECK:STDOUT:   %.loc12_13: i32 = add %n.ref, %.loc12_15
 // CHECK:STDOUT:   %.loc12_18: f64 = real_literal 34e-1

+ 4 - 4
toolchain/check/testdata/class/basic.carbon

@@ -48,20 +48,20 @@ fn Run() -> i32 {
 // CHECK:STDOUT:
 // CHECK:STDOUT: fn @F(%n: i32) -> i32 {
 // CHECK:STDOUT: !entry:
-// CHECK:STDOUT:   %n.ref: i32 = name_reference n, %n
+// CHECK:STDOUT:   %n.ref: i32 = name_ref n, %n
 // CHECK:STDOUT:   return %n.ref
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
 // CHECK:STDOUT: fn @G(%n: i32) -> i32 {
 // CHECK:STDOUT: !entry:
-// CHECK:STDOUT:   %n.ref: i32 = name_reference n, %n
+// CHECK:STDOUT:   %n.ref: i32 = name_ref n, %n
 // CHECK:STDOUT:   return %n.ref
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
 // CHECK:STDOUT: fn @Run() -> i32 {
 // CHECK:STDOUT: !entry:
-// CHECK:STDOUT:   %Class.ref: type = name_reference Class, file.%Class
-// CHECK:STDOUT:   %F.ref: <function> = name_reference F, @Class.%F
+// CHECK:STDOUT:   %Class.ref: type = name_ref Class, file.%Class
+// CHECK:STDOUT:   %F.ref: <function> = name_ref F, @Class.%F
 // CHECK:STDOUT:   %.loc22_18: i32 = int_literal 4
 // CHECK:STDOUT:   %.loc22_17: init i32 = call %F.ref(%.loc22_18)
 // CHECK:STDOUT:   %.loc22_20.1: i32 = value_of_initializer %.loc22_17

+ 6 - 6
toolchain/check/testdata/class/fail_addr_self.carbon

@@ -65,19 +65,19 @@ fn F(c: Class, p: Class*) {
 // CHECK:STDOUT:
 // CHECK:STDOUT: fn @F.2(%c: Class, %p: Class*) {
 // CHECK:STDOUT: !entry:
-// CHECK:STDOUT:   %c.ref.loc19: Class = name_reference c, %c
+// CHECK:STDOUT:   %c.ref.loc19: Class = name_ref c, %c
 // CHECK:STDOUT:   %.loc19_4: <bound method> = bound_method %c.ref.loc19, @Class.%F
 // CHECK:STDOUT:   %.loc19_6: init () = call %.loc19_4(<invalid>)
-// CHECK:STDOUT:   %c.ref.loc27: Class = name_reference c, %c
+// CHECK:STDOUT:   %c.ref.loc27: Class = name_ref c, %c
 // CHECK:STDOUT:   %.loc27_4: <bound method> = bound_method %c.ref.loc27, @Class.%G
 // CHECK:STDOUT:   %.loc27_6: init () = call %.loc27_4(<invalid>)
-// CHECK:STDOUT:   %p.ref.loc30: Class* = name_reference p, %p
-// CHECK:STDOUT:   %.loc30_4.1: ref Class = dereference %p.ref.loc30
+// CHECK:STDOUT:   %p.ref.loc30: Class* = name_ref p, %p
+// CHECK:STDOUT:   %.loc30_4.1: ref Class = deref %p.ref.loc30
 // CHECK:STDOUT:   %.loc30_7: <bound method> = bound_method %.loc30_4.1, @Class.%F
 // CHECK:STDOUT:   %.loc30_4.2: Class* = address_of %.loc30_4.1
 // CHECK:STDOUT:   %.loc30_9: init () = call %.loc30_7(%.loc30_4.2)
-// CHECK:STDOUT:   %p.ref.loc38: Class* = name_reference p, %p
-// CHECK:STDOUT:   %.loc38_4.1: ref Class = dereference %p.ref.loc38
+// CHECK:STDOUT:   %p.ref.loc38: Class* = name_ref p, %p
+// CHECK:STDOUT:   %.loc38_4.1: ref Class = deref %p.ref.loc38
 // CHECK:STDOUT:   %.loc38_7: <bound method> = bound_method %.loc38_4.1, @Class.%G
 // CHECK:STDOUT:   %.loc38_4.2: Class* = address_of %.loc38_4.1
 // CHECK:STDOUT:   %.loc38_9: init () = call %.loc38_7(<invalid>)

+ 15 - 15
toolchain/check/testdata/class/fail_incomplete.carbon

@@ -125,7 +125,7 @@ fn CallReturnIncomplete() {
 // CHECK:STDOUT:   %Class: type = class_type @Class
 // CHECK:STDOUT:   %.loc15: <function> = fn_decl @.1
 // CHECK:STDOUT:   %CallClassFunction: <function> = fn_decl @CallClassFunction
-// CHECK:STDOUT:   %Class.ref: type = name_reference Class, %Class
+// CHECK:STDOUT:   %Class.ref: type = name_ref Class, %Class
 // CHECK:STDOUT:   %global_var.var: ref <error> = var global_var
 // CHECK:STDOUT:   %global_var: ref <error> = bind_name global_var, %global_var.var
 // CHECK:STDOUT:   %ConvertFromStruct: <function> = fn_decl @ConvertFromStruct
@@ -147,8 +147,8 @@ fn CallReturnIncomplete() {
 // CHECK:STDOUT:
 // CHECK:STDOUT: fn @CallClassFunction() {
 // CHECK:STDOUT: !entry:
-// CHECK:STDOUT:   %Class.ref: type = name_reference Class, file.%Class
-// CHECK:STDOUT:   %Function.ref: <error> = name_reference Function, <error>
+// CHECK:STDOUT:   %Class.ref: type = name_ref Class, file.%Class
+// CHECK:STDOUT:   %Function.ref: <error> = name_ref Function, <error>
 // CHECK:STDOUT:   return
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
@@ -160,23 +160,23 @@ fn CallReturnIncomplete() {
 // CHECK:STDOUT:
 // CHECK:STDOUT: fn @MemberAccess(%p: Class*) -> i32 {
 // CHECK:STDOUT: !entry:
-// CHECK:STDOUT:   %p.ref: Class* = name_reference p, %p
-// CHECK:STDOUT:   %.loc55: ref Class = dereference %p.ref
+// CHECK:STDOUT:   %p.ref: Class* = name_ref p, %p
+// CHECK:STDOUT:   %.loc55: ref Class = deref %p.ref
 // CHECK:STDOUT:   return <error>
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
 // CHECK:STDOUT: fn @Copy(%p: Class*) -> <error> {
 // CHECK:STDOUT: !entry:
-// CHECK:STDOUT:   %p.ref: Class* = name_reference p, %p
-// CHECK:STDOUT:   %.loc65: ref Class = dereference %p.ref
+// CHECK:STDOUT:   %p.ref: Class* = name_ref p, %p
+// CHECK:STDOUT:   %.loc65: ref Class = deref %p.ref
 // CHECK:STDOUT:   return <error>
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
 // CHECK:STDOUT: fn @Let(%p: Class*) {
 // CHECK:STDOUT: !entry:
-// CHECK:STDOUT:   %Class.ref: type = name_reference Class, file.%Class
-// CHECK:STDOUT:   %p.ref: Class* = name_reference p, %p
-// CHECK:STDOUT:   %.loc75: ref Class = dereference %p.ref
+// CHECK:STDOUT:   %Class.ref: type = name_ref Class, file.%Class
+// CHECK:STDOUT:   %p.ref: Class* = name_ref p, %p
+// CHECK:STDOUT:   %.loc75: ref Class = deref %p.ref
 // CHECK:STDOUT:   %c: <error> = bind_name c, <error>
 // CHECK:STDOUT:   return
 // CHECK:STDOUT: }
@@ -187,11 +187,11 @@ fn CallReturnIncomplete() {
 // CHECK:STDOUT:
 // CHECK:STDOUT: fn @CallTakeIncomplete(%p: Class*) {
 // CHECK:STDOUT: !entry:
-// CHECK:STDOUT:   %TakeIncomplete.ref.loc100: <function> = name_reference TakeIncomplete, file.%TakeIncomplete
-// CHECK:STDOUT:   %p.ref: Class* = name_reference p, %p
-// CHECK:STDOUT:   %.loc100_18: ref Class = dereference %p.ref
+// CHECK:STDOUT:   %TakeIncomplete.ref.loc100: <function> = name_ref TakeIncomplete, file.%TakeIncomplete
+// CHECK:STDOUT:   %p.ref: Class* = name_ref p, %p
+// CHECK:STDOUT:   %.loc100_18: ref Class = deref %p.ref
 // CHECK:STDOUT:   %.loc100_17: init () = call %TakeIncomplete.ref.loc100(<invalid>)
-// CHECK:STDOUT:   %TakeIncomplete.ref.loc111: <function> = name_reference TakeIncomplete, file.%TakeIncomplete
+// CHECK:STDOUT:   %TakeIncomplete.ref.loc111: <function> = name_ref TakeIncomplete, file.%TakeIncomplete
 // CHECK:STDOUT:   %.loc111_19: {} = struct_literal ()
 // CHECK:STDOUT:   %.loc111_17: init () = call %TakeIncomplete.ref.loc111(<invalid>)
 // CHECK:STDOUT:   return
@@ -199,7 +199,7 @@ fn CallReturnIncomplete() {
 // CHECK:STDOUT:
 // CHECK:STDOUT: fn @CallReturnIncomplete() {
 // CHECK:STDOUT: !entry:
-// CHECK:STDOUT:   %ReturnIncomplete.ref: <function> = name_reference ReturnIncomplete, file.%ReturnIncomplete
+// CHECK:STDOUT:   %ReturnIncomplete.ref: <function> = name_ref ReturnIncomplete, file.%ReturnIncomplete
 // CHECK:STDOUT:   %.loc115: init <error> = call %ReturnIncomplete.ref()
 // CHECK:STDOUT:   return
 // CHECK:STDOUT: }

+ 3 - 3
toolchain/check/testdata/class/fail_init.carbon

@@ -55,14 +55,14 @@ fn F() {
 // CHECK:STDOUT: !entry:
 // CHECK:STDOUT:   %.loc16_9: i32 = int_literal 1
 // CHECK:STDOUT:   %.loc16_10.1: {.a: i32} = struct_literal (%.loc16_9)
-// CHECK:STDOUT:   %Class.ref.loc16: type = name_reference Class, file.%Class
+// CHECK:STDOUT:   %Class.ref.loc16: type = name_ref Class, file.%Class
 // CHECK:STDOUT:   %.loc16_10.2: ref Class = temporary_storage
 // CHECK:STDOUT:   %.loc16_10.3: ref Class = temporary %.loc16_10.2, <error>
 // CHECK:STDOUT:   %.loc16_10.4: ref Class = converted %.loc16_10.1, %.loc16_10.3
 // CHECK:STDOUT:   %.loc20_9: i32 = int_literal 1
 // CHECK:STDOUT:   %.loc20_17: i32 = int_literal 2
 // CHECK:STDOUT:   %.loc20_18.1: {.a: i32, .c: i32} = struct_literal (%.loc20_9, %.loc20_17)
-// CHECK:STDOUT:   %Class.ref.loc20: type = name_reference Class, file.%Class
+// CHECK:STDOUT:   %Class.ref.loc20: type = name_ref Class, file.%Class
 // CHECK:STDOUT:   %.loc20_18.2: ref Class = temporary_storage
 // CHECK:STDOUT:   %.loc20_18.3: ref i32 = class_field_access %.loc20_18.2, member0
 // CHECK:STDOUT:   %.loc20_18.4: init i32 = initialize_from %.loc20_9 to %.loc20_18.3
@@ -72,7 +72,7 @@ fn F() {
 // CHECK:STDOUT:   %.loc24_17: i32 = int_literal 2
 // CHECK:STDOUT:   %.loc24_25: i32 = int_literal 3
 // CHECK:STDOUT:   %.loc24_26.1: {.a: i32, .b: i32, .c: i32} = struct_literal (%.loc24_9, %.loc24_17, %.loc24_25)
-// CHECK:STDOUT:   %Class.ref.loc24: type = name_reference Class, file.%Class
+// CHECK:STDOUT:   %Class.ref.loc24: type = name_ref Class, file.%Class
 // CHECK:STDOUT:   %.loc24_26.2: ref Class = temporary_storage
 // CHECK:STDOUT:   %.loc24_26.3: ref Class = temporary %.loc24_26.2, <error>
 // CHECK:STDOUT:   %.loc24_26.4: ref Class = converted %.loc24_26.1, %.loc24_26.3

+ 4 - 4
toolchain/check/testdata/class/fail_init_as_inplace.carbon

@@ -52,13 +52,13 @@ fn F() {
 // CHECK:STDOUT:
 // CHECK:STDOUT: fn @F() {
 // CHECK:STDOUT: !entry:
-// CHECK:STDOUT:   %Class.ref.loc21_10: type = name_reference Class, file.%Class
+// CHECK:STDOUT:   %Class.ref.loc21_10: type = name_ref Class, file.%Class
 // CHECK:STDOUT:   %c.var: ref Class = var c
 // CHECK:STDOUT:   %c: ref Class = bind_name c, %c.var
 // CHECK:STDOUT:   %.loc21_24: i32 = int_literal 1
 // CHECK:STDOUT:   %.loc21_32: i32 = int_literal 2
 // CHECK:STDOUT:   %.loc21_33.1: {.a: i32, .b: i32} = struct_literal (%.loc21_24, %.loc21_32)
-// CHECK:STDOUT:   %Class.ref.loc21_38: type = name_reference Class, file.%Class
+// CHECK:STDOUT:   %Class.ref.loc21_38: type = name_ref Class, file.%Class
 // CHECK:STDOUT:   %.loc21_33.2: ref Class = temporary_storage
 // CHECK:STDOUT:   %.loc21_33.3: ref i32 = class_field_access %.loc21_33.2, member0
 // CHECK:STDOUT:   %.loc21_33.4: init i32 = initialize_from %.loc21_24 to %.loc21_33.3
@@ -69,8 +69,8 @@ fn F() {
 // CHECK:STDOUT:   %.loc21_33.9: ref Class = converted %.loc21_33.1, %.loc21_33.8
 // CHECK:STDOUT:   %.loc21_33.10: Class = bind_value %.loc21_33.9
 // CHECK:STDOUT:   assign %c.var, <error>
-// CHECK:STDOUT:   %G.ref: <function> = name_reference G, file.%G
-// CHECK:STDOUT:   %c.ref: ref Class = name_reference c, %c
+// CHECK:STDOUT:   %G.ref: <function> = name_ref G, file.%G
+// CHECK:STDOUT:   %c.ref: ref Class = name_ref c, %c
 // CHECK:STDOUT:   %.loc22_5: Class* = address_of %c.ref
 // CHECK:STDOUT:   %.loc22_4: init () = call %G.ref(%.loc22_5)
 // CHECK:STDOUT:   return

+ 3 - 3
toolchain/check/testdata/class/fail_memaccess_category.carbon

@@ -58,7 +58,7 @@ fn F(s: {.a: A}, b: B) {
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
 // CHECK:STDOUT: class @B {
-// CHECK:STDOUT:   %A.ref: type = name_reference A, file.%A
+// CHECK:STDOUT:   %A.ref: type = name_ref A, file.%A
 // CHECK:STDOUT:   %.loc12_8.1: type = unbound_field_type B, A
 // CHECK:STDOUT:   %.loc12_8.2: <unbound field of class B> = field a, member0
 // CHECK:STDOUT:   %a: <unbound field of class B> = bind_name a, %.loc12_8.2
@@ -71,11 +71,11 @@ fn F(s: {.a: A}, b: B) {
 // CHECK:STDOUT:
 // CHECK:STDOUT: fn @F.2(%s: {.a: A}, %b: B) {
 // CHECK:STDOUT: !entry:
-// CHECK:STDOUT:   %s.ref: {.a: A} = name_reference s, %s
+// CHECK:STDOUT:   %s.ref: {.a: A} = name_ref s, %s
 // CHECK:STDOUT:   %.loc23_4: A = struct_access %s.ref, member0
 // CHECK:STDOUT:   %.loc23_6: <bound method> = bound_method %.loc23_4, @A.%F
 // CHECK:STDOUT:   %.loc23_8: init () = call %.loc23_6(<invalid>)
-// CHECK:STDOUT:   %b.ref: B = name_reference b, %b
+// CHECK:STDOUT:   %b.ref: B = name_ref b, %b
 // CHECK:STDOUT:   %.loc33_4.1: ref A = class_field_access %b.ref, member0
 // CHECK:STDOUT:   %.loc33_4.2: A = bind_value %.loc33_4.1
 // CHECK:STDOUT:   %.loc33_6: <bound method> = bound_method %.loc33_4.2, @A.%F

+ 1 - 1
toolchain/check/testdata/class/fail_member_of_let.carbon

@@ -28,7 +28,7 @@ fn T.F() {}
 // CHECK:STDOUT: file "fail_member_of_let.carbon" {
 // CHECK:STDOUT:   class_decl @Class, ()
 // CHECK:STDOUT:   %Class: type = class_type @Class
-// CHECK:STDOUT:   %Class.ref: type = name_reference Class, %Class
+// CHECK:STDOUT:   %Class.ref: type = name_ref Class, %Class
 // CHECK:STDOUT:   %T: type = bind_name T, %Class.ref
 // CHECK:STDOUT:   %.loc22: <function> = fn_decl @.1
 // CHECK:STDOUT: }

+ 10 - 10
toolchain/check/testdata/class/fail_method.carbon

@@ -57,21 +57,21 @@ fn F(c: Class) {
 // CHECK:STDOUT:
 // CHECK:STDOUT: fn @F(%c: Class) {
 // CHECK:STDOUT: !entry:
-// CHECK:STDOUT:   %c.ref.loc13: Class = name_reference c, %c
-// CHECK:STDOUT:   %NoSelf.ref.loc13: <function> = name_reference NoSelf, @Class.%NoSelf
+// CHECK:STDOUT:   %c.ref.loc13: Class = name_ref c, %c
+// CHECK:STDOUT:   %NoSelf.ref.loc13: <function> = name_ref NoSelf, @Class.%NoSelf
 // CHECK:STDOUT:   %.loc13: init () = call %NoSelf.ref.loc13()
-// CHECK:STDOUT:   %c.ref.loc14: Class = name_reference c, %c
+// CHECK:STDOUT:   %c.ref.loc14: Class = name_ref c, %c
 // CHECK:STDOUT:   %.loc14_4: <bound method> = bound_method %c.ref.loc14, @Class.%WithSelf
 // CHECK:STDOUT:   %.loc14_13: init () = call %.loc14_4(%c.ref.loc14)
-// CHECK:STDOUT:   %Class.ref.loc16: type = name_reference Class, file.%Class
-// CHECK:STDOUT:   %NoSelf.ref.loc16: <function> = name_reference NoSelf, @Class.%NoSelf
+// CHECK:STDOUT:   %Class.ref.loc16: type = name_ref Class, file.%Class
+// CHECK:STDOUT:   %NoSelf.ref.loc16: <function> = name_ref NoSelf, @Class.%NoSelf
 // CHECK:STDOUT:   %.loc16: init () = call %NoSelf.ref.loc16()
-// CHECK:STDOUT:   %Class.ref.loc23: type = name_reference Class, file.%Class
-// CHECK:STDOUT:   %WithSelf.ref.loc23: <function> = name_reference WithSelf, @Class.%WithSelf
+// CHECK:STDOUT:   %Class.ref.loc23: type = name_ref Class, file.%Class
+// CHECK:STDOUT:   %WithSelf.ref.loc23: <function> = name_ref WithSelf, @Class.%WithSelf
 // CHECK:STDOUT:   %.loc23: init () = call %WithSelf.ref.loc23(<invalid>)
-// CHECK:STDOUT:   %Class.ref.loc30: type = name_reference Class, file.%Class
-// CHECK:STDOUT:   %WithSelf.ref.loc30: <function> = name_reference WithSelf, @Class.%WithSelf
-// CHECK:STDOUT:   %c.ref.loc30: Class = name_reference c, %c
+// CHECK:STDOUT:   %Class.ref.loc30: type = name_ref Class, file.%Class
+// CHECK:STDOUT:   %WithSelf.ref.loc30: <function> = name_ref WithSelf, @Class.%WithSelf
+// CHECK:STDOUT:   %c.ref.loc30: Class = name_ref c, %c
 // CHECK:STDOUT:   %.loc30: init () = call %WithSelf.ref.loc30(<invalid>)
 // CHECK:STDOUT:   return
 // CHECK:STDOUT: }

+ 2 - 2
toolchain/check/testdata/class/fail_reorder.carbon

@@ -45,8 +45,8 @@ class Class {
 // CHECK:STDOUT:
 // CHECK:STDOUT: fn @G() -> i32 {
 // CHECK:STDOUT: !entry:
-// CHECK:STDOUT:   %Class.ref: type = name_reference Class, file.%Class
-// CHECK:STDOUT:   %F.ref: <error> = name_reference F, <error>
+// CHECK:STDOUT:   %Class.ref: type = name_ref Class, file.%Class
+// CHECK:STDOUT:   %F.ref: <error> = name_ref F, <error>
 // CHECK:STDOUT:   return <error>
 // CHECK:STDOUT: }
 // CHECK:STDOUT:

+ 1 - 1
toolchain/check/testdata/class/fail_scope.carbon

@@ -42,6 +42,6 @@ fn G() -> i32 {
 // CHECK:STDOUT:
 // CHECK:STDOUT: fn @G() -> i32 {
 // CHECK:STDOUT: !entry:
-// CHECK:STDOUT:   %F.ref: <error> = name_reference F, <error>
+// CHECK:STDOUT:   %F.ref: <error> = name_ref F, <error>
 // CHECK:STDOUT:   return <error>
 // CHECK:STDOUT: }

+ 3 - 3
toolchain/check/testdata/class/fail_self.carbon

@@ -89,9 +89,9 @@ fn CallWrongSelf(ws: WrongSelf) {
 // CHECK:STDOUT:
 // CHECK:STDOUT: fn @G() -> %return: Class {
 // CHECK:STDOUT: !entry:
-// CHECK:STDOUT:   %Class.ref: type = name_reference Class, file.%Class
+// CHECK:STDOUT:   %Class.ref: type = name_ref Class, file.%Class
 // CHECK:STDOUT:   %self: Class = self_param false
-// CHECK:STDOUT:   %self.ref: <error> = name_reference self, <error>
+// CHECK:STDOUT:   %self.ref: <error> = name_ref self, <error>
 // CHECK:STDOUT:   return <error>
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
@@ -99,7 +99,7 @@ fn CallWrongSelf(ws: WrongSelf) {
 // CHECK:STDOUT:
 // CHECK:STDOUT: fn @CallWrongSelf(%ws: WrongSelf) {
 // CHECK:STDOUT: !entry:
-// CHECK:STDOUT:   %ws.ref: WrongSelf = name_reference ws, %ws
+// CHECK:STDOUT:   %ws.ref: WrongSelf = name_ref ws, %ws
 // CHECK:STDOUT:   %.loc50_5: <bound method> = bound_method %ws.ref, @WrongSelf.%F
 // CHECK:STDOUT:   %.loc50_7: init () = call %.loc50_5(<invalid>)
 // CHECK:STDOUT:   return

+ 3 - 3
toolchain/check/testdata/class/fail_unbound_field.carbon

@@ -44,13 +44,13 @@ fn G() -> i32 {
 // CHECK:STDOUT:
 // CHECK:STDOUT: fn @F() -> i32 {
 // CHECK:STDOUT: !entry:
-// CHECK:STDOUT:   %field.ref: <unbound field of class Class> = name_reference field, @Class.%field
+// CHECK:STDOUT:   %field.ref: <unbound field of class Class> = name_ref field, @Class.%field
 // CHECK:STDOUT:   return <error>
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
 // CHECK:STDOUT: fn @G() -> i32 {
 // CHECK:STDOUT: !entry:
-// CHECK:STDOUT:   %Class.ref: type = name_reference Class, file.%Class
-// CHECK:STDOUT:   %field.ref: <unbound field of class Class> = name_reference field, @Class.%field
+// CHECK:STDOUT:   %Class.ref: type = name_ref Class, file.%Class
+// CHECK:STDOUT:   %field.ref: <unbound field of class Class> = name_ref field, @Class.%field
 // CHECK:STDOUT:   return <error>
 // CHECK:STDOUT: }

+ 2 - 2
toolchain/check/testdata/class/fail_unknown_member.carbon

@@ -38,7 +38,7 @@ fn G(c: Class) -> i32 {
 // CHECK:STDOUT:
 // CHECK:STDOUT: fn @G(%c: Class) -> i32 {
 // CHECK:STDOUT: !entry:
-// CHECK:STDOUT:   %c.ref: Class = name_reference c, %c
-// CHECK:STDOUT:   %something.ref: <error> = name_reference something, <error>
+// CHECK:STDOUT:   %c.ref: Class = name_ref c, %c
+// CHECK:STDOUT:   %something.ref: <error> = name_ref something, <error>
 // CHECK:STDOUT:   return <error>
 // CHECK:STDOUT: }

+ 5 - 5
toolchain/check/testdata/class/field_access.carbon

@@ -42,20 +42,20 @@ fn Run() -> i32 {
 // CHECK:STDOUT:
 // CHECK:STDOUT: fn @Run() -> i32 {
 // CHECK:STDOUT: !entry:
-// CHECK:STDOUT:   %Class.ref: type = name_reference Class, file.%Class
+// CHECK:STDOUT:   %Class.ref: type = name_ref Class, file.%Class
 // CHECK:STDOUT:   %c.var: ref Class = var c
 // CHECK:STDOUT:   %c: ref Class = bind_name c, %c.var
-// CHECK:STDOUT:   %c.ref.loc14: ref Class = name_reference c, %c
+// CHECK:STDOUT:   %c.ref.loc14: ref Class = name_ref c, %c
 // CHECK:STDOUT:   %.loc14_4: ref i32 = class_field_access %c.ref.loc14, member0
 // CHECK:STDOUT:   %.loc14_9: i32 = int_literal 1
 // CHECK:STDOUT:   assign %.loc14_4, %.loc14_9
-// CHECK:STDOUT:   %c.ref.loc15: ref Class = name_reference c, %c
+// CHECK:STDOUT:   %c.ref.loc15: ref Class = name_ref c, %c
 // CHECK:STDOUT:   %.loc15_4: ref i32 = class_field_access %c.ref.loc15, member1
 // CHECK:STDOUT:   %.loc15_9: i32 = int_literal 2
 // CHECK:STDOUT:   assign %.loc15_4, %.loc15_9
-// CHECK:STDOUT:   %c.ref.loc16_10: ref Class = name_reference c, %c
+// CHECK:STDOUT:   %c.ref.loc16_10: ref Class = name_ref c, %c
 // CHECK:STDOUT:   %.loc16_11.1: ref i32 = class_field_access %c.ref.loc16_10, member0
-// CHECK:STDOUT:   %c.ref.loc16_16: ref Class = name_reference c, %c
+// CHECK:STDOUT:   %c.ref.loc16_16: ref Class = name_ref c, %c
 // CHECK:STDOUT:   %.loc16_17.1: ref i32 = class_field_access %c.ref.loc16_16, member1
 // CHECK:STDOUT:   %.loc16_11.2: i32 = bind_value %.loc16_11.1
 // CHECK:STDOUT:   %.loc16_17.2: i32 = bind_value %.loc16_17.1

+ 7 - 7
toolchain/check/testdata/class/field_access_in_value.carbon

@@ -43,25 +43,25 @@ fn Run() -> i32 {
 // CHECK:STDOUT:
 // CHECK:STDOUT: fn @Run() -> i32 {
 // CHECK:STDOUT: !entry:
-// CHECK:STDOUT:   %Class.ref.loc13: type = name_reference Class, file.%Class
+// CHECK:STDOUT:   %Class.ref.loc13: type = name_ref Class, file.%Class
 // CHECK:STDOUT:   %cv.var: ref Class = var cv
 // CHECK:STDOUT:   %cv: ref Class = bind_name cv, %cv.var
-// CHECK:STDOUT:   %cv.ref.loc14: ref Class = name_reference cv, %cv
+// CHECK:STDOUT:   %cv.ref.loc14: ref Class = name_ref cv, %cv
 // CHECK:STDOUT:   %.loc14_5: ref i32 = class_field_access %cv.ref.loc14, member0
 // CHECK:STDOUT:   %.loc14_10: i32 = int_literal 1
 // CHECK:STDOUT:   assign %.loc14_5, %.loc14_10
-// CHECK:STDOUT:   %cv.ref.loc15: ref Class = name_reference cv, %cv
+// CHECK:STDOUT:   %cv.ref.loc15: ref Class = name_ref cv, %cv
 // CHECK:STDOUT:   %.loc15_5: ref i32 = class_field_access %cv.ref.loc15, member1
 // CHECK:STDOUT:   %.loc15_10: i32 = int_literal 2
 // CHECK:STDOUT:   assign %.loc15_5, %.loc15_10
-// CHECK:STDOUT:   %Class.ref.loc16: type = name_reference Class, file.%Class
-// CHECK:STDOUT:   %cv.ref.loc16: ref Class = name_reference cv, %cv
+// CHECK:STDOUT:   %Class.ref.loc16: type = name_ref Class, file.%Class
+// CHECK:STDOUT:   %cv.ref.loc16: ref Class = name_ref cv, %cv
 // CHECK:STDOUT:   %.loc16: Class = bind_value %cv.ref.loc16
 // CHECK:STDOUT:   %c: Class = bind_name c, %.loc16
-// CHECK:STDOUT:   %c.ref.loc17_10: Class = name_reference c, %c
+// CHECK:STDOUT:   %c.ref.loc17_10: Class = name_ref c, %c
 // CHECK:STDOUT:   %.loc17_11.1: ref i32 = class_field_access %c.ref.loc17_10, member0
 // CHECK:STDOUT:   %.loc17_11.2: i32 = bind_value %.loc17_11.1
-// CHECK:STDOUT:   %c.ref.loc17_16: Class = name_reference c, %c
+// CHECK:STDOUT:   %c.ref.loc17_16: Class = name_ref c, %c
 // CHECK:STDOUT:   %.loc17_17.1: ref i32 = class_field_access %c.ref.loc17_16, member1
 // CHECK:STDOUT:   %.loc17_17.2: i32 = bind_value %.loc17_17.1
 // CHECK:STDOUT:   %.loc17_14: i32 = add %.loc17_11.2, %.loc17_17.2

+ 1 - 1
toolchain/check/testdata/class/forward_declared.carbon

@@ -18,6 +18,6 @@ fn F(p: Class*) -> Class* { return p; }
 // CHECK:STDOUT:
 // CHECK:STDOUT: fn @F(%p: Class*) -> Class* {
 // CHECK:STDOUT: !entry:
-// CHECK:STDOUT:   %p.ref: Class* = name_reference p, %p
+// CHECK:STDOUT:   %p.ref: Class* = name_ref p, %p
 // CHECK:STDOUT:   return %p.ref
 // CHECK:STDOUT: }

+ 5 - 5
toolchain/check/testdata/class/init.carbon

@@ -34,7 +34,7 @@ fn MakeReorder(n: i32, next: Class*) -> Class {
 // CHECK:STDOUT:   %.loc8_8.1: type = unbound_field_type Class, i32
 // CHECK:STDOUT:   %.loc8_8.2: <unbound field of class Class> = field n, member0
 // CHECK:STDOUT:   %n: <unbound field of class Class> = bind_name n, %.loc8_8.2
-// CHECK:STDOUT:   %Class.ref: type = name_reference Class, file.%Class
+// CHECK:STDOUT:   %Class.ref: type = name_ref Class, file.%Class
 // CHECK:STDOUT:   %.loc9_18: type = ptr_type Class
 // CHECK:STDOUT:   %.loc9_11.1: type = unbound_field_type Class, Class*
 // CHECK:STDOUT:   %.loc9_11.2: <unbound field of class Class> = field next, member1
@@ -47,8 +47,8 @@ fn MakeReorder(n: i32, next: Class*) -> Class {
 // CHECK:STDOUT:
 // CHECK:STDOUT: fn @Make(%n: i32, %next: Class*) -> %return: Class {
 // CHECK:STDOUT: !entry:
-// CHECK:STDOUT:   %n.ref: i32 = name_reference n, %n
-// CHECK:STDOUT:   %next.ref: Class* = name_reference next, %next
+// CHECK:STDOUT:   %n.ref: i32 = name_ref n, %n
+// CHECK:STDOUT:   %next.ref: Class* = name_ref next, %next
 // CHECK:STDOUT:   %.loc13_31.1: {.n: i32, .next: Class*} = struct_literal (%n.ref, %next.ref)
 // CHECK:STDOUT:   %.loc13_31.2: ref i32 = class_field_access %return, member0
 // CHECK:STDOUT:   %.loc13_31.3: init i32 = initialize_from %n.ref to %.loc13_31.2
@@ -61,8 +61,8 @@ fn MakeReorder(n: i32, next: Class*) -> Class {
 // CHECK:STDOUT:
 // CHECK:STDOUT: fn @MakeReorder(%n: i32, %next: Class*) -> %return: Class {
 // CHECK:STDOUT: !entry:
-// CHECK:STDOUT:   %next.ref: Class* = name_reference next, %next
-// CHECK:STDOUT:   %n.ref: i32 = name_reference n, %n
+// CHECK:STDOUT:   %next.ref: Class* = name_ref next, %next
+// CHECK:STDOUT:   %n.ref: i32 = name_ref n, %n
 // CHECK:STDOUT:   %.loc17_31.1: {.next: Class*, .n: i32} = struct_literal (%next.ref, %n.ref)
 // CHECK:STDOUT:   %.loc17_31.2: ref i32 = class_field_access %return, member1
 // CHECK:STDOUT:   %.loc17_31.3: init i32 = initialize_from %n.ref to %.loc17_31.2

+ 1 - 1
toolchain/check/testdata/class/init_as.carbon

@@ -42,7 +42,7 @@ fn F() -> i32 {
 // CHECK:STDOUT:   %.loc13_17: i32 = int_literal 1
 // CHECK:STDOUT:   %.loc13_25: i32 = int_literal 2
 // CHECK:STDOUT:   %.loc13_26.1: {.a: i32, .b: i32} = struct_literal (%.loc13_17, %.loc13_25)
-// CHECK:STDOUT:   %Class.ref: type = name_reference Class, file.%Class
+// CHECK:STDOUT:   %Class.ref: type = name_ref Class, file.%Class
 // CHECK:STDOUT:   %.loc13_26.2: ref Class = temporary_storage
 // CHECK:STDOUT:   %.loc13_26.3: ref i32 = class_field_access %.loc13_26.2, member0
 // CHECK:STDOUT:   %.loc13_26.4: init i32 = initialize_from %.loc13_17 to %.loc13_26.3

+ 4 - 4
toolchain/check/testdata/class/init_nested.carbon

@@ -52,11 +52,11 @@ fn MakeOuter() -> Outer {
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
 // CHECK:STDOUT: class @Outer {
-// CHECK:STDOUT:   %Inner.ref.loc15: type = name_reference Inner, file.%Inner
+// CHECK:STDOUT:   %Inner.ref.loc15: type = name_ref Inner, file.%Inner
 // CHECK:STDOUT:   %.loc15_8.1: type = unbound_field_type Outer, Inner
 // CHECK:STDOUT:   %.loc15_8.2: <unbound field of class Outer> = field c, member0
 // CHECK:STDOUT:   %c: <unbound field of class Outer> = bind_name c, %.loc15_8.2
-// CHECK:STDOUT:   %Inner.ref.loc16: type = name_reference Inner, file.%Inner
+// CHECK:STDOUT:   %Inner.ref.loc16: type = name_ref Inner, file.%Inner
 // CHECK:STDOUT:   %.loc16_8.1: type = unbound_field_type Outer, Inner
 // CHECK:STDOUT:   %.loc16_8.2: <unbound field of class Outer> = field d, member1
 // CHECK:STDOUT:   %d: <unbound field of class Outer> = bind_name d, %.loc16_8.2
@@ -70,10 +70,10 @@ fn MakeOuter() -> Outer {
 // CHECK:STDOUT:
 // CHECK:STDOUT: fn @MakeOuter() -> %return: Outer {
 // CHECK:STDOUT: !entry:
-// CHECK:STDOUT:   %MakeInner.ref.loc20_16: <function> = name_reference MakeInner, file.%MakeInner
+// CHECK:STDOUT:   %MakeInner.ref.loc20_16: <function> = name_ref MakeInner, file.%MakeInner
 // CHECK:STDOUT:   %.loc20_45.1: ref Inner = class_field_access %return, member0
 // CHECK:STDOUT:   %.loc20_25: init Inner = call %MakeInner.ref.loc20_16() to %.loc20_45.1
-// CHECK:STDOUT:   %MakeInner.ref.loc20_34: <function> = name_reference MakeInner, file.%MakeInner
+// CHECK:STDOUT:   %MakeInner.ref.loc20_34: <function> = name_ref MakeInner, file.%MakeInner
 // CHECK:STDOUT:   %.loc20_45.2: ref Inner = class_field_access %return, member1
 // CHECK:STDOUT:   %.loc20_43: init Inner = call %MakeInner.ref.loc20_34() to %.loc20_45.2
 // CHECK:STDOUT:   %.loc20_45.3: {.c: Inner, .d: Inner} = struct_literal (%.loc20_25, %.loc20_43)

+ 10 - 10
toolchain/check/testdata/class/method.carbon

@@ -77,7 +77,7 @@ fn CallGOnInitializingExpr() -> i32 {
 // CHECK:STDOUT:
 // CHECK:STDOUT: fn @F[%self: Class]() -> i32 {
 // CHECK:STDOUT: !entry:
-// CHECK:STDOUT:   %self.ref: Class = name_reference self, %self
+// CHECK:STDOUT:   %self.ref: Class = name_ref self, %self
 // CHECK:STDOUT:   %.loc15_14.1: ref i32 = class_field_access %self.ref, member0
 // CHECK:STDOUT:   %.loc15_14.2: i32 = bind_value %.loc15_14.1
 // CHECK:STDOUT:   return %.loc15_14.2
@@ -87,7 +87,7 @@ fn CallGOnInitializingExpr() -> i32 {
 // CHECK:STDOUT:
 // CHECK:STDOUT: fn @Call(%c: Class) -> i32 {
 // CHECK:STDOUT: !entry:
-// CHECK:STDOUT:   %c.ref: Class = name_reference c, %c
+// CHECK:STDOUT:   %c.ref: Class = name_ref c, %c
 // CHECK:STDOUT:   %.loc21_11: <bound method> = bound_method %c.ref, @Class.%F
 // CHECK:STDOUT:   %.loc21_13: init i32 = call %.loc21_11(%c.ref)
 // CHECK:STDOUT:   %.loc21_15.1: i32 = value_of_initializer %.loc21_13
@@ -97,10 +97,10 @@ fn CallGOnInitializingExpr() -> i32 {
 // CHECK:STDOUT:
 // CHECK:STDOUT: fn @CallWithAddr() -> i32 {
 // CHECK:STDOUT: !entry:
-// CHECK:STDOUT:   %Class.ref: type = name_reference Class, file.%Class
+// CHECK:STDOUT:   %Class.ref: type = name_ref Class, file.%Class
 // CHECK:STDOUT:   %c.var: ref Class = var c
 // CHECK:STDOUT:   %c: ref Class = bind_name c, %c.var
-// CHECK:STDOUT:   %c.ref: ref Class = name_reference c, %c
+// CHECK:STDOUT:   %c.ref: ref Class = name_ref c, %c
 // CHECK:STDOUT:   %.loc26_11: <bound method> = bound_method %c.ref, @Class.%G
 // CHECK:STDOUT:   %.loc26_10: Class* = address_of %c.ref
 // CHECK:STDOUT:   %.loc26_13: init i32 = call %.loc26_11(%.loc26_10)
@@ -111,8 +111,8 @@ fn CallGOnInitializingExpr() -> i32 {
 // CHECK:STDOUT:
 // CHECK:STDOUT: fn @CallFThroughPointer(%p: Class*) -> i32 {
 // CHECK:STDOUT: !entry:
-// CHECK:STDOUT:   %p.ref: Class* = name_reference p, %p
-// CHECK:STDOUT:   %.loc30_11.1: ref Class = dereference %p.ref
+// CHECK:STDOUT:   %p.ref: Class* = name_ref p, %p
+// CHECK:STDOUT:   %.loc30_11.1: ref Class = deref %p.ref
 // CHECK:STDOUT:   %.loc30_14: <bound method> = bound_method %.loc30_11.1, @Class.%F
 // CHECK:STDOUT:   %.loc30_11.2: Class = bind_value %.loc30_11.1
 // CHECK:STDOUT:   %.loc30_16: init i32 = call %.loc30_14(%.loc30_11.2)
@@ -123,8 +123,8 @@ fn CallGOnInitializingExpr() -> i32 {
 // CHECK:STDOUT:
 // CHECK:STDOUT: fn @CallGThroughPointer(%p: Class*) -> i32 {
 // CHECK:STDOUT: !entry:
-// CHECK:STDOUT:   %p.ref: Class* = name_reference p, %p
-// CHECK:STDOUT:   %.loc34_11.1: ref Class = dereference %p.ref
+// CHECK:STDOUT:   %p.ref: Class* = name_ref p, %p
+// CHECK:STDOUT:   %.loc34_11.1: ref Class = deref %p.ref
 // CHECK:STDOUT:   %.loc34_14: <bound method> = bound_method %.loc34_11.1, @Class.%G
 // CHECK:STDOUT:   %.loc34_11.2: Class* = address_of %.loc34_11.1
 // CHECK:STDOUT:   %.loc34_16: init i32 = call %.loc34_14(%.loc34_11.2)
@@ -137,7 +137,7 @@ fn CallGOnInitializingExpr() -> i32 {
 // CHECK:STDOUT:
 // CHECK:STDOUT: fn @CallFOnInitializingExpr() -> i32 {
 // CHECK:STDOUT: !entry:
-// CHECK:STDOUT:   %Make.ref: <function> = name_reference Make, file.%Make
+// CHECK:STDOUT:   %Make.ref: <function> = name_ref Make, file.%Make
 // CHECK:STDOUT:   %.loc40_14.1: ref Class = temporary_storage
 // CHECK:STDOUT:   %.loc40_14.2: init Class = call %Make.ref() to %.loc40_14.1
 // CHECK:STDOUT:   %.loc40_14.3: ref Class = temporary %.loc40_14.1, %.loc40_14.2
@@ -151,7 +151,7 @@ fn CallGOnInitializingExpr() -> i32 {
 // CHECK:STDOUT:
 // CHECK:STDOUT: fn @CallGOnInitializingExpr() -> i32 {
 // CHECK:STDOUT: !entry:
-// CHECK:STDOUT:   %Make.ref: <function> = name_reference Make, file.%Make
+// CHECK:STDOUT:   %Make.ref: <function> = name_ref Make, file.%Make
 // CHECK:STDOUT:   %.loc44_14.1: ref Class = temporary_storage
 // CHECK:STDOUT:   %.loc44_14.2: init Class = call %Make.ref() to %.loc44_14.1
 // CHECK:STDOUT:   %.loc44_14.3: ref Class = temporary %.loc44_14.1, %.loc44_14.2

+ 30 - 30
toolchain/check/testdata/class/nested.carbon

@@ -44,17 +44,17 @@ fn F(a: Outer*) {
 // CHECK:STDOUT: class @Outer {
 // CHECK:STDOUT:   class_decl @Inner, ()
 // CHECK:STDOUT:   %Inner: type = class_type @Inner
-// CHECK:STDOUT:   %Self.ref: type = name_reference Self, file.%Outer
+// CHECK:STDOUT:   %Self.ref: type = name_ref Self, file.%Outer
 // CHECK:STDOUT:   %.loc14_15: type = ptr_type Outer
 // CHECK:STDOUT:   %.loc14_9.1: type = unbound_field_type Outer, Outer*
 // CHECK:STDOUT:   %.loc14_9.2: <unbound field of class Outer> = field po, member0
 // CHECK:STDOUT:   %po: <unbound field of class Outer> = bind_name po, %.loc14_9.2
-// CHECK:STDOUT:   %Outer.ref: type = name_reference Outer, file.%Outer
+// CHECK:STDOUT:   %Outer.ref: type = name_ref Outer, file.%Outer
 // CHECK:STDOUT:   %.loc15_16: type = ptr_type Outer
 // CHECK:STDOUT:   %.loc15_9.1: type = unbound_field_type Outer, Outer*
 // CHECK:STDOUT:   %.loc15_9.2: <unbound field of class Outer> = field qo, member1
 // CHECK:STDOUT:   %qo: <unbound field of class Outer> = bind_name qo, %.loc15_9.2
-// CHECK:STDOUT:   %Inner.ref: type = name_reference Inner, %Inner
+// CHECK:STDOUT:   %Inner.ref: type = name_ref Inner, %Inner
 // CHECK:STDOUT:   %.loc16_16: type = ptr_type Inner
 // CHECK:STDOUT:   %.loc16_9.1: type = unbound_field_type Outer, Inner*
 // CHECK:STDOUT:   %.loc16_9.2: <unbound field of class Outer> = field pi, member2
@@ -68,17 +68,17 @@ fn F(a: Outer*) {
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
 // CHECK:STDOUT: class @Inner {
-// CHECK:STDOUT:   %Self.ref: type = name_reference Self, @Outer.%Inner
+// CHECK:STDOUT:   %Self.ref: type = name_ref Self, @Outer.%Inner
 // CHECK:STDOUT:   %.loc9_17: type = ptr_type Inner
 // CHECK:STDOUT:   %.loc9_11.1: type = unbound_field_type Inner, Inner*
 // CHECK:STDOUT:   %.loc9_11.2: <unbound field of class Inner> = field pi, member0
 // CHECK:STDOUT:   %pi: <unbound field of class Inner> = bind_name pi, %.loc9_11.2
-// CHECK:STDOUT:   %Outer.ref: type = name_reference Outer, file.%Outer
+// CHECK:STDOUT:   %Outer.ref: type = name_ref Outer, file.%Outer
 // CHECK:STDOUT:   %.loc10_18: type = ptr_type Outer
 // CHECK:STDOUT:   %.loc10_11.1: type = unbound_field_type Inner, Outer*
 // CHECK:STDOUT:   %.loc10_11.2: <unbound field of class Inner> = field po, member1
 // CHECK:STDOUT:   %po: <unbound field of class Inner> = bind_name po, %.loc10_11.2
-// CHECK:STDOUT:   %Inner.ref: type = name_reference Inner, @Outer.%Inner
+// CHECK:STDOUT:   %Inner.ref: type = name_ref Inner, @Outer.%Inner
 // CHECK:STDOUT:   %.loc11_18: type = ptr_type Inner
 // CHECK:STDOUT:   %.loc11_11.1: type = unbound_field_type Inner, Inner*
 // CHECK:STDOUT:   %.loc11_11.2: <unbound field of class Inner> = field qi, member2
@@ -92,51 +92,51 @@ fn F(a: Outer*) {
 // CHECK:STDOUT:
 // CHECK:STDOUT: fn @F(%a: Outer*) {
 // CHECK:STDOUT: !entry:
-// CHECK:STDOUT:   %a.ref.loc23_5: Outer* = name_reference a, %a
-// CHECK:STDOUT:   %.loc23_4: ref Outer = dereference %a.ref.loc23_5
+// CHECK:STDOUT:   %a.ref.loc23_5: Outer* = name_ref a, %a
+// CHECK:STDOUT:   %.loc23_4: ref Outer = deref %a.ref.loc23_5
 // CHECK:STDOUT:   %.loc23_7: ref Outer* = class_field_access %.loc23_4, member0
-// CHECK:STDOUT:   %a.ref.loc23_13: Outer* = name_reference a, %a
+// CHECK:STDOUT:   %a.ref.loc23_13: Outer* = name_ref a, %a
 // CHECK:STDOUT:   assign %.loc23_7, %a.ref.loc23_13
-// CHECK:STDOUT:   %a.ref.loc24_5: Outer* = name_reference a, %a
-// CHECK:STDOUT:   %.loc24_4: ref Outer = dereference %a.ref.loc24_5
+// CHECK:STDOUT:   %a.ref.loc24_5: Outer* = name_ref a, %a
+// CHECK:STDOUT:   %.loc24_4: ref Outer = deref %a.ref.loc24_5
 // CHECK:STDOUT:   %.loc24_7: ref Outer* = class_field_access %.loc24_4, member1
-// CHECK:STDOUT:   %a.ref.loc24_13: Outer* = name_reference a, %a
+// CHECK:STDOUT:   %a.ref.loc24_13: Outer* = name_ref a, %a
 // CHECK:STDOUT:   assign %.loc24_7, %a.ref.loc24_13
-// CHECK:STDOUT:   %a.ref.loc25_5: Outer* = name_reference a, %a
-// CHECK:STDOUT:   %.loc25_4: ref Outer = dereference %a.ref.loc25_5
+// CHECK:STDOUT:   %a.ref.loc25_5: Outer* = name_ref a, %a
+// CHECK:STDOUT:   %.loc25_4: ref Outer = deref %a.ref.loc25_5
 // CHECK:STDOUT:   %.loc25_7: ref Inner* = class_field_access %.loc25_4, member2
-// CHECK:STDOUT:   %a.ref.loc25_15: Outer* = name_reference a, %a
-// CHECK:STDOUT:   %.loc25_14: ref Outer = dereference %a.ref.loc25_15
+// CHECK:STDOUT:   %a.ref.loc25_15: Outer* = name_ref a, %a
+// CHECK:STDOUT:   %.loc25_14: ref Outer = deref %a.ref.loc25_15
 // CHECK:STDOUT:   %.loc25_17.1: ref Inner* = class_field_access %.loc25_14, member2
 // CHECK:STDOUT:   %.loc25_17.2: Inner* = bind_value %.loc25_17.1
 // CHECK:STDOUT:   assign %.loc25_7, %.loc25_17.2
-// CHECK:STDOUT:   %a.ref.loc26_7: Outer* = name_reference a, %a
-// CHECK:STDOUT:   %.loc26_6: ref Outer = dereference %a.ref.loc26_7
+// CHECK:STDOUT:   %a.ref.loc26_7: Outer* = name_ref a, %a
+// CHECK:STDOUT:   %.loc26_6: ref Outer = deref %a.ref.loc26_7
 // CHECK:STDOUT:   %.loc26_9.1: ref Inner* = class_field_access %.loc26_6, member2
 // CHECK:STDOUT:   %.loc26_9.2: Inner* = bind_value %.loc26_9.1
-// CHECK:STDOUT:   %.loc26_4: ref Inner = dereference %.loc26_9.2
+// CHECK:STDOUT:   %.loc26_4: ref Inner = deref %.loc26_9.2
 // CHECK:STDOUT:   %.loc26_13: ref Outer* = class_field_access %.loc26_4, member1
-// CHECK:STDOUT:   %a.ref.loc26_19: Outer* = name_reference a, %a
+// CHECK:STDOUT:   %a.ref.loc26_19: Outer* = name_ref a, %a
 // CHECK:STDOUT:   assign %.loc26_13, %a.ref.loc26_19
-// CHECK:STDOUT:   %a.ref.loc27_7: Outer* = name_reference a, %a
-// CHECK:STDOUT:   %.loc27_6: ref Outer = dereference %a.ref.loc27_7
+// CHECK:STDOUT:   %a.ref.loc27_7: Outer* = name_ref a, %a
+// CHECK:STDOUT:   %.loc27_6: ref Outer = deref %a.ref.loc27_7
 // CHECK:STDOUT:   %.loc27_9.1: ref Inner* = class_field_access %.loc27_6, member2
 // CHECK:STDOUT:   %.loc27_9.2: Inner* = bind_value %.loc27_9.1
-// CHECK:STDOUT:   %.loc27_4: ref Inner = dereference %.loc27_9.2
+// CHECK:STDOUT:   %.loc27_4: ref Inner = deref %.loc27_9.2
 // CHECK:STDOUT:   %.loc27_13: ref Inner* = class_field_access %.loc27_4, member0
-// CHECK:STDOUT:   %a.ref.loc27_21: Outer* = name_reference a, %a
-// CHECK:STDOUT:   %.loc27_20: ref Outer = dereference %a.ref.loc27_21
+// CHECK:STDOUT:   %a.ref.loc27_21: Outer* = name_ref a, %a
+// CHECK:STDOUT:   %.loc27_20: ref Outer = deref %a.ref.loc27_21
 // CHECK:STDOUT:   %.loc27_23.1: ref Inner* = class_field_access %.loc27_20, member2
 // CHECK:STDOUT:   %.loc27_23.2: Inner* = bind_value %.loc27_23.1
 // CHECK:STDOUT:   assign %.loc27_13, %.loc27_23.2
-// CHECK:STDOUT:   %a.ref.loc28_7: Outer* = name_reference a, %a
-// CHECK:STDOUT:   %.loc28_6: ref Outer = dereference %a.ref.loc28_7
+// CHECK:STDOUT:   %a.ref.loc28_7: Outer* = name_ref a, %a
+// CHECK:STDOUT:   %.loc28_6: ref Outer = deref %a.ref.loc28_7
 // CHECK:STDOUT:   %.loc28_9.1: ref Inner* = class_field_access %.loc28_6, member2
 // CHECK:STDOUT:   %.loc28_9.2: Inner* = bind_value %.loc28_9.1
-// CHECK:STDOUT:   %.loc28_4: ref Inner = dereference %.loc28_9.2
+// CHECK:STDOUT:   %.loc28_4: ref Inner = deref %.loc28_9.2
 // CHECK:STDOUT:   %.loc28_13: ref Inner* = class_field_access %.loc28_4, member2
-// CHECK:STDOUT:   %a.ref.loc28_21: Outer* = name_reference a, %a
-// CHECK:STDOUT:   %.loc28_20: ref Outer = dereference %a.ref.loc28_21
+// CHECK:STDOUT:   %a.ref.loc28_21: Outer* = name_ref a, %a
+// CHECK:STDOUT:   %.loc28_20: ref Outer = deref %a.ref.loc28_21
 // CHECK:STDOUT:   %.loc28_23.1: ref Inner* = class_field_access %.loc28_20, member2
 // CHECK:STDOUT:   %.loc28_23.2: Inner* = bind_value %.loc28_23.1
 // CHECK:STDOUT:   assign %.loc28_13, %.loc28_23.2

+ 3 - 3
toolchain/check/testdata/class/nested_name.carbon

@@ -52,7 +52,7 @@ fn G(o: Outer) {
 // CHECK:STDOUT:
 // CHECK:STDOUT: fn @F(%oi: Inner) -> i32 {
 // CHECK:STDOUT: !entry:
-// CHECK:STDOUT:   %oi.ref: Inner = name_reference oi, %oi
+// CHECK:STDOUT:   %oi.ref: Inner = name_ref oi, %oi
 // CHECK:STDOUT:   %.loc14_12.1: ref i32 = class_field_access %oi.ref, member0
 // CHECK:STDOUT:   %.loc14_12.2: i32 = bind_value %.loc14_12.1
 // CHECK:STDOUT:   return %.loc14_12.2
@@ -60,8 +60,8 @@ fn G(o: Outer) {
 // CHECK:STDOUT:
 // CHECK:STDOUT: fn @G(%o: Outer) {
 // CHECK:STDOUT: !entry:
-// CHECK:STDOUT:   %o.ref: Outer = name_reference o, %o
-// CHECK:STDOUT:   %Inner.ref: type = name_reference Inner, @Outer.%Inner
+// CHECK:STDOUT:   %o.ref: Outer = name_ref o, %o
+// CHECK:STDOUT:   %Inner.ref: type = name_ref Inner, @Outer.%Inner
 // CHECK:STDOUT:   %i.var: ref Inner = var i
 // CHECK:STDOUT:   %i: ref Inner = bind_name i, %i.var
 // CHECK:STDOUT:   return

+ 5 - 5
toolchain/check/testdata/class/raw_self.carbon

@@ -48,20 +48,20 @@ fn Class.G[self: Class](r#self: i32) -> (i32, i32) {
 // CHECK:STDOUT:
 // CHECK:STDOUT: fn @F[%self.addr: Class*](%self: i32) {
 // CHECK:STDOUT: !entry:
-// CHECK:STDOUT:   %self.ref.loc14_5: Class* = name_reference self, %self.addr
-// CHECK:STDOUT:   %.loc14_4: ref Class = dereference %self.ref.loc14_5
+// CHECK:STDOUT:   %self.ref.loc14_5: Class* = name_ref self, %self.addr
+// CHECK:STDOUT:   %.loc14_4: ref Class = deref %self.ref.loc14_5
 // CHECK:STDOUT:   %.loc14_10: ref i32 = class_field_access %.loc14_4, member0
-// CHECK:STDOUT:   %self.ref.loc14_15: i32 = name_reference r#self, %self
+// CHECK:STDOUT:   %self.ref.loc14_15: i32 = name_ref r#self, %self
 // CHECK:STDOUT:   assign %.loc14_10, %self.ref.loc14_15
 // CHECK:STDOUT:   return
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
 // CHECK:STDOUT: fn @G[%self.loc17_12: Class](%self.loc17_25: i32) -> %return: (i32, i32) {
 // CHECK:STDOUT: !entry:
-// CHECK:STDOUT:   %self.ref.loc18_11: Class = name_reference self, %self.loc17_12
+// CHECK:STDOUT:   %self.ref.loc18_11: Class = name_ref self, %self.loc17_12
 // CHECK:STDOUT:   %.loc18_15.1: ref i32 = class_field_access %self.ref.loc18_11, member0
 // CHECK:STDOUT:   %.loc18_15.2: i32 = bind_value %.loc18_15.1
-// CHECK:STDOUT:   %self.ref.loc18_19: i32 = name_reference r#self, %self.loc17_25
+// CHECK:STDOUT:   %self.ref.loc18_19: i32 = name_ref r#self, %self.loc17_25
 // CHECK:STDOUT:   %.loc18_25.1: (i32, i32) = tuple_literal (%.loc18_15.2, %self.ref.loc18_19)
 // CHECK:STDOUT:   %.loc18_25.2: ref i32 = tuple_access %return, member0
 // CHECK:STDOUT:   %.loc18_25.3: init i32 = initialize_from %.loc18_15.2 to %.loc18_25.2

+ 3 - 3
toolchain/check/testdata/class/raw_self_type.carbon

@@ -29,15 +29,15 @@ class Class {
 // CHECK:STDOUT:
 // CHECK:STDOUT: fn @F() {
 // CHECK:STDOUT: !entry:
-// CHECK:STDOUT:   %Self.ref.loc9: type = name_reference Self, file.%Class
+// CHECK:STDOUT:   %Self.ref.loc9: type = name_ref Self, file.%Class
 // CHECK:STDOUT:   %.loc9: type = ptr_type Class
 // CHECK:STDOUT:   %Self.var: ref Class* = var r#Self
 // CHECK:STDOUT:   %Self: ref Class* = bind_name r#Self, %Self.var
-// CHECK:STDOUT:   %Self.ref.loc10_12: type = name_reference Self, file.%Class
+// CHECK:STDOUT:   %Self.ref.loc10_12: type = name_ref Self, file.%Class
 // CHECK:STDOUT:   %.loc10_16: type = ptr_type Class
 // CHECK:STDOUT:   %p.var: ref Class* = var p
 // CHECK:STDOUT:   %p: ref Class* = bind_name p, %p.var
-// CHECK:STDOUT:   %Self.ref.loc10_20: ref Class* = name_reference r#Self, %Self
+// CHECK:STDOUT:   %Self.ref.loc10_20: ref Class* = name_ref r#Self, %Self
 // CHECK:STDOUT:   %.loc10_20: Class* = bind_value %Self.ref.loc10_20
 // CHECK:STDOUT:   assign %p.var, %.loc10_20
 // CHECK:STDOUT:   return

+ 1 - 1
toolchain/check/testdata/class/reenter_scope.carbon

@@ -34,7 +34,7 @@ fn Class.F() -> i32 {
 // CHECK:STDOUT:
 // CHECK:STDOUT: fn @F() -> i32 {
 // CHECK:STDOUT: !entry:
-// CHECK:STDOUT:   %G.ref: <function> = name_reference G, @Class.%G
+// CHECK:STDOUT:   %G.ref: <function> = name_ref G, @Class.%G
 // CHECK:STDOUT:   %.loc13_11: init i32 = call %G.ref()
 // CHECK:STDOUT:   %.loc13_13.1: i32 = value_of_initializer %.loc13_11
 // CHECK:STDOUT:   %.loc13_13.2: i32 = converted %.loc13_11, %.loc13_13.1

+ 4 - 4
toolchain/check/testdata/class/scope.carbon

@@ -50,7 +50,7 @@ fn Run() -> i32 {
 // CHECK:STDOUT:
 // CHECK:STDOUT: fn @G() -> i32 {
 // CHECK:STDOUT: !entry:
-// CHECK:STDOUT:   %F.ref: <function> = name_reference F, @Class.%F
+// CHECK:STDOUT:   %F.ref: <function> = name_ref F, @Class.%F
 // CHECK:STDOUT:   %.loc13_13: init i32 = call %F.ref()
 // CHECK:STDOUT:   %.loc13_15.1: i32 = value_of_initializer %.loc13_13
 // CHECK:STDOUT:   %.loc13_15.2: i32 = converted %.loc13_13, %.loc13_15.1
@@ -65,10 +65,10 @@ fn Run() -> i32 {
 // CHECK:STDOUT:
 // CHECK:STDOUT: fn @Run() -> i32 {
 // CHECK:STDOUT: !entry:
-// CHECK:STDOUT:   %F.ref.loc22_10: <function> = name_reference F, file.%F
+// CHECK:STDOUT:   %F.ref.loc22_10: <function> = name_ref F, file.%F
 // CHECK:STDOUT:   %.loc22_11: init i32 = call %F.ref.loc22_10()
-// CHECK:STDOUT:   %Class.ref: type = name_reference Class, file.%Class
-// CHECK:STDOUT:   %F.ref.loc22_21: <function> = name_reference F, @Class.%F
+// CHECK:STDOUT:   %Class.ref: type = name_ref Class, file.%Class
+// CHECK:STDOUT:   %F.ref.loc22_21: <function> = name_ref F, @Class.%F
 // CHECK:STDOUT:   %.loc22_23.1: init i32 = call %F.ref.loc22_21()
 // CHECK:STDOUT:   %.loc22_14.1: i32 = value_of_initializer %.loc22_11
 // CHECK:STDOUT:   %.loc22_14.2: i32 = converted %.loc22_11, %.loc22_14.1

+ 3 - 3
toolchain/check/testdata/class/self.carbon

@@ -46,7 +46,7 @@ fn Class.G[addr self: Class*]() -> i32 {
 // CHECK:STDOUT:
 // CHECK:STDOUT: fn @F[%self: Class]() -> i32 {
 // CHECK:STDOUT: !entry:
-// CHECK:STDOUT:   %self.ref: Class = name_reference self, %self
+// CHECK:STDOUT:   %self.ref: Class = name_ref self, %self
 // CHECK:STDOUT:   %.loc15_14.1: ref i32 = class_field_access %self.ref, member0
 // CHECK:STDOUT:   %.loc15_14.2: i32 = bind_value %.loc15_14.1
 // CHECK:STDOUT:   return %.loc15_14.2
@@ -54,8 +54,8 @@ fn Class.G[addr self: Class*]() -> i32 {
 // CHECK:STDOUT:
 // CHECK:STDOUT: fn @G[%self.addr: Class*]() -> i32 {
 // CHECK:STDOUT: !entry:
-// CHECK:STDOUT:   %self.ref: Class* = name_reference self, %self.addr
-// CHECK:STDOUT:   %.loc19_11: ref Class = dereference %self.ref
+// CHECK:STDOUT:   %self.ref: Class* = name_ref self, %self.addr
+// CHECK:STDOUT:   %.loc19_11: ref Class = deref %self.ref
 // CHECK:STDOUT:   %.loc19_17.1: ref i32 = class_field_access %.loc19_11, member0
 // CHECK:STDOUT:   %.loc19_17.2: i32 = bind_value %.loc19_17.1
 // CHECK:STDOUT:   return %.loc19_17.2

+ 3 - 3
toolchain/check/testdata/class/self_type.carbon

@@ -29,7 +29,7 @@ fn Class.F[self: Class]() -> i32 {
 // CHECK:STDOUT:
 // CHECK:STDOUT: class @Class {
 // CHECK:STDOUT:   %F: <function> = fn_decl @F
-// CHECK:STDOUT:   %Self.ref: type = name_reference Self, file.%Class
+// CHECK:STDOUT:   %Self.ref: type = name_ref Self, file.%Class
 // CHECK:STDOUT:   %.loc9_14: type = ptr_type Class
 // CHECK:STDOUT:   %.loc9_8.1: type = unbound_field_type Class, Class*
 // CHECK:STDOUT:   %.loc9_8.2: <unbound field of class Class> = field p, member0
@@ -42,10 +42,10 @@ fn Class.F[self: Class]() -> i32 {
 // CHECK:STDOUT:
 // CHECK:STDOUT: fn @F[%self: Class]() -> i32 {
 // CHECK:STDOUT: !entry:
-// CHECK:STDOUT:   %self.ref: Class = name_reference self, %self
+// CHECK:STDOUT:   %self.ref: Class = name_ref self, %self
 // CHECK:STDOUT:   %.loc16_16.1: ref Class* = class_field_access %self.ref, member0
 // CHECK:STDOUT:   %.loc16_16.2: Class* = bind_value %.loc16_16.1
-// CHECK:STDOUT:   %.loc16_11.1: ref Class = dereference %.loc16_16.2
+// CHECK:STDOUT:   %.loc16_11.1: ref Class = deref %.loc16_16.2
 // CHECK:STDOUT:   %.loc16_19: <bound method> = bound_method %.loc16_11.1, @Class.%F
 // CHECK:STDOUT:   %.loc16_11.2: Class = bind_value %.loc16_11.1
 // CHECK:STDOUT:   %.loc16_21: init i32 = call %.loc16_19(%.loc16_11.2)

+ 3 - 3
toolchain/check/testdata/class/static_method.carbon

@@ -36,11 +36,11 @@ fn Run() -> i32 {
 // CHECK:STDOUT:
 // CHECK:STDOUT: fn @Run() -> i32 {
 // CHECK:STDOUT: !entry:
-// CHECK:STDOUT:   %Class.ref: type = name_reference Class, file.%Class
+// CHECK:STDOUT:   %Class.ref: type = name_ref Class, file.%Class
 // CHECK:STDOUT:   %c.var: ref Class = var c
 // CHECK:STDOUT:   %c: ref Class = bind_name c, %c.var
-// CHECK:STDOUT:   %c.ref: ref Class = name_reference c, %c
-// CHECK:STDOUT:   %F.ref: <function> = name_reference F, @Class.%F
+// CHECK:STDOUT:   %c.ref: ref Class = name_ref c, %c
+// CHECK:STDOUT:   %F.ref: <function> = name_ref F, @Class.%F
 // CHECK:STDOUT:   %.loc13_13: init i32 = call %F.ref()
 // CHECK:STDOUT:   %.loc13_15.1: i32 = value_of_initializer %.loc13_13
 // CHECK:STDOUT:   %.loc13_15.2: i32 = converted %.loc13_13, %.loc13_15.1

+ 1 - 1
toolchain/check/testdata/const/collapse.carbon

@@ -18,6 +18,6 @@ fn F(p: const i32**) -> const (const i32)** {
 // CHECK:STDOUT:
 // CHECK:STDOUT: fn @F(%p: const i32**) -> const i32** {
 // CHECK:STDOUT: !entry:
-// CHECK:STDOUT:   %p.ref: const i32** = name_reference p, %p
+// CHECK:STDOUT:   %p.ref: const i32** = name_ref p, %p
 // CHECK:STDOUT:   return %p.ref
 // CHECK:STDOUT: }

+ 1 - 1
toolchain/check/testdata/const/fail_collapse.carbon

@@ -20,6 +20,6 @@ fn G(p: const (const i32)**) -> i32** {
 // CHECK:STDOUT:
 // CHECK:STDOUT: fn @G(%p: const i32**) -> i32** {
 // CHECK:STDOUT: !entry:
-// CHECK:STDOUT:   %p.ref: const i32** = name_reference p, %p
+// CHECK:STDOUT:   %p.ref: const i32** = name_ref p, %p
 // CHECK:STDOUT:   return <error>
 // CHECK:STDOUT: }

+ 5 - 5
toolchain/check/testdata/expression_category/in_place_tuple_init.carbon

@@ -36,16 +36,16 @@ fn H() -> i32 {
 // CHECK:STDOUT:   %.loc7: type = converted %.loc10_19, constants.%.loc7_20.2
 // CHECK:STDOUT:   %v.var: ref (i32, i32) = var v
 // CHECK:STDOUT:   %v: ref (i32, i32) = bind_name v, %v.var
-// CHECK:STDOUT:   %F.ref.loc10: <function> = name_reference F, file.%F
+// CHECK:STDOUT:   %F.ref.loc10: <function> = name_ref F, file.%F
 // CHECK:STDOUT:   %.loc10_7: ref (i32, i32) = splice_block %v.var {}
 // CHECK:STDOUT:   %.loc10_24: init (i32, i32) = call %F.ref.loc10() to %.loc10_7
 // CHECK:STDOUT:   assign %v.var, %.loc10_24
-// CHECK:STDOUT:   %v.ref: ref (i32, i32) = name_reference v, %v
-// CHECK:STDOUT:   %F.ref.loc11: <function> = name_reference F, file.%F
+// CHECK:STDOUT:   %v.ref: ref (i32, i32) = name_ref v, %v
+// CHECK:STDOUT:   %F.ref.loc11: <function> = name_ref F, file.%F
 // CHECK:STDOUT:   %.loc11_3: ref (i32, i32) = splice_block %v.ref {}
 // CHECK:STDOUT:   %.loc11_8: init (i32, i32) = call %F.ref.loc11() to %.loc11_3
 // CHECK:STDOUT:   assign %v.ref, %.loc11_8
-// CHECK:STDOUT:   %F.ref.loc12: <function> = name_reference F, file.%F
+// CHECK:STDOUT:   %F.ref.loc12: <function> = name_ref F, file.%F
 // CHECK:STDOUT:   %.loc9: ref (i32, i32) = splice_block %return {}
 // CHECK:STDOUT:   %.loc12: init (i32, i32) = call %F.ref.loc12() to %.loc9
 // CHECK:STDOUT:   return %.loc12
@@ -53,7 +53,7 @@ fn H() -> i32 {
 // CHECK:STDOUT:
 // CHECK:STDOUT: fn @H() -> i32 {
 // CHECK:STDOUT: !entry:
-// CHECK:STDOUT:   %G.ref: <function> = name_reference G, file.%G
+// CHECK:STDOUT:   %G.ref: <function> = name_ref G, file.%G
 // CHECK:STDOUT:   %.loc16_11.1: ref (i32, i32) = temporary_storage
 // CHECK:STDOUT:   %.loc16_11.2: init (i32, i32) = call %G.ref() to %.loc16_11.1
 // CHECK:STDOUT:   %.loc16_14: i32 = int_literal 0

+ 2 - 2
toolchain/check/testdata/function/call/empty_struct.carbon

@@ -24,13 +24,13 @@ fn Main() {
 // CHECK:STDOUT:
 // CHECK:STDOUT: fn @Echo(%a: {}) -> {} {
 // CHECK:STDOUT: !entry:
-// CHECK:STDOUT:   %a.ref: {} = name_reference a, %a
+// CHECK:STDOUT:   %a.ref: {} = name_ref a, %a
 // CHECK:STDOUT:   return %a.ref
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
 // CHECK:STDOUT: fn @Main() {
 // CHECK:STDOUT: !entry:
-// CHECK:STDOUT:   %Echo.ref: <function> = name_reference Echo, file.%Echo
+// CHECK:STDOUT:   %Echo.ref: <function> = name_ref Echo, file.%Echo
 // CHECK:STDOUT:   %.loc12_9.1: {} = struct_literal ()
 // CHECK:STDOUT:   %.loc12_9.2: {} = struct_value ()
 // CHECK:STDOUT:   %.loc12_9.3: {} = converted %.loc12_9.1, %.loc12_9.2

+ 2 - 2
toolchain/check/testdata/function/call/empty_tuple.carbon

@@ -23,13 +23,13 @@ fn Main() {
 // CHECK:STDOUT:
 // CHECK:STDOUT: fn @Echo(%a: ()) -> () {
 // CHECK:STDOUT: !entry:
-// CHECK:STDOUT:   %a.ref: () = name_reference a, %a
+// CHECK:STDOUT:   %a.ref: () = name_ref a, %a
 // CHECK:STDOUT:   return %a.ref
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
 // CHECK:STDOUT: fn @Main() {
 // CHECK:STDOUT: !entry:
-// CHECK:STDOUT:   %Echo.ref: <function> = name_reference Echo, file.%Echo
+// CHECK:STDOUT:   %Echo.ref: <function> = name_ref Echo, file.%Echo
 // CHECK:STDOUT:   %.loc12_9.1: () = tuple_literal ()
 // CHECK:STDOUT:   %.loc12_9.2: () = tuple_value ()
 // CHECK:STDOUT:   %.loc12_9.3: () = converted %.loc12_9.1, %.loc12_9.2

+ 6 - 6
toolchain/check/testdata/function/call/fail_param_count.carbon

@@ -83,22 +83,22 @@ fn Main() {
 // CHECK:STDOUT:
 // CHECK:STDOUT: fn @Main() {
 // CHECK:STDOUT: !entry:
-// CHECK:STDOUT:   %Run0.ref.loc18: <function> = name_reference Run0, file.%Run0
+// CHECK:STDOUT:   %Run0.ref.loc18: <function> = name_ref Run0, file.%Run0
 // CHECK:STDOUT:   %.loc18_8: i32 = int_literal 1
 // CHECK:STDOUT:   %.loc18_7: init () = call %Run0.ref.loc18(<invalid>)
-// CHECK:STDOUT:   %Run0.ref.loc25: <function> = name_reference Run0, file.%Run0
+// CHECK:STDOUT:   %Run0.ref.loc25: <function> = name_ref Run0, file.%Run0
 // CHECK:STDOUT:   %.loc25_8: i32 = int_literal 0
 // CHECK:STDOUT:   %.loc25_11: i32 = int_literal 1
 // CHECK:STDOUT:   %.loc25_7: init () = call %Run0.ref.loc25(<invalid>)
-// CHECK:STDOUT:   %Run1.ref.loc33: <function> = name_reference Run1, file.%Run1
+// CHECK:STDOUT:   %Run1.ref.loc33: <function> = name_ref Run1, file.%Run1
 // CHECK:STDOUT:   %.loc33: init () = call %Run1.ref.loc33(<invalid>)
-// CHECK:STDOUT:   %Run1.ref.loc40: <function> = name_reference Run1, file.%Run1
+// CHECK:STDOUT:   %Run1.ref.loc40: <function> = name_ref Run1, file.%Run1
 // CHECK:STDOUT:   %.loc40_8: i32 = int_literal 0
 // CHECK:STDOUT:   %.loc40_11: i32 = int_literal 1
 // CHECK:STDOUT:   %.loc40_7: init () = call %Run1.ref.loc40(<invalid>)
-// CHECK:STDOUT:   %Run2.ref.loc48: <function> = name_reference Run2, file.%Run2
+// CHECK:STDOUT:   %Run2.ref.loc48: <function> = name_ref Run2, file.%Run2
 // CHECK:STDOUT:   %.loc48: init () = call %Run2.ref.loc48(<invalid>)
-// CHECK:STDOUT:   %Run2.ref.loc55: <function> = name_reference Run2, file.%Run2
+// CHECK:STDOUT:   %Run2.ref.loc55: <function> = name_ref Run2, file.%Run2
 // CHECK:STDOUT:   %.loc55_8: i32 = int_literal 0
 // CHECK:STDOUT:   %.loc55_7: init () = call %Run2.ref.loc55(<invalid>)
 // CHECK:STDOUT:   return

+ 1 - 1
toolchain/check/testdata/function/call/fail_param_type.carbon

@@ -32,7 +32,7 @@ fn F() {
 // CHECK:STDOUT:
 // CHECK:STDOUT: fn @F() {
 // CHECK:STDOUT: !entry:
-// CHECK:STDOUT:   %G.ref: <function> = name_reference G, file.%G
+// CHECK:STDOUT:   %G.ref: <function> = name_ref G, file.%G
 // CHECK:STDOUT:   %.loc16_5: f64 = real_literal 10e-1
 // CHECK:STDOUT:   %.loc16_4: init () = call %G.ref(<invalid>)
 // CHECK:STDOUT:   return

+ 1 - 1
toolchain/check/testdata/function/call/fail_return_type_mismatch.carbon

@@ -28,7 +28,7 @@ fn Run() {
 // CHECK:STDOUT: !entry:
 // CHECK:STDOUT:   %x.var: ref i32 = var x
 // CHECK:STDOUT:   %x: ref i32 = bind_name x, %x.var
-// CHECK:STDOUT:   %Foo.ref: <function> = name_reference Foo, file.%Foo
+// CHECK:STDOUT:   %Foo.ref: <function> = name_ref Foo, file.%Foo
 // CHECK:STDOUT:   %.loc13: init f64 = call %Foo.ref()
 // CHECK:STDOUT:   assign %x.var, <error>
 // CHECK:STDOUT:   return

+ 2 - 2
toolchain/check/testdata/function/call/i32.carbon

@@ -19,7 +19,7 @@ fn Main() {
 // CHECK:STDOUT:
 // CHECK:STDOUT: fn @Echo(%a: i32) -> i32 {
 // CHECK:STDOUT: !entry:
-// CHECK:STDOUT:   %a.ref: i32 = name_reference a, %a
+// CHECK:STDOUT:   %a.ref: i32 = name_ref a, %a
 // CHECK:STDOUT:   return %a.ref
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
@@ -27,7 +27,7 @@ fn Main() {
 // CHECK:STDOUT: !entry:
 // CHECK:STDOUT:   %b.var: ref i32 = var b
 // CHECK:STDOUT:   %b: ref i32 = bind_name b, %b.var
-// CHECK:STDOUT:   %Echo.ref: <function> = name_reference Echo, file.%Echo
+// CHECK:STDOUT:   %Echo.ref: <function> = name_ref Echo, file.%Echo
 // CHECK:STDOUT:   %.loc12_21: i32 = int_literal 1
 // CHECK:STDOUT:   %.loc12_20: init i32 = call %Echo.ref(%.loc12_21)
 // CHECK:STDOUT:   assign %b.var, %.loc12_20

+ 1 - 1
toolchain/check/testdata/function/call/more_param_ir.carbon

@@ -27,7 +27,7 @@ fn Main() {
 // CHECK:STDOUT:
 // CHECK:STDOUT: fn @Main() {
 // CHECK:STDOUT: !entry:
-// CHECK:STDOUT:   %Foo.ref: <function> = name_reference Foo, file.%Foo
+// CHECK:STDOUT:   %Foo.ref: <function> = name_ref Foo, file.%Foo
 // CHECK:STDOUT:   %.loc11_7: i32 = int_literal 1
 // CHECK:STDOUT:   %.loc11_11: i32 = int_literal 2
 // CHECK:STDOUT:   %.loc11_9: i32 = add %.loc11_7, %.loc11_11

+ 1 - 1
toolchain/check/testdata/function/call/params_one.carbon

@@ -26,7 +26,7 @@ fn Main() {
 // CHECK:STDOUT:
 // CHECK:STDOUT: fn @Main() {
 // CHECK:STDOUT: !entry:
-// CHECK:STDOUT:   %Foo.ref: <function> = name_reference Foo, file.%Foo
+// CHECK:STDOUT:   %Foo.ref: <function> = name_ref Foo, file.%Foo
 // CHECK:STDOUT:   %.loc10_7: i32 = int_literal 1
 // CHECK:STDOUT:   %.loc10_6: init () = call %Foo.ref(%.loc10_7)
 // CHECK:STDOUT:   return

+ 2 - 2
toolchain/check/testdata/function/call/params_one_comma.carbon

@@ -27,10 +27,10 @@ fn Main() {
 // CHECK:STDOUT:
 // CHECK:STDOUT: fn @Main() {
 // CHECK:STDOUT: !entry:
-// CHECK:STDOUT:   %Foo.ref.loc10: <function> = name_reference Foo, file.%Foo
+// CHECK:STDOUT:   %Foo.ref.loc10: <function> = name_ref Foo, file.%Foo
 // CHECK:STDOUT:   %.loc10_7: i32 = int_literal 1
 // CHECK:STDOUT:   %.loc10_6: init () = call %Foo.ref.loc10(%.loc10_7)
-// CHECK:STDOUT:   %Foo.ref.loc11: <function> = name_reference Foo, file.%Foo
+// CHECK:STDOUT:   %Foo.ref.loc11: <function> = name_ref Foo, file.%Foo
 // CHECK:STDOUT:   %.loc11_7: i32 = int_literal 1
 // CHECK:STDOUT:   %.loc11_6: init () = call %Foo.ref.loc11(%.loc11_7)
 // CHECK:STDOUT:   return

+ 1 - 1
toolchain/check/testdata/function/call/params_two.carbon

@@ -26,7 +26,7 @@ fn Main() {
 // CHECK:STDOUT:
 // CHECK:STDOUT: fn @Main() {
 // CHECK:STDOUT: !entry:
-// CHECK:STDOUT:   %Foo.ref: <function> = name_reference Foo, file.%Foo
+// CHECK:STDOUT:   %Foo.ref: <function> = name_ref Foo, file.%Foo
 // CHECK:STDOUT:   %.loc10_7: i32 = int_literal 1
 // CHECK:STDOUT:   %.loc10_10: i32 = int_literal 2
 // CHECK:STDOUT:   %.loc10_6: init () = call %Foo.ref(%.loc10_7, %.loc10_10)

+ 2 - 2
toolchain/check/testdata/function/call/params_two_comma.carbon

@@ -27,11 +27,11 @@ fn Main() {
 // CHECK:STDOUT:
 // CHECK:STDOUT: fn @Main() {
 // CHECK:STDOUT: !entry:
-// CHECK:STDOUT:   %Foo.ref.loc10: <function> = name_reference Foo, file.%Foo
+// CHECK:STDOUT:   %Foo.ref.loc10: <function> = name_ref Foo, file.%Foo
 // CHECK:STDOUT:   %.loc10_7: i32 = int_literal 1
 // CHECK:STDOUT:   %.loc10_10: i32 = int_literal 2
 // CHECK:STDOUT:   %.loc10_6: init () = call %Foo.ref.loc10(%.loc10_7, %.loc10_10)
-// CHECK:STDOUT:   %Foo.ref.loc11: <function> = name_reference Foo, file.%Foo
+// CHECK:STDOUT:   %Foo.ref.loc11: <function> = name_ref Foo, file.%Foo
 // CHECK:STDOUT:   %.loc11_7: i32 = int_literal 1
 // CHECK:STDOUT:   %.loc11_10: i32 = int_literal 2
 // CHECK:STDOUT:   %.loc11_6: init () = call %Foo.ref.loc11(%.loc11_7, %.loc11_10)

+ 1 - 1
toolchain/check/testdata/function/call/params_zero.carbon

@@ -26,7 +26,7 @@ fn Main() {
 // CHECK:STDOUT:
 // CHECK:STDOUT: fn @Main() {
 // CHECK:STDOUT: !entry:
-// CHECK:STDOUT:   %Foo.ref: <function> = name_reference Foo, file.%Foo
+// CHECK:STDOUT:   %Foo.ref: <function> = name_ref Foo, file.%Foo
 // CHECK:STDOUT:   %.loc10: init () = call %Foo.ref()
 // CHECK:STDOUT:   return
 // CHECK:STDOUT: }

+ 1 - 1
toolchain/check/testdata/function/call/return_implicit.carbon

@@ -31,7 +31,7 @@ fn Main() {
 // CHECK:STDOUT:   %.loc11_11.2: type = converted %.loc11_11.1, constants.%.loc11
 // CHECK:STDOUT:   %b.var: ref () = var b
 // CHECK:STDOUT:   %b: ref () = bind_name b, %b.var
-// CHECK:STDOUT:   %MakeImplicitEmptyTuple.ref: <function> = name_reference MakeImplicitEmptyTuple, file.%MakeImplicitEmptyTuple
+// CHECK:STDOUT:   %MakeImplicitEmptyTuple.ref: <function> = name_ref MakeImplicitEmptyTuple, file.%MakeImplicitEmptyTuple
 // CHECK:STDOUT:   %.loc11_37: init () = call %MakeImplicitEmptyTuple.ref()
 // CHECK:STDOUT:   assign %b.var, %.loc11_37
 // CHECK:STDOUT:   return

+ 1 - 1
toolchain/check/testdata/function/declaration/simple.carbon

@@ -21,7 +21,7 @@ fn G() { F(); }
 // CHECK:STDOUT:
 // CHECK:STDOUT: fn @G() {
 // CHECK:STDOUT: !entry:
-// CHECK:STDOUT:   %F.ref: <function> = name_reference F, file.%F
+// CHECK:STDOUT:   %F.ref: <function> = name_ref F, file.%F
 // CHECK:STDOUT:   %.loc9: init () = call %F.ref()
 // CHECK:STDOUT:   return
 // CHECK:STDOUT: }

+ 4 - 4
toolchain/check/testdata/if/else.carbon

@@ -45,21 +45,21 @@ fn If(b: bool) {
 // CHECK:STDOUT:
 // CHECK:STDOUT: fn @If(%b: bool) {
 // CHECK:STDOUT: !entry:
-// CHECK:STDOUT:   %b.ref: bool = name_reference b, %b
+// CHECK:STDOUT:   %b.ref: bool = name_ref b, %b
 // CHECK:STDOUT:   if %b.ref br !if.then else br !if.else
 // CHECK:STDOUT:
 // CHECK:STDOUT: !if.then:
-// CHECK:STDOUT:   %F.ref: <function> = name_reference F, file.%F
+// CHECK:STDOUT:   %F.ref: <function> = name_ref F, file.%F
 // CHECK:STDOUT:   %.loc13: init () = call %F.ref()
 // CHECK:STDOUT:   br !if.done
 // CHECK:STDOUT:
 // CHECK:STDOUT: !if.else:
-// CHECK:STDOUT:   %G.ref: <function> = name_reference G, file.%G
+// CHECK:STDOUT:   %G.ref: <function> = name_ref G, file.%G
 // CHECK:STDOUT:   %.loc15: init () = call %G.ref()
 // CHECK:STDOUT:   br !if.done
 // CHECK:STDOUT:
 // CHECK:STDOUT: !if.done:
-// CHECK:STDOUT:   %H.ref: <function> = name_reference H, file.%H
+// CHECK:STDOUT:   %H.ref: <function> = name_ref H, file.%H
 // CHECK:STDOUT:   %.loc17: init () = call %H.ref()
 // CHECK:STDOUT:   return
 // CHECK:STDOUT: }

+ 3 - 3
toolchain/check/testdata/if/fail_reachable_fallthrough.carbon

@@ -41,7 +41,7 @@ fn If3(b: bool) -> i32 {
 // CHECK:STDOUT:
 // CHECK:STDOUT: fn @If1(%b: bool) -> i32 {
 // CHECK:STDOUT: !entry:
-// CHECK:STDOUT:   %b.ref: bool = name_reference b, %b
+// CHECK:STDOUT:   %b.ref: bool = name_ref b, %b
 // CHECK:STDOUT:   if %b.ref br !if.then else br !if.else
 // CHECK:STDOUT:
 // CHECK:STDOUT: !if.then:
@@ -56,7 +56,7 @@ fn If3(b: bool) -> i32 {
 // CHECK:STDOUT:
 // CHECK:STDOUT: fn @If2(%b: bool) -> i32 {
 // CHECK:STDOUT: !entry:
-// CHECK:STDOUT:   %b.ref: bool = name_reference b, %b
+// CHECK:STDOUT:   %b.ref: bool = name_ref b, %b
 // CHECK:STDOUT:   if %b.ref br !if.then else br !if.else
 // CHECK:STDOUT:
 // CHECK:STDOUT: !if.then:
@@ -71,7 +71,7 @@ fn If3(b: bool) -> i32 {
 // CHECK:STDOUT:
 // CHECK:STDOUT: fn @If3(%b: bool) -> i32 {
 // CHECK:STDOUT: !entry:
-// CHECK:STDOUT:   %b.ref: bool = name_reference b, %b
+// CHECK:STDOUT:   %b.ref: bool = name_ref b, %b
 // CHECK:STDOUT:   if %b.ref br !if.then else br !if.else
 // CHECK:STDOUT:
 // CHECK:STDOUT: !if.then:

+ 3 - 3
toolchain/check/testdata/if/fail_scope.carbon

@@ -21,7 +21,7 @@ fn VarScope(b: bool) -> i32 {
 // CHECK:STDOUT:
 // CHECK:STDOUT: fn @VarScope(%b: bool) -> i32 {
 // CHECK:STDOUT: !entry:
-// CHECK:STDOUT:   %b.ref: bool = name_reference b, %b
+// CHECK:STDOUT:   %b.ref: bool = name_ref b, %b
 // CHECK:STDOUT:   if %b.ref br !if.then else br !if.else
 // CHECK:STDOUT:
 // CHECK:STDOUT: !if.then:
@@ -29,11 +29,11 @@ fn VarScope(b: bool) -> i32 {
 // CHECK:STDOUT:   %n: ref i32 = bind_name n, %n.var
 // CHECK:STDOUT:   %.loc9: i32 = int_literal 2
 // CHECK:STDOUT:   assign %n.var, %.loc9
-// CHECK:STDOUT:   %n.ref.loc10: ref i32 = name_reference n, %n
+// CHECK:STDOUT:   %n.ref.loc10: ref i32 = name_ref n, %n
 // CHECK:STDOUT:   %.loc10: i32 = bind_value %n.ref.loc10
 // CHECK:STDOUT:   return %.loc10
 // CHECK:STDOUT:
 // CHECK:STDOUT: !if.else:
-// CHECK:STDOUT:   %n.ref.loc15: <error> = name_reference n, <error>
+// CHECK:STDOUT:   %n.ref.loc15: <error> = name_ref n, <error>
 // CHECK:STDOUT:   return <error>
 // CHECK:STDOUT: }

+ 3 - 3
toolchain/check/testdata/if/no_else.carbon

@@ -36,16 +36,16 @@ fn If(b: bool) {
 // CHECK:STDOUT:
 // CHECK:STDOUT: fn @If(%b: bool) {
 // CHECK:STDOUT: !entry:
-// CHECK:STDOUT:   %b.ref: bool = name_reference b, %b
+// CHECK:STDOUT:   %b.ref: bool = name_ref b, %b
 // CHECK:STDOUT:   if %b.ref br !if.then else br !if.else
 // CHECK:STDOUT:
 // CHECK:STDOUT: !if.then:
-// CHECK:STDOUT:   %F.ref: <function> = name_reference F, file.%F
+// CHECK:STDOUT:   %F.ref: <function> = name_ref F, file.%F
 // CHECK:STDOUT:   %.loc12: init () = call %F.ref()
 // CHECK:STDOUT:   br !if.else
 // CHECK:STDOUT:
 // CHECK:STDOUT: !if.else:
-// CHECK:STDOUT:   %G.ref: <function> = name_reference G, file.%G
+// CHECK:STDOUT:   %G.ref: <function> = name_ref G, file.%G
 // CHECK:STDOUT:   %.loc14: init () = call %G.ref()
 // CHECK:STDOUT:   return
 // CHECK:STDOUT: }

+ 1 - 1
toolchain/check/testdata/if/unreachable_fallthrough.carbon

@@ -19,7 +19,7 @@ fn If(b: bool) -> i32 {
 // CHECK:STDOUT:
 // CHECK:STDOUT: fn @If(%b: bool) -> i32 {
 // CHECK:STDOUT: !entry:
-// CHECK:STDOUT:   %b.ref: bool = name_reference b, %b
+// CHECK:STDOUT:   %b.ref: bool = name_ref b, %b
 // CHECK:STDOUT:   if %b.ref br !if.then else br !if.else
 // CHECK:STDOUT:
 // CHECK:STDOUT: !if.then:

+ 5 - 5
toolchain/check/testdata/if_expression/basic.carbon

@@ -14,18 +14,18 @@ fn F(b: bool, n: i32, m: i32) -> i32 {
 // CHECK:STDOUT:
 // CHECK:STDOUT: fn @F(%b: bool, %n: i32, %m: i32) -> i32 {
 // CHECK:STDOUT: !entry:
-// CHECK:STDOUT:   %b.ref: bool = name_reference b, %b
+// CHECK:STDOUT:   %b.ref: bool = name_ref b, %b
 // CHECK:STDOUT:   if %b.ref br !if.expr.then else br !if.expr.else
 // CHECK:STDOUT:
 // CHECK:STDOUT: !if.expr.then:
-// CHECK:STDOUT:   %n.ref.loc8_20: i32 = name_reference n, %n
-// CHECK:STDOUT:   %m.ref.loc8_24: i32 = name_reference m, %m
+// CHECK:STDOUT:   %n.ref.loc8_20: i32 = name_ref n, %n
+// CHECK:STDOUT:   %m.ref.loc8_24: i32 = name_ref m, %m
 // CHECK:STDOUT:   %.loc8_22: i32 = add %n.ref.loc8_20, %m.ref.loc8_24
 // CHECK:STDOUT:   br !if.expr.result(%.loc8_22)
 // CHECK:STDOUT:
 // CHECK:STDOUT: !if.expr.else:
-// CHECK:STDOUT:   %m.ref.loc8_31: i32 = name_reference m, %m
-// CHECK:STDOUT:   %n.ref.loc8_35: i32 = name_reference n, %n
+// CHECK:STDOUT:   %m.ref.loc8_31: i32 = name_ref m, %m
+// CHECK:STDOUT:   %n.ref.loc8_35: i32 = name_ref n, %n
 // CHECK:STDOUT:   %.loc8_33: i32 = add %m.ref.loc8_31, %n.ref.loc8_35
 // CHECK:STDOUT:   br !if.expr.result(%.loc8_33)
 // CHECK:STDOUT:

+ 4 - 4
toolchain/check/testdata/if_expression/constant_condition.carbon

@@ -40,14 +40,14 @@ fn G() -> i32 {
 // CHECK:STDOUT:   if %.loc11_13 br !if.expr.then else br !if.expr.else
 // CHECK:STDOUT:
 // CHECK:STDOUT: !if.expr.then:
-// CHECK:STDOUT:   %A.ref: <function> = name_reference A, file.%A
+// CHECK:STDOUT:   %A.ref: <function> = name_ref A, file.%A
 // CHECK:STDOUT:   %.loc11_24.1: init i32 = call %A.ref()
 // CHECK:STDOUT:   %.loc11_24.2: i32 = value_of_initializer %.loc11_24.1
 // CHECK:STDOUT:   %.loc11_24.3: i32 = converted %.loc11_24.1, %.loc11_24.2
 // CHECK:STDOUT:   br !if.expr.result(%.loc11_24.3)
 // CHECK:STDOUT:
 // CHECK:STDOUT: !if.expr.else:
-// CHECK:STDOUT:   %B.ref: <function> = name_reference B, file.%B
+// CHECK:STDOUT:   %B.ref: <function> = name_ref B, file.%B
 // CHECK:STDOUT:   %.loc11_33: init i32 = call %B.ref()
 // CHECK:STDOUT:   %.loc11_27.1: i32 = value_of_initializer %.loc11_33
 // CHECK:STDOUT:   %.loc11_27.2: i32 = converted %.loc11_33, %.loc11_27.1
@@ -64,14 +64,14 @@ fn G() -> i32 {
 // CHECK:STDOUT:   if %.loc15_13 br !if.expr.then else br !if.expr.else
 // CHECK:STDOUT:
 // CHECK:STDOUT: !if.expr.then:
-// CHECK:STDOUT:   %A.ref: <function> = name_reference A, file.%A
+// CHECK:STDOUT:   %A.ref: <function> = name_ref A, file.%A
 // CHECK:STDOUT:   %.loc15_25.1: init i32 = call %A.ref()
 // CHECK:STDOUT:   %.loc15_25.2: i32 = value_of_initializer %.loc15_25.1
 // CHECK:STDOUT:   %.loc15_25.3: i32 = converted %.loc15_25.1, %.loc15_25.2
 // CHECK:STDOUT:   br !if.expr.result(%.loc15_25.3)
 // CHECK:STDOUT:
 // CHECK:STDOUT: !if.expr.else:
-// CHECK:STDOUT:   %B.ref: <function> = name_reference B, file.%B
+// CHECK:STDOUT:   %B.ref: <function> = name_ref B, file.%B
 // CHECK:STDOUT:   %.loc15_34: init i32 = call %B.ref()
 // CHECK:STDOUT:   %.loc15_28.1: i32 = value_of_initializer %.loc15_34
 // CHECK:STDOUT:   %.loc15_28.2: i32 = converted %.loc15_34, %.loc15_28.1

+ 3 - 3
toolchain/check/testdata/if_expression/control_flow.carbon

@@ -31,18 +31,18 @@ fn F(b: bool) -> i32 {
 // CHECK:STDOUT:
 // CHECK:STDOUT: fn @F(%b: bool) -> i32 {
 // CHECK:STDOUT: !entry:
-// CHECK:STDOUT:   %b.ref: bool = name_reference b, %b
+// CHECK:STDOUT:   %b.ref: bool = name_ref b, %b
 // CHECK:STDOUT:   if %b.ref br !if.expr.then else br !if.expr.else
 // CHECK:STDOUT:
 // CHECK:STDOUT: !if.expr.then:
-// CHECK:STDOUT:   %A.ref: <function> = name_reference A, file.%A
+// CHECK:STDOUT:   %A.ref: <function> = name_ref A, file.%A
 // CHECK:STDOUT:   %.loc11_21.1: init i32 = call %A.ref()
 // CHECK:STDOUT:   %.loc11_21.2: i32 = value_of_initializer %.loc11_21.1
 // CHECK:STDOUT:   %.loc11_21.3: i32 = converted %.loc11_21.1, %.loc11_21.2
 // CHECK:STDOUT:   br !if.expr.result(%.loc11_21.3)
 // CHECK:STDOUT:
 // CHECK:STDOUT: !if.expr.else:
-// CHECK:STDOUT:   %B.ref: <function> = name_reference B, file.%B
+// CHECK:STDOUT:   %B.ref: <function> = name_ref B, file.%B
 // CHECK:STDOUT:   %.loc11_30: init i32 = call %B.ref()
 // CHECK:STDOUT:   %.loc11_24.1: i32 = value_of_initializer %.loc11_30
 // CHECK:STDOUT:   %.loc11_24.2: i32 = converted %.loc11_30, %.loc11_24.1

+ 3 - 3
toolchain/check/testdata/if_expression/nested.carbon

@@ -14,11 +14,11 @@ fn F(a: bool, b: bool, c: bool) -> i32 {
 // CHECK:STDOUT:
 // CHECK:STDOUT: fn @F(%a: bool, %b: bool, %c: bool) -> i32 {
 // CHECK:STDOUT: !entry:
-// CHECK:STDOUT:   %a.ref: bool = name_reference a, %a
+// CHECK:STDOUT:   %a.ref: bool = name_ref a, %a
 // CHECK:STDOUT:   if %a.ref br !if.expr.then.loc8_10 else br !if.expr.else.loc8_10
 // CHECK:STDOUT:
 // CHECK:STDOUT: !if.expr.then.loc8_10:
-// CHECK:STDOUT:   %b.ref: bool = name_reference b, %b
+// CHECK:STDOUT:   %b.ref: bool = name_ref b, %b
 // CHECK:STDOUT:   if %b.ref br !if.expr.then.loc8_20 else br !if.expr.else.loc8_20
 // CHECK:STDOUT:
 // CHECK:STDOUT: !if.expr.then.loc8_20:
@@ -34,7 +34,7 @@ fn F(a: bool, b: bool, c: bool) -> i32 {
 // CHECK:STDOUT:   br !if.expr.result.loc8_10(%.loc8_20)
 // CHECK:STDOUT:
 // CHECK:STDOUT: !if.expr.else.loc8_10:
-// CHECK:STDOUT:   %c.ref: bool = name_reference c, %c
+// CHECK:STDOUT:   %c.ref: bool = name_ref c, %c
 // CHECK:STDOUT:   if %c.ref br !if.expr.then.loc8_44 else br !if.expr.else.loc8_44
 // CHECK:STDOUT:
 // CHECK:STDOUT: !if.expr.then.loc8_44:

+ 4 - 4
toolchain/check/testdata/if_expression/struct.carbon

@@ -38,12 +38,12 @@ fn F(cond: bool) {
 // CHECK:STDOUT:   %.loc10_46.6: init {.a: i32, .b: i32} = struct_init (%.loc10_46.3, %.loc10_46.5) to %a.var
 // CHECK:STDOUT:   %.loc10_46.7: init {.a: i32, .b: i32} = converted %.loc10_46.1, %.loc10_46.6
 // CHECK:STDOUT:   assign %a.var, %.loc10_46.7
-// CHECK:STDOUT:   %G.ref: <function> = name_reference G, file.%G
-// CHECK:STDOUT:   %cond.ref: bool = name_reference cond, %cond
+// CHECK:STDOUT:   %G.ref: <function> = name_ref G, file.%G
+// CHECK:STDOUT:   %cond.ref: bool = name_ref cond, %cond
 // CHECK:STDOUT:   if %cond.ref br !if.expr.then else br !if.expr.else
 // CHECK:STDOUT:
 // CHECK:STDOUT: !if.expr.then:
-// CHECK:STDOUT:   %a.ref.loc11_18: ref {.a: i32, .b: i32} = name_reference a, %a
+// CHECK:STDOUT:   %a.ref.loc11_18: ref {.a: i32, .b: i32} = name_ref a, %a
 // CHECK:STDOUT:   %.loc11_18.1: ref i32 = struct_access %a.ref.loc11_18, member0
 // CHECK:STDOUT:   %.loc11_18.2: i32 = bind_value %.loc11_18.1
 // CHECK:STDOUT:   %.loc11_18.3: ref i32 = struct_access %a.ref.loc11_18, member1
@@ -53,7 +53,7 @@ fn F(cond: bool) {
 // CHECK:STDOUT:   br !if.expr.result(%.loc11_18.6)
 // CHECK:STDOUT:
 // CHECK:STDOUT: !if.expr.else:
-// CHECK:STDOUT:   %a.ref.loc11_25: ref {.a: i32, .b: i32} = name_reference a, %a
+// CHECK:STDOUT:   %a.ref.loc11_25: ref {.a: i32, .b: i32} = name_ref a, %a
 // CHECK:STDOUT:   %.loc11_25.1: ref i32 = struct_access %a.ref.loc11_25, member0
 // CHECK:STDOUT:   %.loc11_25.2: i32 = bind_value %.loc11_25.1
 // CHECK:STDOUT:   %.loc11_25.3: ref i32 = struct_access %a.ref.loc11_25, member1

+ 3 - 3
toolchain/check/testdata/index/array_element_access.carbon

@@ -37,15 +37,15 @@ var d: i32 = a[b];
 // CHECK:STDOUT:   assign %b.var, %.loc8
 // CHECK:STDOUT:   %c.var: ref i32 = var c
 // CHECK:STDOUT:   %c: ref i32 = bind_name c, %c.var
-// CHECK:STDOUT:   %a.ref.loc9: ref [i32; 2] = name_reference a, %a
+// CHECK:STDOUT:   %a.ref.loc9: ref [i32; 2] = name_ref a, %a
 // CHECK:STDOUT:   %.loc9_16: i32 = int_literal 0
 // CHECK:STDOUT:   %.loc9_17.1: ref i32 = array_index %a.ref.loc9, %.loc9_16
 // CHECK:STDOUT:   %.loc9_17.2: i32 = bind_value %.loc9_17.1
 // CHECK:STDOUT:   assign %c.var, %.loc9_17.2
 // CHECK:STDOUT:   %d.var: ref i32 = var d
 // CHECK:STDOUT:   %d: ref i32 = bind_name d, %d.var
-// CHECK:STDOUT:   %a.ref.loc10: ref [i32; 2] = name_reference a, %a
-// CHECK:STDOUT:   %b.ref: ref i32 = name_reference b, %b
+// CHECK:STDOUT:   %a.ref.loc10: ref [i32; 2] = name_ref a, %a
+// CHECK:STDOUT:   %b.ref: ref i32 = name_ref b, %b
 // CHECK:STDOUT:   %.loc10_16: i32 = bind_value %b.ref
 // CHECK:STDOUT:   %.loc10_17.1: ref i32 = array_index %a.ref.loc10, %.loc10_16
 // CHECK:STDOUT:   %.loc10_17.2: i32 = bind_value %.loc10_17.1

+ 6 - 6
toolchain/check/testdata/index/expression_category.carbon

@@ -62,12 +62,12 @@ fn ValueBinding(b: [i32; 3]) {
 // CHECK:STDOUT:   %.loc13_14: type = ptr_type i32
 // CHECK:STDOUT:   %pa.var: ref i32* = var pa
 // CHECK:STDOUT:   %pa: ref i32* = bind_name pa, %pa.var
-// CHECK:STDOUT:   %a.ref.loc13: ref [i32; 3] = name_reference a, %a
+// CHECK:STDOUT:   %a.ref.loc13: ref [i32; 3] = name_ref a, %a
 // CHECK:STDOUT:   %.loc13_21: i32 = int_literal 0
 // CHECK:STDOUT:   %.loc13_22: ref i32 = array_index %a.ref.loc13, %.loc13_21
 // CHECK:STDOUT:   %.loc13_18: i32* = address_of %.loc13_22
 // CHECK:STDOUT:   assign %pa.var, %.loc13_18
-// CHECK:STDOUT:   %a.ref.loc14: ref [i32; 3] = name_reference a, %a
+// CHECK:STDOUT:   %a.ref.loc14: ref [i32; 3] = name_ref a, %a
 // CHECK:STDOUT:   %.loc14_5: i32 = int_literal 0
 // CHECK:STDOUT:   %.loc14_6: ref i32 = array_index %a.ref.loc14, %.loc14_5
 // CHECK:STDOUT:   %.loc14_10: i32 = int_literal 4
@@ -97,15 +97,15 @@ fn ValueBinding(b: [i32; 3]) {
 // CHECK:STDOUT:   %.loc18_29.11: init [i32; 3] = array_init (%.loc18_29.4, %.loc18_29.7, %.loc18_29.10) to %a.var
 // CHECK:STDOUT:   %.loc18_29.12: init [i32; 3] = converted %.loc18_29.1, %.loc18_29.11
 // CHECK:STDOUT:   assign %a.var, %.loc18_29.12
-// CHECK:STDOUT:   %a.ref: ref [i32; 3] = name_reference a, %a
+// CHECK:STDOUT:   %a.ref: ref [i32; 3] = name_ref a, %a
 // CHECK:STDOUT:   %.loc22_5: i32 = int_literal 0
 // CHECK:STDOUT:   %.loc22_6: ref i32 = array_index %a.ref, %.loc22_5
-// CHECK:STDOUT:   %b.ref: [i32; 3] = name_reference b, %b
+// CHECK:STDOUT:   %b.ref: [i32; 3] = name_ref b, %b
 // CHECK:STDOUT:   %.loc23_5: i32 = int_literal 0
-// CHECK:STDOUT:   %.loc23_6.1: ref [i32; 3] = value_as_reference %b.ref
+// CHECK:STDOUT:   %.loc23_6.1: ref [i32; 3] = value_as_ref %b.ref
 // CHECK:STDOUT:   %.loc23_6.2: ref i32 = array_index %.loc23_6.1, %.loc23_5
 // CHECK:STDOUT:   %.loc23_6.3: i32 = bind_value %.loc23_6.2
-// CHECK:STDOUT:   %F.ref: <function> = name_reference F, file.%F
+// CHECK:STDOUT:   %F.ref: <function> = name_ref F, file.%F
 // CHECK:STDOUT:   %.loc24_4.1: ref [i32; 3] = temporary_storage
 // CHECK:STDOUT:   %.loc24_4.2: init [i32; 3] = call %F.ref() to %.loc24_4.1
 // CHECK:STDOUT:   %.loc24_7: i32 = int_literal 0

+ 1 - 1
toolchain/check/testdata/index/fail_array_large_index.carbon

@@ -30,7 +30,7 @@ var b: i32 = a[0xFFFFFFFFFFFFFFFFF];
 // CHECK:STDOUT:   assign %a.var, %.loc7_23.6
 // CHECK:STDOUT:   %b.var: ref i32 = var b
 // CHECK:STDOUT:   %b: ref i32 = bind_name b, %b.var
-// CHECK:STDOUT:   %a.ref: ref [i32; 1] = name_reference a, %a
+// CHECK:STDOUT:   %a.ref: ref [i32; 1] = name_ref a, %a
 // CHECK:STDOUT:   %.loc11_16: i32 = int_literal 295147905179352825855
 // CHECK:STDOUT:   %.loc11_35.1: ref i32 = array_index %a.ref, <error>
 // CHECK:STDOUT:   %.loc11_35.2: i32 = bind_value %.loc11_35.1

+ 1 - 1
toolchain/check/testdata/index/fail_array_non_int_indexing.carbon

@@ -30,7 +30,7 @@ var b: i32 = a[2.6];
 // CHECK:STDOUT:   assign %a.var, %.loc7_23.6
 // CHECK:STDOUT:   %b.var: ref i32 = var b
 // CHECK:STDOUT:   %b: ref i32 = bind_name b, %b.var
-// CHECK:STDOUT:   %a.ref: ref [i32; 1] = name_reference a, %a
+// CHECK:STDOUT:   %a.ref: ref [i32; 1] = name_ref a, %a
 // CHECK:STDOUT:   %.loc11_16: f64 = real_literal 26e-1
 // CHECK:STDOUT:   %.loc11_19.1: ref i32 = array_index %a.ref, <error>
 // CHECK:STDOUT:   %.loc11_19.2: i32 = bind_value %.loc11_19.1

+ 1 - 1
toolchain/check/testdata/index/fail_array_out_of_bound_access.carbon

@@ -30,7 +30,7 @@ var b: i32 = a[2];
 // CHECK:STDOUT:   assign %a.var, %.loc7_23.6
 // CHECK:STDOUT:   %b.var: ref i32 = var b
 // CHECK:STDOUT:   %b: ref i32 = bind_name b, %b.var
-// CHECK:STDOUT:   %a.ref: ref [i32; 1] = name_reference a, %a
+// CHECK:STDOUT:   %a.ref: ref [i32; 1] = name_ref a, %a
 // CHECK:STDOUT:   %.loc11_16: i32 = int_literal 2
 // CHECK:STDOUT:   %.loc11_17.1: ref i32 = array_index %a.ref, <error>
 // CHECK:STDOUT:   %.loc11_17.2: i32 = bind_value %.loc11_17.1

+ 1 - 1
toolchain/check/testdata/index/fail_empty_tuple_access.carbon

@@ -29,7 +29,7 @@ fn Run() {
 // CHECK:STDOUT:
 // CHECK:STDOUT: fn @Run() {
 // CHECK:STDOUT: !entry:
-// CHECK:STDOUT:   %F.ref: <function> = name_reference F, file.%F
+// CHECK:STDOUT:   %F.ref: <function> = name_ref F, file.%F
 // CHECK:STDOUT:   %.loc13_4.1: init () = call %F.ref()
 // CHECK:STDOUT:   %.loc13_7: i32 = int_literal 0
 // CHECK:STDOUT:   %.loc13_4.2: ref () = temporary_storage

+ 6 - 6
toolchain/check/testdata/index/fail_expression_category.carbon

@@ -45,16 +45,16 @@ fn G(b: [i32; 3]) {
 // CHECK:STDOUT:   %.loc14_14: type = ptr_type i32
 // CHECK:STDOUT:   %pb.var: ref i32* = var pb
 // CHECK:STDOUT:   %pb: ref i32* = bind_name pb, %pb.var
-// CHECK:STDOUT:   %b.ref.loc14: [i32; 3] = name_reference b, %b
+// CHECK:STDOUT:   %b.ref.loc14: [i32; 3] = name_ref b, %b
 // CHECK:STDOUT:   %.loc14_21: i32 = int_literal 0
-// CHECK:STDOUT:   %.loc14_22.1: ref [i32; 3] = value_as_reference %b.ref.loc14
+// CHECK:STDOUT:   %.loc14_22.1: ref [i32; 3] = value_as_ref %b.ref.loc14
 // CHECK:STDOUT:   %.loc14_22.2: ref i32 = array_index %.loc14_22.1, %.loc14_21
 // CHECK:STDOUT:   %.loc14_22.3: i32 = bind_value %.loc14_22.2
 // CHECK:STDOUT:   %.loc14_18: i32* = address_of %.loc14_22.3
 // CHECK:STDOUT:   assign %pb.var, %.loc14_18
-// CHECK:STDOUT:   %b.ref.loc18: [i32; 3] = name_reference b, %b
+// CHECK:STDOUT:   %b.ref.loc18: [i32; 3] = name_ref b, %b
 // CHECK:STDOUT:   %.loc18_5: i32 = int_literal 0
-// CHECK:STDOUT:   %.loc18_6.1: ref [i32; 3] = value_as_reference %b.ref.loc18
+// CHECK:STDOUT:   %.loc18_6.1: ref [i32; 3] = value_as_ref %b.ref.loc18
 // CHECK:STDOUT:   %.loc18_6.2: ref i32 = array_index %.loc18_6.1, %.loc18_5
 // CHECK:STDOUT:   %.loc18_6.3: i32 = bind_value %.loc18_6.2
 // CHECK:STDOUT:   %.loc18_10: i32 = int_literal 4
@@ -62,7 +62,7 @@ fn G(b: [i32; 3]) {
 // CHECK:STDOUT:   %.loc25_14: type = ptr_type i32
 // CHECK:STDOUT:   %pf.var: ref i32* = var pf
 // CHECK:STDOUT:   %pf: ref i32* = bind_name pf, %pf.var
-// CHECK:STDOUT:   %F.ref.loc25: <function> = name_reference F, file.%F
+// CHECK:STDOUT:   %F.ref.loc25: <function> = name_ref F, file.%F
 // CHECK:STDOUT:   %.loc25_20.1: ref [i32; 3] = temporary_storage
 // CHECK:STDOUT:   %.loc25_20.2: init [i32; 3] = call %F.ref.loc25() to %.loc25_20.1
 // CHECK:STDOUT:   %.loc25_23: i32 = int_literal 0
@@ -71,7 +71,7 @@ fn G(b: [i32; 3]) {
 // CHECK:STDOUT:   %.loc25_24.2: i32 = bind_value %.loc25_24.1
 // CHECK:STDOUT:   %.loc25_18: i32* = address_of %.loc25_24.2
 // CHECK:STDOUT:   assign %pf.var, %.loc25_18
-// CHECK:STDOUT:   %F.ref.loc29: <function> = name_reference F, file.%F
+// CHECK:STDOUT:   %F.ref.loc29: <function> = name_ref F, file.%F
 // CHECK:STDOUT:   %.loc29_4.1: ref [i32; 3] = temporary_storage
 // CHECK:STDOUT:   %.loc29_4.2: init [i32; 3] = call %F.ref.loc29() to %.loc29_4.1
 // CHECK:STDOUT:   %.loc29_7: i32 = int_literal 0

+ 2 - 2
toolchain/check/testdata/index/fail_invalid_base.carbon

@@ -39,13 +39,13 @@ var d: i32 = {.a: i32, .b: i32}[0];
 // CHECK:STDOUT:   %.loc11: <namespace> = namespace {}
 // CHECK:STDOUT:   %a.var: ref i32 = var a
 // CHECK:STDOUT:   %a: ref i32 = bind_name a, %a.var
-// CHECK:STDOUT:   %N.ref: <namespace> = name_reference N, %.loc11
+// CHECK:STDOUT:   %N.ref: <namespace> = name_ref N, %.loc11
 // CHECK:STDOUT:   %.loc15: i32 = int_literal 0
 // CHECK:STDOUT:   assign %a.var, <error>
 // CHECK:STDOUT:   %F: <function> = fn_decl @F
 // CHECK:STDOUT:   %b.var: ref i32 = var b
 // CHECK:STDOUT:   %b: ref i32 = bind_name b, %b.var
-// CHECK:STDOUT:   %F.ref: <function> = name_reference F, %F
+// CHECK:STDOUT:   %F.ref: <function> = name_ref F, %F
 // CHECK:STDOUT:   %.loc21: i32 = int_literal 1
 // CHECK:STDOUT:   assign %b.var, <error>
 // CHECK:STDOUT:   %c.var: ref i32 = var c

+ 1 - 1
toolchain/check/testdata/index/fail_name_not_found.carbon

@@ -19,7 +19,7 @@ fn Main() {
 // CHECK:STDOUT: !entry:
 // CHECK:STDOUT:   %b.var: ref i32 = var b
 // CHECK:STDOUT:   %b: ref i32 = bind_name b, %b.var
-// CHECK:STDOUT:   %a.ref: <error> = name_reference a, <error>
+// CHECK:STDOUT:   %a.ref: <error> = name_ref a, <error>
 // CHECK:STDOUT:   %.loc11: i32 = int_literal 0
 // CHECK:STDOUT:   assign %b.var, <error>
 // CHECK:STDOUT:   return

+ 2 - 2
toolchain/check/testdata/index/fail_non_deterministic_type.carbon

@@ -38,8 +38,8 @@ var c: i32 = a[b];
 // CHECK:STDOUT:   assign %b.var, %.loc8
 // CHECK:STDOUT:   %c.var: ref i32 = var c
 // CHECK:STDOUT:   %c: ref i32 = bind_name c, %c.var
-// CHECK:STDOUT:   %a.ref: ref (i32, i32) = name_reference a, %a
-// CHECK:STDOUT:   %b.ref: ref i32 = name_reference b, %b
+// CHECK:STDOUT:   %a.ref: ref (i32, i32) = name_ref a, %a
+// CHECK:STDOUT:   %b.ref: ref i32 = name_ref b, %b
 // CHECK:STDOUT:   %.loc12: ref <error> = tuple_index %a.ref, <error>
 // CHECK:STDOUT:   assign %c.var, <error>
 // CHECK:STDOUT: }

+ 2 - 2
toolchain/check/testdata/index/fail_tuple_index_error.carbon

@@ -33,8 +33,8 @@ var b: i32 = a[oops];
 // CHECK:STDOUT:   assign %a.var, %.loc7_27.7
 // CHECK:STDOUT:   %b.var: ref i32 = var b
 // CHECK:STDOUT:   %b: ref i32 = bind_name b, %b.var
-// CHECK:STDOUT:   %a.ref: ref (i32, i32) = name_reference a, %a
-// CHECK:STDOUT:   %oops.ref: <error> = name_reference oops, <error>
+// CHECK:STDOUT:   %a.ref: ref (i32, i32) = name_ref a, %a
+// CHECK:STDOUT:   %oops.ref: <error> = name_ref oops, <error>
 // CHECK:STDOUT:   %.loc11: ref <error> = tuple_index %a.ref, %oops.ref
 // CHECK:STDOUT:   assign %b.var, <error>
 // CHECK:STDOUT: }

+ 2 - 2
toolchain/check/testdata/index/fail_tuple_large_index.carbon

@@ -30,7 +30,7 @@ var c: i32 = b[0xFFFFFFFFFFFFFFFFF];
 // CHECK:STDOUT:   %.loc7_13.3: type = converted %.loc8_13, constants.%.loc7_13.2
 // CHECK:STDOUT:   %b.var: ref (i32,) = var b
 // CHECK:STDOUT:   %b: ref (i32,) = bind_name b, %b.var
-// CHECK:STDOUT:   %a.ref: ref (i32,) = name_reference a, %a
+// CHECK:STDOUT:   %a.ref: ref (i32,) = name_ref a, %a
 // CHECK:STDOUT:   %.loc8_17.1: ref i32 = tuple_access %a.ref, member0
 // CHECK:STDOUT:   %.loc8_17.2: i32 = bind_value %.loc8_17.1
 // CHECK:STDOUT:   %.loc8_17.3: init (i32,) = tuple_init (%.loc8_17.2) to %b.var
@@ -38,7 +38,7 @@ var c: i32 = b[0xFFFFFFFFFFFFFFFFF];
 // CHECK:STDOUT:   assign %b.var, %.loc8_17.4
 // CHECK:STDOUT:   %c.var: ref i32 = var c
 // CHECK:STDOUT:   %c: ref i32 = bind_name c, %c.var
-// CHECK:STDOUT:   %b.ref: ref (i32,) = name_reference b, %b
+// CHECK:STDOUT:   %b.ref: ref (i32,) = name_ref b, %b
 // CHECK:STDOUT:   %.loc12_16: i32 = int_literal 295147905179352825855
 // CHECK:STDOUT:   %.loc12_35: ref <error> = tuple_index %b.ref, <error>
 // CHECK:STDOUT:   assign %c.var, <error>

+ 1 - 1
toolchain/check/testdata/index/fail_tuple_non_int_indexing.carbon

@@ -33,7 +33,7 @@ var b: i32 = a[2.6];
 // CHECK:STDOUT:   assign %a.var, %.loc7_27.7
 // CHECK:STDOUT:   %b.var: ref i32 = var b
 // CHECK:STDOUT:   %b: ref i32 = bind_name b, %b.var
-// CHECK:STDOUT:   %a.ref: ref (i32, i32) = name_reference a, %a
+// CHECK:STDOUT:   %a.ref: ref (i32, i32) = name_ref a, %a
 // CHECK:STDOUT:   %.loc11_16: f64 = real_literal 26e-1
 // CHECK:STDOUT:   %.loc11_19: ref <error> = tuple_index %a.ref, <error>
 // CHECK:STDOUT:   assign %b.var, <error>

+ 1 - 1
toolchain/check/testdata/index/fail_tuple_out_of_bound_access.carbon

@@ -33,7 +33,7 @@ var b: i32 = a[2];
 // CHECK:STDOUT:   assign %a.var, %.loc7_27.7
 // CHECK:STDOUT:   %b.var: ref i32 = var b
 // CHECK:STDOUT:   %b: ref i32 = bind_name b, %b.var
-// CHECK:STDOUT:   %a.ref: ref (i32, i32) = name_reference a, %a
+// CHECK:STDOUT:   %a.ref: ref (i32, i32) = name_ref a, %a
 // CHECK:STDOUT:   %.loc11_16: i32 = int_literal 2
 // CHECK:STDOUT:   %.loc11_17: ref <error> = tuple_index %a.ref, <error>
 // CHECK:STDOUT:   assign %b.var, <error>

+ 2 - 2
toolchain/check/testdata/index/tuple_element_access.carbon

@@ -27,7 +27,7 @@ var c: i32 = b[0];
 // CHECK:STDOUT:   %.loc7_13.3: type = converted %.loc8_13, constants.%.loc7_13.2
 // CHECK:STDOUT:   %b.var: ref (i32,) = var b
 // CHECK:STDOUT:   %b: ref (i32,) = bind_name b, %b.var
-// CHECK:STDOUT:   %a.ref: ref (i32,) = name_reference a, %a
+// CHECK:STDOUT:   %a.ref: ref (i32,) = name_ref a, %a
 // CHECK:STDOUT:   %.loc8_17.1: ref i32 = tuple_access %a.ref, member0
 // CHECK:STDOUT:   %.loc8_17.2: i32 = bind_value %.loc8_17.1
 // CHECK:STDOUT:   %.loc8_17.3: init (i32,) = tuple_init (%.loc8_17.2) to %b.var
@@ -35,7 +35,7 @@ var c: i32 = b[0];
 // CHECK:STDOUT:   assign %b.var, %.loc8_17.4
 // CHECK:STDOUT:   %c.var: ref i32 = var c
 // CHECK:STDOUT:   %c: ref i32 = bind_name c, %c.var
-// CHECK:STDOUT:   %b.ref: ref (i32,) = name_reference b, %b
+// CHECK:STDOUT:   %b.ref: ref (i32,) = name_ref b, %b
 // CHECK:STDOUT:   %.loc9_16: i32 = int_literal 0
 // CHECK:STDOUT:   %.loc9_17.1: ref i32 = tuple_index %b.ref, %.loc9_16
 // CHECK:STDOUT:   %.loc9_17.2: i32 = bind_value %.loc9_17.1

+ 1 - 1
toolchain/check/testdata/index/tuple_return_value_access.carbon

@@ -31,7 +31,7 @@ fn Run() -> i32 {
 // CHECK:STDOUT:
 // CHECK:STDOUT: fn @Run() -> i32 {
 // CHECK:STDOUT: !entry:
-// CHECK:STDOUT:   %F.ref: <function> = name_reference F, file.%F
+// CHECK:STDOUT:   %F.ref: <function> = name_ref F, file.%F
 // CHECK:STDOUT:   %.loc10_11.1: init (i32,) = call %F.ref()
 // CHECK:STDOUT:   %.loc10_14: i32 = int_literal 0
 // CHECK:STDOUT:   %.loc10_11.2: ref (i32,) = temporary_storage

+ 2 - 2
toolchain/check/testdata/let/convert.carbon

@@ -42,7 +42,7 @@ fn F() -> i32 {
 // CHECK:STDOUT:   assign %v.var, %.loc8_36.9
 // CHECK:STDOUT:   %.loc10_24: (type, type, type) = tuple_literal (i32, i32, i32)
 // CHECK:STDOUT:   %.loc8_24.3: type = converted %.loc10_24, constants.%.loc8_24.2
-// CHECK:STDOUT:   %v.ref: ref (i32, i32, i32) = name_reference v, %v
+// CHECK:STDOUT:   %v.ref: ref (i32, i32, i32) = name_ref v, %v
 // CHECK:STDOUT:   %.loc10_28.1: ref i32 = tuple_access %v.ref, member0
 // CHECK:STDOUT:   %.loc10_28.2: i32 = bind_value %.loc10_28.1
 // CHECK:STDOUT:   %.loc10_28.3: ref i32 = tuple_access %v.ref, member1
@@ -52,7 +52,7 @@ fn F() -> i32 {
 // CHECK:STDOUT:   %.loc10_28.7: (i32, i32, i32) = tuple_value (%.loc10_28.2, %.loc10_28.4, %.loc10_28.6)
 // CHECK:STDOUT:   %.loc10_28.8: (i32, i32, i32) = converted %v.ref, %.loc10_28.7
 // CHECK:STDOUT:   %w: (i32, i32, i32) = bind_name w, %.loc10_28.8
-// CHECK:STDOUT:   %w.ref: (i32, i32, i32) = name_reference w, %w
+// CHECK:STDOUT:   %w.ref: (i32, i32, i32) = name_ref w, %w
 // CHECK:STDOUT:   %.loc11_12: i32 = int_literal 1
 // CHECK:STDOUT:   %.loc11_13: i32 = tuple_index %w.ref, %.loc11_12
 // CHECK:STDOUT:   return %.loc11_13

+ 1 - 1
toolchain/check/testdata/let/fail_use_in_init.carbon

@@ -17,7 +17,7 @@ fn F() {
 // CHECK:STDOUT:
 // CHECK:STDOUT: fn @F() {
 // CHECK:STDOUT: !entry:
-// CHECK:STDOUT:   %a.ref: <error> = name_reference a, <error>
+// CHECK:STDOUT:   %a.ref: <error> = name_ref a, <error>
 // CHECK:STDOUT:   %a: i32 = bind_name a, <error>
 // CHECK:STDOUT:   return
 // CHECK:STDOUT: }

+ 1 - 1
toolchain/check/testdata/let/global.carbon

@@ -16,6 +16,6 @@ fn F() -> i32 { return n; }
 // CHECK:STDOUT:
 // CHECK:STDOUT: fn @F() -> i32 {
 // CHECK:STDOUT: !entry:
-// CHECK:STDOUT:   %n.ref: i32 = name_reference n, file.%n
+// CHECK:STDOUT:   %n.ref: i32 = name_ref n, file.%n
 // CHECK:STDOUT:   return %n.ref
 // CHECK:STDOUT: }

+ 2 - 2
toolchain/check/testdata/let/local.carbon

@@ -15,8 +15,8 @@ fn F(a: i32) -> i32 {
 // CHECK:STDOUT:
 // CHECK:STDOUT: fn @F(%a: i32) -> i32 {
 // CHECK:STDOUT: !entry:
-// CHECK:STDOUT:   %a.ref: i32 = name_reference a, %a
+// CHECK:STDOUT:   %a.ref: i32 = name_ref a, %a
 // CHECK:STDOUT:   %b: i32 = bind_name b, %a.ref
-// CHECK:STDOUT:   %b.ref: i32 = name_reference b, %b
+// CHECK:STDOUT:   %b.ref: i32 = name_ref b, %b
 // CHECK:STDOUT:   return %b.ref
 // CHECK:STDOUT: }

Some files were not shown because too many files changed in this diff