[PATCH] D80661: [CodeGen] Enable tail call position check for speculatable functions

Victor Huang via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 2 12:37:57 PDT 2020


NeHuang updated this revision to Diff 267936.
NeHuang edited the summary of this revision.
NeHuang added a comment.

Previously we have an assumption that speculatable callee will be moved down if there are intermediate instructions (not using the result of callee) between it and the return instruction. However, the assumption does not hold in our experiment that no passes in `opt` or `llc` will move the speculatable callee down. Therefore we need to handle speculatable calls same as the other calls in `bool llvm::isInTailCallPosition` that checking if it is in a tail call position.

Added a new test case that intermediate instructions (not use result of callee) between speculatable callee and the return instruction.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D80661/new/

https://reviews.llvm.org/D80661

Files:
  llvm/lib/CodeGen/Analysis.cpp
  llvm/test/CodeGen/PowerPC/tailcall-speculatable-callee.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D80661.267936.patch
Type: text/x-patch
Size: 5520 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200602/ede888e6/attachment.bin>


More information about the llvm-commits mailing list