BOLT:Deleted some specific instructions within the function, but the size of the function remains unchanged

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”.
image

Let’s discuss on GH: [BOLT] Deleted some specific instructions within the function, but the size of the function remains unchanged · Issue #79857 · llvm/llvm-project · GitHub