[WebAssembly] Eliminate range checks on br_tables
Summary: Jump tables for most targets cannot handle out of range indices by themselves, so LLVM emits range checks to guard the jump tables. WebAssembly, on the other hand, implements jump tables using the br_table instruction, which takes a default branch target as an operand, making the range checks redundant. This patch introduces a new MachineFunction pass in the WebAssembly backend to find and eliminate the redundant range checks. Reviewers: aheejin, dschuff Subscribers: mgorny, sbc100, jgravelle-google, hiraditya, sunfish, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D80863
Loading
Please register or sign in to comment