[WebAssembly] Assert MRI.isSSA() in passes that depend on SSA form.
authorDan Gohman <dan433584@gmail.com>
Tue, 8 Dec 2015 03:30:42 +0000 (03:30 +0000)
committerDan Gohman <dan433584@gmail.com>
Tue, 8 Dec 2015 03:30:42 +0000 (03:30 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254995 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/WebAssembly/WebAssemblyRegStackify.cpp
lib/Target/WebAssembly/WebAssemblyStoreResults.cpp

index ac016a7b9b0aaa23fdf86b10195418a849076e3c..9fbde70634ac657924fd0c1de94e5ab26aaf9155 100644 (file)
@@ -127,6 +127,8 @@ bool WebAssemblyRegStackify::runOnMachineFunction(MachineFunction &MF) {
   WebAssemblyFunctionInfo &MFI = *MF.getInfo<WebAssemblyFunctionInfo>();
   AliasAnalysis &AA = getAnalysis<AAResultsWrapperPass>().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.
index b67453bee708dffe523612f6c9e76b7ee25ceb0b..21122ba2b2ea9677c031003e96bf26c5b57fb5ad 100644 (file)
@@ -72,6 +72,8 @@ bool WebAssemblyStoreResults::runOnMachineFunction(MachineFunction &MF) {
   const MachineRegisterInfo &MRI = MF.getRegInfo();
   MachineDominatorTree &MDT = getAnalysis<MachineDominatorTree>();
 
+  assert(MRI.isSSA() && "StoreResults depends on SSA form");
+
   for (auto &MBB : MF) {
     DEBUG(dbgs() << "Basic Block: " << MBB.getName() << '\n');
     for (auto &MI : MBB)