Need some guidance about the right way to model this -- how would you model a backend with a handful of read-only physical registers that are passed as arguments to a function? I was emitting copyFromReg nodes in the LowerFormalArgument() routine, but then the register allocator and coalescer are resisting coalescing the COPY MI's for various reasons - for example, the read-only register class contains too few registers and the live range threshold cancels the coalescing.<div>
<br></div><div>A simple example (post-ISEL):</div><div><br></div><div>%vreg2<def> = COPY %C1; GPReg:%vreg2</div><div>...</div><div>%vreg11<def> = MUL %vreg7, %vreg2; GPreg:%vreg11,%vreg7,%vreg2</div><div><br></div>
<div>I'd want it to propagate %C1 into the MUL, replacing %vreg2. How is this supposed to work? Is there a DAG operation or MF pass that should handle this before regalloc, or some other means?</div><div><br></div><div>
Thanks,</div><div>Joe</div><div><br></div><div><br></div>