From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12060 invoked by alias); 14 Jun 2012 14:16:34 -0000 Received: (qmail 12036 invoked by uid 22791); 14 Jun 2012 14:16:32 -0000 X-SWARE-Spam-Status: No, hits=-1.0 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from sam.nabble.com (HELO sam.nabble.com) (216.139.236.26) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 14 Jun 2012 14:16:09 +0000 Received: from telerig.nabble.com ([192.168.236.162]) by sam.nabble.com with esmtp (Exim 4.72) (envelope-from ) id 1SfAqG-0008CV-6F for gcc-bugs@gcc.gnu.org; Thu, 14 Jun 2012 07:16:08 -0700 Message-ID: <34012207.post@talk.nabble.com> Date: Thu, 14 Jun 2012 14:16:00 -0000 From: miloutch To: gcc-bugs@gcc.gnu.org Subject: optimizations are deleting my adds MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2012-06/txt/msg00920.txt.bz2 Hi, I have a small problem. I am making a new pass for my gcc, and some of my adds are deleted by optimization passes. here is the code i add : t = builtin_decl_explicit (BUILT_IN_ACC_SETUPARGUMENT); g = gimple_build_call(t, 3, build1(ADDR_EXPR, integer_ptr_type_node, length), build_int_cst(integer_type_node,TREE_INT_CST_LOW(TYPE_SIZE_UNIT (TREE_TYPE (tmp_result)))), offset ); gsi_insert_before (&gsi, g, GSI_SAME_STMT); you see, the variable length wich is actually "length.0" -> gimple_omp_for_final() is renamed by ssa pass in length_1(D) But, here is an ADDR_EXPR of length, and the optimization don't rename it, so it points to the wrong variable because length.0 is not used anymore after the optimizations. I want to know if there is a way to prevent the compiler from optimizing this code with a flag in my code for example ? Thanks in advance ! -- View this message in context: http://old.nabble.com/optimizations-are-deleting-my-adds-tp34012207p34012207.html Sent from the gcc - bugs mailing list archive at Nabble.com.