<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/54200>54200</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
ObjCMethodDecl::isDirectMethod is called extremely frequently and requires expensive attribute checks
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
saagarjha
</td>
</tr>
</table>
<pre>
Pretty much what the title says. In our large project the compiler seems to spend something like 10-20% of its time checking the attributes on methods, in particular whether the method is a direct call or not (a runner up is availability checks). Given that direct calls are supposed to be a carefully used feature sprinkled on just a few performance-sensitive parts of a codebase, the cost to check whether a method is using direct calls seems fairly high.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJxVUttu2zAM_Rr7hajh-IIkD37YWnTYQ7H9giTTNlNZ8kQpXf5-lNN1HSDAlnR4LqS0H2_Dz4Ax3mBNZoG3RUWIC0KkaBFY3biC7w58CmBVmBG24C9o7iDj140sBmDElSF64A3dCOxXjAu5GSy9Ihzqh6Yumh78BBQFR6vULmheMyQTqRgD6RSRwTvIxX7konkEcrCpEMkkURd3ciNyueQOAmJQMFLIloyyFnwA5yMUzUlBSM4JPG077KrIKk2WJOyuLgrnCr7RFZ1QSvBPPIIPkj9tm2ccczQtNuUq4JSsvUHKxxOqmDJuC-RerZyI_UviKNAJ32DDMPmwKmfwgdExRRHbE3FuhvD5EbVizFnvHZVaEdv9feRVn9Imzk37z-m9-5OiIL4WmpeqHId2PLdnVe5zHH7oy-PLTvGExhbtF1nETzvJywd1ZpMI-DsGXFG4poC_Eroov0rGmndSwoLYcpjrp8G9d7RMwQ5LjBtnkeZZ1kxxSbqStyIba69_Pw_vL0m2xJxQpvHcd01dl8sw6bE-9IcOx_HYd0fTadWa02HSx-l86syxlEGi5aHovxZN46TTO4X8F_1TSUNTN03d1t2ha8-Hrjqbpj61Yz-12hxPnS66Gld5DVX2Ufkwl2HYLek0s1xa4sj_LhUzzQ5xlxN-laRjYWClZhUuiyp38WE3_wcEJink">