[llvm] r279875 - TableGen: Switch from a std::map to a DenseMap in CodeGenSubRegIndex. NFC
Galina Kistanova via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 20 10:53:31 PDT 2016
Hello Justin,
This change made clang indeterministic.
http://lab.llvm.org:8011/builders/clang-with-lto-ubuntu/builds/453
Could you revert it, please?
If you would like to debug, here are some details:
With this patch, 2 sequential builds of the exact same compiler produces
different results. The .rodata sections are different in size.
Please find attached 2 dumped section headers for clang-4.0 executable.
Note that the size of the section [ 5] .rodata is different for each build.
Thanks
Galina
On Fri, Aug 26, 2016 at 3:29 PM, Justin Bogner via llvm-commits <
llvm-commits at lists.llvm.org> wrote:
> Author: bogner
> Date: Fri Aug 26 17:29:36 2016
> New Revision: 279875
>
> URL: http://llvm.org/viewvc/llvm-project?rev=279875&view=rev
> Log:
> TableGen: Switch from a std::map to a DenseMap in CodeGenSubRegIndex. NFC
>
> This mapping is between pointers, which DenseMap is particularly good
> at. Most targets aren't really affected, but if there's a lot of
> subregister composition this can shave off a good chunk of time from
> generating registers.
>
> Modified:
> llvm/trunk/utils/TableGen/CodeGenRegisters.h
>
> Modified: llvm/trunk/utils/TableGen/CodeGenRegisters.h
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/
> TableGen/CodeGenRegisters.h?rev=279875&r1=279874&r2=279875&view=diff
> ============================================================
> ==================
> --- llvm/trunk/utils/TableGen/CodeGenRegisters.h (original)
> +++ llvm/trunk/utils/TableGen/CodeGenRegisters.h Fri Aug 26 17:29:36 2016
> @@ -74,8 +74,7 @@ namespace llvm {
> std::string getQualifiedName() const;
>
> // Map of composite subreg indices.
> - typedef std::map<CodeGenSubRegIndex *, CodeGenSubRegIndex *,
> - deref<llvm::less>> CompMap;
> + typedef DenseMap<CodeGenSubRegIndex *, CodeGenSubRegIndex *> CompMap;
>
> // Returns the subreg index that results from composing this with Idx.
> // Returns NULL if this and Idx don't compose.
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160920/96f177fc/attachment.html>
-------------- next part --------------
ELF Header:
Magic: 7f 45 4c 46 02 01 01 00 00 00 00 00 00 00 00 00
Class: ELF64
Data: 2's complement, little endian
Version: 1 (current)
OS/ABI: UNIX - System V
ABI Version: 0
Type: EXEC (Executable file)
Machine: Advanced Micro Devices X86-64
Version: 0x1
Entry point address: 0x1f0c000
Start of program headers: 64 (bytes into file)
Start of section headers: 90971472 (bytes into file)
Flags: 0x0
Size of this header: 64 (bytes)
Size of program headers: 56 (bytes)
Number of program headers: 11
Size of section headers: 64 (bytes)
Number of section headers: 40
Section header string table index: 38
Section Headers:
[Nr] Name Type Address Offset
Size EntSize Flags Link Info Align
[ 0] NULL 0000000000000000 00000000
0000000000000000 0000000000000000 0 0 0
[ 1] .interp PROGBITS 00000000000102a8 000002a8
000000000000001c 0000000000000000 A 0 0 1
[ 2] .note.ABI-tag NOTE 00000000000102c4 000002c4
0000000000000020 0000000000000000 A 0 0 4
[ 3] .rodata PROGBITS 00000000000102e4 000002e4
0000000000000084 0000000000000004 AM 0 0 4
[ 4] .rodata PROGBITS 0000000000010370 00000370
0000000000f938b8 0000000000000000 A 0 0 16
[ 5] .rodata PROGBITS 0000000000fa3c28 00f93c28
00000000009e394a 0000000000000001 AMS 0 0 1
[ 6] .rodata PROGBITS 0000000001987580 01977580
00000000000021f0 0000000000000010 AM 0 0 16
[ 7] .rodata PROGBITS 0000000001989770 01979770
00000000000001f8 0000000000000008 AM 0 0 8
[ 8] .rodata PROGBITS 0000000001989970 01979970
0000000000000d80 0000000000000020 AM 0 0 16
[ 9] .rodata PROGBITS 000000000198a6f0 0197a6f0
0000000000000018 0000000000000004 AMS 0 0 4
[10] .rodata PROGBITS 000000000198a710 0197a710
000000000000cf74 0000000000000001 AMS 0 0 16
[11] .rodata PROGBITS 0000000001997684 01987684
000000000000000e 0000000000000002 AMS 0 0 2
[12] .eh_frame PROGBITS 0000000001997698 01987698
0000000000217460 0000000000000000 A 0 0 8
[13] .dynsym DYNSYM 0000000001baeaf8 01b9eaf8
00000000000b14c8 0000000000000018 A 17 1 8
[14] .gnu.version VERSYM 0000000001c5ffc0 01c4ffc0
000000000000ec66 0000000000000002 A 13 0 2
[15] .gnu.version_r VERNEED 0000000001c6ec28 01c5ec28
0000000000000190 0000000000000000 A 17 6 4
[16] .gnu.hash GNU_HASH 0000000001c6edb8 01c5edb8
00000000000358bc 0000000000000000 A 13 0 8
[17] .dynstr STRTAB 0000000001ca4674 01c94674
00000000001fa3bc 0000000000000000 A 0 0 1
[18] .rela.dyn RELA 0000000001e9ea30 01e8ea30
0000000000000210 0000000000000018 A 13 0 8
[19] .rela.plt RELA 0000000001e9ec40 01e8ec40
0000000000001bd8 0000000000000018 A 13 0 8
[20] .eh_frame_hdr PROGBITS 0000000001ea0818 01e90818
000000000006afe4 0000000000000000 A 0 0 1
[21] .text PROGBITS 0000000001f0c000 01efc000
00000000030f9f46 0000000000000000 AX 0 0 16
[22] .init PROGBITS 0000000005005f48 04ff5f48
000000000000001a 0000000000000000 AX 0 0 4
[23] .fini PROGBITS 0000000005005f64 04ff5f64
0000000000000009 0000000000000000 AX 0 0 4
[24] .plt PROGBITS 0000000005005f70 04ff5f70
00000000000012a0 0000000000000000 AX 0 0 16
[25] .tbss NOBITS 0000000005007210 04ff7210
0000000000000008 0000000000000000 WAT 0 0 8
[26] .jcr PROGBITS 0000000005008000 04ff8000
0000000000000008 0000000000000000 WA 0 0 8
[27] .fini_array FINI_ARRAY 0000000005008008 04ff8008
0000000000000008 0000000000000000 WA 0 0 8
[28] .init_array INIT_ARRAY 0000000005008010 04ff8010
0000000000000938 0000000000000000 WA 0 0 8
[29] .data.rel.ro PROGBITS 0000000005008950 04ff8950
00000000000008d8 0000000000000000 WA 0 0 16
[30] .dynamic DYNAMIC 0000000005009228 04ff9228
00000000000001f0 0000000000000010 WA 17 0 8
[31] .got PROGBITS 0000000005009418 04ff9418
0000000000000020 0000000000000000 WA 0 0 8
[32] .data PROGBITS 000000000500a000 04ffa000
00000000000067d8 0000000000000000 WA 0 0 16
[33] .tm_clone_table PROGBITS 00000000050107d8 050007d8
0000000000000000 0000000000000000 WA 0 0 8
[34] .got.plt PROGBITS 00000000050107d8 050007d8
0000000000000960 0000000000000000 WA 0 0 8
[35] .bss NOBITS 0000000005011140 05001138
000000000003a448 0000000000000000 WA 0 0 16
[36] .bss NOBITS 000000000504b5a0 05001138
0000000000000488 0000000000000000 WA 0 0 32
[37] .symtab SYMTAB 0000000000000000 05001138
00000000001a3310 0000000000000018 39 41272 8
[38] .shstrtab STRTAB 0000000000000000 051a4448
0000000000000114 0000000000000000 0 0 1
[39] .strtab STRTAB 0000000000000000 051a455c
000000000051d7f3 0000000000000000 0 0 1
Key to Flags:
W (write), A (alloc), X (execute), M (merge), S (strings), I (info),
L (link order), O (extra OS processing required), G (group), T (TLS),
C (compressed), x (unknown), o (OS specific), E (exclude),
l (large), p (processor specific)
-------------- next part --------------
ELF Header:
Magic: 7f 45 4c 46 02 01 01 00 00 00 00 00 00 00 00 00
Class: ELF64
Data: 2's complement, little endian
Version: 1 (current)
OS/ABI: UNIX - System V
ABI Version: 0
Type: EXEC (Executable file)
Machine: Advanced Micro Devices X86-64
Version: 0x1
Entry point address: 0x1f0c000
Start of program headers: 64 (bytes into file)
Start of section headers: 90971472 (bytes into file)
Flags: 0x0
Size of this header: 64 (bytes)
Size of program headers: 56 (bytes)
Number of program headers: 11
Size of section headers: 64 (bytes)
Number of section headers: 40
Section header string table index: 38
Section Headers:
[Nr] Name Type Address Offset
Size EntSize Flags Link Info Align
[ 0] NULL 0000000000000000 00000000
0000000000000000 0000000000000000 0 0 0
[ 1] .interp PROGBITS 00000000000102a8 000002a8
000000000000001c 0000000000000000 A 0 0 1
[ 2] .note.ABI-tag NOTE 00000000000102c4 000002c4
0000000000000020 0000000000000000 A 0 0 4
[ 3] .rodata PROGBITS 00000000000102e4 000002e4
0000000000000084 0000000000000004 AM 0 0 4
[ 4] .rodata PROGBITS 0000000000010370 00000370
0000000000f93a58 0000000000000000 A 0 0 16
[ 5] .rodata PROGBITS 0000000000fa3dc8 00f93dc8
00000000009e394a 0000000000000001 AMS 0 0 1
[ 6] .rodata PROGBITS 0000000001987720 01977720
00000000000021f0 0000000000000010 AM 0 0 16
[ 7] .rodata PROGBITS 0000000001989910 01979910
00000000000001f8 0000000000000008 AM 0 0 8
[ 8] .rodata PROGBITS 0000000001989b10 01979b10
0000000000000d80 0000000000000020 AM 0 0 16
[ 9] .rodata PROGBITS 000000000198a890 0197a890
0000000000000018 0000000000000004 AMS 0 0 4
[10] .rodata PROGBITS 000000000198a8b0 0197a8b0
000000000000cf74 0000000000000001 AMS 0 0 16
[11] .rodata PROGBITS 0000000001997824 01987824
000000000000000e 0000000000000002 AMS 0 0 2
[12] .eh_frame PROGBITS 0000000001997838 01987838
0000000000217460 0000000000000000 A 0 0 8
[13] .dynsym DYNSYM 0000000001baec98 01b9ec98
00000000000b14c8 0000000000000018 A 17 1 8
[14] .gnu.version VERSYM 0000000001c60160 01c50160
000000000000ec66 0000000000000002 A 13 0 2
[15] .gnu.version_r VERNEED 0000000001c6edc8 01c5edc8
0000000000000190 0000000000000000 A 17 6 4
[16] .gnu.hash GNU_HASH 0000000001c6ef58 01c5ef58
00000000000358bc 0000000000000000 A 13 0 8
[17] .dynstr STRTAB 0000000001ca4814 01c94814
00000000001fa3bc 0000000000000000 A 0 0 1
[18] .rela.dyn RELA 0000000001e9ebd0 01e8ebd0
0000000000000210 0000000000000018 A 13 0 8
[19] .rela.plt RELA 0000000001e9ede0 01e8ede0
0000000000001bd8 0000000000000018 A 13 0 8
[20] .eh_frame_hdr PROGBITS 0000000001ea09b8 01e909b8
000000000006afe4 0000000000000000 A 0 0 1
[21] .text PROGBITS 0000000001f0c000 01efc000
00000000030f9f46 0000000000000000 AX 0 0 16
[22] .init PROGBITS 0000000005005f48 04ff5f48
000000000000001a 0000000000000000 AX 0 0 4
[23] .fini PROGBITS 0000000005005f64 04ff5f64
0000000000000009 0000000000000000 AX 0 0 4
[24] .plt PROGBITS 0000000005005f70 04ff5f70
00000000000012a0 0000000000000000 AX 0 0 16
[25] .tbss NOBITS 0000000005007210 04ff7210
0000000000000008 0000000000000000 WAT 0 0 8
[26] .jcr PROGBITS 0000000005008000 04ff8000
0000000000000008 0000000000000000 WA 0 0 8
[27] .fini_array FINI_ARRAY 0000000005008008 04ff8008
0000000000000008 0000000000000000 WA 0 0 8
[28] .init_array INIT_ARRAY 0000000005008010 04ff8010
0000000000000938 0000000000000000 WA 0 0 8
[29] .data.rel.ro PROGBITS 0000000005008950 04ff8950
00000000000008d8 0000000000000000 WA 0 0 16
[30] .dynamic DYNAMIC 0000000005009228 04ff9228
00000000000001f0 0000000000000010 WA 17 0 8
[31] .got PROGBITS 0000000005009418 04ff9418
0000000000000020 0000000000000000 WA 0 0 8
[32] .data PROGBITS 000000000500a000 04ffa000
00000000000067d8 0000000000000000 WA 0 0 16
[33] .tm_clone_table PROGBITS 00000000050107d8 050007d8
0000000000000000 0000000000000000 WA 0 0 8
[34] .got.plt PROGBITS 00000000050107d8 050007d8
0000000000000960 0000000000000000 WA 0 0 8
[35] .bss NOBITS 0000000005011140 05001138
000000000003a448 0000000000000000 WA 0 0 16
[36] .bss NOBITS 000000000504b5a0 05001138
0000000000000488 0000000000000000 WA 0 0 32
[37] .symtab SYMTAB 0000000000000000 05001138
00000000001a3310 0000000000000018 39 41272 8
[38] .shstrtab STRTAB 0000000000000000 051a4448
0000000000000114 0000000000000000 0 0 1
[39] .strtab STRTAB 0000000000000000 051a455c
000000000051d7f3 0000000000000000 0 0 1
Key to Flags:
W (write), A (alloc), X (execute), M (merge), S (strings), I (info),
L (link order), O (extra OS processing required), G (group), T (TLS),
C (compressed), x (unknown), o (OS specific), E (exclude),
l (large), p (processor specific)
More information about the llvm-commits
mailing list