[llvm] f987cce - Correctly report modified status for TailRecursionElimination

via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 5 06:58:49 PDT 2020


Author: serge-sans-paille
Date: 2020-06-05T15:58:20+02:00
New Revision: f987cceb134200d575beda611fe190535155c7a2

URL: https://github.com/llvm/llvm-project/commit/f987cceb134200d575beda611fe190535155c7a2
DIFF: https://github.com/llvm/llvm-project/commit/f987cceb134200d575beda611fe190535155c7a2.diff

LOG: Correctly report modified status for TailRecursionElimination

Differential Revision: https://reviews.llvm.org/D81232

Added: 
    

Modified: 
    llvm/lib/Transforms/Scalar/TailRecursionElimination.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Transforms/Scalar/TailRecursionElimination.cpp b/llvm/lib/Transforms/Scalar/TailRecursionElimination.cpp
index 4263dddd9737..5bb1d54d7d12 100644
--- a/llvm/lib/Transforms/Scalar/TailRecursionElimination.cpp
+++ b/llvm/lib/Transforms/Scalar/TailRecursionElimination.cpp
@@ -818,7 +818,7 @@ bool TailRecursionEliminator::eliminate(Function &F,
   // If this function is a varargs function, we won't be able to PHI the args
   // right, so don't even try to convert it...
   if (F.getFunctionType()->isVarArg())
-    return false;
+    return MadeChange;
 
   // If false, we cannot perform TRE on tail calls marked with the 'tail'
   // attribute, because doing so would cause the stack size to increase (real


        


More information about the llvm-commits mailing list