laytonio added inline comments.

Comment at: llvm/lib/Transforms/Scalar/TailRecursionElimination.cpp:838
+        if (isValidTRECandidate(CI))
+          HasValidCandidates = true;
+      }
Is there any reason to find and validate candidates now only to have to redo it 
when we actually perform the eliminations? If so, is there any reason this 
needs to follow a different code path than findTRECandidate? findTRECandidate 
is doing the same checks, except for canMoveAboveCall and 
canTransformAccumulatorRecursion, which should probably be refactored into 
findTRECandidate from eliminateCall anyway. If not then all of this code goes 
away and we're left with the same canTRE as in trunk.

  rG LLVM Github Monorepo


cfe-commits mailing list

Reply via email to