Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[[ minsize ]] does not propagate to inlined functions #108566

Open
psiha opened this issue Sep 13, 2024 · 0 comments
Open

[[ minsize ]] does not propagate to inlined functions #108566

psiha opened this issue Sep 13, 2024 · 0 comments

Comments

@psiha
Copy link

psiha commented Sep 13, 2024

...unless, counterintuitively, combined with [[ flatten ]]
https://godbolt.org/z/s14W7W6Gf

This is demonstrated by case 1.

Case 2 is another problem I stumbled upon trying to reproduce this on godbolt - which uses string_views (as in my original problem) - but on godbolt instead of getting unwanted unrolled code Clang was somehow unable to inline trivial std::ranges wrappers and for some reason thinks those same wrappers can throw exceptions? (though this might be an STL implementation issue).

Finally - trying to workaround this issue I could not use #pragma clang loop unroll( disable ) when using STL algorithms for the obvious reason being that pragma requiring to 'see' the loop directly following - can you add a pragma or an attribute or some other mechanism with which one could disable loop unrolling for a block of functions or a block of code or for an entire function (also affecting any inlined code).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant