On 10/22/15 04:07, Richard Biener wrote:

Yeah, please make them either end or start a BB so we have to check
at most a single stmt.  ECF_RETURNS_TWICE should achieve that,
it also makes it a code motion barrier.

I'm having a hard time making  UNIQUE the end of a BB.

I'm emitting code to a gimple sequence, which later gets processed by the OMP machinery. Just doing that doesn't cause the block to be split after the ECF_RETURNS_TWICE function.

In all the below, the label is generated by:

  tree label = create_artificial_label (loc);
  FORCED_LABEL (label) = 1;

I tried doing
  UNIQUE (...)
  goto label
  label:

but that is apparently optimized away, leaving UNIQUE in the middle of a bb. Next I tried:

  UNIQUE (..., &label)
  goto label
label:

but the goto is elided and label migrates to the start of the bb, again leaving UNIQUE in the middle.

Any suggestions?

nathan

Reply via email to