> The patterns clobber and use the rs6000 link register as a match_scratch > with constraint of the link register class: > > (clobber (match_scratch:SI 0 "=l")) > > instead of clobbering the link register hard register directly in the > early insn generation. This style dates to the original rs6000 port. A > naked use that starts as a pseudo causes problems for dataflow. > > Do you remember why you wrote the call patterns this way? Was > there a problem with reload and clobbers of hard registers in a register > class containing a single register or some other historical quirk?
I think the former. I no longer remember the details, but if you had a clobber of a hard reg, there were a number of things that such a hard reg couldn't be used for (this is where the details are murky) and in order to avoid that problem a match_scratch was used to delay the explicit hard register usage as long as possible.