From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15156 invoked by alias); 18 Apr 2003 10:41:30 -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 15144 invoked from network); 18 Apr 2003 10:41:30 -0000 Received: from unknown (HELO nikam.ms.mff.cuni.cz) (195.113.18.106) by sources.redhat.com with SMTP; 18 Apr 2003 10:41:30 -0000 Received: from camelot.ms.mff.cuni.cz (kampanus.ms.mff.cuni.cz [195.113.18.107]) by nikam.ms.mff.cuni.cz (Postfix) with SMTP id 2A10B4DF08; Fri, 18 Apr 2003 12:41:30 +0200 (CEST) Received: by camelot.ms.mff.cuni.cz (sSMTP sendmail emulation); Fri, 18 Apr 2003 12:41:31 +0200 Date: Fri, 18 Apr 2003 12:11:00 -0000 From: Jan Hubicka To: Ulrich.Weigand@de.ibm.com, rth@redhat.com, gcc@gcc.gnu.org, aj@suse.de Subject: Profiling on S390 Message-ID: <20030418104131.GL11098@kam.mff.cuni.cz> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.3.28i X-SW-Source: 2003-04/txt/msg00903.txt.bz2 Hi, arc profiling on s390 is currently broken because of strcmp expander. What it does is to emit: expand_end_loop (); emit_insn ((*gen_short) (op0, op1, convert_to_mode (word_mode, count, 1))); emit_label (end_label); emit_insn ((*gen_result) (target)); Where gen_result expands into: (insn 43 42 44 (nil) (set (reg:SI 44) (compare:SI (reg:CCS 33 %cc) (const_int 0 [0x0]))) -1 (nil) (nil)) Where CC is intialized via the conditional jumps into the label. It looks very unsafe for me - GCC assumes at many places that CC is not live accross boundaries. What happens is that profiler insert adddi on the begining of BB clobberring the flags. But in general gcc will happily reverse the conditional when reordering basic blocks and do other transformations that can break such construct. What would be the best sollution? Honza