[WebAssembly] Assert MRI.isSSA() in passes that depend on SSA form.

llvm-svn: 254995
This commit is contained in:
Dan Gohman 2015-12-08 03:30:42 +00:00
parent a8551b4d7e
commit d70e5907cd
2 changed files with 4 additions and 0 deletions

View 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.

View 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)