Displaying 2 results from an estimated 2 matches for "_retpt".
Did you mean:
retpt
2017 Apr 18
2
[RFC] Adding CPS call support
...n LR. On other architectures, you can emulate this (for example, you could lower an IR "call" to LEA+JMP on x86-64).
This is similar to what I was originally thinking, since the end goal of all of this is the following machine code for a call (I'll use an x86-64 example):
leaq _retpt(%rip), %scratchReg
movq %scratchReg, (%ghcSPReg)
jmp _bar
But, if we want to end up with the above machine code using a custom lowering of just the following IR instruction,
%retVals = cps call ghccc @bar (... args ...)
_without_ explicitly taking the block address and writing it...
2017 Apr 17
2
[RFC] Adding CPS call support
(Sorry for the 2nd email Eli, I forgot to reply-all).
> I'm not following how explicitly representing the return address of a call in the IR before isel actually solves any relevant issue. We already pass the return address implicitly as an argument to every call; you can retrieve it with llvm.returnaddress if you need it.
Unfortunately the @llvm.returnaddress intrinsic does not solve