From 55a29f75fd81ea0a107fe3cfab9fe4000082cc9a Mon Sep 17 00:00:00 2001 From: Dan Gohman Date: Tue, 8 Dec 2015 03:30:42 +0000 Subject: [PATCH] [WebAssembly] Assert MRI.isSSA() in passes that depend on SSA form. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254995 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Target/WebAssembly/WebAssemblyRegStackify.cpp | 2 ++ lib/Target/WebAssembly/WebAssemblyStoreResults.cpp | 2 ++ 2 files changed, 4 insertions(+) diff --git a/lib/Target/WebAssembly/WebAssemblyRegStackify.cpp b/lib/Target/WebAssembly/WebAssemblyRegStackify.cpp index ac016a7b9b0..9fbde70634a 100644 --- a/lib/Target/WebAssembly/WebAssemblyRegStackify.cpp +++ b/lib/Target/WebAssembly/WebAssemblyRegStackify.cpp @@ -127,6 +127,8 @@ bool WebAssemblyRegStackify::runOnMachineFunction(MachineFunction &MF) { WebAssemblyFunctionInfo &MFI = *MF.getInfo(); AliasAnalysis &AA = getAnalysis().getAAResults(); + assert(MRI.isSSA() && "RegStackify depends on SSA form"); + // Walk the instructions from the bottom up. Currently we don't look past // block boundaries, and the blocks aren't ordered so the block visitation // order isn't significant, but we may want to change this in the future. diff --git a/lib/Target/WebAssembly/WebAssemblyStoreResults.cpp b/lib/Target/WebAssembly/WebAssemblyStoreResults.cpp index b67453bee70..21122ba2b2e 100644 --- a/lib/Target/WebAssembly/WebAssemblyStoreResults.cpp +++ b/lib/Target/WebAssembly/WebAssemblyStoreResults.cpp @@ -72,6 +72,8 @@ bool WebAssemblyStoreResults::runOnMachineFunction(MachineFunction &MF) { const MachineRegisterInfo &MRI = MF.getRegInfo(); MachineDominatorTree &MDT = getAnalysis(); + assert(MRI.isSSA() && "StoreResults depends on SSA form"); + for (auto &MBB : MF) { DEBUG(dbgs() << "Basic Block: " << MBB.getName() << '\n'); for (auto &MI : MBB) -- 2.34.1