Skip to content

Commit

Permalink
[WebAssembly] Refactor WebAssemblyLowerEmscriptenException pass for s…
Browse files Browse the repository at this point in the history
…etjmp/longjmp

This patch changes the code structure of
WebAssemblyLowerEmscriptenException pass to support both exception
handling and setjmp/longjmp. It also changes the name of the pass and
the source file.

1. Change the file/pass name to WebAssemblyLowerEmscriptenExceptions ->
WebAssemblyLowerEmscriptenEHSjLj to make it clear that it supports both
EH and SjLj
2. List function / global variable names at the top so they
can be changed easily
3. Some cosmetic changes

Patch by Heejin Ahn

Differential Revision: https://reviews.llvm.org/D23588

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279075 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
dschuff committed Aug 18, 2016
1 parent c9134ed commit 0bc76c7
Show file tree
Hide file tree
Showing 6 changed files with 191 additions and 133 deletions.
2 changes: 1 addition & 1 deletion lib/Target/WebAssembly/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ add_llvm_target(WebAssemblyCodeGen
WebAssemblyISelLowering.cpp
WebAssemblyInstrInfo.cpp
WebAssemblyLowerBrUnless.cpp
WebAssemblyLowerEmscriptenExceptions.cpp
WebAssemblyLowerEmscriptenEHSjLj.cpp
WebAssemblyMachineFunctionInfo.cpp
WebAssemblyMCInstLower.cpp
WebAssemblyOptimizeLiveIntervals.cpp
Expand Down
4 changes: 2 additions & 2 deletions lib/Target/WebAssembly/WebAssembly.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ class ModulePass;
class FunctionPass;

// LLVM IR passes.
ModulePass *createWebAssemblyLowerEmscriptenExceptions();
void initializeWebAssemblyLowerEmscriptenExceptionsPass(PassRegistry &);
ModulePass *createWebAssemblyLowerEmscriptenEHSjLj(bool DoEH, bool DoSjLj);
void initializeWebAssemblyLowerEmscriptenEHSjLjPass(PassRegistry &);
FunctionPass *createWebAssemblyOptimizeReturned();

// ISel and immediate followup passes.
Expand Down
Loading

0 comments on commit 0bc76c7

Please sign in to comment.