ir_block *old_bcontinue;
ir_block *old_bbreak;
+ ir_block *btemp;
+
(void)lvalue;
(void)out;
/* Now all blocks are in place */
/* From 'bin' we jump to whatever comes first */
- if (bprecond && !ir_block_create_jump(bin, bprecond))
- return false;
- else if (bbody && !ir_block_create_jump(bin, bbody))
- return false;
- else if (bpostcond && !ir_block_create_jump(bin, bpostcond))
- return false;
- else if ( !ir_block_create_jump(bin, bout))
+ if (bprecond) tmpblock = bprecond;
+ else if (bbody) tmpblock = bbody;
+ else if (bpostcond) tmpblock = bpostcond;
+ else tmpblock = bout;
+ if (!ir_block_create_jump(bin, tmpblock))
return false;
+ }
/* From precond */
if (bprecond)
/* from body */
if (bbody)
{
- if (bincrement && !ir_block_create_jump(end_bbody, bincrement))
- return false;
- else if (bpostcond && !ir_block_create_jump(end_bbody, bpostcond))
- return false;
- else if (bprecond && !ir_block_create_jump(end_bbody, bprecond))
- return false;
- else if (!ir_block_create_jump(end_bbody, bout))
+ if (bincrement) tmpblock = bincrement;
+ else if (bpostcond) tmpblock = bpostcond;
+ else if (bprecond) tmpblock = bprecond;
+ else tmpblock = bout;
+ if (!ir_block_create_jump(end_bbody, tmpblock))
return false;
+ }
}
/* from increment */
if (bincrement)
{
- if (bpostcond && !ir_block_create_jump(end_bincrement, bpostcond))
- return false;
- else if (bprecond && !ir_block_create_jump(end_bincrement, bprecond))
- return false;
- else if (bbody && !ir_block_create_jump(end_bincrement, bbody))
- return false;
- else if (!ir_block_create_jump(end_bincrement, bout))
+ if (bpostcond) tmpblock = bpostcond;
+ else if (bprecond) tmpblock = bprecond;
+ else if (bbody) tmpblock = bbody;
+ else tmpblock = bout;
+ if (!ir_block_create_jump(end_bincrement, tmpblock))
return false;
+ }
}
/* from postcond */