[llvm-dev] Altering the return address , for a function with multiple return paths

Tsur Herman via llvm-dev llvm-dev at lists.llvm.org
Sun Jul 21 02:06:42 PDT 2019


Playing around with calling conventions naked functions and
epilogue/prologue...
Is it possible/expressible/feasible to alter the return address the
function will return to?

For example, when a function may return an Int8 or a Float64, depending on
some external state
(user, or random variable), instead of checking the returned type in the
calling function, is it possible
to pass 2 potential return addresses one suitable for Int8 and one suitable
for Float64 and let the function return to the right place?

if it is possible, what are the implications? do these inhibit the
optimization opportunities somehow?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20190721/ad196050/attachment.html>


More information about the llvm-dev mailing list