File tree 1 file changed +8
-8
lines changed
llvm/lib/Target/WebAssembly
1 file changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -123,14 +123,14 @@ bool WebAssemblyDebugFixup::runOnMachineFunction(MachineFunction &MF) {
123
123
}
124
124
} else {
125
125
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 .
134
134
if (MI.getOpcode () == WebAssembly::UNREACHABLE) {
135
135
Stack.clear ();
136
136
break ;
You can’t perform that action at this time.
0 commit comments