public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* creating low gimple code for gimplify_omp_atomic_pipeline
@ 2007-08-01 12:09 Razya Ladelsky
  2007-08-01 15:07 ` Diego Novillo
  0 siblings, 1 reply; 2+ messages in thread
From: Razya Ladelsky @ 2007-08-01 12:09 UTC (permalink / raw)
  To: gcc

Hi,

In order to generate code for omp_atomic, I use force_gimple_operand which 
calls gimplify_omp_atomic; 
in some cases it calls gimplify_omp_atomic_pipeline, which expands the 
atomic operation to a
cycle (implementing it using atomic compare-and-swap primitive).
However, the cond_expr that is generated is structured, and needs to be 
lowered.

Any suggestions on how to create low gimple code for 
gimplify_omp_atomic_pipeline
cases?

Thanks,
Razya 

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: creating low gimple code for gimplify_omp_atomic_pipeline
  2007-08-01 12:09 creating low gimple code for gimplify_omp_atomic_pipeline Razya Ladelsky
@ 2007-08-01 15:07 ` Diego Novillo
  0 siblings, 0 replies; 2+ messages in thread
From: Diego Novillo @ 2007-08-01 15:07 UTC (permalink / raw)
  To: Razya Ladelsky; +Cc: gcc

On 8/1/07 8:07 AM, Razya Ladelsky wrote:

> Any suggestions on how to create low gimple code for 
> gimplify_omp_atomic_pipeline
> cases?

Interesting.  I think it's the first time we run into this problem.  I
don't see force_gimple_operand trying to emit low GIMPLE.  But we always
use it from the optimizers, so it should.

You cannot force the omp_atomic gimplifiers to emit low GIMPLE as those
are called by the GENERIC->GIMPLE conversion.  The easiest way to fix
this, I think, is to call lower_stmt() from force_gimple_operand() after
the call to gimplify_expr.  For this you'll need to setup a stmt
iterator on the resulting list of statements from gimplify_expr and call
lower_stmt on each of them (this should be implemented in gimple-low.c).

Longer term, I think we need to have an indicator of what level of
GIMPLE the function is in.  This way the various helpers like
force_gimple_operand can decide what to do.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2007-08-01 15:07 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-08-01 12:09 creating low gimple code for gimplify_omp_atomic_pipeline Razya Ladelsky
2007-08-01 15:07 ` Diego Novillo

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).