[PATCH] D123231: [StructurizeCFG] Improve basic block ordering

Ruiling, Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 15 00:35:10 PDT 2022


ruiling added a comment.

I had tried a different approach to avoid inserting excessive number of boolean values during the loop-exit-unify in D127831 <https://reviews.llvm.org/D127831>. I just did some testing of that change against the LLVM IR Brendon shared with me. It shows the change could help reducing the number of registers as well as compile time. But it is sad that I still hit the error: "unhandled SGPR spill to memory" from SGPRSpillBuilder in SIRegisterInfo.cpp. Can the limitation be fixed? I did some register pressure comparison, seems the way I proposed would use much less VGPR than (D123230 <https://reviews.llvm.org/D123230> + D123231 <https://reviews.llvm.org/D123231>), but use more SGPR. I haven't looked further why there is such behavior difference. I think we need more investigation to know why. But looks like D127831 <https://reviews.llvm.org/D127831> might help us generate better code because we can use one VGPR as the backup storage for spilling of 64/32 SGPRs. And the idea used there is much easy to follow.


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

https://reviews.llvm.org/D123231



More information about the llvm-commits mailing list