[PATCH] D62877: [WebAssembly] Implement tail calls and unify tablegen call classes

Thomas Lively via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 7 10:18:55 PDT 2019


tlively marked an inline comment as done.
tlively added inline comments.


================
Comment at: llvm/lib/Target/WebAssembly/WebAssemblyISelLowering.cpp:790
+    InTys.clear();
+    InTys.push_back(MVT::Other);
+    InTys.push_back(MVT::Glue);
----------------
aheejin wrote:
> - Sorry, but why should we clear `InTys` here? I understand that we don't need output types, but should input types different from normal calls?
> - `InTys.push_back(MVT::Other);` is common for both `if` and `else`, so we can hoist it (If we don't need to clear `InTys`)
The terminology here is super confusing, but everything named `In*` refers to values coming back into the current frame once the call finishes, i.e. the return values. `return_call` has no return values except for the chain and glue, so `InTys` gets cleared.

We would need to duplicate the condition for the clear and the glue push if we hoisted the other push, so I don't think it's worth it.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D62877





More information about the llvm-commits mailing list