[PATCH] D82085: [TRE] allow TRE for non-capturing calls.

Alexey Lapshin via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Jul 8 16:43:58 PDT 2020


avl marked an inline comment as done.
avl added inline comments.


================
Comment at: llvm/lib/Transforms/Scalar/TailRecursionElimination.cpp:474
+  // Operand Bundles or not marked as TailCall.
+  if (CI->isNoTailCall() || CI->hasOperandBundles() || !CI->isTailCall())
     return nullptr;
----------------
efriedma wrote:
> The hasOperandBundles() check looks completely new; is there some test for it?
> 
> The `isNoTailCall()` check is currently redundant; it isn't legal to write "tail notail".  I guess it makes sense to guard against that, though.
>The hasOperandBundles() check looks completely new; is there some test for it?

it is not new. it is copied from 245 line. Now, when patch changed from its original state all above conditions could be changed just to :

if (!CI->isTailCall())

the test is Transforms/TailCallElim/deopt-bundle.ll

>The isNoTailCall() check is currently redundant; it isn't legal to write "tail notail". I guess it makes sense to guard against that, though.

would add checking for that.



Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D82085





More information about the cfe-commits mailing list