File tree Expand file tree Collapse file tree
llvm/lib/Target/WebAssembly Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -123,14 +123,14 @@ bool WebAssemblyDebugFixup::runOnMachineFunction(MachineFunction &MF) {
123123 }
124124 } else {
125125
126- // There is a WebAssembly Peephole optimisation can remove instructions
127- // before and after a wasm unreachable. This is a valid transformation
128- // because unreachable is "stack polymorphic", but stack polymorphism is
129- // not modeled in the llvm wasm backend. In current codegen, unreachable
130- // can only appear at the end of a basic block, and the stack is empty
131- // at the end of every basic block.
132- // So we can assume unreachable has stack-type [t*] -> [], and simply
133- // clear the stack.
126+ // There is a WebAssembly peephole optimisation can remove drop
127+ // instructions before a wasm unreachable. This is a valid
128+ // transformation because unreachable is "stack polymorphic", but stack
129+ // polymorphism is not modeled in the llvm wasm backend.
130+ // In current codegen, virtual registers can only be stackified within
131+ // a basic block, and cannot be stackified across an UNREACHABLE
132+ // because it is marked as having unmodeled side effects.
133+ // So we can assume the operand stack is empty after an UNREACHABLE .
134134 if (MI.getOpcode () == WebAssembly::UNREACHABLE) {
135135 Stack.clear ();
136136 break ;
You can’t perform that action at this time.
0 commit comments