#
0d948827 |
| 15-Dec-2023 |
Arthur Eubanks <aeubanks@google.com> |
[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_
[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.
show more ...
|