summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorDan Gohman <dan433584@gmail.com>2015-12-08 03:30:42 +0000
committerDan Gohman <dan433584@gmail.com>2015-12-08 03:30:42 +0000
commitd70e5907cdaf2dd7a7a40043278d3b9589dec9bb (patch)
tree281f4ebe96f9fd83b3d0b6a4ade6b11e25270917 /llvm/lib
parenta8551b4d7e4b3c25e0f0d44115502d0c63abe13e (diff)
downloadbcm5719-llvm-d70e5907cdaf2dd7a7a40043278d3b9589dec9bb.tar.gz
bcm5719-llvm-d70e5907cdaf2dd7a7a40043278d3b9589dec9bb.zip
[WebAssembly] Assert MRI.isSSA() in passes that depend on SSA form.
llvm-svn: 254995
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/Target/WebAssembly/WebAssemblyRegStackify.cpp2
-rw-r--r--llvm/lib/Target/WebAssembly/WebAssemblyStoreResults.cpp2
2 files changed, 4 insertions, 0 deletions
diff --git a/llvm/lib/Target/WebAssembly/WebAssemblyRegStackify.cpp b/llvm/lib/Target/WebAssembly/WebAssemblyRegStackify.cpp
index ac016a7b9b0..9fbde70634a 100644
--- a/llvm/lib/Target/WebAssembly/WebAssemblyRegStackify.cpp
+++ b/llvm/lib/Target/WebAssembly/WebAssemblyRegStackify.cpp
@@ -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.
diff --git a/llvm/lib/Target/WebAssembly/WebAssemblyStoreResults.cpp b/llvm/lib/Target/WebAssembly/WebAssemblyStoreResults.cpp
index b67453bee70..21122ba2b2e 100644
--- a/llvm/lib/Target/WebAssembly/WebAssemblyStoreResults.cpp
+++ b/llvm/lib/Target/WebAssembly/WebAssemblyStoreResults.cpp
@@ -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)
OpenPOWER on IntegriCloud