it easier for back ends to recognise special idioms such as
increments and decrements.
global register and it is not going to be destroyed by an instruction,
then use the global register as the operand.
+ * jit/jit-insn.c: recognise "t = a op b; a = t" and turn it
+ into "a = a op b" to make it easier for back ends to recognise
+ special idioms such as increments and decrements.
+
2004-06-01 Rhys Weatherley <rweather@southern-storm.com.au>
* jit/jit-cache.c, jit/jit-elf-read.c, tools/gen-apply.c:
{
return 0;
}
+ insn = _jit_block_get_last(func->builder->current_block);
+ if(value->is_temporary && insn && insn->dest == value &&
+ insn->value1 == dest)
+ {
+ /* Special case: we can move the destination value back into
+ the previous instruction, to avoid a redundant copy */
+ insn->dest = dest;
+ return 1;
+ }
insn = _jit_block_add_insn(func->builder->current_block);
if(!insn)
{