forked from OSchip/llvm-project
b812b7a45e
Since the beginning, the offset of a frame index has been consistently interpreted backwards. It was treating it as an offset from the scratch wave offset register as a frame register. The correct interpretation is the offset from the SP on entry to the function, before the prolog. Frame index elimination then should select either SP or another register as an FP. Treat the scratch wave offset on kernel entry as the pre-incremented SP. Rely more heavily on the standard hasFP and frame pointer elimination logic, and clean up the private reservation code. This saves a copy in most callee functions. The kernel prolog emission code is still kind of a mess relying on checking the uses of physical registers, which I would prefer to eliminate. Currently selection directly emits MUBUF instructions, which require using a reference to some register. Use the register chosen for SP, and then ignore this later. This should probably be cleaned up to use pseudos that don't refer to any specific base register until frame index elimination. Add a workaround for shaders using large numbers of SGPRs. I'm not sure these cases were ever working correctly, since as far as I can tell the logic for figuring out which SGPR is the scratch wave offset doesn't match up with the shader input initialization in the shader programming guide. llvm-svn: 362661 |
||
---|---|---|
.. | ||
expected-target-index-name.mir | ||
intrinsics.mir | ||
invalid-target-index-operand.mir | ||
lit.local.cfg | ||
load-store-opt-dlc.mir | ||
machine-function-info-no-ir.mir | ||
machine-function-info-register-parse-error1.mir | ||
machine-function-info-register-parse-error2.mir | ||
machine-function-info.ll | ||
mfi-frame-offset-reg-class.mir | ||
mfi-parse-error-frame-offset-reg.mir | ||
mfi-parse-error-scratch-rsrc-reg.mir | ||
mfi-parse-error-scratch-wave-offset-reg.mir | ||
mfi-parse-error-stack-ptr-offset-reg.mir | ||
mfi-scratch-rsrc-reg-reg-class.mir | ||
mfi-scratch-wave-offset-reg-class.mir | ||
mfi-stack-ptr-offset-reg-class.mir | ||
mir-canon-multi.mir | ||
parse-order-reserved-regs.mir | ||
stack-id.mir | ||
syncscopes.mir | ||
target-flags.mir | ||
target-index-operands.mir |