summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/WebAssembly/WebAssemblyCFGStackify.cpp
diff options
context:
space:
mode:
authorYury Delendik <ydelendik@mozilla.com>2018-10-04 23:31:00 +0000
committerYury Delendik <ydelendik@mozilla.com>2018-10-04 23:31:00 +0000
commit409b4391527a72d8c606749386a079aa42437f57 (patch)
tree67d587279ecec545a9408f83c9971a76307f3930 /llvm/lib/Target/WebAssembly/WebAssemblyCFGStackify.cpp
parent173946dca61175350b415745848e946dceef6968 (diff)
downloadbcm5719-llvm-409b4391527a72d8c606749386a079aa42437f57.tar.gz
bcm5719-llvm-409b4391527a72d8c606749386a079aa42437f57.zip
[WebAssembly] Ignore DBG_VALUE in WebAssemblyCFGStackify pass when looking for block start
Summary: Fixes https://bugs.llvm.org/show_bug.cgi?id=39158 and regression caused by D49034. Though it is possible the problem was existed before and was exposed by additional DBG_VALUEs. Reviewers: sunfish, dschuff, aheejin Reviewed By: aheejin Subscribers: sbc100, aheejin, llvm-commits, alexcrichton, jgravelle-google Differential Revision: https://reviews.llvm.org/D52837 llvm-svn: 343827
Diffstat (limited to 'llvm/lib/Target/WebAssembly/WebAssemblyCFGStackify.cpp')
-rw-r--r--llvm/lib/Target/WebAssembly/WebAssemblyCFGStackify.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/lib/Target/WebAssembly/WebAssemblyCFGStackify.cpp b/llvm/lib/Target/WebAssembly/WebAssemblyCFGStackify.cpp
index e62b8b60d0d..93ca670bbdb 100644
--- a/llvm/lib/Target/WebAssembly/WebAssemblyCFGStackify.cpp
+++ b/llvm/lib/Target/WebAssembly/WebAssemblyCFGStackify.cpp
@@ -309,6 +309,8 @@ void WebAssemblyCFGStackify::placeBlockMarker(MachineBasicBlock &MBB) {
// Local expression tree should go after the BLOCK.
for (auto I = Header->getFirstTerminator(), E = Header->begin(); I != E;
--I) {
+ if (std::prev(I)->isDebugInstr() || std::prev(I)->isPosition())
+ continue;
if (WebAssembly::isChild(*std::prev(I), MFI))
AfterSet.insert(&*std::prev(I));
else
@@ -531,6 +533,8 @@ void WebAssemblyCFGStackify::placeTryMarker(MachineBasicBlock &MBB) {
// Local expression tree should go after the TRY.
for (auto I = Header->getFirstTerminator(), E = Header->begin(); I != E;
--I) {
+ if (std::prev(I)->isDebugInstr() || std::prev(I)->isPosition())
+ continue;
if (WebAssembly::isChild(*std::prev(I), MFI))
AfterSet.insert(&*std::prev(I));
else
OpenPOWER on IntegriCloud