aboutsummaryrefslogtreecommitdiff
path: root/src/codegen/c.zig
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2023-09-24 14:37:36 -0700
committerAndrew Kelley <andrew@ziglang.org>2023-09-24 14:37:36 -0700
commitc08c0fc6eddf601785abfbc5e5a9ab5c89d7cfbf (patch)
tree65cabc6acd2db112c1fa9557c2f34dfd04659113 /src/codegen/c.zig
parenta7088fd9a3edb037f0f51bb402a3c557334634f3 (diff)
downloadzig-c08c0fc6eddf601785abfbc5e5a9ab5c89d7cfbf.tar.gz
zig-c08c0fc6eddf601785abfbc5e5a9ab5c89d7cfbf.zip
revert "compiler: packed structs cache bit offsets"
This is mostly a revert of a7088fd9a3edb037f0f51bb402a3c557334634f3. Measurement revealed the commit actually regressed performance.
Diffstat (limited to 'src/codegen/c.zig')
-rw-r--r--src/codegen/c.zig2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/codegen/c.zig b/src/codegen/c.zig
index ff472f7375..54e13db9a1 100644
--- a/src/codegen/c.zig
+++ b/src/codegen/c.zig
@@ -5429,7 +5429,7 @@ fn airStructFieldVal(f: *Function, inst: Air.Inst.Index) !CValue {
const bit_offset_ty = try mod.intType(.unsigned, Type.smallestUnsignedBits(int_info.bits - 1));
- const bit_offset = struct_type.fieldBitOffset(ip, extra.field_index);
+ const bit_offset = mod.structPackedFieldBitOffset(struct_type, extra.field_index);
const bit_offset_val = try mod.intValue(bit_offset_ty, bit_offset);
const field_int_signedness = if (inst_ty.isAbiInt(mod))