<feed xmlns='http://www.w3.org/2005/Atom'>
<title>llvm-project.git/llvm/lib/Transforms/Instrumentation, branch users/nico/python-2</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.
</subtitle>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/'/>
<entry>
<title>[msan] Fix "Add optional flag to improve instrumentation of disjoint OR (#145990)" (#146799)</title>
<updated>2025-07-03T03:15:58+00:00</updated>
<author>
<name>Thurston Dang</name>
<email>thurston@google.com</email>
</author>
<published>2025-07-03T03:15:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=4cf53cd266b9e336b0dbaa52ef264a22b74e2242'/>
<id>4cf53cd266b9e336b0dbaa52ef264a22b74e2242</id>
<content type='text'>
The "V1" and "V2" values were already NOT'ed, hence the calculation of disjoint OR in #145990 was incorrect. This patch fixes the issue, with some refactoring and renaming of variables.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The "V1" and "V2" values were already NOT'ed, hence the calculation of disjoint OR in #145990 was incorrect. This patch fixes the issue, with some refactoring and renaming of variables.</pre>
</div>
</content>
</entry>
<entry>
<title>[NFC] [MSAN] replace (void) with [[maybe_unused]] (#146617)</title>
<updated>2025-07-02T19:14:45+00:00</updated>
<author>
<name>Florian Mayer</name>
<email>fmayer@google.com</email>
</author>
<published>2025-07-02T19:14:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=1f7ba23422da15e75a7d12f7534960d1192bae86'/>
<id>1f7ba23422da15e75a7d12f7534960d1192bae86</id>
<content type='text'>
The latter is preferred in the LLVM style guide.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The latter is preferred in the LLVM style guide.</pre>
</div>
</content>
</entry>
<entry>
<title>[LowerAllowCheckPass] allow to specify runtime.check hotness (#145998)</title>
<updated>2025-06-27T18:28:07+00:00</updated>
<author>
<name>Florian Mayer</name>
<email>fmayer@google.com</email>
</author>
<published>2025-06-27T18:28:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=71bc606e95d6771467326013c2e006728eabf4a8'/>
<id>71bc606e95d6771467326013c2e006728eabf4a8</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>[msan] Add optional flag to improve instrumentation of disjoint OR (#145990)</title>
<updated>2025-06-27T05:55:55+00:00</updated>
<author>
<name>Thurston Dang</name>
<email>thurston@google.com</email>
</author>
<published>2025-06-27T05:55:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=afe6af14ff9b790232efaf9f57667eba38eddfc9'/>
<id>afe6af14ff9b790232efaf9f57667eba38eddfc9</id>
<content type='text'>
The disjoint OR (https://github.com/llvm/llvm-project/pull/72583) of two '1's is poison, hence the MSan ought to consider the result uninitialized (rather than initialized - i.e. a false negative - as per the existing instrumentation which ignores disjointedness). This patch adds a flag, `-msan-precise-disjoint-or`, which defaults to false (the legacy behavior). A future patch will default this flag to true.

Updates the test from https://github.com/llvm/llvm-project/pull/145982</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The disjoint OR (https://github.com/llvm/llvm-project/pull/72583) of two '1's is poison, hence the MSan ought to consider the result uninitialized (rather than initialized - i.e. a false negative - as per the existing instrumentation which ignores disjointedness). This patch adds a flag, `-msan-precise-disjoint-or`, which defaults to false (the legacy behavior). A future patch will default this flag to true.

Updates the test from https://github.com/llvm/llvm-project/pull/145982</pre>
</div>
</content>
</entry>
<entry>
<title>[LowerAllowCheckPass] fix pipeline printing (#146000)</title>
<updated>2025-06-27T04:35:35+00:00</updated>
<author>
<name>Florian Mayer</name>
<email>fmayer@google.com</email>
</author>
<published>2025-06-27T04:35:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=60a18d611907dc904cd893a53c72b99c8e55ae06'/>
<id>60a18d611907dc904cd893a53c72b99c8e55ae06</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>[LowerAllowCheck] preserve CFG analyses (#145816)</title>
<updated>2025-06-26T17:08:34+00:00</updated>
<author>
<name>Florian Mayer</name>
<email>fmayer@google.com</email>
</author>
<published>2025-06-26T17:08:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=e0c7136713d23b7637b2c14d295e338351b7a5ee'/>
<id>e0c7136713d23b7637b2c14d295e338351b7a5ee</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>[NFC] [LowerAllowCheck] use InstIterator (#145817)</title>
<updated>2025-06-26T02:40:43+00:00</updated>
<author>
<name>Florian Mayer</name>
<email>fmayer@google.com</email>
</author>
<published>2025-06-26T02:40:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=e2cc82b1777c3a5a2b66d9de60bb0eece8d55283'/>
<id>e2cc82b1777c3a5a2b66d9de60bb0eece8d55283</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>[msan] Sharpen instrumentation of Intrinsic::{ctlz,cttz} (#145609)</title>
<updated>2025-06-25T16:29:59+00:00</updated>
<author>
<name>Thurston Dang</name>
<email>thurston@google.com</email>
</author>
<published>2025-06-25T16:29:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=5a194c1fd97b10fdbdbd8ada85372d978c9ff3c4'/>
<id>5a194c1fd97b10fdbdbd8ada85372d978c9ff3c4</id>
<content type='text'>
The current instrumentation of Intrinsic::{ctlz,cttz} has false positives. For example, consider `ctlz(0001 11??)` whereby `0` and `1` denotes initialized bits (with concrete values of 0 and 1 respectively) and `?` denotes an uninitialized bit. The result (of 3) is well-defined and the shadow ought to be fully initialized, but the current instrumentation marks it as fully uninitialized.

This patch improves the fidelity of the instrumentation by comparing the number of leading (for ctlz; trailing for cttz) zeros in the concrete value and the shadow.

This patch also renames the function from 'handleCountZeroes' to 'handleLeadingTrailingCountZeros', to clarify that the intrinsics handled do not count all the zeros (unlike `llvm.ctpop`, which counts all the 1s).</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The current instrumentation of Intrinsic::{ctlz,cttz} has false positives. For example, consider `ctlz(0001 11??)` whereby `0` and `1` denotes initialized bits (with concrete values of 0 and 1 respectively) and `?` denotes an uninitialized bit. The result (of 3) is well-defined and the shadow ought to be fully initialized, but the current instrumentation marks it as fully uninitialized.

This patch improves the fidelity of the instrumentation by comparing the number of leading (for ctlz; trailing for cttz) zeros in the concrete value and the shadow.

This patch also renames the function from 'handleCountZeroes' to 'handleLeadingTrailingCountZeros', to clarify that the intrinsics handled do not count all the zeros (unlike `llvm.ctpop`, which counts all the 1s).</pre>
</div>
</content>
</entry>
<entry>
<title>Reapply "[msan] Automatically print shadow for failing outlined checks" (#145611) (#145615)</title>
<updated>2025-06-25T03:33:11+00:00</updated>
<author>
<name>Thurston Dang</name>
<email>thurston@google.com</email>
</author>
<published>2025-06-25T03:33:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=c85466dcd485d4a1320eec9cbf32bd47ff90464f'/>
<id>c85466dcd485d4a1320eec9cbf32bd47ff90464f</id>
<content type='text'>
This reverts commit 5eb5f0d8760c6b757c1da22682b5cf722efee489 i.e.,
relands 1b71ea411a9d36705663b1724ececbdfec7cc98c.

Test case was failing on aarch64 because the long double type is
implemented differently on x86 vs aarch64. This reland restricts the
test to x86.

----

Original CL description:
    
A commonly used aid for debugging MSan reports is
`__msan_print_shadow()`, which requires manual app code annotations
(typically of the variable in the UUM report or nearby). This is in
contrast to ASan, which automatically prints out the shadow map when a
check fails.
    
This patch changes MSan to print the shadow that failed an outlined
check (checks are outlined per function after the
`-msan-instrumentation-with-call-threshold` is exceeded) if verbosity &gt;=
1. Note that we do not print out the shadow map of "neighboring"
variables because this is technically infeasible; see "Caveat" below.
    
This patch can be easier to use than `__msan_print_shadow()` because
this does not require manual app code annotations. Additionally, due to
optimizations, `__msan_print_shadow()` calls can sometimes spuriously
affect whether a variable is initialized.
    
As a side effect, this patch also enables outlined checks for
arbitrary-sized shadows (vs. the current hardcoded handlers for
{1,2,4,8}-byte shadows).
    
Caveat: the shadow does not necessarily correspond to an individual user
variable, because MSan instrumentation may combine and/or truncate
multiple shadows prior to emitting a check that the mangled shadow is
zero (e.g., `convertShadowToScalar()`,
`handleSSEVectorConvertIntrinsic()`, `materializeInstructionChecks()`).
OTOH it is arguably a strength that this feature emit the shadow that
directly matters for the MSan check, but which cannot be obtained using
the MSan API.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This reverts commit 5eb5f0d8760c6b757c1da22682b5cf722efee489 i.e.,
relands 1b71ea411a9d36705663b1724ececbdfec7cc98c.

Test case was failing on aarch64 because the long double type is
implemented differently on x86 vs aarch64. This reland restricts the
test to x86.

----

Original CL description:
    
A commonly used aid for debugging MSan reports is
`__msan_print_shadow()`, which requires manual app code annotations
(typically of the variable in the UUM report or nearby). This is in
contrast to ASan, which automatically prints out the shadow map when a
check fails.
    
This patch changes MSan to print the shadow that failed an outlined
check (checks are outlined per function after the
`-msan-instrumentation-with-call-threshold` is exceeded) if verbosity &gt;=
1. Note that we do not print out the shadow map of "neighboring"
variables because this is technically infeasible; see "Caveat" below.
    
This patch can be easier to use than `__msan_print_shadow()` because
this does not require manual app code annotations. Additionally, due to
optimizations, `__msan_print_shadow()` calls can sometimes spuriously
affect whether a variable is initialized.
    
As a side effect, this patch also enables outlined checks for
arbitrary-sized shadows (vs. the current hardcoded handlers for
{1,2,4,8}-byte shadows).
    
Caveat: the shadow does not necessarily correspond to an individual user
variable, because MSan instrumentation may combine and/or truncate
multiple shadows prior to emitting a check that the mangled shadow is
zero (e.g., `convertShadowToScalar()`,
`handleSSEVectorConvertIntrinsic()`, `materializeInstructionChecks()`).
OTOH it is arguably a strength that this feature emit the shadow that
directly matters for the MSan check, but which cannot be obtained using
the MSan API.</pre>
</div>
</content>
</entry>
<entry>
<title>Revert "[msan] Automatically print shadow for failing outlined checks" (#145611)</title>
<updated>2025-06-24T22:53:19+00:00</updated>
<author>
<name>Thurston Dang</name>
<email>thurston@google.com</email>
</author>
<published>2025-06-24T22:53:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=5eb5f0d8760c6b757c1da22682b5cf722efee489'/>
<id>5eb5f0d8760c6b757c1da22682b5cf722efee489</id>
<content type='text'>
Reverts llvm/llvm-project#145107

Reason: buildbot breakage
(https://lab.llvm.org/buildbot/#/builders/51/builds/18512)</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Reverts llvm/llvm-project#145107

Reason: buildbot breakage
(https://lab.llvm.org/buildbot/#/builders/51/builds/18512)</pre>
</div>
</content>
</entry>
</feed>
