[PATCH] D73699: [RISCV] Implement mayBeEmittedAsTailCall for tail call optimization

Lewis Revill via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 4 04:43:15 PST 2020


lewis-revill added a comment.

Thanks, this seems like a good change. I haven't checked the source, but I wonder is it ever possible this hook triggers duplication of the returns but the tail calls don't get emitted for whatever reason? Other than that and the comment above I'd be happy with this.



================
Comment at: llvm/test/CodeGen/RISCV/tail-calls.ll:177
+define i32 @duplicate_returns(i32 %a, i32 %b) nounwind {
+; CHECK-LABEL: duplicate_returns:
+; CHECK:       # %bb.3: # %if.then6
----------------
Perhaps these check lines should be simplified to just the checks for the tail calls, rather than using 'CHECK-NEXT' to check every line. Just to potentially reduce the chance of this test failing for unrelated reasons. Ideally we'd be able to check the tail calls in any order too but I'm not sure how that would be done with filecheck.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D73699





More information about the llvm-commits mailing list