[PATCH] D43746: [WebAssembly] Add Wasm exception handling prepare pass

Heejin Ahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu May 10 18:13:27 PDT 2018


aheejin added inline comments.


================
Comment at: lib/CodeGen/WinEHPrepare.cpp:54
+    "demote-catchswitch-only", cl::Hidden,
+    cl::desc("Demote catchswitch BBs only (for wasm EH)"), cl::init(false));
+
----------------
aheejin wrote:
> dschuff wrote:
> > Why do catchswitch phis need to be removed if we don't outline any funclets?
> Because catchswitch BBs are removed, or more precisely, not copied to MachineBasicBlock in ISel.
The code that skips `catchswitch` blocks is [[ https://github.com/llvm-mirror/llvm/blob/3d02bd7c77a93bf169c78947def63243033faf54/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp#L235-L239 | here ]].


Repository:
  rL LLVM

https://reviews.llvm.org/D43746





More information about the llvm-commits mailing list