public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* optimizations are deleting my adds
@ 2012-06-14 14:16 miloutch
2012-06-18 7:40 ` [BUG middle-end] Optimizations " miloutch
0 siblings, 1 reply; 2+ messages in thread
From: miloutch @ 2012-06-14 14:16 UTC (permalink / raw)
To: gcc-bugs
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.
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [BUG middle-end] Optimizations are deleting my adds
2012-06-14 14:16 optimizations are deleting my adds miloutch
@ 2012-06-18 7:40 ` miloutch
0 siblings, 0 replies; 2+ messages in thread
From: miloutch @ 2012-06-18 7:40 UTC (permalink / raw)
To: gcc-bugs
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.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-06-18 7:40 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-06-14 14:16 optimizations are deleting my adds miloutch
2012-06-18 7:40 ` [BUG middle-end] Optimizations " miloutch
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).