[PATCH] D95500: [AMDGPU] Fix WMM Entry SCC preservation

Jay Foad via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 27 02:58:15 PST 2021


foad added inline comments.


================
Comment at: llvm/lib/Target/AMDGPU/SIWholeQuadMode.cpp:843
 
+      /* Whether we need to save SCC depends on start and end states */
+      bool SaveSCC = false;
----------------
`//` for comments please.


================
Comment at: llvm/lib/Target/AMDGPU/SIWholeQuadMode.cpp:847
+      case StateExact:
+        SaveSCC = (Needs & StateWWM) || ((Needs & StateWQM) && WQMFromExec);
+        break;
----------------
All three `SaveSCC = ` calculations could do with an explanatory comment.


================
Comment at: llvm/lib/Target/AMDGPU/SIWholeQuadMode.cpp:856
+      default:
+        assert(false && "Unknown state");
+        break;
----------------
`llvm_unreachable`


================
Comment at: llvm/test/CodeGen/AMDGPU/wqm.mir:63
+name:            test_wwm_scc2
+alignment:       1
+exposesReturnsTwice: false
----------------
Remove most of this? Usually you only need `name`, `tracksRegLiveness` and `body`. 


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D95500



More information about the llvm-commits mailing list