[tint][ir][DirectVariableAccess] Preserve original fn names

Unlike the AST path, where functions need to have a unique name, names are metadata in the IR path, and the writers must handle name collisions.
By preserving the original function name, the emitted code is easier to read, single variants don't change name, and (future) debug info will be correct.

Bug: tint:2053
Change-Id: Id8357d560486334543eb7ff953b69000c305eeb3
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/169262
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: James Price <jrprice@google.com>
Auto-Submit: Ben Clayton <bclayton@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
diff --git a/src/tint/lang/core/ir/transform/direct_variable_access.cc b/src/tint/lang/core/ir/transform/direct_variable_access.cc
index e62d52b..95a601e 100644
--- a/src/tint/lang/core/ir/transform/direct_variable_access.cc
+++ b/src/tint/lang/core/ir/transform/direct_variable_access.cc
@@ -260,10 +260,12 @@
     /// transforming. These functions will be replaced with variants based on the access shapes.
     void GatherFnsThatNeedForking() {
         for (auto& fn : ir.functions) {
-            for (auto* param : fn->Params()) {
-                if (ParamNeedsTransforming(param)) {
-                    need_forking.Add(fn, fn_info_allocator.Create());
-                    break;
+            if (fn->Alive()) {
+                for (auto* param : fn->Params()) {
+                    if (ParamNeedsTransforming(param)) {
+                        need_forking.Add(fn, fn_info_allocator.Create());
+                        break;
+                    }
                 }
             }
         }
@@ -361,15 +363,9 @@
                 auto* variant_fn = CloneContext{ir}.Clone(target);
                 (*target_info)->ordered_variants.Push(variant_fn);
 
-                // Build a unique name for the variant.
-                if (auto fn_name = ir.NameOf(variant_fn); fn_name.IsValid()) {
-                    StringStream variant_name;
-                    variant_name << fn_name.NameView();
-                    auto params = signature.Keys().Sort();
-                    for (auto param_idx : params) {
-                        variant_name << "_" << AccessShapeName(*signature.Get(param_idx));
-                    }
-                    ir.SetName(variant_fn, variant_name.str());
+                // Copy the original name for the variant
+                if (auto fn_name = ir.NameOf(fn)) {
+                    ir.SetName(fn, fn_name);
                 }
 
                 // Create an entry for the variant, and add it to the queue of variants that need to
@@ -587,37 +583,6 @@
         }
     }
 
-    /// @returns a string describing the given AccessShape, used to suffix the generated function
-    /// variants.
-    std::string AccessShapeName(const AccessShape& shape) {
-        StringStream ss;
-
-        if (auto* global = std::get_if<RootModuleScopeVar>(&shape.root)) {
-            ss << ir.NameOf(global->var).NameView();
-        } else {
-            ss << "P";
-        }
-
-        for (auto& op : shape.ops) {
-            ss << "_";
-
-            if (std::holds_alternative<IndexAccess>(op)) {
-                /// The op uses an index taken from an array parameter.
-                ss << "X";
-                continue;
-            }
-
-            if (auto* access = std::get_if<MemberAccess>(&op); TINT_LIKELY(access)) {
-                ss << access->member->Name().NameView();
-                continue;
-            }
-
-            TINT_ICE() << "unhandled variant for access chain";
-            break;
-        }
-        return ss.str();
-    }
-
     /// @return true if @p param is a pointer parameter that requires transforming, based on the
     /// address space and transform options.
     /// @param param the function parameter
diff --git a/src/tint/lang/core/ir/transform/direct_variable_access_test.cc b/src/tint/lang/core/ir/transform/direct_variable_access_test.cc
index e6244da..4919a26 100644
--- a/src/tint/lang/core/ir/transform/direct_variable_access_test.cc
+++ b/src/tint/lang/core/ir/transform/direct_variable_access_test.cc
@@ -430,7 +430,7 @@
   %U:ptr<uniform, array<array<array<vec4<i32>, 8>, 8>, 8>, read> = var @binding_point(0, 0)
 }
 
-%a_U_X_X_X = func(%pre:i32, %p_indices:array<u32, 3>, %post:i32):vec4<i32> -> %b2 {
+%a = func(%pre:i32, %p_indices:array<u32, 3>, %post:i32):vec4<i32> -> %b2 {
   %b2 = block {
     %6:u32 = access %p_indices, 0u
     %7:u32 = access %p_indices, 1u
@@ -446,23 +446,23 @@
     %13:u32 = convert 2i
     %14:u32 = convert 1i
     %15:array<u32, 3> = construct %14, %13, %12
-    %16:vec4<i32> = call %a_U_X_X_X, 10i, %15, 20i
+    %16:vec4<i32> = call %a, 10i, %15, 20i
     ret
   }
 }
-%c_U = func():void -> %b4 {
+%c = func():void -> %b4 {
   %b4 = block {
     %18:u32 = convert 3i
     %19:u32 = convert 2i
     %20:u32 = convert 1i
     %21:array<u32, 3> = construct %20, %19, %18
-    %22:vec4<i32> = call %a_U_X_X_X, 10i, %21, 20i
+    %22:vec4<i32> = call %a, 10i, %21, 20i
     ret
   }
 }
 %d = func():void -> %b5 {
   %b5 = block {
-    %24:void = call %c_U
+    %24:void = call %c
     ret
   }
 }
@@ -644,7 +644,7 @@
     ret %14
   }
 }
-%a_U_X_X_X = func(%pre:i32, %p_indices:array<u32, 3>, %post:i32):vec4<i32> -> %b5 {
+%a = func(%pre:i32, %p_indices:array<u32, 3>, %post:i32):vec4<i32> -> %b5 {
   %b5 = block {
     %19:u32 = access %p_indices, 0u
     %20:u32 = access %p_indices, 1u
@@ -663,11 +663,11 @@
     %29:u32 = convert %27
     %30:u32 = convert %25
     %31:array<u32, 3> = construct %30, %28, %29
-    %32:vec4<i32> = call %a_U_X_X_X, 10i, %31, 20i
+    %32:vec4<i32> = call %a, 10i, %31, 20i
     ret
   }
 }
-%c_U = func():void -> %b7 {
+%c = func():void -> %b7 {
   %b7 = block {
     %34:i32 = call %first
     %35:i32 = call %second
@@ -676,13 +676,13 @@
     %38:u32 = convert %36
     %39:u32 = convert %34
     %40:array<u32, 3> = construct %39, %37, %38
-    %41:vec4<i32> = call %a_U_X_X_X, 10i, %40, 20i
+    %41:vec4<i32> = call %a, 10i, %40, 20i
     ret
   }
 }
 %d = func():void -> %b8 {
   %b8 = block {
-    %43:void = call %c_U
+    %43:void = call %c
     ret
   }
 }
@@ -751,7 +751,7 @@
   %U:ptr<uniform, i32, read> = var @binding_point(0, 0)
 }
 
-%a_U = func(%pre:i32, %post:i32):i32 -> %b2 {
+%a = func(%pre:i32, %post:i32):i32 -> %b2 {
   %b2 = block {
     %5:ptr<uniform, i32, read> = access %U
     %6:i32 = load %5
@@ -760,7 +760,7 @@
 }
 %b = func():void -> %b3 {
   %b3 = block {
-    %8:i32 = call %a_U, 10i, 20i
+    %8:i32 = call %a, 10i, 20i
     ret
   }
 }
@@ -824,7 +824,7 @@
   %U:ptr<uniform, array<vec4<i32>, 8>, read> = var @binding_point(0, 0)
 }
 
-%a_U_X = func(%pre:i32, %p_indices:array<u32, 1>, %post:i32):vec4<i32> -> %b2 {
+%a = func(%pre:i32, %p_indices:array<u32, 1>, %post:i32):vec4<i32> -> %b2 {
   %b2 = block {
     %6:u32 = access %p_indices, 0u
     %7:ptr<uniform, vec4<i32>, read> = access %U, %6
@@ -837,7 +837,7 @@
     %I:i32 = let 3i
     %11:u32 = convert %I
     %12:array<u32, 1> = construct %11
-    %13:vec4<i32> = call %a_U_X, 10i, %12, 20i
+    %13:vec4<i32> = call %a, 10i, %12, 20i
     ret
   }
 }
@@ -1037,7 +1037,7 @@
   %U:ptr<uniform, Outer, read> = var @binding_point(0, 0)
 }
 
-%f0_U_mat_X = func(%p_indices:array<u32, 1>):f32 -> %b2 {
+%f0 = func(%p_indices:array<u32, 1>):f32 -> %b2 {
   %b2 = block {
     %4:u32 = access %p_indices, 0u
     %5:ptr<uniform, vec4<f32>, read> = access %U, 1u, %4
@@ -1045,7 +1045,7 @@
     ret %6
   }
 }
-%f0_U_arr_X_mat_X = func(%p_indices_1:array<u32, 2>):f32 -> %b3 {  # %p_indices_1: 'p_indices'
+%f0_1 = func(%p_indices_1:array<u32, 2>):f32 -> %b3 {  # %f0_1: 'f0', %p_indices_1: 'p_indices'
   %b3 = block {
     %9:u32 = access %p_indices_1, 0u
     %10:u32 = access %p_indices_1, 1u
@@ -1054,32 +1054,32 @@
     ret %12
   }
 }
-%f1_U_mat = func():f32 -> %b4 {
+%f1 = func():f32 -> %b4 {
   %b4 = block {
     %res:ptr<function, f32, read_write> = var
     %15:u32 = convert 1i
     %16:array<u32, 1> = construct %15
-    %17:f32 = call %f0_U_mat_X, %16
+    %17:f32 = call %f0, %16
     %18:f32 = load %res
     %19:f32 = add %18, %17
     store %res, %19
     %20:u32 = convert 1i
     %21:array<u32, 1> = construct %20
-    %22:f32 = call %f0_U_mat_X, %21
+    %22:f32 = call %f0, %21
     %23:f32 = load %res
     %24:f32 = add %23, %22
     store %res, %24
     %25:u32 = convert 2i
     %26:u32 = convert 1i
     %27:array<u32, 2> = construct %25, %26
-    %28:f32 = call %f0_U_arr_X_mat_X, %27
+    %28:f32 = call %f0_1, %27
     %29:f32 = load %res
     %30:f32 = add %29, %28
     store %res, %30
     %31:u32 = convert 2i
     %32:u32 = convert 1i
     %33:array<u32, 2> = construct %31, %32
-    %34:f32 = call %f0_U_arr_X_mat_X, %33
+    %34:f32 = call %f0_1, %33
     %35:f32 = load %res
     %36:f32 = add %35, %34
     store %res, %36
@@ -1087,33 +1087,33 @@
     ret %37
   }
 }
-%f1_U_arr_X_mat = func(%p_indices_2:array<u32, 1>):f32 -> %b5 {  # %p_indices_2: 'p_indices'
+%f1_1 = func(%p_indices_2:array<u32, 1>):f32 -> %b5 {  # %f1_1: 'f1', %p_indices_2: 'p_indices'
   %b5 = block {
     %40:u32 = access %p_indices_2, 0u
     %res_1:ptr<function, f32, read_write> = var  # %res_1: 'res'
     %42:u32 = convert 1i
     %43:array<u32, 2> = construct %40, %42
-    %44:f32 = call %f0_U_arr_X_mat_X, %43
+    %44:f32 = call %f0_1, %43
     %45:f32 = load %res_1
     %46:f32 = add %45, %44
     store %res_1, %46
     %47:u32 = convert 1i
     %48:array<u32, 2> = construct %40, %47
-    %49:f32 = call %f0_U_arr_X_mat_X, %48
+    %49:f32 = call %f0_1, %48
     %50:f32 = load %res_1
     %51:f32 = add %50, %49
     store %res_1, %51
     %52:u32 = convert 2i
     %53:u32 = convert 1i
     %54:array<u32, 2> = construct %52, %53
-    %55:f32 = call %f0_U_arr_X_mat_X, %54
+    %55:f32 = call %f0_1, %54
     %56:f32 = load %res_1
     %57:f32 = add %56, %55
     store %res_1, %57
     %58:u32 = convert 2i
     %59:u32 = convert 1i
     %60:array<u32, 2> = construct %58, %59
-    %61:f32 = call %f0_U_arr_X_mat_X, %60
+    %61:f32 = call %f0_1, %60
     %62:f32 = load %res_1
     %63:f32 = add %62, %61
     store %res_1, %63
@@ -1121,33 +1121,33 @@
     ret %64
   }
 }
-%f2_U_arr_X = func(%p_indices_3:array<u32, 1>):f32 -> %b6 {  # %p_indices_3: 'p_indices'
+%f2 = func(%p_indices_3:array<u32, 1>):f32 -> %b6 {  # %p_indices_3: 'p_indices'
   %b6 = block {
     %67:u32 = access %p_indices_3, 0u
     %68:array<u32, 1> = construct %67
-    %69:f32 = call %f1_U_arr_X_mat, %68
+    %69:f32 = call %f1_1, %68
     ret %69
   }
 }
-%f3_U_arr_U_mat = func():f32 -> %b7 {
+%f3 = func():f32 -> %b7 {
   %b7 = block {
     %71:u32 = convert 3i
     %72:array<u32, 1> = construct %71
-    %73:f32 = call %f2_U_arr_X, %72
-    %74:f32 = call %f1_U_mat
+    %73:f32 = call %f2, %72
+    %74:f32 = call %f1
     %75:f32 = add %73, %74
     ret %75
   }
 }
-%f4_U = func():f32 -> %b8 {
+%f4 = func():f32 -> %b8 {
   %b8 = block {
-    %77:f32 = call %f3_U_arr_U_mat
+    %77:f32 = call %f3
     ret %77
   }
 }
 %b = func():void -> %b9 {
   %b9 = block {
-    %79:f32 = call %f4_U
+    %79:f32 = call %f4
     ret
   }
 }
@@ -1242,7 +1242,7 @@
   %U:ptr<uniform, array<array<array<vec4<i32>, 5>, 5>, 5>, read> = var @binding_point(0, 0)
 }
 
-%f2_U_X_X = func(%p_indices:array<u32, 2>):vec4<i32> -> %b2 {
+%f2 = func(%p_indices:array<u32, 2>):vec4<i32> -> %b2 {
   %b2 = block {
     %4:u32 = access %p_indices, 0u
     %5:u32 = access %p_indices, 1u
@@ -1252,24 +1252,24 @@
     ret %8
   }
 }
-%f1_U_X = func(%p_indices_1:array<u32, 1>):vec4<i32> -> %b3 {  # %p_indices_1: 'p_indices'
+%f1 = func(%p_indices_1:array<u32, 1>):vec4<i32> -> %b3 {  # %p_indices_1: 'p_indices'
   %b3 = block {
     %11:u32 = access %p_indices_1, 0u
     %12:array<u32, 2> = construct %11, 2u
-    %13:vec4<i32> = call %f2_U_X_X, %12
+    %13:vec4<i32> = call %f2, %12
     ret %13
   }
 }
-%f0_U = func():vec4<i32> -> %b4 {
+%f0 = func():vec4<i32> -> %b4 {
   %b4 = block {
     %15:array<u32, 1> = construct 1u
-    %16:vec4<i32> = call %f1_U_X, %15
+    %16:vec4<i32> = call %f1, %15
     ret %16
   }
 }
 %main = func():void -> %b5 {
   %b5 = block {
-    %18:vec4<i32> = call %f0_U
+    %18:vec4<i32> = call %f0
     ret
   }
 }
@@ -1352,7 +1352,7 @@
   %S:ptr<storage, str, read> = var @binding_point(0, 0)
 }
 
-%a_S_i = func(%pre:i32, %post:i32):i32 -> %b2 {
+%a = func(%pre:i32, %post:i32):i32 -> %b2 {
   %b2 = block {
     %5:ptr<storage, i32, read> = access %S, 0u
     %6:i32 = load %5
@@ -1361,7 +1361,7 @@
 }
 %b = func():void -> %b3 {
   %b3 = block {
-    %8:i32 = call %a_S_i, 10i, 20i
+    %8:i32 = call %a, 10i, 20i
     ret
   }
 }
@@ -1439,7 +1439,7 @@
   %S:ptr<storage, str, read_write> = var @binding_point(0, 0)
 }
 
-%a_S_arr = func(%pre:i32, %post:i32):void -> %b2 {
+%a = func(%pre:i32, %post:i32):void -> %b2 {
   %b2 = block {
     %5:ptr<storage, array<i32, 4>, read_write> = access %S, 0u
     store %5, array<i32, 4>(0i)
@@ -1448,7 +1448,7 @@
 }
 %b = func():void -> %b3 {
   %b3 = block {
-    %7:void = call %a_S_arr, 10i, 20i
+    %7:void = call %a, 10i, 20i
     ret
   }
 }
@@ -1515,7 +1515,7 @@
   %S:ptr<storage, array<vec4<i32>, 8>, read_write> = var @binding_point(0, 0)
 }
 
-%a_S_X = func(%pre:i32, %p_indices:array<u32, 1>, %post:i32):void -> %b2 {
+%a = func(%pre:i32, %p_indices:array<u32, 1>, %post:i32):void -> %b2 {
   %b2 = block {
     %6:u32 = access %p_indices, 0u
     %7:ptr<storage, vec4<i32>, read_write> = access %S, %6
@@ -1528,7 +1528,7 @@
     %I:i32 = let 3i
     %10:u32 = convert %I
     %11:array<u32, 1> = construct %10
-    %12:void = call %a_S_X, 10i, %11, 20i
+    %12:void = call %a, 10i, %11, 20i
     ret
   }
 }
@@ -1728,7 +1728,7 @@
   %S:ptr<storage, Outer, read> = var @binding_point(0, 0)
 }
 
-%f0_S_mat_X = func(%p_indices:array<u32, 1>):f32 -> %b2 {
+%f0 = func(%p_indices:array<u32, 1>):f32 -> %b2 {
   %b2 = block {
     %4:u32 = access %p_indices, 0u
     %5:ptr<storage, vec4<f32>, read> = access %S, 1u, %4
@@ -1736,7 +1736,7 @@
     ret %6
   }
 }
-%f0_S_arr_X_mat_X = func(%p_indices_1:array<u32, 2>):f32 -> %b3 {  # %p_indices_1: 'p_indices'
+%f0_1 = func(%p_indices_1:array<u32, 2>):f32 -> %b3 {  # %f0_1: 'f0', %p_indices_1: 'p_indices'
   %b3 = block {
     %9:u32 = access %p_indices_1, 0u
     %10:u32 = access %p_indices_1, 1u
@@ -1745,32 +1745,32 @@
     ret %12
   }
 }
-%f1_S_mat = func():f32 -> %b4 {
+%f1 = func():f32 -> %b4 {
   %b4 = block {
     %res:ptr<function, f32, read_write> = var
     %15:u32 = convert 1i
     %16:array<u32, 1> = construct %15
-    %17:f32 = call %f0_S_mat_X, %16
+    %17:f32 = call %f0, %16
     %18:f32 = load %res
     %19:f32 = add %18, %17
     store %res, %19
     %20:u32 = convert 1i
     %21:array<u32, 1> = construct %20
-    %22:f32 = call %f0_S_mat_X, %21
+    %22:f32 = call %f0, %21
     %23:f32 = load %res
     %24:f32 = add %23, %22
     store %res, %24
     %25:u32 = convert 2i
     %26:u32 = convert 1i
     %27:array<u32, 2> = construct %25, %26
-    %28:f32 = call %f0_S_arr_X_mat_X, %27
+    %28:f32 = call %f0_1, %27
     %29:f32 = load %res
     %30:f32 = add %29, %28
     store %res, %30
     %31:u32 = convert 2i
     %32:u32 = convert 1i
     %33:array<u32, 2> = construct %31, %32
-    %34:f32 = call %f0_S_arr_X_mat_X, %33
+    %34:f32 = call %f0_1, %33
     %35:f32 = load %res
     %36:f32 = add %35, %34
     store %res, %36
@@ -1778,33 +1778,33 @@
     ret %37
   }
 }
-%f1_S_arr_X_mat = func(%p_indices_2:array<u32, 1>):f32 -> %b5 {  # %p_indices_2: 'p_indices'
+%f1_1 = func(%p_indices_2:array<u32, 1>):f32 -> %b5 {  # %f1_1: 'f1', %p_indices_2: 'p_indices'
   %b5 = block {
     %40:u32 = access %p_indices_2, 0u
     %res_1:ptr<function, f32, read_write> = var  # %res_1: 'res'
     %42:u32 = convert 1i
     %43:array<u32, 2> = construct %40, %42
-    %44:f32 = call %f0_S_arr_X_mat_X, %43
+    %44:f32 = call %f0_1, %43
     %45:f32 = load %res_1
     %46:f32 = add %45, %44
     store %res_1, %46
     %47:u32 = convert 1i
     %48:array<u32, 2> = construct %40, %47
-    %49:f32 = call %f0_S_arr_X_mat_X, %48
+    %49:f32 = call %f0_1, %48
     %50:f32 = load %res_1
     %51:f32 = add %50, %49
     store %res_1, %51
     %52:u32 = convert 2i
     %53:u32 = convert 1i
     %54:array<u32, 2> = construct %52, %53
-    %55:f32 = call %f0_S_arr_X_mat_X, %54
+    %55:f32 = call %f0_1, %54
     %56:f32 = load %res_1
     %57:f32 = add %56, %55
     store %res_1, %57
     %58:u32 = convert 2i
     %59:u32 = convert 1i
     %60:array<u32, 2> = construct %58, %59
-    %61:f32 = call %f0_S_arr_X_mat_X, %60
+    %61:f32 = call %f0_1, %60
     %62:f32 = load %res_1
     %63:f32 = add %62, %61
     store %res_1, %63
@@ -1812,33 +1812,33 @@
     ret %64
   }
 }
-%f2_S_arr_X = func(%p_indices_3:array<u32, 1>):f32 -> %b6 {  # %p_indices_3: 'p_indices'
+%f2 = func(%p_indices_3:array<u32, 1>):f32 -> %b6 {  # %p_indices_3: 'p_indices'
   %b6 = block {
     %67:u32 = access %p_indices_3, 0u
     %68:array<u32, 1> = construct %67
-    %69:f32 = call %f1_S_arr_X_mat, %68
+    %69:f32 = call %f1_1, %68
     ret %69
   }
 }
-%f3_S_arr_S_mat = func():f32 -> %b7 {
+%f3 = func():f32 -> %b7 {
   %b7 = block {
     %71:u32 = convert 3i
     %72:array<u32, 1> = construct %71
-    %73:f32 = call %f2_S_arr_X, %72
-    %74:f32 = call %f1_S_mat
+    %73:f32 = call %f2, %72
+    %74:f32 = call %f1
     %75:f32 = add %73, %74
     ret %75
   }
 }
-%f4_S = func():f32 -> %b8 {
+%f4 = func():f32 -> %b8 {
   %b8 = block {
-    %77:f32 = call %f3_S_arr_S_mat
+    %77:f32 = call %f3
     ret %77
   }
 }
 %b = func():void -> %b9 {
   %b9 = block {
-    %79:f32 = call %f4_S
+    %79:f32 = call %f4
     ret
   }
 }
@@ -1933,7 +1933,7 @@
   %U:ptr<storage, array<array<array<vec4<i32>, 5>, 5>, 5>, read_write> = var @binding_point(0, 0)
 }
 
-%f2_U_X_X = func(%p_indices:array<u32, 2>):vec4<i32> -> %b2 {
+%f2 = func(%p_indices:array<u32, 2>):vec4<i32> -> %b2 {
   %b2 = block {
     %4:u32 = access %p_indices, 0u
     %5:u32 = access %p_indices, 1u
@@ -1943,24 +1943,24 @@
     ret %8
   }
 }
-%f1_U_X = func(%p_indices_1:array<u32, 1>):vec4<i32> -> %b3 {  # %p_indices_1: 'p_indices'
+%f1 = func(%p_indices_1:array<u32, 1>):vec4<i32> -> %b3 {  # %p_indices_1: 'p_indices'
   %b3 = block {
     %11:u32 = access %p_indices_1, 0u
     %12:array<u32, 2> = construct %11, 2u
-    %13:vec4<i32> = call %f2_U_X_X, %12
+    %13:vec4<i32> = call %f2, %12
     ret %13
   }
 }
-%f0_U = func():vec4<i32> -> %b4 {
+%f0 = func():vec4<i32> -> %b4 {
   %b4 = block {
     %15:array<u32, 1> = construct 1u
-    %16:vec4<i32> = call %f1_U_X, %15
+    %16:vec4<i32> = call %f1, %15
     ret %16
   }
 }
 %main = func():void -> %b5 {
   %b5 = block {
-    %18:vec4<i32> = call %f0_U
+    %18:vec4<i32> = call %f0
     ret
   }
 }
@@ -2030,7 +2030,7 @@
   %W:ptr<workgroup, array<vec4<i32>, 8>, read_write> = var
 }
 
-%a_W_X = func(%pre:i32, %p_indices:array<u32, 1>, %post:i32):vec4<i32> -> %b2 {
+%a = func(%pre:i32, %p_indices:array<u32, 1>, %post:i32):vec4<i32> -> %b2 {
   %b2 = block {
     %6:u32 = access %p_indices, 0u
     %7:ptr<workgroup, vec4<i32>, read_write> = access %W, %6
@@ -2042,7 +2042,7 @@
   %b3 = block {
     %10:u32 = convert 3i
     %11:array<u32, 1> = construct %10
-    %12:vec4<i32> = call %a_W_X, 10i, %11, 20i
+    %12:vec4<i32> = call %a, 10i, %11, 20i
     ret
   }
 }
@@ -2106,7 +2106,7 @@
   %W:ptr<workgroup, array<vec4<i32>, 8>, read_write> = var
 }
 
-%a_W_X = func(%pre:i32, %p_indices:array<u32, 1>, %post:i32):void -> %b2 {
+%a = func(%pre:i32, %p_indices:array<u32, 1>, %post:i32):void -> %b2 {
   %b2 = block {
     %6:u32 = access %p_indices, 0u
     %7:ptr<workgroup, vec4<i32>, read_write> = access %W, %6
@@ -2118,7 +2118,7 @@
   %b3 = block {
     %9:u32 = convert 3i
     %10:array<u32, 1> = construct %9
-    %11:void = call %a_W_X, 10i, %10, 20i
+    %11:void = call %a, 10i, %10, 20i
     ret
   }
 }
@@ -2317,7 +2317,7 @@
   %W:ptr<workgroup, Outer, read_write> = var
 }
 
-%f0_W_mat_X = func(%p_indices:array<u32, 1>):f32 -> %b2 {
+%f0 = func(%p_indices:array<u32, 1>):f32 -> %b2 {
   %b2 = block {
     %4:u32 = access %p_indices, 0u
     %5:ptr<workgroup, vec4<f32>, read_write> = access %W, 1u, %4
@@ -2325,7 +2325,7 @@
     ret %6
   }
 }
-%f0_W_arr_X_mat_X = func(%p_indices_1:array<u32, 2>):f32 -> %b3 {  # %p_indices_1: 'p_indices'
+%f0_1 = func(%p_indices_1:array<u32, 2>):f32 -> %b3 {  # %f0_1: 'f0', %p_indices_1: 'p_indices'
   %b3 = block {
     %9:u32 = access %p_indices_1, 0u
     %10:u32 = access %p_indices_1, 1u
@@ -2334,32 +2334,32 @@
     ret %12
   }
 }
-%f1_W_mat = func():f32 -> %b4 {
+%f1 = func():f32 -> %b4 {
   %b4 = block {
     %res:ptr<function, f32, read_write> = var
     %15:u32 = convert 1i
     %16:array<u32, 1> = construct %15
-    %17:f32 = call %f0_W_mat_X, %16
+    %17:f32 = call %f0, %16
     %18:f32 = load %res
     %19:f32 = add %18, %17
     store %res, %19
     %20:u32 = convert 1i
     %21:array<u32, 1> = construct %20
-    %22:f32 = call %f0_W_mat_X, %21
+    %22:f32 = call %f0, %21
     %23:f32 = load %res
     %24:f32 = add %23, %22
     store %res, %24
     %25:u32 = convert 2i
     %26:u32 = convert 1i
     %27:array<u32, 2> = construct %25, %26
-    %28:f32 = call %f0_W_arr_X_mat_X, %27
+    %28:f32 = call %f0_1, %27
     %29:f32 = load %res
     %30:f32 = add %29, %28
     store %res, %30
     %31:u32 = convert 2i
     %32:u32 = convert 1i
     %33:array<u32, 2> = construct %31, %32
-    %34:f32 = call %f0_W_arr_X_mat_X, %33
+    %34:f32 = call %f0_1, %33
     %35:f32 = load %res
     %36:f32 = add %35, %34
     store %res, %36
@@ -2367,33 +2367,33 @@
     ret %37
   }
 }
-%f1_W_arr_X_mat = func(%p_indices_2:array<u32, 1>):f32 -> %b5 {  # %p_indices_2: 'p_indices'
+%f1_1 = func(%p_indices_2:array<u32, 1>):f32 -> %b5 {  # %f1_1: 'f1', %p_indices_2: 'p_indices'
   %b5 = block {
     %40:u32 = access %p_indices_2, 0u
     %res_1:ptr<function, f32, read_write> = var  # %res_1: 'res'
     %42:u32 = convert 1i
     %43:array<u32, 2> = construct %40, %42
-    %44:f32 = call %f0_W_arr_X_mat_X, %43
+    %44:f32 = call %f0_1, %43
     %45:f32 = load %res_1
     %46:f32 = add %45, %44
     store %res_1, %46
     %47:u32 = convert 1i
     %48:array<u32, 2> = construct %40, %47
-    %49:f32 = call %f0_W_arr_X_mat_X, %48
+    %49:f32 = call %f0_1, %48
     %50:f32 = load %res_1
     %51:f32 = add %50, %49
     store %res_1, %51
     %52:u32 = convert 2i
     %53:u32 = convert 1i
     %54:array<u32, 2> = construct %52, %53
-    %55:f32 = call %f0_W_arr_X_mat_X, %54
+    %55:f32 = call %f0_1, %54
     %56:f32 = load %res_1
     %57:f32 = add %56, %55
     store %res_1, %57
     %58:u32 = convert 2i
     %59:u32 = convert 1i
     %60:array<u32, 2> = construct %58, %59
-    %61:f32 = call %f0_W_arr_X_mat_X, %60
+    %61:f32 = call %f0_1, %60
     %62:f32 = load %res_1
     %63:f32 = add %62, %61
     store %res_1, %63
@@ -2401,33 +2401,33 @@
     ret %64
   }
 }
-%f2_W_arr_X = func(%p_indices_3:array<u32, 1>):f32 -> %b6 {  # %p_indices_3: 'p_indices'
+%f2 = func(%p_indices_3:array<u32, 1>):f32 -> %b6 {  # %p_indices_3: 'p_indices'
   %b6 = block {
     %67:u32 = access %p_indices_3, 0u
     %68:array<u32, 1> = construct %67
-    %69:f32 = call %f1_W_arr_X_mat, %68
+    %69:f32 = call %f1_1, %68
     ret %69
   }
 }
-%f3_W_arr_W_mat = func():f32 -> %b7 {
+%f3 = func():f32 -> %b7 {
   %b7 = block {
     %71:u32 = convert 3i
     %72:array<u32, 1> = construct %71
-    %73:f32 = call %f2_W_arr_X, %72
-    %74:f32 = call %f1_W_mat
+    %73:f32 = call %f2, %72
+    %74:f32 = call %f1
     %75:f32 = add %73, %74
     ret %75
   }
 }
-%f4_W = func():f32 -> %b8 {
+%f4 = func():f32 -> %b8 {
   %b8 = block {
-    %77:f32 = call %f3_W_arr_W_mat
+    %77:f32 = call %f3
     ret %77
   }
 }
 %b = func():void -> %b9 {
   %b9 = block {
-    %79:f32 = call %f4_W
+    %79:f32 = call %f4
     ret
   }
 }
@@ -2522,7 +2522,7 @@
   %U:ptr<workgroup, array<array<array<vec4<i32>, 5>, 5>, 5>, read_write> = var @binding_point(0, 0)
 }
 
-%f2_U_X_X = func(%p_indices:array<u32, 2>):vec4<i32> -> %b2 {
+%f2 = func(%p_indices:array<u32, 2>):vec4<i32> -> %b2 {
   %b2 = block {
     %4:u32 = access %p_indices, 0u
     %5:u32 = access %p_indices, 1u
@@ -2532,24 +2532,24 @@
     ret %8
   }
 }
-%f1_U_X = func(%p_indices_1:array<u32, 1>):vec4<i32> -> %b3 {  # %p_indices_1: 'p_indices'
+%f1 = func(%p_indices_1:array<u32, 1>):vec4<i32> -> %b3 {  # %p_indices_1: 'p_indices'
   %b3 = block {
     %11:u32 = access %p_indices_1, 0u
     %12:array<u32, 2> = construct %11, 2u
-    %13:vec4<i32> = call %f2_U_X_X, %12
+    %13:vec4<i32> = call %f2, %12
     ret %13
   }
 }
-%f0_U = func():vec4<i32> -> %b4 {
+%f0 = func():vec4<i32> -> %b4 {
   %b4 = block {
     %15:array<u32, 1> = construct 1u
-    %16:vec4<i32> = call %f1_U_X, %15
+    %16:vec4<i32> = call %f1, %15
     ret %16
   }
 }
 %main = func():void -> %b5 {
   %b5 = block {
-    %18:vec4<i32> = call %f0_U
+    %18:vec4<i32> = call %f0
     ret
   }
 }
@@ -2617,7 +2617,7 @@
   %P:ptr<private, i32, read_write> = var
 }
 
-%a_P = func(%pre:i32, %post:i32):i32 -> %b2 {
+%a = func(%pre:i32, %post:i32):i32 -> %b2 {
   %b2 = block {
     %5:ptr<private, i32, read_write> = access %P
     %6:i32 = load %5
@@ -2626,7 +2626,7 @@
 }
 %b = func():void -> %b3 {
   %b3 = block {
-    %8:i32 = call %a_P, 10i, 20i
+    %8:i32 = call %a, 10i, 20i
     ret
   }
 }
@@ -2688,7 +2688,7 @@
   %P:ptr<private, i32, read_write> = var
 }
 
-%a_P = func(%pre:i32, %post:i32):void -> %b2 {
+%a = func(%pre:i32, %post:i32):void -> %b2 {
   %b2 = block {
     %5:ptr<private, i32, read_write> = access %P
     store %5, 42i
@@ -2697,7 +2697,7 @@
 }
 %b = func():void -> %b3 {
   %b3 = block {
-    %7:void = call %a_P, 10i, 20i
+    %7:void = call %a, 10i, 20i
     ret
   }
 }
@@ -2770,7 +2770,7 @@
   %P:ptr<private, str, read_write> = var
 }
 
-%a_P_i = func(%pre:i32, %post:i32):i32 -> %b2 {
+%a = func(%pre:i32, %post:i32):i32 -> %b2 {
   %b2 = block {
     %5:ptr<private, i32, read_write> = access %P, 0u
     %6:i32 = load %5
@@ -2779,7 +2779,7 @@
 }
 %b = func():void -> %b3 {
   %b3 = block {
-    %8:i32 = call %a_P_i, 10i, 20i
+    %8:i32 = call %a, 10i, 20i
     ret
   }
 }
@@ -2916,7 +2916,7 @@
   %P:ptr<private, str, read_write> = var
 }
 
-%a_P_arr = func(%pre:i32, %post:i32):void -> %b2 {
+%a = func(%pre:i32, %post:i32):void -> %b2 {
   %b2 = block {
     %5:ptr<private, array<i32, 4>, read_write> = access %P, 0u
     store %5, array<i32, 4>(0i)
@@ -2925,7 +2925,7 @@
 }
 %b = func():void -> %b3 {
   %b3 = block {
-    %7:void = call %a_P_arr, 10i, 20i
+    %7:void = call %a, 10i, 20i
     ret
   }
 }
@@ -3082,21 +3082,21 @@
   %Pa:ptr<private, array<i32, 4>, read_write> = var
 }
 
-%a_Pi = func(%pre:i32, %post:i32):i32 -> %b2 {
+%a = func(%pre:i32, %post:i32):i32 -> %b2 {
   %b2 = block {
     %7:ptr<private, i32, read_write> = access %Pi
     %8:i32 = load %7
     ret %8
   }
 }
-%a_Ps_i = func(%pre_1:i32, %post_1:i32):i32 -> %b3 {  # %pre_1: 'pre', %post_1: 'post'
+%a_1 = func(%pre_1:i32, %post_1:i32):i32 -> %b3 {  # %a_1: 'a', %pre_1: 'pre', %post_1: 'post'
   %b3 = block {
     %12:ptr<private, i32, read_write> = access %Ps, 0u
     %13:i32 = load %12
     ret %13
   }
 }
-%a_Pa_X = func(%pre_2:i32, %p_indices:array<u32, 1>, %post_2:i32):i32 -> %b4 {  # %pre_2: 'pre', %post_2: 'post'
+%a_2 = func(%pre_2:i32, %p_indices:array<u32, 1>, %post_2:i32):i32 -> %b4 {  # %a_2: 'a', %pre_2: 'pre', %post_2: 'post'
   %b4 = block {
     %18:u32 = access %p_indices, 0u
     %19:ptr<private, i32, read_write> = access %Pa, %18
@@ -3106,11 +3106,11 @@
 }
 %b = func():void -> %b5 {
   %b5 = block {
-    %22:i32 = call %a_Pi, 10i, 20i
-    %23:i32 = call %a_Ps_i, 30i, 40i
+    %22:i32 = call %a, 10i, 20i
+    %23:i32 = call %a_1, 30i, 40i
     %24:u32 = convert 2i
     %25:array<u32, 1> = construct %24
-    %26:i32 = call %a_Pa_X, 50i, %25, 60i
+    %26:i32 = call %a_2, 50i, %25, 60i
     ret
   }
 }
@@ -3387,7 +3387,7 @@
   %P:ptr<private, Outer, read_write> = var
 }
 
-%f0_P_mat_X = func(%p_indices:array<u32, 1>):f32 -> %b2 {
+%f0 = func(%p_indices:array<u32, 1>):f32 -> %b2 {
   %b2 = block {
     %4:u32 = access %p_indices, 0u
     %5:ptr<private, vec4<f32>, read_write> = access %P, 1u, %4
@@ -3395,7 +3395,7 @@
     ret %6
   }
 }
-%f0_P_arr_X_mat_X = func(%p_indices_1:array<u32, 2>):f32 -> %b3 {  # %p_indices_1: 'p_indices'
+%f0_1 = func(%p_indices_1:array<u32, 2>):f32 -> %b3 {  # %f0_1: 'f0', %p_indices_1: 'p_indices'
   %b3 = block {
     %9:u32 = access %p_indices_1, 0u
     %10:u32 = access %p_indices_1, 1u
@@ -3404,32 +3404,32 @@
     ret %12
   }
 }
-%f1_P_mat = func():f32 -> %b4 {
+%f1 = func():f32 -> %b4 {
   %b4 = block {
     %res:ptr<function, f32, read_write> = var
     %15:u32 = convert 1i
     %16:array<u32, 1> = construct %15
-    %17:f32 = call %f0_P_mat_X, %16
+    %17:f32 = call %f0, %16
     %18:f32 = load %res
     %19:f32 = add %18, %17
     store %res, %19
     %20:u32 = convert 1i
     %21:array<u32, 1> = construct %20
-    %22:f32 = call %f0_P_mat_X, %21
+    %22:f32 = call %f0, %21
     %23:f32 = load %res
     %24:f32 = add %23, %22
     store %res, %24
     %25:u32 = convert 2i
     %26:u32 = convert 1i
     %27:array<u32, 2> = construct %25, %26
-    %28:f32 = call %f0_P_arr_X_mat_X, %27
+    %28:f32 = call %f0_1, %27
     %29:f32 = load %res
     %30:f32 = add %29, %28
     store %res, %30
     %31:u32 = convert 2i
     %32:u32 = convert 1i
     %33:array<u32, 2> = construct %31, %32
-    %34:f32 = call %f0_P_arr_X_mat_X, %33
+    %34:f32 = call %f0_1, %33
     %35:f32 = load %res
     %36:f32 = add %35, %34
     store %res, %36
@@ -3437,33 +3437,33 @@
     ret %37
   }
 }
-%f1_P_arr_X_mat = func(%p_indices_2:array<u32, 1>):f32 -> %b5 {  # %p_indices_2: 'p_indices'
+%f1_1 = func(%p_indices_2:array<u32, 1>):f32 -> %b5 {  # %f1_1: 'f1', %p_indices_2: 'p_indices'
   %b5 = block {
     %40:u32 = access %p_indices_2, 0u
     %res_1:ptr<function, f32, read_write> = var  # %res_1: 'res'
     %42:u32 = convert 1i
     %43:array<u32, 2> = construct %40, %42
-    %44:f32 = call %f0_P_arr_X_mat_X, %43
+    %44:f32 = call %f0_1, %43
     %45:f32 = load %res_1
     %46:f32 = add %45, %44
     store %res_1, %46
     %47:u32 = convert 1i
     %48:array<u32, 2> = construct %40, %47
-    %49:f32 = call %f0_P_arr_X_mat_X, %48
+    %49:f32 = call %f0_1, %48
     %50:f32 = load %res_1
     %51:f32 = add %50, %49
     store %res_1, %51
     %52:u32 = convert 2i
     %53:u32 = convert 1i
     %54:array<u32, 2> = construct %52, %53
-    %55:f32 = call %f0_P_arr_X_mat_X, %54
+    %55:f32 = call %f0_1, %54
     %56:f32 = load %res_1
     %57:f32 = add %56, %55
     store %res_1, %57
     %58:u32 = convert 2i
     %59:u32 = convert 1i
     %60:array<u32, 2> = construct %58, %59
-    %61:f32 = call %f0_P_arr_X_mat_X, %60
+    %61:f32 = call %f0_1, %60
     %62:f32 = load %res_1
     %63:f32 = add %62, %61
     store %res_1, %63
@@ -3471,33 +3471,33 @@
     ret %64
   }
 }
-%f2_P_arr_X = func(%p_indices_3:array<u32, 1>):f32 -> %b6 {  # %p_indices_3: 'p_indices'
+%f2 = func(%p_indices_3:array<u32, 1>):f32 -> %b6 {  # %p_indices_3: 'p_indices'
   %b6 = block {
     %67:u32 = access %p_indices_3, 0u
     %68:array<u32, 1> = construct %67
-    %69:f32 = call %f1_P_arr_X_mat, %68
+    %69:f32 = call %f1_1, %68
     ret %69
   }
 }
-%f3_P_arr_P_mat = func():f32 -> %b7 {
+%f3 = func():f32 -> %b7 {
   %b7 = block {
     %71:u32 = convert 3i
     %72:array<u32, 1> = construct %71
-    %73:f32 = call %f2_P_arr_X, %72
-    %74:f32 = call %f1_P_mat
+    %73:f32 = call %f2, %72
+    %74:f32 = call %f1
     %75:f32 = add %73, %74
     ret %75
   }
 }
-%f4_P = func():f32 -> %b8 {
+%f4 = func():f32 -> %b8 {
   %b8 = block {
-    %77:f32 = call %f3_P_arr_P_mat
+    %77:f32 = call %f3
     ret %77
   }
 }
 %b = func():void -> %b9 {
   %b9 = block {
-    %79:f32 = call %f4_P
+    %79:f32 = call %f4
     ret
   }
 }
@@ -3773,7 +3773,7 @@
   %P:ptr<private, array<array<array<vec4<i32>, 5>, 5>, 5>, read_write> = var
 }
 
-%f2_P_X_X = func(%p_indices:array<u32, 2>):vec4<i32> -> %b2 {
+%f2 = func(%p_indices:array<u32, 2>):vec4<i32> -> %b2 {
   %b2 = block {
     %4:u32 = access %p_indices, 0u
     %5:u32 = access %p_indices, 1u
@@ -3783,24 +3783,24 @@
     ret %8
   }
 }
-%f1_P_X = func(%p_indices_1:array<u32, 1>):vec4<i32> -> %b3 {  # %p_indices_1: 'p_indices'
+%f1 = func(%p_indices_1:array<u32, 1>):vec4<i32> -> %b3 {  # %p_indices_1: 'p_indices'
   %b3 = block {
     %11:u32 = access %p_indices_1, 0u
     %12:array<u32, 2> = construct %11, 2u
-    %13:vec4<i32> = call %f2_P_X_X, %12
+    %13:vec4<i32> = call %f2, %12
     ret %13
   }
 }
-%f0_P = func():vec4<i32> -> %b4 {
+%f0 = func():vec4<i32> -> %b4 {
   %b4 = block {
     %15:array<u32, 1> = construct 1u
-    %16:vec4<i32> = call %f1_P_X, %15
+    %16:vec4<i32> = call %f1, %15
     ret %16
   }
 }
 %main = func():void -> %b5 {
   %b5 = block {
-    %18:vec4<i32> = call %f0_P
+    %18:vec4<i32> = call %f0
     ret
   }
 }
@@ -3972,7 +3972,7 @@
     EXPECT_EQ(src, str());
 
     auto* expect = R"(
-%a_P = func(%pre:i32, %p_root:ptr<function, i32, read_write>, %post:i32):i32 -> %b1 {
+%a = func(%pre:i32, %p_root:ptr<function, i32, read_write>, %post:i32):i32 -> %b1 {
   %b1 = block {
     %5:ptr<function, i32, read_write> = access %p_root
     %6:i32 = load %5
@@ -3982,7 +3982,7 @@
 %b = func():void -> %b2 {
   %b2 = block {
     %F:ptr<function, i32, read_write> = var
-    %9:i32 = call %a_P, 10i, %F, 20i
+    %9:i32 = call %a, 10i, %F, 20i
     ret
   }
 }
@@ -4032,7 +4032,7 @@
     EXPECT_EQ(src, str());
 
     auto* expect = R"(
-%a_P = func(%pre:i32, %p_root:ptr<function, i32, read_write>, %post:i32):void -> %b1 {
+%a = func(%pre:i32, %p_root:ptr<function, i32, read_write>, %post:i32):void -> %b1 {
   %b1 = block {
     %5:ptr<function, i32, read_write> = access %p_root
     store %5, 42i
@@ -4042,7 +4042,7 @@
 %b = func():void -> %b2 {
   %b2 = block {
     %F:ptr<function, i32, read_write> = var
-    %8:void = call %a_P, 10i, %F, 20i
+    %8:void = call %a, 10i, %F, 20i
     ret
   }
 }
@@ -4103,7 +4103,7 @@
   i:i32 @offset(0)
 }
 
-%a_P_i = func(%pre:i32, %p_root:ptr<function, str, read_write>, %post:i32):i32 -> %b1 {
+%a = func(%pre:i32, %p_root:ptr<function, str, read_write>, %post:i32):i32 -> %b1 {
   %b1 = block {
     %5:ptr<function, i32, read_write> = access %p_root, 0u
     %6:i32 = load %5
@@ -4113,7 +4113,7 @@
 %b = func():void -> %b2 {
   %b2 = block {
     %F:ptr<function, str, read_write> = var
-    %9:i32 = call %a_P_i, 10i, %F, 20i
+    %9:i32 = call %a, 10i, %F, 20i
     ret
   }
 }
@@ -4178,7 +4178,7 @@
   arr:array<i32, 4> @offset(0)
 }
 
-%a_P_arr = func(%pre:i32, %p_root:ptr<function, str, read_write>, %post:i32):void -> %b1 {
+%a = func(%pre:i32, %p_root:ptr<function, str, read_write>, %post:i32):void -> %b1 {
   %b1 = block {
     %5:ptr<function, array<i32, 4>, read_write> = access %p_root, 0u
     store %5, array<i32, 4>(0i)
@@ -4188,7 +4188,7 @@
 %b = func():void -> %b2 {
   %b2 = block {
     %F:ptr<function, str, read_write> = var
-    %8:void = call %a_P_arr, 10i, %F, 20i
+    %8:void = call %a, 10i, %F, 20i
     ret
   }
 }
@@ -4265,21 +4265,21 @@
   i:i32 @offset(0)
 }
 
-%a_P = func(%pre:i32, %p_root:ptr<function, i32, read_write>, %post:i32):i32 -> %b1 {
+%a = func(%pre:i32, %p_root:ptr<function, i32, read_write>, %post:i32):i32 -> %b1 {
   %b1 = block {
     %5:ptr<function, i32, read_write> = access %p_root
     %6:i32 = load %5
     ret %6
   }
 }
-%a_P_i = func(%pre_1:i32, %p_root_1:ptr<function, str, read_write>, %post_1:i32):i32 -> %b2 {  # %pre_1: 'pre', %p_root_1: 'p_root', %post_1: 'post'
+%a_1 = func(%pre_1:i32, %p_root_1:ptr<function, str, read_write>, %post_1:i32):i32 -> %b2 {  # %a_1: 'a', %pre_1: 'pre', %p_root_1: 'p_root', %post_1: 'post'
   %b2 = block {
     %11:ptr<function, i32, read_write> = access %p_root_1, 0u
     %12:i32 = load %11
     ret %12
   }
 }
-%a_P_X = func(%pre_2:i32, %p_root_2:ptr<function, array<i32, 4>, read_write>, %p_indices:array<u32, 1>, %post_2:i32):i32 -> %b3 {  # %pre_2: 'pre', %p_root_2: 'p_root', %post_2: 'post'
+%a_2 = func(%pre_2:i32, %p_root_2:ptr<function, array<i32, 4>, read_write>, %p_indices:array<u32, 1>, %post_2:i32):i32 -> %b3 {  # %a_2: 'a', %pre_2: 'pre', %p_root_2: 'p_root', %post_2: 'post'
   %b3 = block {
     %18:u32 = access %p_indices, 0u
     %19:ptr<function, i32, read_write> = access %p_root_2, %18
@@ -4292,11 +4292,11 @@
     %Fi:ptr<function, i32, read_write> = var
     %Fs:ptr<function, str, read_write> = var
     %Fa:ptr<function, array<i32, 4>, read_write> = var
-    %25:i32 = call %a_P, 10i, %Fi, 20i
-    %26:i32 = call %a_P_i, 30i, %Fs, 40i
+    %25:i32 = call %a, 10i, %Fi, 20i
+    %26:i32 = call %a_1, 30i, %Fs, 40i
     %27:u32 = convert 2i
     %28:array<u32, 1> = construct %27
-    %29:i32 = call %a_P_X, 50i, %Fa, %28, 60i
+    %29:i32 = call %a_2, 50i, %Fa, %28, 60i
     ret
   }
 }
@@ -4570,7 +4570,7 @@
   mat:mat3x4<f32> @offset(192)
 }
 
-%f0_P_arr_X_mat_X = func(%p_root:ptr<function, Outer, read_write>, %p_indices:array<u32, 2>):f32 -> %b1 {
+%f0 = func(%p_root:ptr<function, Outer, read_write>, %p_indices:array<u32, 2>):f32 -> %b1 {
   %b1 = block {
     %4:u32 = access %p_indices, 0u
     %5:u32 = access %p_indices, 1u
@@ -4579,19 +4579,19 @@
     ret %7
   }
 }
-%f1_P_arr_X_mat = func(%p_root_1:ptr<function, Outer, read_write>, %p_indices_1:array<u32, 1>):f32 -> %b2 {  # %p_root_1: 'p_root', %p_indices_1: 'p_indices'
+%f1 = func(%p_root_1:ptr<function, Outer, read_write>, %p_indices_1:array<u32, 1>):f32 -> %b2 {  # %p_root_1: 'p_root', %p_indices_1: 'p_indices'
   %b2 = block {
     %11:u32 = access %p_indices_1, 0u
     %res:ptr<function, f32, read_write> = var
     %13:u32 = convert 1i
     %14:array<u32, 2> = construct %11, %13
-    %15:f32 = call %f0_P_arr_X_mat_X, %p_root_1, %14
+    %15:f32 = call %f0, %p_root_1, %14
     %16:f32 = load %res
     %17:f32 = add %16, %15
     store %res, %17
     %18:u32 = convert 1i
     %19:array<u32, 2> = construct %11, %18
-    %20:f32 = call %f0_P_arr_X_mat_X, %p_root_1, %19
+    %20:f32 = call %f0, %p_root_1, %19
     %21:f32 = load %res
     %22:f32 = add %21, %20
     store %res, %22
@@ -4599,32 +4599,32 @@
     ret %23
   }
 }
-%f2_P_arr_X = func(%p_root_2:ptr<function, Outer, read_write>, %p_indices_2:array<u32, 1>):f32 -> %b3 {  # %p_root_2: 'p_root', %p_indices_2: 'p_indices'
+%f2 = func(%p_root_2:ptr<function, Outer, read_write>, %p_indices_2:array<u32, 1>):f32 -> %b3 {  # %p_root_2: 'p_root', %p_indices_2: 'p_indices'
   %b3 = block {
     %27:u32 = access %p_indices_2, 0u
     %28:array<u32, 1> = construct %27
-    %29:f32 = call %f1_P_arr_X_mat, %p_root_2, %28
+    %29:f32 = call %f1, %p_root_2, %28
     ret %29
   }
 }
-%f3_P_arr = func(%p_root_3:ptr<function, Outer, read_write>):f32 -> %b4 {  # %p_root_3: 'p_root'
+%f3 = func(%p_root_3:ptr<function, Outer, read_write>):f32 -> %b4 {  # %p_root_3: 'p_root'
   %b4 = block {
     %32:u32 = convert 3i
     %33:array<u32, 1> = construct %32
-    %34:f32 = call %f2_P_arr_X, %p_root_3, %33
+    %34:f32 = call %f2, %p_root_3, %33
     ret %34
   }
 }
-%f4_P = func(%p_root_4:ptr<function, Outer, read_write>):f32 -> %b5 {  # %p_root_4: 'p_root'
+%f4 = func(%p_root_4:ptr<function, Outer, read_write>):f32 -> %b5 {  # %p_root_4: 'p_root'
   %b5 = block {
-    %37:f32 = call %f3_P_arr, %p_root_4
+    %37:f32 = call %f3, %p_root_4
     ret %37
   }
 }
 %b = func():void -> %b6 {
   %b6 = block {
     %F:ptr<function, Outer, read_write> = var
-    %40:f32 = call %f4_P, %F
+    %40:f32 = call %f4, %F
     ret
   }
 }
@@ -4859,7 +4859,7 @@
     EXPECT_EQ(src, str());
 
     auto* expect = R"(
-%f2_P_X_X = func(%p_root:ptr<function, array<array<array<vec4<i32>, 5>, 5>, 5>, read_write>, %p_indices:array<u32, 2>):vec4<i32> -> %b1 {
+%f2 = func(%p_root:ptr<function, array<array<array<vec4<i32>, 5>, 5>, 5>, read_write>, %p_indices:array<u32, 2>):vec4<i32> -> %b1 {
   %b1 = block {
     %4:u32 = access %p_indices, 0u
     %5:u32 = access %p_indices, 1u
@@ -4869,25 +4869,25 @@
     ret %8
   }
 }
-%f1_P_X = func(%p_root_1:ptr<function, array<array<array<vec4<i32>, 5>, 5>, 5>, read_write>, %p_indices_1:array<u32, 1>):vec4<i32> -> %b2 {  # %p_root_1: 'p_root', %p_indices_1: 'p_indices'
+%f1 = func(%p_root_1:ptr<function, array<array<array<vec4<i32>, 5>, 5>, 5>, read_write>, %p_indices_1:array<u32, 1>):vec4<i32> -> %b2 {  # %p_root_1: 'p_root', %p_indices_1: 'p_indices'
   %b2 = block {
     %12:u32 = access %p_indices_1, 0u
     %13:array<u32, 2> = construct %12, 2u
-    %14:vec4<i32> = call %f2_P_X_X, %p_root_1, %13
+    %14:vec4<i32> = call %f2, %p_root_1, %13
     ret %14
   }
 }
-%f0_P = func(%p_root_2:ptr<function, array<array<array<vec4<i32>, 5>, 5>, 5>, read_write>):vec4<i32> -> %b3 {  # %p_root_2: 'p_root'
+%f0 = func(%p_root_2:ptr<function, array<array<array<vec4<i32>, 5>, 5>, 5>, read_write>):vec4<i32> -> %b3 {  # %p_root_2: 'p_root'
   %b3 = block {
     %17:array<u32, 1> = construct 1u
-    %18:vec4<i32> = call %f1_P_X, %p_root_2, %17
+    %18:vec4<i32> = call %f1, %p_root_2, %17
     ret %18
   }
 }
 %main = func():void -> %b4 {
   %b4 = block {
     %F:ptr<function, array<array<array<vec4<i32>, 5>, 5>, 5>, read_write> = var
-    %21:vec4<i32> = call %f0_P, %F
+    %21:vec4<i32> = call %f0, %F
     ret
   }
 }
@@ -5033,7 +5033,7 @@
   %S:ptr<storage, array<f32>, read_write> = var @binding_point(0, 0)
 }
 
-%len_S = func():u32 -> %b2 {
+%len = func():u32 -> %b2 {
   %b2 = block {
     %3:ptr<storage, array<f32>, read_write> = access %S
     %4:u32 = arrayLength %3
@@ -5042,7 +5042,7 @@
 }
 %b = func():void -> %b3 {
   %b3 = block {
-    %6:u32 = call %len_S
+    %6:u32 = call %len
     ret
   }
 }
@@ -5100,7 +5100,7 @@
   %W:ptr<workgroup, atomic<i32>, read_write> = var
 }
 
-%load_W = func():i32 -> %b2 {
+%load = func():i32 -> %b2 {
   %b2 = block {
     %3:ptr<workgroup, atomic<i32>, read_write> = access %W
     %4:i32 = atomicLoad %3
@@ -5109,7 +5109,7 @@
 }
 %b = func():void -> %b3 {
   %b3 = block {
-    %6:i32 = call %load_W
+    %6:i32 = call %load
     ret
   }
 }
@@ -5380,21 +5380,21 @@
   %W_arr_arr:ptr<workgroup, array<array<vec4<i32>, 8>, 4>, read_write> = var
 }
 
-%fn_u_U = func():vec4<i32> -> %b2 {
+%fn_u = func():vec4<i32> -> %b2 {
   %b2 = block {
     %14:ptr<uniform, vec4<i32>, read> = access %U
     %15:vec4<i32> = load %14
     ret %15
   }
 }
-%fn_u_U_str_i = func():vec4<i32> -> %b3 {
+%fn_u_1 = func():vec4<i32> -> %b3 {  # %fn_u_1: 'fn_u'
   %b3 = block {
     %17:ptr<uniform, vec4<i32>, read> = access %U_str, 0u
     %18:vec4<i32> = load %17
     ret %18
   }
 }
-%fn_u_U_arr_X = func(%p_indices:array<u32, 1>):vec4<i32> -> %b4 {
+%fn_u_2 = func(%p_indices:array<u32, 1>):vec4<i32> -> %b4 {  # %fn_u_2: 'fn_u'
   %b4 = block {
     %21:u32 = access %p_indices, 0u
     %22:ptr<uniform, vec4<i32>, read> = access %U_arr, %21
@@ -5402,7 +5402,7 @@
     ret %23
   }
 }
-%fn_u_U_arr_arr_X_X = func(%p_indices_1:array<u32, 2>):vec4<i32> -> %b5 {  # %p_indices_1: 'p_indices'
+%fn_u_3 = func(%p_indices_1:array<u32, 2>):vec4<i32> -> %b5 {  # %fn_u_3: 'fn_u', %p_indices_1: 'p_indices'
   %b5 = block {
     %26:u32 = access %p_indices_1, 0u
     %27:u32 = access %p_indices_1, 1u
@@ -5411,21 +5411,21 @@
     ret %29
   }
 }
-%fn_s_S = func():vec4<i32> -> %b6 {
+%fn_s = func():vec4<i32> -> %b6 {
   %b6 = block {
     %31:ptr<storage, vec4<i32>, read> = access %S
     %32:vec4<i32> = load %31
     ret %32
   }
 }
-%fn_s_S_str_i = func():vec4<i32> -> %b7 {
+%fn_s_1 = func():vec4<i32> -> %b7 {  # %fn_s_1: 'fn_s'
   %b7 = block {
     %34:ptr<storage, vec4<i32>, read> = access %S_str, 0u
     %35:vec4<i32> = load %34
     ret %35
   }
 }
-%fn_s_S_arr_X = func(%p_indices_2:array<u32, 1>):vec4<i32> -> %b8 {  # %p_indices_2: 'p_indices'
+%fn_s_2 = func(%p_indices_2:array<u32, 1>):vec4<i32> -> %b8 {  # %fn_s_2: 'fn_s', %p_indices_2: 'p_indices'
   %b8 = block {
     %38:u32 = access %p_indices_2, 0u
     %39:ptr<storage, vec4<i32>, read> = access %S_arr, %38
@@ -5433,7 +5433,7 @@
     ret %40
   }
 }
-%fn_s_S_arr_arr_X_X = func(%p_indices_3:array<u32, 2>):vec4<i32> -> %b9 {  # %p_indices_3: 'p_indices'
+%fn_s_3 = func(%p_indices_3:array<u32, 2>):vec4<i32> -> %b9 {  # %fn_s_3: 'fn_s', %p_indices_3: 'p_indices'
   %b9 = block {
     %43:u32 = access %p_indices_3, 0u
     %44:u32 = access %p_indices_3, 1u
@@ -5442,21 +5442,21 @@
     ret %46
   }
 }
-%fn_w_W = func():vec4<i32> -> %b10 {
+%fn_w = func():vec4<i32> -> %b10 {
   %b10 = block {
     %48:ptr<workgroup, vec4<i32>, read_write> = access %W
     %49:vec4<i32> = load %48
     ret %49
   }
 }
-%fn_w_W_str_i = func():vec4<i32> -> %b11 {
+%fn_w_1 = func():vec4<i32> -> %b11 {  # %fn_w_1: 'fn_w'
   %b11 = block {
     %51:ptr<workgroup, vec4<i32>, read_write> = access %W_str, 0u
     %52:vec4<i32> = load %51
     ret %52
   }
 }
-%fn_w_W_arr_X = func(%p_indices_4:array<u32, 1>):vec4<i32> -> %b12 {  # %p_indices_4: 'p_indices'
+%fn_w_2 = func(%p_indices_4:array<u32, 1>):vec4<i32> -> %b12 {  # %fn_w_2: 'fn_w', %p_indices_4: 'p_indices'
   %b12 = block {
     %55:u32 = access %p_indices_4, 0u
     %56:ptr<workgroup, vec4<i32>, read_write> = access %W_arr, %55
@@ -5464,7 +5464,7 @@
     ret %57
   }
 }
-%fn_w_W_arr_arr_X_X = func(%p_indices_5:array<u32, 2>):vec4<i32> -> %b13 {  # %p_indices_5: 'p_indices'
+%fn_w_3 = func(%p_indices_5:array<u32, 2>):vec4<i32> -> %b13 {  # %fn_w_3: 'fn_w', %p_indices_5: 'p_indices'
   %b13 = block {
     %60:u32 = access %p_indices_5, 0u
     %61:u32 = access %p_indices_5, 1u
@@ -5477,87 +5477,87 @@
   %b14 = block {
     %I:i32 = let 3i
     %J:i32 = let 4i
-    %u:vec4<i32> = call %fn_u_U
-    %u_str:vec4<i32> = call %fn_u_U_str_i
+    %u:vec4<i32> = call %fn_u
+    %u_str:vec4<i32> = call %fn_u_1
     %69:u32 = convert 0i
     %70:array<u32, 1> = construct %69
-    %u_arr0:vec4<i32> = call %fn_u_U_arr_X, %70
+    %u_arr0:vec4<i32> = call %fn_u_2, %70
     %72:u32 = convert 1i
     %73:array<u32, 1> = construct %72
-    %u_arr1:vec4<i32> = call %fn_u_U_arr_X, %73
+    %u_arr1:vec4<i32> = call %fn_u_2, %73
     %75:u32 = convert %I
     %76:array<u32, 1> = construct %75
-    %u_arrI:vec4<i32> = call %fn_u_U_arr_X, %76
+    %u_arrI:vec4<i32> = call %fn_u_2, %76
     %78:u32 = convert 1i
     %79:u32 = convert 0i
     %80:array<u32, 2> = construct %78, %79
-    %u_arr1_arr0:vec4<i32> = call %fn_u_U_arr_arr_X_X, %80
+    %u_arr1_arr0:vec4<i32> = call %fn_u_3, %80
     %82:u32 = convert 2i
     %83:u32 = convert %I
     %84:array<u32, 2> = construct %82, %83
-    %u_arr2_arrI:vec4<i32> = call %fn_u_U_arr_arr_X_X, %84
+    %u_arr2_arrI:vec4<i32> = call %fn_u_3, %84
     %86:u32 = convert %I
     %87:u32 = convert 2i
     %88:array<u32, 2> = construct %86, %87
-    %u_arrI_arr2:vec4<i32> = call %fn_u_U_arr_arr_X_X, %88
+    %u_arrI_arr2:vec4<i32> = call %fn_u_3, %88
     %90:u32 = convert %I
     %91:u32 = convert %J
     %92:array<u32, 2> = construct %90, %91
-    %u_arrI_arrJ:vec4<i32> = call %fn_u_U_arr_arr_X_X, %92
-    %s:vec4<i32> = call %fn_s_S
-    %s_str:vec4<i32> = call %fn_s_S_str_i
+    %u_arrI_arrJ:vec4<i32> = call %fn_u_3, %92
+    %s:vec4<i32> = call %fn_s
+    %s_str:vec4<i32> = call %fn_s_1
     %96:u32 = convert 0i
     %97:array<u32, 1> = construct %96
-    %s_arr0:vec4<i32> = call %fn_s_S_arr_X, %97
+    %s_arr0:vec4<i32> = call %fn_s_2, %97
     %99:u32 = convert 1i
     %100:array<u32, 1> = construct %99
-    %s_arr1:vec4<i32> = call %fn_s_S_arr_X, %100
+    %s_arr1:vec4<i32> = call %fn_s_2, %100
     %102:u32 = convert %I
     %103:array<u32, 1> = construct %102
-    %s_arrI:vec4<i32> = call %fn_s_S_arr_X, %103
+    %s_arrI:vec4<i32> = call %fn_s_2, %103
     %105:u32 = convert 1i
     %106:u32 = convert 0i
     %107:array<u32, 2> = construct %105, %106
-    %s_arr1_arr0:vec4<i32> = call %fn_s_S_arr_arr_X_X, %107
+    %s_arr1_arr0:vec4<i32> = call %fn_s_3, %107
     %109:u32 = convert 2i
     %110:u32 = convert %I
     %111:array<u32, 2> = construct %109, %110
-    %s_arr2_arrI:vec4<i32> = call %fn_s_S_arr_arr_X_X, %111
+    %s_arr2_arrI:vec4<i32> = call %fn_s_3, %111
     %113:u32 = convert %I
     %114:u32 = convert 2i
     %115:array<u32, 2> = construct %113, %114
-    %s_arrI_arr2:vec4<i32> = call %fn_s_S_arr_arr_X_X, %115
+    %s_arrI_arr2:vec4<i32> = call %fn_s_3, %115
     %117:u32 = convert %I
     %118:u32 = convert %J
     %119:array<u32, 2> = construct %117, %118
-    %s_arrI_arrJ:vec4<i32> = call %fn_s_S_arr_arr_X_X, %119
-    %w:vec4<i32> = call %fn_w_W
-    %w_str:vec4<i32> = call %fn_w_W_str_i
+    %s_arrI_arrJ:vec4<i32> = call %fn_s_3, %119
+    %w:vec4<i32> = call %fn_w
+    %w_str:vec4<i32> = call %fn_w_1
     %123:u32 = convert 0i
     %124:array<u32, 1> = construct %123
-    %w_arr0:vec4<i32> = call %fn_w_W_arr_X, %124
+    %w_arr0:vec4<i32> = call %fn_w_2, %124
     %126:u32 = convert 1i
     %127:array<u32, 1> = construct %126
-    %w_arr1:vec4<i32> = call %fn_w_W_arr_X, %127
+    %w_arr1:vec4<i32> = call %fn_w_2, %127
     %129:u32 = convert %I
     %130:array<u32, 1> = construct %129
-    %w_arrI:vec4<i32> = call %fn_w_W_arr_X, %130
+    %w_arrI:vec4<i32> = call %fn_w_2, %130
     %132:u32 = convert 1i
     %133:u32 = convert 0i
     %134:array<u32, 2> = construct %132, %133
-    %w_arr1_arr0:vec4<i32> = call %fn_w_W_arr_arr_X_X, %134
+    %w_arr1_arr0:vec4<i32> = call %fn_w_3, %134
     %136:u32 = convert 2i
     %137:u32 = convert %I
     %138:array<u32, 2> = construct %136, %137
-    %w_arr2_arrI:vec4<i32> = call %fn_w_W_arr_arr_X_X, %138
+    %w_arr2_arrI:vec4<i32> = call %fn_w_3, %138
     %140:u32 = convert %I
     %141:u32 = convert 2i
     %142:array<u32, 2> = construct %140, %141
-    %w_arrI_arr2:vec4<i32> = call %fn_w_W_arr_arr_X_X, %142
+    %w_arrI_arr2:vec4<i32> = call %fn_w_3, %142
     %144:u32 = convert %I
     %145:u32 = convert %J
     %146:array<u32, 2> = construct %144, %145
-    %w_arrI_arrJ:vec4<i32> = call %fn_w_W_arr_arr_X_X, %146
+    %w_arrI_arrJ:vec4<i32> = call %fn_w_3, %146
     ret
   }
 }
@@ -5657,7 +5657,7 @@
     ret %i
   }
 }
-%b_S_X = func(%p_indices:array<u32, 1>):i32 -> %b3 {
+%b = func(%p_indices:array<u32, 1>):i32 -> %b3 {
   %b3 = block {
     %6:u32 = access %p_indices, 0u
     %7:ptr<storage, array<array<array<i32, 9>, 9>, 9>, read> = access %S, %6
@@ -5681,7 +5681,7 @@
   %b4 = block {
     %22:u32 = convert 42i
     %23:array<u32, 1> = construct %22
-    %v:i32 = call %b_S_X, %23
+    %v:i32 = call %b, %23
     ret
   }
 }
@@ -5777,7 +5777,7 @@
   %S:ptr<storage, array<array<array<array<i32, 9>, 9>, 9>, 50>, read> = var @binding_point(0, 0)
 }
 
-%a_S_X_X_X_X = func(%pre:i32, %i_indices:array<u32, 4>, %post:i32):i32 -> %b2 {
+%a = func(%pre:i32, %i_indices:array<u32, 4>, %post:i32):i32 -> %b2 {
   %b2 = block {
     %6:u32 = access %i_indices, 0u
     %7:u32 = access %i_indices, 1u
@@ -5788,29 +5788,29 @@
     ret %11
   }
 }
-%b_S_X = func(%p_indices:array<u32, 1>):i32 -> %b3 {
+%b = func(%p_indices:array<u32, 1>):i32 -> %b3 {
   %b3 = block {
     %14:u32 = access %p_indices, 0u
     %15:u32 = convert 0i
     %16:u32 = convert 1i
     %17:u32 = convert 2i
     %18:array<u32, 4> = construct %14, %15, %16, %17
-    %19:i32 = call %a_S_X_X_X_X, 20i, %18, 30i
+    %19:i32 = call %a, 20i, %18, 30i
     %20:u32 = convert 3i
     %21:u32 = convert 4i
     %22:u32 = convert 5i
     %23:array<u32, 4> = construct %14, %20, %21, %22
-    %24:i32 = call %a_S_X_X_X_X, 40i, %23, 50i
+    %24:i32 = call %a, 40i, %23, 50i
     %25:u32 = convert 6i
     %26:u32 = convert 7i
     %27:u32 = convert 8i
     %28:array<u32, 4> = construct %14, %25, %26, %27
-    %29:i32 = call %a_S_X_X_X_X, 60i, %28, 70i
+    %29:i32 = call %a, 60i, %28, 70i
     %30:u32 = convert %19
     %31:u32 = convert %24
     %32:u32 = convert %29
     %33:array<u32, 4> = construct %14, %30, %31, %32
-    %34:i32 = call %a_S_X_X_X_X, 10i, %33, 80i
+    %34:i32 = call %a, 10i, %33, 80i
     ret %34
   }
 }
@@ -5818,7 +5818,7 @@
   %b4 = block {
     %36:u32 = convert 42i
     %37:array<u32, 1> = construct %36
-    %v:i32 = call %b_S_X, %37
+    %v:i32 = call %b, %37
     ret
   }
 }
@@ -5919,7 +5919,7 @@
     ret %i
   }
 }
-%b_S_X_U_X = func(%s_indices:array<u32, 1>, %u_indices:array<u32, 1>):i32 -> %b3 {
+%b = func(%s_indices:array<u32, 1>, %u_indices:array<u32, 1>):i32 -> %b3 {
   %b3 = block {
     %8:u32 = access %s_indices, 0u
     %9:ptr<storage, array<array<i32, 9>, 9>, read> = access %S, %8
@@ -5943,7 +5943,7 @@
     %23:array<u32, 1> = construct %22
     %24:u32 = convert 24i
     %25:array<u32, 1> = construct %24
-    %v:i32 = call %b_S_X_U_X, %23, %25
+    %v:i32 = call %b, %23, %25
     ret
   }
 }
diff --git a/src/tint/lang/core/ir/transform/direct_variable_access_wgsl_test.cc b/src/tint/lang/core/ir/transform/direct_variable_access_wgsl_test.cc
index f0f2e00..77b799c 100644
--- a/src/tint/lang/core/ir/transform/direct_variable_access_wgsl_test.cc
+++ b/src/tint/lang/core/ir/transform/direct_variable_access_wgsl_test.cc
@@ -279,20 +279,20 @@
         R"(
 @group(0) @binding(0) var<uniform> U : array<array<array<vec4<i32>, 8u>, 8u>, 8u>;
 
-fn a_U_X_X_X(pre : i32, p_indices : array<u32, 3u>, post : i32) -> vec4<i32> {
+fn a(pre : i32, p_indices : array<u32, 3u>, post : i32) -> vec4<i32> {
   return U[p_indices[0u]][p_indices[1u]][p_indices[2u]];
 }
 
 fn b() {
-  a_U_X_X_X(10i, array<u32, 3u>(u32(1i), u32(2i), u32(3i)), 20i);
+  a(10i, array<u32, 3u>(u32(1i), u32(2i), u32(3i)), 20i);
 }
 
-fn c_U() {
-  a_U_X_X_X(10i, array<u32, 3u>(u32(1i), u32(2i), u32(3i)), 20i);
+fn c() {
+  a(10i, array<u32, 3u>(u32(1i), u32(2i), u32(3i)), 20i);
 }
 
 fn d() {
-  c_U();
+  c();
 }
 )";
 
@@ -362,24 +362,24 @@
   return i;
 }
 
-fn a_U_X_X_X(pre : i32, p_indices : array<u32, 3u>, post : i32) -> vec4<i32> {
+fn a(pre : i32, p_indices : array<u32, 3u>, post : i32) -> vec4<i32> {
   return U[p_indices[0u]][p_indices[1u]][p_indices[2u]];
 }
 
 fn b() {
   let v = first();
   let v_1 = second();
-  a_U_X_X_X(10i, array<u32, 3u>(u32(v), u32(v_1), u32(third())), 20i);
+  a(10i, array<u32, 3u>(u32(v), u32(v_1), u32(third())), 20i);
 }
 
-fn c_U() {
+fn c() {
   let v_2 = first();
   let v_3 = second();
-  a_U_X_X_X(10i, array<u32, 3u>(u32(v_2), u32(v_3), u32(third())), 20i);
+  a(10i, array<u32, 3u>(u32(v_2), u32(v_3), u32(third())), 20i);
 }
 
 fn d() {
-  c_U();
+  c();
 }
 )";
 
@@ -438,24 +438,24 @@
   return i;
 }
 
-fn a_U_X_X(pre : i32, p_indices : array<u32, 2u>, post : i32) -> vec4<i32> {
+fn a(pre : i32, p_indices : array<u32, 2u>, post : i32) -> vec4<i32> {
   return U[p_indices[0u]][p_indices[1u]];
 }
 
 fn b() {
   for(let v = first(); true; ) {
-    a_U_X_X(10i, array<u32, 2u>(u32(v), u32(second())), 20i);
+    a(10i, array<u32, 2u>(u32(v), u32(second())), 20i);
   }
 }
 
-fn c_U() {
+fn c() {
   for(let v_1 = first(); true; ) {
-    a_U_X_X(10i, array<u32, 2u>(u32(v_1), u32(second())), 20i);
+    a(10i, array<u32, 2u>(u32(v_1), u32(second())), 20i);
   }
 }
 
 fn d() {
-  c_U();
+  c();
 }
 )";
 
@@ -516,28 +516,28 @@
   return i;
 }
 
-fn a_U_X_X(pre : i32, p_indices : array<u32, 2u>, post : i32) -> vec4<i32> {
+fn a(pre : i32, p_indices : array<u32, 2u>, post : i32) -> vec4<i32> {
   return U[p_indices[0u]][p_indices[1u]];
 }
 
 fn b() {
   let v = first();
   let v_1 = second();
-  while((a_U_X_X(10i, array<u32, 2u>(u32(v), u32(v_1)), 20i).x < 4i)) {
+  while((a(10i, array<u32, 2u>(u32(v), u32(v_1)), 20i).x < 4i)) {
     let body = 1i;
   }
 }
 
-fn c_U() {
+fn c() {
   let v_2 = first();
   let v_3 = second();
-  while((a_U_X_X(10i, array<u32, 2u>(u32(v_2), u32(v_3)), 20i).x < 4i)) {
+  while((a(10i, array<u32, 2u>(u32(v_2), u32(v_3)), 20i).x < 4i)) {
     let body = 1i;
   }
 }
 
 fn d() {
-  c_U();
+  c();
 }
 )";
 
@@ -598,28 +598,28 @@
   return i;
 }
 
-fn a_U_X_X(pre : i32, p_indices : array<u32, 2u>, post : i32) -> vec4<i32> {
+fn a(pre : i32, p_indices : array<u32, 2u>, post : i32) -> vec4<i32> {
   return U[p_indices[0u]][p_indices[1u]];
 }
 
 fn b() {
   let v = first();
   let v_1 = second();
-  for(var i : i32 = 0i; (i < 3i); a_U_X_X(10i, array<u32, 2u>(u32(v), u32(v_1)), 20i)) {
+  for(var i : i32 = 0i; (i < 3i); a(10i, array<u32, 2u>(u32(v), u32(v_1)), 20i)) {
     i = (i + 1i);
   }
 }
 
-fn c_U() {
+fn c() {
   let v_2 = first();
   let v_3 = second();
-  for(var i : i32 = 0i; (i < 3i); a_U_X_X(10i, array<u32, 2u>(u32(v_2), u32(v_3)), 20i)) {
+  for(var i : i32 = 0i; (i < 3i); a(10i, array<u32, 2u>(u32(v_2), u32(v_3)), 20i)) {
     i = (i + 1i);
   }
 }
 
 fn d() {
-  c_U();
+  c();
 }
 )";
 
@@ -680,28 +680,28 @@
   return i;
 }
 
-fn a_U_X_X(pre : i32, p_indices : array<u32, 2u>, post : i32) -> vec4<i32> {
+fn a(pre : i32, p_indices : array<u32, 2u>, post : i32) -> vec4<i32> {
   return U[p_indices[0u]][p_indices[1u]];
 }
 
 fn b() {
   let v = first();
   let v_1 = second();
-  while((a_U_X_X(10i, array<u32, 2u>(u32(v), u32(v_1)), 20i).x < 4i)) {
+  while((a(10i, array<u32, 2u>(u32(v), u32(v_1)), 20i).x < 4i)) {
     let body = 1i;
   }
 }
 
-fn c_U() {
+fn c() {
   let v_2 = first();
   let v_3 = second();
-  while((a_U_X_X(10i, array<u32, 2u>(u32(v_2), u32(v_3)), 20i).x < 4i)) {
+  while((a(10i, array<u32, 2u>(u32(v_2), u32(v_3)), 20i).x < 4i)) {
     let body = 1i;
   }
 }
 
 fn d() {
-  c_U();
+  c();
 }
 )";
 
@@ -734,12 +734,12 @@
     auto* expect = R"(
 @group(0) @binding(0) var<uniform> U : i32;
 
-fn a_U(pre : i32, post : i32) -> i32 {
+fn a(pre : i32, post : i32) -> i32 {
   return U;
 }
 
 fn b() {
-  a_U(10i, 20i);
+  a(10i, 20i);
 }
 )";
 
@@ -765,13 +765,13 @@
     auto* expect = R"(
 @group(0) @binding(0) var<uniform> U : array<vec4<i32>, 8u>;
 
-fn a_U_X(pre : i32, p_indices : array<u32, 1u>, post : i32) -> vec4<i32> {
+fn a(pre : i32, p_indices : array<u32, 1u>, post : i32) -> vec4<i32> {
   return U[p_indices[0u]];
 }
 
 fn b() {
   let I = 3i;
-  a_U_X(10i, array<u32, 1u>(u32(I)), 20i);
+  a(10i, array<u32, 1u>(u32(I)), 20i);
 }
 )";
 
@@ -853,55 +853,55 @@
 
 @group(0) @binding(0) var<uniform> U : Outer;
 
-fn f0_U_mat_X(p_indices : array<u32, 1u>) -> f32 {
+fn f0(p_indices : array<u32, 1u>) -> f32 {
   return U.mat[p_indices[0u]].x;
 }
 
-fn f0_U_arr_X_mat_X(p_indices : array<u32, 2u>) -> f32 {
+fn f0_1(p_indices : array<u32, 2u>) -> f32 {
   return U.arr[p_indices[0u]].mat[p_indices[1u]].x;
 }
 
-fn f1_U_mat() -> f32 {
+fn f1() -> f32 {
   var res : f32;
-  let v = f0_U_mat_X(array<u32, 1u>(u32(1i)));
+  let v = f0(array<u32, 1u>(u32(1i)));
   res = (res + v);
-  let v_1 = f0_U_mat_X(array<u32, 1u>(u32(1i)));
+  let v_1 = f0(array<u32, 1u>(u32(1i)));
   res = (res + v_1);
-  let v_2 = f0_U_arr_X_mat_X(array<u32, 2u>(u32(2i), u32(1i)));
+  let v_2 = f0_1(array<u32, 2u>(u32(2i), u32(1i)));
   res = (res + v_2);
-  let v_3 = f0_U_arr_X_mat_X(array<u32, 2u>(u32(2i), u32(1i)));
+  let v_3 = f0_1(array<u32, 2u>(u32(2i), u32(1i)));
   res = (res + v_3);
   return res;
 }
 
-fn f1_U_arr_X_mat(p_indices : array<u32, 1u>) -> f32 {
+fn f1_1(p_indices : array<u32, 1u>) -> f32 {
   let v_4 = p_indices[0u];
   var res : f32;
-  let v_5 = f0_U_arr_X_mat_X(array<u32, 2u>(v_4, u32(1i)));
+  let v_5 = f0_1(array<u32, 2u>(v_4, u32(1i)));
   res = (res + v_5);
-  let v_6 = f0_U_arr_X_mat_X(array<u32, 2u>(v_4, u32(1i)));
+  let v_6 = f0_1(array<u32, 2u>(v_4, u32(1i)));
   res = (res + v_6);
-  let v_7 = f0_U_arr_X_mat_X(array<u32, 2u>(u32(2i), u32(1i)));
+  let v_7 = f0_1(array<u32, 2u>(u32(2i), u32(1i)));
   res = (res + v_7);
-  let v_8 = f0_U_arr_X_mat_X(array<u32, 2u>(u32(2i), u32(1i)));
+  let v_8 = f0_1(array<u32, 2u>(u32(2i), u32(1i)));
   res = (res + v_8);
   return res;
 }
 
-fn f2_U_arr_X(p_indices : array<u32, 1u>) -> f32 {
-  return f1_U_arr_X_mat(array<u32, 1u>(p_indices[0u]));
+fn f2(p_indices : array<u32, 1u>) -> f32 {
+  return f1_1(array<u32, 1u>(p_indices[0u]));
 }
 
-fn f3_U_arr_U_mat() -> f32 {
-  return (f2_U_arr_X(array<u32, 1u>(u32(3i))) + f1_U_mat());
+fn f3() -> f32 {
+  return (f2(array<u32, 1u>(u32(3i))) + f1());
 }
 
-fn f4_U() -> f32 {
-  return f3_U_arr_U_mat();
+fn f4() -> f32 {
+  return f3();
 }
 
 fn b() {
-  f4_U();
+  f4();
 }
 )";
 
@@ -943,12 +943,12 @@
 
 @group(0) @binding(0) var<storage, read> S : str;
 
-fn a_S_i(pre : i32, post : i32) -> i32 {
+fn a(pre : i32, post : i32) -> i32 {
   return S.i;
 }
 
 fn b() {
-  a_S_i(10i, 20i);
+  a(10i, 20i);
 }
 )";
 
@@ -981,12 +981,12 @@
 
 @group(0) @binding(0) var<storage, read_write> S : str;
 
-fn a_S_arr(pre : i32, post : i32) {
+fn a(pre : i32, post : i32) {
   S.arr = array<i32, 4u>();
 }
 
 fn b() {
-  a_S_arr(10i, 20i);
+  a(10i, 20i);
 }
 )";
 
@@ -1012,13 +1012,13 @@
     auto* expect = R"(
 @group(0) @binding(0) var<storage, read_write> S : array<vec4<i32>, 8u>;
 
-fn a_S_X(pre : i32, p_indices : array<u32, 1u>, post : i32) {
+fn a(pre : i32, p_indices : array<u32, 1u>, post : i32) {
   S[p_indices[0u]] = vec4<i32>();
 }
 
 fn b() {
   let I = 3i;
-  a_S_X(10i, array<u32, 1u>(u32(I)), 20i);
+  a(10i, array<u32, 1u>(u32(I)), 20i);
 }
 )";
 
@@ -1100,55 +1100,55 @@
 
 @group(0) @binding(0) var<storage, read> S : Outer;
 
-fn f0_S_mat_X(p_indices : array<u32, 1u>) -> f32 {
+fn f0(p_indices : array<u32, 1u>) -> f32 {
   return S.mat[p_indices[0u]].x;
 }
 
-fn f0_S_arr_X_mat_X(p_indices : array<u32, 2u>) -> f32 {
+fn f0_1(p_indices : array<u32, 2u>) -> f32 {
   return S.arr[p_indices[0u]].mat[p_indices[1u]].x;
 }
 
-fn f1_S_mat() -> f32 {
+fn f1() -> f32 {
   var res : f32;
-  let v = f0_S_mat_X(array<u32, 1u>(u32(1i)));
+  let v = f0(array<u32, 1u>(u32(1i)));
   res = (res + v);
-  let v_1 = f0_S_mat_X(array<u32, 1u>(u32(1i)));
+  let v_1 = f0(array<u32, 1u>(u32(1i)));
   res = (res + v_1);
-  let v_2 = f0_S_arr_X_mat_X(array<u32, 2u>(u32(2i), u32(1i)));
+  let v_2 = f0_1(array<u32, 2u>(u32(2i), u32(1i)));
   res = (res + v_2);
-  let v_3 = f0_S_arr_X_mat_X(array<u32, 2u>(u32(2i), u32(1i)));
+  let v_3 = f0_1(array<u32, 2u>(u32(2i), u32(1i)));
   res = (res + v_3);
   return res;
 }
 
-fn f1_S_arr_X_mat(p_indices : array<u32, 1u>) -> f32 {
+fn f1_1(p_indices : array<u32, 1u>) -> f32 {
   let v_4 = p_indices[0u];
   var res : f32;
-  let v_5 = f0_S_arr_X_mat_X(array<u32, 2u>(v_4, u32(1i)));
+  let v_5 = f0_1(array<u32, 2u>(v_4, u32(1i)));
   res = (res + v_5);
-  let v_6 = f0_S_arr_X_mat_X(array<u32, 2u>(v_4, u32(1i)));
+  let v_6 = f0_1(array<u32, 2u>(v_4, u32(1i)));
   res = (res + v_6);
-  let v_7 = f0_S_arr_X_mat_X(array<u32, 2u>(u32(2i), u32(1i)));
+  let v_7 = f0_1(array<u32, 2u>(u32(2i), u32(1i)));
   res = (res + v_7);
-  let v_8 = f0_S_arr_X_mat_X(array<u32, 2u>(u32(2i), u32(1i)));
+  let v_8 = f0_1(array<u32, 2u>(u32(2i), u32(1i)));
   res = (res + v_8);
   return res;
 }
 
-fn f2_S_arr_X(p_indices : array<u32, 1u>) -> f32 {
-  return f1_S_arr_X_mat(array<u32, 1u>(p_indices[0u]));
+fn f2(p_indices : array<u32, 1u>) -> f32 {
+  return f1_1(array<u32, 1u>(p_indices[0u]));
 }
 
-fn f3_S_arr_S_mat() -> f32 {
-  return (f2_S_arr_X(array<u32, 1u>(u32(3i))) + f1_S_mat());
+fn f3() -> f32 {
+  return (f2(array<u32, 1u>(u32(3i))) + f1());
 }
 
-fn f4_S() -> f32 {
-  return f3_S_arr_S_mat();
+fn f4() -> f32 {
+  return f3();
 }
 
 fn b() {
-  f4_S();
+  f4();
 }
 )";
 
@@ -1182,12 +1182,12 @@
     auto* expect = R"(
 var<workgroup> W : array<vec4<i32>, 8u>;
 
-fn a_W_X(pre : i32, p_indices : array<u32, 1u>, post : i32) -> vec4<i32> {
+fn a(pre : i32, p_indices : array<u32, 1u>, post : i32) -> vec4<i32> {
   return W[p_indices[0u]];
 }
 
 fn b() {
-  a_W_X(10i, array<u32, 1u>(u32(3i)), 20i);
+  a(10i, array<u32, 1u>(u32(3i)), 20i);
 }
 )";
 
@@ -1212,12 +1212,12 @@
     auto* expect = R"(
 var<workgroup> W : array<vec4<i32>, 8u>;
 
-fn a_W_X(pre : i32, p_indices : array<u32, 1u>, post : i32) {
+fn a(pre : i32, p_indices : array<u32, 1u>, post : i32) {
   W[p_indices[0u]] = vec4<i32>();
 }
 
 fn b() {
-  a_W_X(10i, array<u32, 1u>(u32(3i)), 20i);
+  a(10i, array<u32, 1u>(u32(3i)), 20i);
 }
 )";
 
@@ -1299,55 +1299,55 @@
 
 var<workgroup> W : Outer;
 
-fn f0_W_mat_X(p_indices : array<u32, 1u>) -> f32 {
+fn f0(p_indices : array<u32, 1u>) -> f32 {
   return W.mat[p_indices[0u]].x;
 }
 
-fn f0_W_arr_X_mat_X(p_indices : array<u32, 2u>) -> f32 {
+fn f0_1(p_indices : array<u32, 2u>) -> f32 {
   return W.arr[p_indices[0u]].mat[p_indices[1u]].x;
 }
 
-fn f1_W_mat() -> f32 {
+fn f1() -> f32 {
   var res : f32;
-  let v = f0_W_mat_X(array<u32, 1u>(u32(1i)));
+  let v = f0(array<u32, 1u>(u32(1i)));
   res = (res + v);
-  let v_1 = f0_W_mat_X(array<u32, 1u>(u32(1i)));
+  let v_1 = f0(array<u32, 1u>(u32(1i)));
   res = (res + v_1);
-  let v_2 = f0_W_arr_X_mat_X(array<u32, 2u>(u32(2i), u32(1i)));
+  let v_2 = f0_1(array<u32, 2u>(u32(2i), u32(1i)));
   res = (res + v_2);
-  let v_3 = f0_W_arr_X_mat_X(array<u32, 2u>(u32(2i), u32(1i)));
+  let v_3 = f0_1(array<u32, 2u>(u32(2i), u32(1i)));
   res = (res + v_3);
   return res;
 }
 
-fn f1_W_arr_X_mat(p_indices : array<u32, 1u>) -> f32 {
+fn f1_1(p_indices : array<u32, 1u>) -> f32 {
   let v_4 = p_indices[0u];
   var res : f32;
-  let v_5 = f0_W_arr_X_mat_X(array<u32, 2u>(v_4, u32(1i)));
+  let v_5 = f0_1(array<u32, 2u>(v_4, u32(1i)));
   res = (res + v_5);
-  let v_6 = f0_W_arr_X_mat_X(array<u32, 2u>(v_4, u32(1i)));
+  let v_6 = f0_1(array<u32, 2u>(v_4, u32(1i)));
   res = (res + v_6);
-  let v_7 = f0_W_arr_X_mat_X(array<u32, 2u>(u32(2i), u32(1i)));
+  let v_7 = f0_1(array<u32, 2u>(u32(2i), u32(1i)));
   res = (res + v_7);
-  let v_8 = f0_W_arr_X_mat_X(array<u32, 2u>(u32(2i), u32(1i)));
+  let v_8 = f0_1(array<u32, 2u>(u32(2i), u32(1i)));
   res = (res + v_8);
   return res;
 }
 
-fn f2_W_arr_X(p_indices : array<u32, 1u>) -> f32 {
-  return f1_W_arr_X_mat(array<u32, 1u>(p_indices[0u]));
+fn f2(p_indices : array<u32, 1u>) -> f32 {
+  return f1_1(array<u32, 1u>(p_indices[0u]));
 }
 
-fn f3_W_arr_W_mat() -> f32 {
-  return (f2_W_arr_X(array<u32, 1u>(u32(3i))) + f1_W_mat());
+fn f3() -> f32 {
+  return (f2(array<u32, 1u>(u32(3i))) + f1());
 }
 
-fn f4_W() -> f32 {
-  return f3_W_arr_W_mat();
+fn f4() -> f32 {
+  return f3();
 }
 
 fn b() {
-  f4_W();
+  f4();
 }
 )";
 
@@ -1381,12 +1381,12 @@
     auto* expect = R"(
 var<private> P : i32;
 
-fn a_P(pre : i32, post : i32) -> i32 {
+fn a(pre : i32, post : i32) -> i32 {
   return P;
 }
 
 fn b() {
-  a_P(10i, 20i);
+  a(10i, 20i);
 }
 )";
 
@@ -1411,12 +1411,12 @@
     auto* expect = R"(
 var<private> P : i32;
 
-fn a_P(pre : i32, post : i32) {
+fn a(pre : i32, post : i32) {
   P = 42i;
 }
 
 fn b() {
-  a_P(10i, 20i);
+  a(10i, 20i);
 }
 )";
 
@@ -1449,12 +1449,12 @@
 
 var<private> P : str;
 
-fn a_P_i(pre : i32, post : i32) -> i32 {
+fn a(pre : i32, post : i32) -> i32 {
   return P.i;
 }
 
 fn b() {
-  a_P_i(10i, 20i);
+  a(10i, 20i);
 }
 )";
 
@@ -1514,12 +1514,12 @@
 
 var<private> P : str;
 
-fn a_P_arr(pre : i32, post : i32) {
+fn a(pre : i32, post : i32) {
   P.arr = array<i32, 4u>();
 }
 
 fn b() {
-  a_P_arr(10i, 20i);
+  a(10i, 20i);
 }
 )";
 
@@ -1587,22 +1587,22 @@
 
 var<private> Pa : array<i32, 4u>;
 
-fn a_Pi(pre : i32, post : i32) -> i32 {
+fn a(pre : i32, post : i32) -> i32 {
   return Pi;
 }
 
-fn a_Ps_i(pre : i32, post : i32) -> i32 {
+fn a_1(pre : i32, post : i32) -> i32 {
   return Ps.i;
 }
 
-fn a_Pa_X(pre : i32, p_indices : array<u32, 1u>, post : i32) -> i32 {
+fn a_2(pre : i32, p_indices : array<u32, 1u>, post : i32) -> i32 {
   return Pa[p_indices[0u]];
 }
 
 fn b() {
-  a_Pi(10i, 20i);
-  a_Ps_i(30i, 40i);
-  a_Pa_X(50i, array<u32, 1u>(u32(2i)), 60i);
+  a(10i, 20i);
+  a_1(30i, 40i);
+  a_2(50i, array<u32, 1u>(u32(2i)), 60i);
 }
 )";
 
@@ -1717,55 +1717,55 @@
 
 var<private> P : Outer;
 
-fn f0_P_mat_X(p_indices : array<u32, 1u>) -> f32 {
+fn f0(p_indices : array<u32, 1u>) -> f32 {
   return P.mat[p_indices[0u]].x;
 }
 
-fn f0_P_arr_X_mat_X(p_indices : array<u32, 2u>) -> f32 {
+fn f0_1(p_indices : array<u32, 2u>) -> f32 {
   return P.arr[p_indices[0u]].mat[p_indices[1u]].x;
 }
 
-fn f1_P_mat() -> f32 {
+fn f1() -> f32 {
   var res : f32;
-  let v = f0_P_mat_X(array<u32, 1u>(u32(1i)));
+  let v = f0(array<u32, 1u>(u32(1i)));
   res = (res + v);
-  let v_1 = f0_P_mat_X(array<u32, 1u>(u32(1i)));
+  let v_1 = f0(array<u32, 1u>(u32(1i)));
   res = (res + v_1);
-  let v_2 = f0_P_arr_X_mat_X(array<u32, 2u>(u32(2i), u32(1i)));
+  let v_2 = f0_1(array<u32, 2u>(u32(2i), u32(1i)));
   res = (res + v_2);
-  let v_3 = f0_P_arr_X_mat_X(array<u32, 2u>(u32(2i), u32(1i)));
+  let v_3 = f0_1(array<u32, 2u>(u32(2i), u32(1i)));
   res = (res + v_3);
   return res;
 }
 
-fn f1_P_arr_X_mat(p_indices : array<u32, 1u>) -> f32 {
+fn f1_1(p_indices : array<u32, 1u>) -> f32 {
   let v_4 = p_indices[0u];
   var res : f32;
-  let v_5 = f0_P_arr_X_mat_X(array<u32, 2u>(v_4, u32(1i)));
+  let v_5 = f0_1(array<u32, 2u>(v_4, u32(1i)));
   res = (res + v_5);
-  let v_6 = f0_P_arr_X_mat_X(array<u32, 2u>(v_4, u32(1i)));
+  let v_6 = f0_1(array<u32, 2u>(v_4, u32(1i)));
   res = (res + v_6);
-  let v_7 = f0_P_arr_X_mat_X(array<u32, 2u>(u32(2i), u32(1i)));
+  let v_7 = f0_1(array<u32, 2u>(u32(2i), u32(1i)));
   res = (res + v_7);
-  let v_8 = f0_P_arr_X_mat_X(array<u32, 2u>(u32(2i), u32(1i)));
+  let v_8 = f0_1(array<u32, 2u>(u32(2i), u32(1i)));
   res = (res + v_8);
   return res;
 }
 
-fn f2_P_arr_X(p_indices : array<u32, 1u>) -> f32 {
-  return f1_P_arr_X_mat(array<u32, 1u>(p_indices[0u]));
+fn f2(p_indices : array<u32, 1u>) -> f32 {
+  return f1_1(array<u32, 1u>(p_indices[0u]));
 }
 
-fn f3_P_arr_P_mat() -> f32 {
-  return (f2_P_arr_X(array<u32, 1u>(u32(3i))) + f1_P_mat());
+fn f3() -> f32 {
+  return (f2(array<u32, 1u>(u32(3i))) + f1());
 }
 
-fn f4_P() -> f32 {
-  return f3_P_arr_P_mat();
+fn f4() -> f32 {
+  return f3();
 }
 
 fn b() {
-  f4_P();
+  f4();
 }
 )";
 
@@ -1873,13 +1873,13 @@
 )";
 
     auto* expect = R"(
-fn a_P(pre : i32, p_root : ptr<function, i32>, post : i32) -> i32 {
+fn a(pre : i32, p_root : ptr<function, i32>, post : i32) -> i32 {
   return *(p_root);
 }
 
 fn b() {
   var F : i32;
-  a_P(10i, &(F), 20i);
+  a(10i, &(F), 20i);
 }
 )";
 
@@ -1901,13 +1901,13 @@
 )";
 
     auto* expect = R"(
-fn a_P(pre : i32, p_root : ptr<function, i32>, post : i32) {
+fn a(pre : i32, p_root : ptr<function, i32>, post : i32) {
   *(p_root) = 42i;
 }
 
 fn b() {
   var F : i32;
-  a_P(10i, &(F), 20i);
+  a(10i, &(F), 20i);
 }
 )";
 
@@ -1937,13 +1937,13 @@
   i : i32,
 }
 
-fn a_P_i(pre : i32, p_root : ptr<function, str>, post : i32) -> i32 {
+fn a(pre : i32, p_root : ptr<function, str>, post : i32) -> i32 {
   return (*(p_root)).i;
 }
 
 fn b() {
   var F : str;
-  a_P_i(10i, &(F), 20i);
+  a(10i, &(F), 20i);
 }
 )";
 
@@ -1973,13 +1973,13 @@
   arr : array<i32, 4u>,
 }
 
-fn a_P_arr(pre : i32, p_root : ptr<function, str>, post : i32) {
+fn a(pre : i32, p_root : ptr<function, str>, post : i32) {
   (*(p_root)).arr = array<i32, 4u>();
 }
 
 fn b() {
   var F : str;
-  a_P_arr(10i, &(F), 20i);
+  a(10i, &(F), 20i);
 }
 )";
 
@@ -2010,7 +2010,7 @@
 )";
 
     auto* expect = R"(
-fn a_P(pre : i32, p_root : ptr<function, i32>, post : i32) -> i32 {
+fn a(pre : i32, p_root : ptr<function, i32>, post : i32) -> i32 {
   return *(p_root);
 }
 
@@ -2018,11 +2018,11 @@
   i : i32,
 }
 
-fn a_P_i(pre : i32, p_root : ptr<function, str>, post : i32) -> i32 {
+fn a_1(pre : i32, p_root : ptr<function, str>, post : i32) -> i32 {
   return (*(p_root)).i;
 }
 
-fn a_P_X(pre : i32, p_root : ptr<function, array<i32, 4u>>, p_indices : array<u32, 1u>, post : i32) -> i32 {
+fn a_2(pre : i32, p_root : ptr<function, array<i32, 4u>>, p_indices : array<u32, 1u>, post : i32) -> i32 {
   return (*(p_root))[p_indices[0u]];
 }
 
@@ -2030,9 +2030,9 @@
   var Fi : i32;
   var Fs : str;
   var Fa : array<i32, 4u>;
-  a_P(10i, &(Fi), 20i);
-  a_P_i(30i, &(Fs), 40i);
-  a_P_X(50i, &(Fa), array<u32, 1u>(u32(2i)), 60i);
+  a(10i, &(Fi), 20i);
+  a_1(30i, &(Fs), 40i);
+  a_2(50i, &(Fa), array<u32, 1u>(u32(2i)), 60i);
 }
 )";
 
@@ -2118,12 +2118,12 @@
     auto* expect = R"(
 @group(0) @binding(0) var<storage, read> S : array<f32>;
 
-fn len_S() -> u32 {
+fn len() -> u32 {
   return arrayLength(&(S));
 }
 
 fn f() {
-  let n = len_S();
+  let n = len();
 }
 )";
 
@@ -2148,12 +2148,12 @@
     auto* expect = R"(
 var<workgroup> W : f32;
 
-fn load_W() -> f32 {
+fn load() -> f32 {
   return workgroupUniformLoad(&(W));
 }
 
 fn f() {
-  let v = load_W();
+  let v = load();
 }
 )";
 
@@ -2269,84 +2269,84 @@
 
 var<workgroup> W_arr_arr : array<array<vec4<i32>, 8u>, 4u>;
 
-fn fn_u_U() -> vec4<i32> {
+fn fn_u() -> vec4<i32> {
   return U;
 }
 
-fn fn_u_U_str_i() -> vec4<i32> {
+fn fn_u_1() -> vec4<i32> {
   return U_str.i;
 }
 
-fn fn_u_U_arr_X(p_indices : array<u32, 1u>) -> vec4<i32> {
+fn fn_u_2(p_indices : array<u32, 1u>) -> vec4<i32> {
   return U_arr[p_indices[0u]];
 }
 
-fn fn_u_U_arr_arr_X_X(p_indices : array<u32, 2u>) -> vec4<i32> {
+fn fn_u_3(p_indices : array<u32, 2u>) -> vec4<i32> {
   return U_arr_arr[p_indices[0u]][p_indices[1u]];
 }
 
-fn fn_s_S() -> vec4<i32> {
+fn fn_s() -> vec4<i32> {
   return S;
 }
 
-fn fn_s_S_str_i() -> vec4<i32> {
+fn fn_s_1() -> vec4<i32> {
   return S_str.i;
 }
 
-fn fn_s_S_arr_X(p_indices : array<u32, 1u>) -> vec4<i32> {
+fn fn_s_2(p_indices : array<u32, 1u>) -> vec4<i32> {
   return S_arr[p_indices[0u]];
 }
 
-fn fn_s_S_arr_arr_X_X(p_indices : array<u32, 2u>) -> vec4<i32> {
+fn fn_s_3(p_indices : array<u32, 2u>) -> vec4<i32> {
   return S_arr_arr[p_indices[0u]][p_indices[1u]];
 }
 
-fn fn_w_W() -> vec4<i32> {
+fn fn_w() -> vec4<i32> {
   return W;
 }
 
-fn fn_w_W_str_i() -> vec4<i32> {
+fn fn_w_1() -> vec4<i32> {
   return W_str.i;
 }
 
-fn fn_w_W_arr_X(p_indices : array<u32, 1u>) -> vec4<i32> {
+fn fn_w_2(p_indices : array<u32, 1u>) -> vec4<i32> {
   return W_arr[p_indices[0u]];
 }
 
-fn fn_w_W_arr_arr_X_X(p_indices : array<u32, 2u>) -> vec4<i32> {
+fn fn_w_3(p_indices : array<u32, 2u>) -> vec4<i32> {
   return W_arr_arr[p_indices[0u]][p_indices[1u]];
 }
 
 fn b() {
   let I = 3i;
   let J = 4i;
-  let u = fn_u_U();
-  let u_str = fn_u_U_str_i();
-  let u_arr0 = fn_u_U_arr_X(array<u32, 1u>(u32(0i)));
-  let u_arr1 = fn_u_U_arr_X(array<u32, 1u>(u32(1i)));
-  let u_arrI = fn_u_U_arr_X(array<u32, 1u>(u32(I)));
-  let u_arr1_arr0 = fn_u_U_arr_arr_X_X(array<u32, 2u>(u32(1i), u32(0i)));
-  let u_arr2_arrI = fn_u_U_arr_arr_X_X(array<u32, 2u>(u32(2i), u32(I)));
-  let u_arrI_arr2 = fn_u_U_arr_arr_X_X(array<u32, 2u>(u32(I), u32(2i)));
-  let u_arrI_arrJ = fn_u_U_arr_arr_X_X(array<u32, 2u>(u32(I), u32(J)));
-  let s = fn_s_S();
-  let s_str = fn_s_S_str_i();
-  let s_arr0 = fn_s_S_arr_X(array<u32, 1u>(u32(0i)));
-  let s_arr1 = fn_s_S_arr_X(array<u32, 1u>(u32(1i)));
-  let s_arrI = fn_s_S_arr_X(array<u32, 1u>(u32(I)));
-  let s_arr1_arr0 = fn_s_S_arr_arr_X_X(array<u32, 2u>(u32(1i), u32(0i)));
-  let s_arr2_arrI = fn_s_S_arr_arr_X_X(array<u32, 2u>(u32(2i), u32(I)));
-  let s_arrI_arr2 = fn_s_S_arr_arr_X_X(array<u32, 2u>(u32(I), u32(2i)));
-  let s_arrI_arrJ = fn_s_S_arr_arr_X_X(array<u32, 2u>(u32(I), u32(J)));
-  let w = fn_w_W();
-  let w_str = fn_w_W_str_i();
-  let w_arr0 = fn_w_W_arr_X(array<u32, 1u>(u32(0i)));
-  let w_arr1 = fn_w_W_arr_X(array<u32, 1u>(u32(1i)));
-  let w_arrI = fn_w_W_arr_X(array<u32, 1u>(u32(I)));
-  let w_arr1_arr0 = fn_w_W_arr_arr_X_X(array<u32, 2u>(u32(1i), u32(0i)));
-  let w_arr2_arrI = fn_w_W_arr_arr_X_X(array<u32, 2u>(u32(2i), u32(I)));
-  let w_arrI_arr2 = fn_w_W_arr_arr_X_X(array<u32, 2u>(u32(I), u32(2i)));
-  let w_arrI_arrJ = fn_w_W_arr_arr_X_X(array<u32, 2u>(u32(I), u32(J)));
+  let u = fn_u();
+  let u_str = fn_u_1();
+  let u_arr0 = fn_u_2(array<u32, 1u>(u32(0i)));
+  let u_arr1 = fn_u_2(array<u32, 1u>(u32(1i)));
+  let u_arrI = fn_u_2(array<u32, 1u>(u32(I)));
+  let u_arr1_arr0 = fn_u_3(array<u32, 2u>(u32(1i), u32(0i)));
+  let u_arr2_arrI = fn_u_3(array<u32, 2u>(u32(2i), u32(I)));
+  let u_arrI_arr2 = fn_u_3(array<u32, 2u>(u32(I), u32(2i)));
+  let u_arrI_arrJ = fn_u_3(array<u32, 2u>(u32(I), u32(J)));
+  let s = fn_s();
+  let s_str = fn_s_1();
+  let s_arr0 = fn_s_2(array<u32, 1u>(u32(0i)));
+  let s_arr1 = fn_s_2(array<u32, 1u>(u32(1i)));
+  let s_arrI = fn_s_2(array<u32, 1u>(u32(I)));
+  let s_arr1_arr0 = fn_s_3(array<u32, 2u>(u32(1i), u32(0i)));
+  let s_arr2_arrI = fn_s_3(array<u32, 2u>(u32(2i), u32(I)));
+  let s_arrI_arr2 = fn_s_3(array<u32, 2u>(u32(I), u32(2i)));
+  let s_arrI_arrJ = fn_s_3(array<u32, 2u>(u32(I), u32(J)));
+  let w = fn_w();
+  let w_str = fn_w_1();
+  let w_arr0 = fn_w_2(array<u32, 1u>(u32(0i)));
+  let w_arr1 = fn_w_2(array<u32, 1u>(u32(1i)));
+  let w_arrI = fn_w_2(array<u32, 1u>(u32(I)));
+  let w_arr1_arr0 = fn_w_3(array<u32, 2u>(u32(1i), u32(0i)));
+  let w_arr2_arrI = fn_w_3(array<u32, 2u>(u32(2i), u32(I)));
+  let w_arrI_arr2 = fn_w_3(array<u32, 2u>(u32(I), u32(2i)));
+  let w_arrI_arrJ = fn_w_3(array<u32, 2u>(u32(I), u32(J)));
 }
 )";
 
@@ -2379,13 +2379,13 @@
   return i;
 }
 
-fn b_S_X(p_indices : array<u32, 1u>) -> i32 {
+fn b(p_indices : array<u32, 1u>) -> i32 {
   let v = &(S[p_indices[0u]]);
   return (*(v))[a((*(v))[0i][1i][2i])][a((*(v))[a(3i)][4i][5i])][a((*(v))[6i][a(7i)][8i])];
 }
 
 fn c() {
-  let v = b_S_X(array<u32, 1u>(u32(42i)));
+  let v = b(array<u32, 1u>(u32(42i)));
 }
 )";
 
@@ -2416,19 +2416,19 @@
     auto* expect = R"(
 @group(0) @binding(0) var<storage, read> S : array<array<array<array<i32, 9u>, 9u>, 9u>, 50u>;
 
-fn a_S_X_X_X_X(pre : i32, i_indices : array<u32, 4u>, post : i32) -> i32 {
+fn a(pre : i32, i_indices : array<u32, 4u>, post : i32) -> i32 {
   return S[i_indices[0u]][i_indices[1u]][i_indices[2u]][i_indices[3u]];
 }
 
-fn b_S_X(p_indices : array<u32, 1u>) -> i32 {
+fn b(p_indices : array<u32, 1u>) -> i32 {
   let v = p_indices[0u];
-  let v_1 = a_S_X_X_X_X(20i, array<u32, 4u>(v, u32(0i), u32(1i), u32(2i)), 30i);
-  let v_2 = a_S_X_X_X_X(40i, array<u32, 4u>(v, u32(3i), u32(4i), u32(5i)), 50i);
-  return a_S_X_X_X_X(10i, array<u32, 4u>(v, u32(v_1), u32(v_2), u32(a_S_X_X_X_X(60i, array<u32, 4u>(v, u32(6i), u32(7i), u32(8i)), 70i))), 80i);
+  let v_1 = a(20i, array<u32, 4u>(v, u32(0i), u32(1i), u32(2i)), 30i);
+  let v_2 = a(40i, array<u32, 4u>(v, u32(3i), u32(4i), u32(5i)), 50i);
+  return a(10i, array<u32, 4u>(v, u32(v_1), u32(v_2), u32(a(60i, array<u32, 4u>(v, u32(6i), u32(7i), u32(8i)), 70i))), 80i);
 }
 
 fn c() {
-  let v = b_S_X(array<u32, 1u>(u32(42i)));
+  let v = b(array<u32, 1u>(u32(42i)));
 }
 )";
 
@@ -2464,13 +2464,13 @@
   return i;
 }
 
-fn b_S_X_U_X(s_indices : array<u32, 1u>, u_indices : array<u32, 1u>) -> i32 {
+fn b(s_indices : array<u32, 1u>, u_indices : array<u32, 1u>) -> i32 {
   let v = &(U[u_indices[0u]]);
   return S[s_indices[0u]][a((*(v))[0i][1i].x)][a((*(v))[a(3i)][4i].y)];
 }
 
 fn c() {
-  let v = b_S_X_U_X(array<u32, 1u>(u32(42i)), array<u32, 1u>(u32(24i)));
+  let v = b(array<u32, 1u>(u32(42i)), array<u32, 1u>(u32(24i)));
 }
 )";