<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/59532>59532</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
How to apply optimization passes to a single function?
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
yuemonangong
</td>
</tr>
</table>
<pre>
The command `opt -S src.ll -o des.ll -pass1 -pass2 -pass3` can apply the specific passes to a '.ll' file.
The question is, how to apply `-pass1 -pass2 -pass3` to a specific function in `src.ll` without modifying other functions.
Is there an API or command line to achieve this?
Thank you very much.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJx0UcuunDoQ_BqzaQ0yzXvBYu49Qjm7SMkPeEyDnRib0GZG5OsjmGRyNlkVUlMPVylmO3miTpT_ifItUVs0Ye32jebglZ-Cn5JbGPbuqyHQYZ6VH0BUMiwRLl-AV506B5cAA_H5tSjm7An4hFxUErTyoJbF7RANAS-k7Wg1HHdiiAEUCKxT5wTWMFpHKQj5JuT18P2xEUcbPFgW-D-Y8DgZp5yo5L88T9WX1bh5_RTxB-mZ_PjtYaMJW4Q5DHbcrZ8gREPri8DpM8k7H9lXAuXh-vkdwvoqxFlPp502lu4E0VgWef_nBcp_hz1scKd1h3nTJk2GLh_avFUJdVlVZ7JpyjZPTFeURYNtQznJsmqaehxViYUcmiLTFTVjYjuUiBlmpayzKs_T5tYWY1UN5VhLRN2IQtKsrEudu89pWKfEMm_UlW2ZY-LUjRyfayN6esB5FIjH-Gt3cC63bWJRSGc58l-VaKOj7tPH7sMS7Wx_qrPWj1Oy9ZOjV4Mi75NtdZ2JcWGRXwX2AvvJRrPdUh1mgf1h8xsuyxq-kY4C-zMcC-zP8L8CAAD__0SX34I">