[PATCH] D72902: [WebAssembly] Fix RegStackify and ExplicitLocals to handle multivalue

Thomas Lively via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 17 00:08:39 PST 2020


tlively created this revision.
tlively added reviewers: aheejin, dschuff.
Herald added subscribers: llvm-commits, sunfish, hiraditya, jgravelle-google, sbc100.
Herald added a project: LLVM.
tlively added a parent revision: D71496: [WebAssembly] Split and recombine multivalue calls for ISel.
tlively marked 2 inline comments as done.
tlively added a comment.

Just looking for high-level feedback right now, especially on the inclusion of the script and generated test cases. Now that multivalue is testable, I will go back and clean up the previous patches in this chain.



================
Comment at: llvm/lib/Target/WebAssembly/WebAssemblyRegStackify.cpp:839
       while (!TreeWalker.done()) {
-        MachineOperand &Op = TreeWalker.pop();
+        MachineOperand &Use = TreeWalker.pop();
 
----------------
I am thinking of splitting the renaming and re-typing of these variables into a separate NFC patch. Thoughts?


================
Comment at: llvm/test/CodeGen/WebAssembly/multivalue-stackify.py:4
+
+
+MAX_OPS = 4
----------------
I will add a comment to this file explaining what it does and why.


There is still room for improvement in the handling of multivalue
nodes in both passes, but the current algorithm is at least correct
and optimizes some simpler cases. In order to make future
optimizations of these passes easier and build confidence that the
current algorithms are correct, this CL also adds a script that
automatically and exhaustively generates interesting multivalue test
cases.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D72902

Files:
  llvm/lib/Target/WebAssembly/WebAssemblyExplicitLocals.cpp
  llvm/lib/Target/WebAssembly/WebAssemblyRegStackify.cpp
  llvm/test/CodeGen/WebAssembly/multivalue-stackify.ll
  llvm/test/CodeGen/WebAssembly/multivalue-stackify.py
  llvm/test/CodeGen/WebAssembly/multivalue.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D72902.238703.patch
Type: text/x-patch
Size: 128555 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200117/5c5d5a0e/attachment-0001.bin>


More information about the llvm-commits mailing list