Details
- Reviewers
- None
Diff Detail
- Repository
- rG LLVM Github Monorepo
Unit Tests
Event Timeline
Do these all belong in a linux specific directory? Wouldn't the two which aren't x86 specific be fine to put into libc/src/__support/?
Also, we should be weary of LTO inlining. I'm not entirely sure of the details here or how to force the linker to not inline these functions. It would certainly break all of these so it's worth looking into.
I did not finish this patch, but wrote just enough to make it understandable so that the main discussion about sanitizer instrumentation can proceed smoothly.
The __builtin* functions are really clang/gcc specific. That is why I put them in a linux specific directory. May be in future they have to be grouped differently.
Also, we should be weary of LTO inlining. I'm not entirely sure of the details here or how to force the linker to not inline these functions. It would certainly break all of these so it's worth looking into.
Thanks for bringing this up. So yes, we need to add the noinline attribute to guarantee that these functions don't get inlined even under LTO. Will do this in the next update.
libc/config/linux/platform_lowlevel.cpp | ||
---|---|---|
13 | Add noinline attribute. | |
libc/config/linux/x86_64/machine_lowlevel.cpp | ||
13 | Add noinline attribute. |
Add noinline attribute.