<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/98519>98519</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
Use profile information to find best codegen strategy for switch statements.
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
hiraditya
</td>
</tr>
</table>
<pre>
The codegen of switch statements have different strategies that can affect performance and code size e.g., jump-table, split jump-table, binary-tree etc. Currently there are hard coded thresholds which may not be suitable for all the cases in a large codebase.
Based on the discussion in #98391 using profile-information to make such decisions can help with better codegen.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJxkUluOqzoQXI35aQWBSQJ88DEPZQX3LqCxG-y5xkbuZqLc1R9BZs6R5vzY8qOqu6oLmf0ciQZ1eVWX9wI3cSkPzme0Xh5YjMk-hn8cgUmWZoqQJuC7F-OABYUWisLg8JPA-mmiTFGAJaPQ7IlBHAoYjIDTREZgpTylvGA0BBjtQQvs_yegci6VfoOPbVlPgmOg_cRr8PLjbvQR8-MkmQhITAlvW97rhgeIo0yAmcBhfrJbEJeJXQqW4e68cbDgA2ISGAl48wcvTCkDhrAzgEEmBh8BIWCen-JHZCpV9a6ql-f6ikwWUjwg1rPZmH2KO07ppu-avoaNfZxhzWnygU4-Htpl_yUJFvxvb8A4sGT8juXDKkdhhbsXByOJUP72vizs0Ni-6bGgoW511epz3XeFG9paU1dr216uDVY02q6l87VtNDZt1etz4Qdd6XPV1nXdXa5NV1b11HXYj9durJoLoTpXtKAPZQifS5nyXHjmjYa-u9R9EXCkwEdItI50h-NRab1nJg875jRuM6tzFTwL_2ERL4GGf5m-TYAfJkw-WhiJ5XfCvtLzOEbyV9bKYsthcCIrq-ZF6ZvSt9mL28bSpEXp2176azutOX2QEaVvR8Os9O0p6HPQvwIAAP__uP8EwA">