[PATCH] D59740: [WebAssembly] Don't analyze branches after CFGStackify

Heejin Ahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Mar 24 06:01:52 PDT 2019


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


================
Comment at: lib/Target/WebAssembly/WebAssemblyInstrInfo.cpp:106-107
+  // If we're running after CFGStackify, we can't optimize further.
+  if (MFI.isCFGStackified())
+    return true;
+
----------------
arsenm wrote:
> I think this isn't what you want to do. analyzeBranch isn't really for turning off transformations. The verifier will stop catching useful cases with this
Please note that we were doing this already. (The part of the code I deleted)
CFGStackify is a pass near the end of WebAssembly compilation pipeline, and this pass deletes all MBB operands from branches to replace them with integers, and also deletes some other unnecessary instruction from WebAssembly standpoint, so after that it is not possible to analyze branch anyway. This patch is not introducing a new thing; it is rather filling in a hole, because we rejected analysis only when there were terminators and ignored the case of fall-throughs after CFGStackify.


Repository:
  rL LLVM

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

https://reviews.llvm.org/D59740





More information about the llvm-commits mailing list