<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/79857>79857</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
[BOLT] Deleted some specific instructions within the function, but the size of the function remains unchanged
</td>
</tr>
<tr>
<th>Labels</th>
<td>
BOLT
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
killerloura
</td>
</tr>
</table>
<pre>
I added a codesize optimization in bolt, which removed some instructions. I expected it to optimize code size, but it didn't work. It seems like the function is being refilled with some unused data.
The function called by "call" is generated by my optimization pass using `createInjectedBinaryFunction` .

Interestingly, it worked when I replaced a "call" with "nop".

</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJxsk8FuozwUhZ_GbK6KHBMgLFg0jfh_NJWq0VSj0eyMfQG3xka2SZM-_cgknWmkrhD4-vicw2fuvRoMYk3yPckPCV_CaF39qrRGp-3ieNJZea5b4FKiBA7CSvTqHcHOQU3qnQdlDSgDndWBsAd4G5UYweFkjyjB2wlBGR_cIuKkT6EFPM0oAkpQAYL9UMJVG6J41OmWENelkoawMsCbda8ptAE84uRBq1eEMCL0ixEXDx46VGYAh330L-FNhfHiYDGLRwmSB54SeiD0_vnzVsHX-e4MhLH4QhiLegMadDxclqbzbeaZew-LjyeSggqHPGBrXtZke2W4OzdXfVJQuB5L2IbkezXxAUn5UFT0lG1ykh8I2y2ztlyS7J6whrBm0dmvdp_9Xz2GH1i47DgWp4eGt_3YpLMZCKsuitCagA59UGbQ59icupQVCxjRQAsOZ83F-vs-5VvbIYwZOxPGvva3paesKL70Z7qzpep3NX9n78fy6b-fL9_0S7c7NZRe_SWyzmSVVTzBelPSIt_mVV4kY80zTkVeIauqshcb3uWi6rtMClb2jOVlompG2ZZuWLUpMpYVKeXZbpNvq0z0tJRYkC3FiSudan2cUuuGRHm_YF1Wu7xMNO9Q-5VpxvZPj8-EsUi3q-P4XbcMnmypVj74fwJBBb3eg3VDfoADagwfCPsZheqVuGF5rVCZGww_0I3fLvekv8XURePGw2LEyM2AMlmcrscQZv-320GFcelSYSfCmujw-ribnY2AEdaseT1hzRr5TwAAAP__PwU-Xg">