[llvm-dev] CallSiteSplitting and musttail calls

Fedor Indutny via llvm-dev llvm-dev at lists.llvm.org
Fri Feb 23 23:16:10 PST 2018


I've discovered that `CallSiteSplitting` optimization doesn't support
musttail calls. The easiest fix as it stands is disabling it for such call
sites: https://reviews.llvm.org/D43729 . However, I'm not happy with such

My more sophisticated attempt has failed due to my poor understanding of
llvm internals. Here is the attempted patch:

I'd greatly appreciate any help with it.

Just in case, there're few questions that I'm trying to find answers for:

* Why replacing `removeFromParent()` with `eraseFromParent` breaks the code?
* How to properly remove predecessors from the resulting Tail block?
* How to remove the Tail block itself when we're done?

Thank you,
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20180224/5dfc1a71/attachment.html>

More information about the llvm-dev mailing list