We don't allow copy propagation of physical registers, however, in the case of the processor register this appears overly cautious. In the current generational putfield write barrier we get:
t1 = PR // define t1 to PR
return // likely
... = t1 // unlikely - use of t1
as t1 is alive in the slow path the definition must occur at the head of the method, so we copy PR redundantly for it only to be used if we get into the write barrier slow path. We should just copy propagate PR and save the allocation of t1.
Similarly the test at the head of the put field write barrier is often
t2 = l1 + constant_offset
if t2 < constant_start_of_nursery
which can be folded in BURS to:
if l1 < constant_start_of_nursery - constant_offset
this is already performed in expression folding, but currently disabled.
|Assignee||Ian Rogers [ ianrogers ]|
|Fix Version/s||3.2 [ 14379 ]|
|Fix Version/s||3.1.0 [ 14620 ]|
|Component/s||Compiler: Optimizing [ 12831 ]|