public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: miloutch <augustin.serraz@gmail.com>
To: gcc-bugs@gcc.gnu.org
Subject: Re: [BUG middle-end] Optimizations are deleting my adds
Date: Mon, 18 Jun 2012 07:40:00 -0000	[thread overview]
Message-ID: <34028377.post@talk.nabble.com> (raw)
In-Reply-To: <34012207.post@talk.nabble.com>


Nobody have the answer ?
I'm desperate ... :(

miloutch wrote:
> 
> 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/-BUG-middle-end--Optimizations-are-deleting-my-adds-tp34012207p34028377.html
Sent from the gcc - bugs mailing list archive at Nabble.com.


      reply	other threads:[~2012-06-18  7:40 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-14 14:16 optimizations " miloutch
2012-06-18  7:40 ` miloutch [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=34028377.post@talk.nabble.com \
    --to=augustin.serraz@gmail.com \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).