[PATCH] D105192: [AMDGPU] Optimize VGPR LiveRange in waterfall loops

Ruiling, Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Jul 11 19:33:31 PDT 2021


ruiling accepted this revision.
ruiling added a comment.
This revision is now accepted and ready to land.

Thanks for the work, the code logic looks good to me. Please wait one or two days in case others have more comments.



================
Comment at: llvm/lib/Target/AMDGPU/SIOptimizeVGPRLiveRange.cpp:555
+  }
+  assert(FoundLastUse && "Failed to find last usage of register in loop");
+}
----------------
Several NDEBUGs in short piece of code is a little bit annoying, may be you can check the `!NewVarInfo.Kills.empty()`.


================
Comment at: llvm/test/CodeGen/AMDGPU/indirect-call.ll:649
+; allocator is not able to do that because the return value clashes with the liverange of an
+; IMPLICIT_DEF of the argument.
+define i32 @test_indirect_call_vgpr_ptr_arg_and_return(i32 %i, i32(i32)* %fptr) {
----------------
thanks for the test, I see the issue, will take further look later.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D105192



More information about the llvm-commits mailing list