[PATCH] D62683: [ARM][FIX] Ran out of registers due tail recursion

Dave Green via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu May 30 11:34:20 PDT 2019


dmgreen edited reviewers, added: efriedma; removed: eli.friedman.
dmgreen added a comment.

Nice one. Please remember to clang-format the patch.



================
Comment at: lib/Target/ARM/ARMISelLowering.cpp:1888
   // These operations are automatically eliminated by the prolog/epilog pass
-  if (!isSibCall)
+  else
     Chain = DAG.getCALLSEQ_START(Chain, NumBytes, 0, dl);
----------------
This looks like an unrelated change (and a little harder to parse to me, with the comment and newly between the if and the else).


================
Comment at: lib/Target/ARM/ARMISelLowering.cpp:1888
   // These operations are automatically eliminated by the prolog/epilog pass
-  if (!isSibCall)
+  else
     Chain = DAG.getCALLSEQ_START(Chain, NumBytes, 0, dl);
----------------
dmgreen wrote:
> This looks like an unrelated change (and a little harder to parse to me, with the comment and newly between the if and the else).
Also, is isSibCall ever different to isTailCall? Do we need both?


================
Comment at: test/CodeGen/ARM/pr42062.ll:7
+define void @food(i8* %a) #0 {
+; CHECK-NOT: error: ran out of registers during register allocation
+entry:
----------------
Its probably best to test the whole output, to check it's using correct registers.


Repository:
  rL LLVM

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

https://reviews.llvm.org/D62683





More information about the llvm-commits mailing list