From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from nikam.ms.mff.cuni.cz (nikam.ms.mff.cuni.cz [195.113.20.16]) by sourceware.org (Postfix) with ESMTPS id 641E73857439 for ; Thu, 18 Nov 2021 18:22:15 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 641E73857439 Received: by nikam.ms.mff.cuni.cz (Postfix, from userid 16202) id 035AF28094C; Thu, 18 Nov 2021 19:22:13 +0100 (CET) Date: Thu, 18 Nov 2021 19:22:12 +0100 From: Jan Hubicka To: Martin =?iso-8859-2?Q?Li=B9ka?= Cc: gcc-patches@gcc.gnu.org Subject: Re: [PATCH] IPA: fix reproducibility in IPA MOD REF Message-ID: <20211118182212.GF76860@kam.mff.cuni.cz> References: <3b0ef8c4-45df-1d84-158d-f6d98a493a32@suse.cz> <20211118181133.GE76860@kam.mff.cuni.cz> <3d12d111-7ba0-b1a5-4e89-00ddfd8ae61f@suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3d12d111-7ba0-b1a5-4e89-00ddfd8ae61f@suse.cz> User-Agent: Mutt/1.10.1 (2018-07-13) X-Spam-Status: No, score=-5.8 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_NONE, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Nov 2021 18:22:17 -0000 > Supported LTO compression algorithms: zlib zstd > gcc version 12.0.0 20211118 (experimental) (GCC) > /usr/bin/ld: ./xxx.ltrans0.ltrans.o: warning: relocation against `lm_read_ctl_dict_size_n_lmclass_used' in read-only section `.text' > /usr/bin/ld: ./xxx.ltrans0.ltrans.o: relocation R_X86_64_PC32 against symbol `__ckd_calloc___elem_size' can not be used when making a shared object; recompile with -fPIC > /usr/bin/ld: final link failed: bad value > collect2: error: ld returned 1 exit status > /usr/bin/ld: ./yyy.ltrans0.ltrans.o: warning: relocation against `__ckd_calloc___n_elem' in read-only section `.text' > /usr/bin/ld: ./yyy.ltrans0.ltrans.o: relocation R_X86_64_PC32 against symbol `__ckd_calloc___elem_size' can not be used when making a shared object; recompile with -fPIC > /usr/bin/ld: final link failed: bad value > collect2: error: ld returned 1 exit status > diff: yyy.ltrans0.ltrans*optimized: No such file or directory > 54,55d53 > < movslq lm_read_ctl_dict_size_n_lmclass_used(%rip), %rax > < movl $0, 0(%rbp,%rax,4) > > I tracked that it differs in tree DSE dump. > > May I install the patch? No, I think it is bug of symbol_summary that get is causing a difference. It should be pure function. I think it is: /* Getter for summary callgraph node pointer. */ T* get (cgraph_node *node) ATTRIBUTE_PURE { return exists (node) ? (*m_vector)[node->get_summary_id ()] : NULL; } It should not be using get_summary_id (which allocates it for no good reaosn) and simply check that summary_id is non-negative. Still I wonder how this can make code different - that looks like another bug somewhere. Honza