facebookarchive / BOLT

Binary Optimization and Layout Tool - A linux command-line utility used for optimizing performance of binaries
2.51k stars 176 forks source link

Disable InlineMemcpy with NoInline #237

Closed yota9 closed 2 years ago

yota9 commented 2 years ago

Sometimes we want completely disable inlining optimizations, disable memcpy when NoInline option is passed

Vladislav Khmelevsky, Advanced Software Technology Lab, Huawei

maksfb commented 2 years ago

Are you enabling -inline-memcpy in some places and want to override it with -no-inline?

I've just verified that in GCC -minline-all-stringops operates independently of -fno-inline. I.e. adding the latter will not disable inlining of memcpy and co. if it was enabled earlier. Since -inline-memcpy option is off by default, I'd prefer to keep a similar behavior in BOLT to keep the user expectations aligned.

yota9 commented 2 years ago

@maksfb Thank you for your answer! The idea here is to protect bolt users from using incompatible options e.g. memcpy inlining and golang. Actually I didn't noticed StringOps option in pass registration, so never mind , I will just close the review :)