[all-commits] [llvm/llvm-project] 0d9488: [Instrumentation][X86] Limit setting large section...
Arthur Eubanks via All-commits
all-commits at lists.llvm.org
Fri Dec 15 09:47:13 PST 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 0d948827d773be7e440d1e639ddf42c4d28ab461
https://github.com/llvm/llvm-project/commit/0d948827d773be7e440d1e639ddf42c4d28ab461
Author: Arthur Eubanks <aeubanks at google.com>
Date: 2023-12-15 (Fri, 15 Dec 2023)
Changed paths:
M llvm/lib/Transforms/Instrumentation/Instrumentation.cpp
A llvm/test/Instrumentation/AddressSanitizer/global-metadata-code-model-medium.ll
A llvm/test/Instrumentation/AddressSanitizer/global-metadata-code-model-small.ll
R llvm/test/Instrumentation/AddressSanitizer/global_metadata_code_model.ll
M llvm/test/Instrumentation/InstrProfiling/icall-comdat.ll
A llvm/test/Instrumentation/InstrProfiling/section-code-model-large.ll
A llvm/test/Instrumentation/InstrProfiling/section-code-model-medium.ll
A llvm/test/Instrumentation/InstrProfiling/section-code-model-small.ll
Log Message:
-----------
[Instrumentation][X86] Limit setting large section flag to medium/large code models (#75542)
In #74514 and #74778 we marked various instrumentation-added sections as
large. This causes an extra PT_LOAD segment if using the small code
model. Since people using the small code model presumably aren't hitting
relocation limits, disable this when using the small code model to avoid
the extra segment.
This uses Module::getCodeModel() which isn't necessarily reliable since
it reads module metadata (which right now only the clang frontend sets),
but it would be nice to get to a point where we reliably put this sort
of information (e.g. PIC/code model/etc) in the IR. This requires
duplicating the existing tests since opt/llc currently don't set these
metadata. If we get to a point where they do set the code model metadata
based on command line arguments then we can deduplicate these tests.
More information about the All-commits
mailing list