authorgravatar for liljaanton2001@gmail.comantlilja <liljaanton2001@gmail.com> 2024-02-23 03:12:54+01:00
committergravatar for liljaanton2001@gmail.comantlilja <liljaanton2001@gmail.com> 2024-02-23 03:12:54+01:00
logdfde194287b7afa66a14804fdbc43211ce52e2f7
tree856c723121d0348ab8f5fa87a537d68e582cd30c
parent0ba2185a4233f1717497c03bcc93e806eb111492

LLVM Builder: Make some Metadata no longer be distinct


2 files changed, 24 insertions(+), 24 deletions(-)

src/codegen/llvm/Builder.zig+14-14
......@@ -12284,7 +12284,7 @@ fn debugFileAssumeCapacity(
1228412284 directory: MetadataString,
1228512285) Metadata {
1228612286 assert(!self.strip);
12287 return self.metadataDistinctAssumeCapacity(.file, Metadata.File{
12287 return self.metadataSimpleAssumeCapacity(.file, Metadata.File{
1228812288 .filename = filename,
1228912289 .directory = directory,
1229012290 });
......@@ -12338,7 +12338,7 @@ fn debugSubprogramAssumeCapacity(
1233812338
1233912339fn debugLexicalBlockAssumeCapacity(self: *Builder, scope: Metadata, file: Metadata, line: u32, column: u32) Metadata {
1234012340 assert(!self.strip);
12341 return self.metadataDistinctAssumeCapacity(.lexical_block, Metadata.LexicalBlock{
12341 return self.metadataSimpleAssumeCapacity(.lexical_block, Metadata.LexicalBlock{
1234212342 .scope = scope,
1234312343 .file = file,
1234412344 .line = line,
......@@ -12358,7 +12358,7 @@ fn debugLocationAssumeCapacity(self: *Builder, line: u32, column: u32, scope: Me
1235812358
1235912359fn debugBoolTypeAssumeCapacity(self: *Builder, name: MetadataString, size_in_bits: u64) Metadata {
1236012360 assert(!self.strip);
12361 return self.metadataDistinctAssumeCapacity(.basic_bool_type, Metadata.BasicType{
12361 return self.metadataSimpleAssumeCapacity(.basic_bool_type, Metadata.BasicType{
1236212362 .name = name,
1236312363 .size_in_bits_lo = @truncate(size_in_bits),
1236412364 .size_in_bits_hi = @truncate(size_in_bits >> 32),
......@@ -12367,7 +12367,7 @@ fn debugBoolTypeAssumeCapacity(self: *Builder, name: MetadataString, size_in_bit
1236712367
1236812368fn debugUnsignedTypeAssumeCapacity(self: *Builder, name: MetadataString, size_in_bits: u64) Metadata {
1236912369 assert(!self.strip);
12370 return self.metadataDistinctAssumeCapacity(.basic_unsigned_type, Metadata.BasicType{
12370 return self.metadataSimpleAssumeCapacity(.basic_unsigned_type, Metadata.BasicType{
1237112371 .name = name,
1237212372 .size_in_bits_lo = @truncate(size_in_bits),
1237312373 .size_in_bits_hi = @truncate(size_in_bits >> 32),
......@@ -12376,7 +12376,7 @@ fn debugUnsignedTypeAssumeCapacity(self: *Builder, name: MetadataString, size_in
1237612376
1237712377fn debugSignedTypeAssumeCapacity(self: *Builder, name: MetadataString, size_in_bits: u64) Metadata {
1237812378 assert(!self.strip);
12379 return self.metadataDistinctAssumeCapacity(.basic_signed_type, Metadata.BasicType{
12379 return self.metadataSimpleAssumeCapacity(.basic_signed_type, Metadata.BasicType{
1238012380 .name = name,
1238112381 .size_in_bits_lo = @truncate(size_in_bits),
1238212382 .size_in_bits_hi = @truncate(size_in_bits >> 32),
......@@ -12385,7 +12385,7 @@ fn debugSignedTypeAssumeCapacity(self: *Builder, name: MetadataString, size_in_b
1238512385
1238612386fn debugFloatTypeAssumeCapacity(self: *Builder, name: MetadataString, size_in_bits: u64) Metadata {
1238712387 assert(!self.strip);
12388 return self.metadataDistinctAssumeCapacity(.basic_float_type, Metadata.BasicType{
12388 return self.metadataSimpleAssumeCapacity(.basic_float_type, Metadata.BasicType{
1238912389 .name = name,
1239012390 .size_in_bits_lo = @truncate(size_in_bits),
1239112391 .size_in_bits_hi = @truncate(size_in_bits >> 32),
......@@ -12537,7 +12537,7 @@ fn debugCompositeTypeAssumeCapacity(
1253712537 fields_tuple: Metadata,
1253812538) Metadata {
1253912539 assert(!self.strip);
12540 return self.metadataDistinctAssumeCapacity(tag, Metadata.CompositeType{
12540 return self.metadataSimpleAssumeCapacity(tag, Metadata.CompositeType{
1254112541 .name = name,
1254212542 .file = file,
1254312543 .scope = scope,
......@@ -12563,7 +12563,7 @@ fn debugPointerTypeAssumeCapacity(
1256312563 offset_in_bits: u64,
1256412564) Metadata {
1256512565 assert(!self.strip);
12566 return self.metadataDistinctAssumeCapacity(.derived_pointer_type, Metadata.DerivedType{
12566 return self.metadataSimpleAssumeCapacity(.derived_pointer_type, Metadata.DerivedType{
1256712567 .name = name,
1256812568 .file = file,
1256912569 .scope = scope,
......@@ -12590,7 +12590,7 @@ fn debugMemberTypeAssumeCapacity(
1259012590 offset_in_bits: u64,
1259112591) Metadata {
1259212592 assert(!self.strip);
12593 return self.metadataDistinctAssumeCapacity(.derived_member_type, Metadata.DerivedType{
12593 return self.metadataSimpleAssumeCapacity(.derived_member_type, Metadata.DerivedType{
1259412594 .name = name,
1259512595 .file = file,
1259612596 .scope = scope,
......@@ -12610,7 +12610,7 @@ fn debugSubroutineTypeAssumeCapacity(
1261012610 types_tuple: Metadata,
1261112611) Metadata {
1261212612 assert(!self.strip);
12613 return self.metadataDistinctAssumeCapacity(.subroutine_type, Metadata.SubroutineType{
12613 return self.metadataSimpleAssumeCapacity(.subroutine_type, Metadata.SubroutineType{
1261412614 .types_tuple = types_tuple,
1261512615 });
1261612616}
......@@ -12674,7 +12674,7 @@ fn debugSubrangeAssumeCapacity(
1267412674 count: Metadata,
1267512675) Metadata {
1267612676 assert(!self.strip);
12677 return self.metadataDistinctAssumeCapacity(.subrange, Metadata.Subrange{
12677 return self.metadataSimpleAssumeCapacity(.subrange, Metadata.Subrange{
1267812678 .lower_bound = lower_bound,
1267912679 .count = count,
1268012680 });
......@@ -12797,7 +12797,7 @@ fn debugLocalVarAssumeCapacity(
1279712797 ty: Metadata,
1279812798) Metadata {
1279912799 assert(!self.strip);
12800 return self.metadataDistinctAssumeCapacity(.local_var, Metadata.LocalVar{
12800 return self.metadataSimpleAssumeCapacity(.local_var, Metadata.LocalVar{
1280112801 .name = name,
1280212802 .file = file,
1280312803 .scope = scope,
......@@ -12816,7 +12816,7 @@ fn debugParameterAssumeCapacity(
1281612816 arg_no: u32,
1281712817) Metadata {
1281812818 assert(!self.strip);
12819 return self.metadataDistinctAssumeCapacity(.parameter, Metadata.Parameter{
12819 return self.metadataSimpleAssumeCapacity(.parameter, Metadata.Parameter{
1282012820 .name = name,
1282112821 .file = file,
1282212822 .scope = scope,
......@@ -12858,7 +12858,7 @@ fn debugGlobalVarExpressionAssumeCapacity(
1285812858 expression: Metadata,
1285912859) Metadata {
1286012860 assert(!self.strip);
12861 return self.metadataDistinctAssumeCapacity(.global_var_expression, Metadata.GlobalVarExpression{
12861 return self.metadataSimpleAssumeCapacity(.global_var_expression, Metadata.GlobalVarExpression{
1286212862 .variable = variable,
1286312863 .expression = expression,
1286412864 });
src/codegen/llvm/ir.zig+10-10
......@@ -658,7 +658,7 @@ pub const MetadataBlock = struct {
658658 pub const File = struct {
659659 pub const ops = [_]AbbrevOp{
660660 .{ .literal = 16 },
661 .{ .literal = 1 }, // is distinct
661 .{ .literal = 0 }, // is distinct
662662 MetadataAbbrev, // filename
663663 MetadataAbbrev, // directory
664664 .{ .literal = 0 }, // checksum
......@@ -743,7 +743,7 @@ pub const MetadataBlock = struct {
743743 pub const LexicalBlock = struct {
744744 pub const ops = [_]AbbrevOp{
745745 .{ .literal = 22 },
746 .{ .literal = 1 }, // is distinct
746 .{ .literal = 0 }, // is distinct
747747 MetadataAbbrev, // scope
748748 MetadataAbbrev, // file
749749 LineAbbrev, // line
......@@ -776,7 +776,7 @@ pub const MetadataBlock = struct {
776776 pub const BasicType = struct {
777777 pub const ops = [_]AbbrevOp{
778778 .{ .literal = 15 },
779 .{ .literal = 1 }, // is distinct
779 .{ .literal = 0 }, // is distinct
780780 .{ .literal = std.dwarf.TAG.base_type }, // tag
781781 MetadataAbbrev, // name
782782 .{ .vbr = 6 }, // size in bits
......@@ -793,7 +793,7 @@ pub const MetadataBlock = struct {
793793 pub const CompositeType = struct {
794794 pub const ops = [_]AbbrevOp{
795795 .{ .literal = 18 },
796 .{ .literal = 1 | 0x2 }, // is distinct | is not used in old type ref
796 .{ .literal = 0 | 0x2 }, // is distinct | is not used in old type ref
797797 .{ .fixed = 32 }, // tag
798798 MetadataAbbrev, // name
799799 MetadataAbbrev, // file
......@@ -832,7 +832,7 @@ pub const MetadataBlock = struct {
832832 pub const DerivedType = struct {
833833 pub const ops = [_]AbbrevOp{
834834 .{ .literal = 17 },
835 .{ .literal = 1 }, // is distinct
835 .{ .literal = 0 }, // is distinct
836836 .{ .fixed = 32 }, // tag
837837 MetadataAbbrev, // name
838838 MetadataAbbrev, // file
......@@ -860,7 +860,7 @@ pub const MetadataBlock = struct {
860860 pub const SubroutineType = struct {
861861 pub const ops = [_]AbbrevOp{
862862 .{ .literal = 19 },
863 .{ .literal = 1 | 0x2 }, // is distinct | has no old type refs
863 .{ .literal = 0 | 0x2 }, // is distinct | has no old type refs
864864 .{ .literal = 0 }, // flags
865865 MetadataAbbrev, // types
866866 .{ .literal = 0 }, // cc
......@@ -895,7 +895,7 @@ pub const MetadataBlock = struct {
895895 pub const Subrange = struct {
896896 pub const ops = [_]AbbrevOp{
897897 .{ .literal = 13 },
898 .{ .literal = 0b11 }, // is distinct | version
898 .{ .literal = 0b10 }, // is distinct | version
899899 MetadataAbbrev, // count
900900 MetadataAbbrev, // lower bound
901901 .{ .literal = 0 }, // upper bound
......@@ -928,7 +928,7 @@ pub const MetadataBlock = struct {
928928 pub const LocalVar = struct {
929929 pub const ops = [_]AbbrevOp{
930930 .{ .literal = 28 },
931 .{ .literal = 0b11 }, // is distinct | has alignment
931 .{ .literal = 0b10 }, // is distinct | has alignment
932932 MetadataAbbrev, // scope
933933 MetadataAbbrev, // name
934934 MetadataAbbrev, // file
......@@ -950,7 +950,7 @@ pub const MetadataBlock = struct {
950950 pub const Parameter = struct {
951951 pub const ops = [_]AbbrevOp{
952952 .{ .literal = 28 },
953 .{ .literal = 0b11 }, // is distinct | has alignment
953 .{ .literal = 0b10 }, // is distinct | has alignment
954954 MetadataAbbrev, // scope
955955 MetadataAbbrev, // name
956956 MetadataAbbrev, // file
......@@ -1000,7 +1000,7 @@ pub const MetadataBlock = struct {
10001000 pub const GlobalVarExpression = struct {
10011001 pub const ops = [_]AbbrevOp{
10021002 .{ .literal = 37 },
1003 .{ .literal = 1 }, // is distinct
1003 .{ .literal = 0 }, // is distinct
10041004 MetadataAbbrev, // variable
10051005 MetadataAbbrev, // expression
10061006 };