diff options
author | Heejin Ahn <aheejin@gmail.com> | 2018-08-21 21:23:07 +0000 |
---|---|---|
committer | Heejin Ahn <aheejin@gmail.com> | 2018-08-21 21:23:07 +0000 |
commit | 78d191089182842f6360547c48993e44de9e1437 (patch) | |
tree | 4c74fb81a64effca22778f64765ad7585e9630b6 /llvm/lib/Target/WebAssembly/WebAssembly.h | |
parent | 1d78503f6a3c71d9862d5009224cba27b237a883 (diff) | |
download | bcm5719-llvm-78d191089182842f6360547c48993e44de9e1437.tar.gz bcm5719-llvm-78d191089182842f6360547c48993e44de9e1437.zip |
[WebAssembly] Restore __stack_pointer after catch instructions
Summary:
After the stack is unwound due to a thrown exception, the
`__stack_pointer` global can point to an invalid address. This inserts
instructions that restore `__stack_pointer` global.
Reviewers: jgravelle-google, dschuff
Subscribers: mgorny, sbc100, sunfish, llvm-commits
Differential Revision: https://reviews.llvm.org/D50980
llvm-svn: 340339
Diffstat (limited to 'llvm/lib/Target/WebAssembly/WebAssembly.h')
-rw-r--r-- | llvm/lib/Target/WebAssembly/WebAssembly.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/lib/Target/WebAssembly/WebAssembly.h b/llvm/lib/Target/WebAssembly/WebAssembly.h index 05b7b21fb59..87975cad02a 100644 --- a/llvm/lib/Target/WebAssembly/WebAssembly.h +++ b/llvm/lib/Target/WebAssembly/WebAssembly.h @@ -39,6 +39,7 @@ FunctionPass *createWebAssemblyArgumentMove(); FunctionPass *createWebAssemblySetP2AlignOperands(); // Late passes. +FunctionPass *createWebAssemblyEHRestoreStackPointer(); FunctionPass *createWebAssemblyReplacePhysRegs(); FunctionPass *createWebAssemblyPrepareForLiveIntervals(); FunctionPass *createWebAssemblyOptimizeLiveIntervals(); @@ -63,6 +64,7 @@ void initializeFixFunctionBitcastsPass(PassRegistry &); void initializeOptimizeReturnedPass(PassRegistry &); void initializeWebAssemblyArgumentMovePass(PassRegistry &); void initializeWebAssemblySetP2AlignOperandsPass(PassRegistry &); +void initializeWebAssemblyEHRestoreStackPointerPass(PassRegistry &); void initializeWebAssemblyReplacePhysRegsPass(PassRegistry &); void initializeWebAssemblyPrepareForLiveIntervalsPass(PassRegistry &); void initializeWebAssemblyOptimizeLiveIntervalsPass(PassRegistry &); |