From patchwork Tue Mar 29 11:26:50 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Uros Bizjak X-Patchwork-Id: 88749 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) by ozlabs.org (Postfix) with SMTP id E814EB6EDD for ; Tue, 29 Mar 2011 22:27:03 +1100 (EST) Received: (qmail 23242 invoked by alias); 29 Mar 2011 11:26:59 -0000 Received: (qmail 23234 invoked by uid 22791); 29 Mar 2011 11:26:58 -0000 X-SWARE-Spam-Status: No, hits=-2.2 required=5.0 tests=AWL, BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, RCVD_IN_DNSWL_LOW, TW_ZJ, T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: sourceware.org Received: from mail-pv0-f175.google.com (HELO mail-pv0-f175.google.com) (74.125.83.175) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 29 Mar 2011 11:26:51 +0000 Received: by pvc30 with SMTP id 30so15431pvc.20 for ; Tue, 29 Mar 2011 04:26:50 -0700 (PDT) MIME-Version: 1.0 Received: by 10.142.192.9 with SMTP id p9mr4383753wff.421.1301398010539; Tue, 29 Mar 2011 04:26:50 -0700 (PDT) Received: by 10.142.81.8 with HTTP; Tue, 29 Mar 2011 04:26:50 -0700 (PDT) Date: Tue, 29 Mar 2011 13:26:50 +0200 Message-ID: Subject: [PATCH, alpha]: Fix ICE in mems_in_disjoint_alias_sets_p From: Uros Bizjak To: gcc-patches@gcc.gnu.org Cc: Richard Henderson Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Hello! Attached patch fixes the same ICE as seen on sparc [1], where it was fixed by [2]. 2011-03-29 Uros Bizjak * config/alpha/alpha.c (alpha_sr_alias_set): Don't define. (alpha_option_override): Don't set alpha_sr_alias_set. (emit_frame_store_1): Use gen_frame_mem rather than calling set_mem_alias_set. (alpha_expand_epilogue): Ditto. This patch is prerequisite to build libgo on alpha. Due to binutils-2.21 bug [3] and independently of this patch, the bootstrap with go enabled fails with an (otherwise harmless) compare failure in the go directory. Patch was bootstrapped and regression tested on alphaev68-pc-linux-gnu. OK for 4.7 and 4.6.1? [1] http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47219 [2] http://gcc.gnu.org/ml/gcc-patches/2011-01/msg00916.html [3] http://sourceware.org/bugzilla/show_bug.cgi?id=12610 Uros. Index: alpha.c =================================================================== --- alpha.c (revision 171651) +++ alpha.c (working copy) @@ -95,10 +95,6 @@ int alpha_memory_latency = 3; static int alpha_function_needs_gp; -/* The alias set for prologue/epilogue register save/restore. */ - -static GTY(()) alias_set_type alpha_sr_alias_set; - /* The assembler name of the current function. */ static const char *alpha_fnname; @@ -476,9 +472,6 @@ alpha_option_override (void) if (align_functions <= 0) align_functions = 16; - /* Acquire a unique set number for our register saves and restores. */ - alpha_sr_alias_set = new_alias_set (); - /* Register variables and functions with the garbage collector. */ /* Set up function hooks. */ @@ -7448,8 +7441,7 @@ emit_frame_store_1 (rtx value, rtx base_ rtx addr, mem, insn; addr = plus_constant (base_reg, base_ofs); - mem = gen_rtx_MEM (DImode, addr); - set_mem_alias_set (mem, alpha_sr_alias_set); + mem = gen_frame_mem (DImode, addr); insn = emit_move_insn (mem, value); RTX_FRAME_RELATED_P (insn) = 1; @@ -8056,9 +8048,7 @@ alpha_expand_epilogue (void) /* Restore registers in order, excepting a true frame pointer. */ - mem = gen_rtx_MEM (DImode, plus_constant (sa_reg, reg_offset)); - if (! eh_ofs) - set_mem_alias_set (mem, alpha_sr_alias_set); + mem = gen_frame_mem (DImode, plus_constant (sa_reg, reg_offset)); reg = gen_rtx_REG (DImode, REG_RA); emit_move_insn (reg, mem); cfa_restores = alloc_reg_note (REG_CFA_RESTORE, reg, cfa_restores); @@ -8073,8 +8063,8 @@ alpha_expand_epilogue (void) fp_offset = reg_offset; else { - mem = gen_rtx_MEM (DImode, plus_constant(sa_reg, reg_offset)); - set_mem_alias_set (mem, alpha_sr_alias_set); + mem = gen_frame_mem (DImode, + plus_constant (sa_reg, reg_offset)); reg = gen_rtx_REG (DImode, i); emit_move_insn (reg, mem); cfa_restores = alloc_reg_note (REG_CFA_RESTORE, reg, @@ -8086,8 +8076,7 @@ alpha_expand_epilogue (void) for (i = 0; i < 31; ++i) if (fmask & (1UL << i)) { - mem = gen_rtx_MEM (DFmode, plus_constant(sa_reg, reg_offset)); - set_mem_alias_set (mem, alpha_sr_alias_set); + mem = gen_frame_mem (DFmode, plus_constant (sa_reg, reg_offset)); reg = gen_rtx_REG (DFmode, i+32); emit_move_insn (reg, mem); cfa_restores = alloc_reg_note (REG_CFA_RESTORE, reg, cfa_restores); @@ -8145,8 +8134,7 @@ alpha_expand_epilogue (void) if (fp_is_frame_pointer) { emit_insn (gen_blockage ()); - mem = gen_rtx_MEM (DImode, plus_constant (sa_reg, fp_offset)); - set_mem_alias_set (mem, alpha_sr_alias_set); + mem = gen_frame_mem (DImode, plus_constant (sa_reg, fp_offset)); emit_move_insn (hard_frame_pointer_rtx, mem); cfa_restores = alloc_reg_note (REG_CFA_RESTORE, hard_frame_pointer_rtx, cfa_restores);