X-Git-Url: http://plrg.eecs.uci.edu/git/?a=blobdiff_plain;f=lib%2FTarget%2FWebAssembly%2FWebAssemblyRegStackify.cpp;h=d890310ac5013e5a10c09fce4bf21d84c3a9e8a8;hb=54fd4d436030f4fa15e8b9cd6643a9255890144c;hp=ac016a7b9b0aaa23fdf86b10195418a849076e3c;hpb=ca526959c1fc8d8172b780d916cdeb3f03a33836;p=oota-llvm.git diff --git a/lib/Target/WebAssembly/WebAssemblyRegStackify.cpp b/lib/Target/WebAssembly/WebAssemblyRegStackify.cpp index ac016a7b9b0..d890310ac50 100644 --- a/lib/Target/WebAssembly/WebAssemblyRegStackify.cpp +++ b/lib/Target/WebAssembly/WebAssemblyRegStackify.cpp @@ -15,7 +15,7 @@ /// are then marked as "stackified", meaning references to them are replaced by /// "push" and "pop" from the stack. /// -/// This is primarily a code size optimiation, since temporary values on the +/// This is primarily a code size optimization, since temporary values on the /// expression don't need to be named. /// //===----------------------------------------------------------------------===// @@ -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.