Displaying 2 results from an estimated 2 matches for "hasonedef".
2020 Jun 16
2
[ARM] Thumb code-gen for 8-bit imm arguments results in extra reg copies
Hi,
For the following test-case:
void foo(unsigned, unsigned);
void f()
{
foo(10, 20);
foo(10, 20);
}
clang --target=arm-linux-gnueabi -mthumb -O2 generates:
push {r4, r5, r7, lr}
movs r4, #10
movs r5, #20
movs r0, r4
movs r1, r5
bl foo
movs r0, r4
movs r1, r5
bl foo
pop {r4,
2020 Jun 18
2
[ARM] Thumb code-gen for 8-bit imm arguments results in extra reg copies
...ic to check
> > for single live def, instead of single def.
>
> This seems dodgy to me. The instruction does also change CPSR so for
> the transformation to be valid you have to know that register is dead
> where the new instruction is being inserted. As far as I can tell the
> hasOneDef check in reMaterializeTrivialDef is a simple heuristic to
> keep the analysis local and avoid dealing with such issues.
>
> I also don't know how other users of the rematerializable property
> will cope with a wider range of
> isReallyTriviallyReMaterializableGeneric instructions...