Coming soon - Get a detailed view of why an account is flagged as spam!
view details
21
What would cause a single instruction function to NOT be inlined?
Post Flair (click to view more posts with a particular flair)
Post Body

My architecture has an absolute value instruction. I can see in the disassembly that both abs and std::abs compile down to this single instruction. But sometimes itโ€™s a function call to an abs function which only has two instructions: abs and ret, and sometimes itโ€™s inlined. Iโ€™m using -O3 on gcc... any idea why a function call would be generated for such a small function?

Author
Account Strength
100%
Account Age
13 years
Verified Email
Yes
Verified Flair
No
Total Karma
130,597
Link Karma
12,951
Comment Karma
117,424
Profile updated: 6 hours ago
Posts updated: 9 months ago

Subreddit

Post Details

We try to extract some basic information from the post title. This is not always successful or accurate, please use your best judgement and compare these values to the post title and body for confirmation.
Posted
4 years ago