The reason to inline the 8 and 16 byte access checks is that the code for those is smaller than the 1, 2 and 4 byte checks. This allows to have a balanced, middle ground setting between size and speed.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
What's the code size implications?
| clang/test/CodeGen/asan-use-callbacks.cpp | ||
|---|---|---|
| 15 | As we introduce a difference in behavior for small and large accesses, | |
| llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp | ||
| 310 | The flag semantics are weird. We first say "use callbacks", then we say "but not for small callbacks". | |
| 1749 | perhaps move this logic to where UseCalls is computed initially? | |
| 1751 | for single-statement if bodies this code base does not use {} | |
| clang/test/CodeGen/asan-use-callbacks.cpp | ||
|---|---|---|
| 15 | changes in llvm/lib should be tested in corresponding llvm/test, not clang/test | |
As we introduce a difference in behavior for small and large accesses,
I would extend this test to have 1, 2, 4, and 16-byte accesses.