From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8942 invoked by alias); 11 Dec 2002 23:58:10 -0000 Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org Received: (qmail 8935 invoked from network); 11 Dec 2002 23:58:10 -0000 Received: from unknown (HELO vlsi1.ultra.nyu.edu) (128.122.140.213) by sources.redhat.com with SMTP; 11 Dec 2002 23:58:10 -0000 Received: by vlsi1.ultra.nyu.edu (4.1/1.34) id AA08321; Wed, 11 Dec 02 18:59:57 EST Date: Wed, 11 Dec 2002 15:59:00 -0000 From: kenner@vlsi1.ultra.nyu.edu (Richard Kenner) Message-Id: <10212112359.AA08321@vlsi1.ultra.nyu.edu> To: gcc@gcc.gnu.org Subject: Function clobber_return_register X-SW-Source: 2002-12/txt/msg00608.txt.bz2 Can somebody explain what this function is for? There are no comments in front of this function (or do_clobber_return_reg) saying what it does. What I have on Alpha is this in 22.postreload: (insn 300 361 297 (clobber (reg/i:DI 0 $0)) -1 (insn_list:REG_DEP_ANTI 283 (insn_list:REG_DEP_ANTI 286 (nil))) (nil)) ;; End of basic block 29, registers live: 15 [$15] 26 [$26] 29 [$29] 30 [$30] 31 [AP] 63 [FP] 69 ;; Start of basic block 30, registers live: 15 [$15] 26 [$26] 29 [$29] 30 [$30] 69 (code_label 297 300 341 1 "" "" [1 uses]) (note 341 297 299 [bb 30] NOTE_INSN_BASIC_BLOCK) (insn 299 341 302 (use (reg/i:DI 0 $0)) -1 (nil) In 23.flow2, things have been rearranged in a way that I can't follow, but now there's no label between the CLOBBER and the USE. The test case is this tiny Ada code: function Tretcln return Integer is S : String := Integer'Image (1); function Ret1 return integer is begin return 1; end; begin return Ret1; end Tretcln; and the issue is that there is a cleanup (due to the 'Image) for this function. Due to the CLOBBER and USE now being in the same basic block, that block is marked as not having $0 live, so the restore of $0 is deleted as a dead insn and thus the return value of Ret1 is being lost in the return of Tretcln.