| #
29441e4f |
| 29-Jan-2025 |
Nikita Popov <npopov@redhat.com> |
[IR] Convert from nocapture to captures(none) (#123181)
This PR removes the old `nocapture` attribute, replacing it with the new
`captures` attribute introduced in #116990. This change is
intended
[IR] Convert from nocapture to captures(none) (#123181)
This PR removes the old `nocapture` attribute, replacing it with the new
`captures` attribute introduced in #116990. This change is
intended to be essentially NFC, replacing existing uses of `nocapture`
with `captures(none)` without adding any new analysis capabilities.
Making use of non-`none` values is left for a followup.
Some notes:
* `nocapture` will be upgraded to `captures(none)` by the bitcode
reader.
* `nocapture` will also be upgraded by the textual IR reader. This is to
make it easier to use old IR files and somewhat reduce the test churn in
this PR.
* Helper APIs like `doesNotCapture()` will check for `captures(none)`.
* MLIR import will convert `captures(none)` into an `llvm.nocapture`
attribute. The representation in the LLVM IR dialect should be updated
separately.
show more ...
|
|
Revision tags: llvmorg-21-init, llvmorg-19.1.7, llvmorg-19.1.6, llvmorg-19.1.5, llvmorg-19.1.4 |
|
| #
38fffa63 |
| 06-Nov-2024 |
Paul Walker <paul.walker@arm.com> |
[LLVM][IR] Use splat syntax when printing Constant[Data]Vector. (#112548)
|
|
Revision tags: llvmorg-19.1.3 |
|
| #
cf8d2453 |
| 25-Oct-2024 |
Vitaly Buka <vitalybuka@google.com> |
[msan] Reduces overhead of #113200, by 10% (#113201)
CTMark #113200 size overhead was 5.3%, now it's 4.7%.
The patch affects only signed integers.
https://alive2.llvm.org/ce/z/Lv5hyi
* The
[msan] Reduces overhead of #113200, by 10% (#113201)
CTMark #113200 size overhead was 5.3%, now it's 4.7%.
The patch affects only signed integers.
https://alive2.llvm.org/ce/z/Lv5hyi
* The patch replaces code which extracted sign bit,
maximized/minimized it, then packed it back, with
simple sign bit flip. The another way to think about
transformation is as a subtraction of MIN_SINT from
A/B. Then we map MIN_SINT to 0, 0 to -MIN_SINT, and
MAX_SINT to MAX_UINT.
* Then to maximize/minimize A/B we don't need
to extract sign bit, we can apply shadow the
same way as to other bits.
* After sign bit flip, we had to switch to unsigned
version of the predicates.
* After change above getHighestPossibleValue/getLowestPossibleValue
became very similar, so we can combine into a single function.
* Because the function does sign bit flip and
requires unsigned predicates used for returned values,
there is no point in keeping it as a member of class,
to hide, we switch to function local lambda.
show more ...
|
| #
c77d8edf |
| 22-Oct-2024 |
Vitaly Buka <vitalybuka@google.com> |
Revert "Revert "[msan] Switch to -msan-handle-icmp-exact my default"" (#113379)
Reverts llvm/llvm-project#113376
Fixed with #113378
|
| #
c3aa8b7d |
| 22-Oct-2024 |
Vitaly Buka <vitalybuka@google.com> |
Revert "[msan] Switch to -msan-handle-icmp-exact my default" (#113376)
Reverts llvm/llvm-project#113200
Breaks bots, see llvm/llvm-project#113200
|
| #
395093ec |
| 22-Oct-2024 |
Vitaly Buka <vitalybuka@google.com> |
[msan] Switch to -msan-handle-icmp-exact my default (#113200)
Fixes #111212.
This grows .text by 5.3% on CTMark, (or 2.6% large internal binary)
Perf regressed by 1.6%. We will try to improve in
[msan] Switch to -msan-handle-icmp-exact my default (#113200)
Fixes #111212.
This grows .text by 5.3% on CTMark, (or 2.6% large internal binary)
Perf regressed by 1.6%. We will try to improve in follow up patches.
It worth to pay some performance regression to fix
correctness to avoid stuff like #111212.
show more ...
|
| #
54cf62d1 |
| 22-Oct-2024 |
Vitaly Buka <vitalybuka@google.com> |
[nfc][msan] Generate test with update_test_checks.py (#113199)
PR is to:
1. Simplify test update in #113200
2. Make tests more comprehensive, currently interesting cases looks very
basic:
```
[nfc][msan] Generate test with update_test_checks.py (#113199)
PR is to:
1. Simplify test update in #113200
2. Make tests more comprehensive, currently interesting cases looks very
basic:
```
; CHECK-LABEL: @ICmpSGTAllOnes
; CHECK: icmp slt
; CHECK-NOT: call void @__msan_warning
; CHECK: icmp sgt
; CHECK-NOT: call void @__msan_warning
; CHECK: ret i1
```
show more ...
|
| #
cafeacff |
| 21-Oct-2024 |
Vitaly Buka <vitalybuka@google.com> |
[nfc][msan] Remove RUN: duplicates (#113197)
|
| #
59528bbc |
| 21-Oct-2024 |
Vitaly Buka <vitalybuka@google.com> |
[nfc][msan] Reorder flags in RUN: (#113196)
|
|
Revision tags: llvmorg-19.1.2, llvmorg-19.1.1, llvmorg-19.1.0, llvmorg-19.1.0-rc4, llvmorg-19.1.0-rc3, llvmorg-19.1.0-rc2, llvmorg-19.1.0-rc1, llvmorg-20-init, llvmorg-18.1.8, llvmorg-18.1.7, llvmorg-18.1.6, llvmorg-18.1.5, llvmorg-18.1.4, llvmorg-18.1.3, llvmorg-18.1.2, llvmorg-18.1.1, llvmorg-18.1.0, llvmorg-18.1.0-rc4, llvmorg-18.1.0-rc3, llvmorg-18.1.0-rc2, llvmorg-18.1.0-rc1, llvmorg-19-init, llvmorg-17.0.6, llvmorg-17.0.5, llvmorg-17.0.4, llvmorg-17.0.3, llvmorg-17.0.2, llvmorg-17.0.1, llvmorg-17.0.0, llvmorg-17.0.0-rc4, llvmorg-17.0.0-rc3, llvmorg-17.0.0-rc2, llvmorg-17.0.0-rc1, llvmorg-18-init, llvmorg-16.0.6, llvmorg-16.0.5, llvmorg-16.0.4, llvmorg-16.0.3, llvmorg-16.0.2, llvmorg-16.0.1, llvmorg-16.0.0, llvmorg-16.0.0-rc4, llvmorg-16.0.0-rc3, llvmorg-16.0.0-rc2, llvmorg-16.0.0-rc1, llvmorg-17-init, llvmorg-15.0.7, llvmorg-15.0.6, llvmorg-15.0.5, llvmorg-15.0.4, llvmorg-15.0.3, working, llvmorg-15.0.2, llvmorg-15.0.1 |
|
| #
dc3875e4 |
| 15-Sep-2022 |
Jonas Paulsson <paulsson@linux.vnet.ibm.com> |
Add parameter extension attributes in various instrumentation passes.
For the targets that have in their ABI the requirement that arguments and return values are extended to the full register bitwid
Add parameter extension attributes in various instrumentation passes.
For the targets that have in their ABI the requirement that arguments and return values are extended to the full register bitwidth, it is important that calls when built also take care of this detail.
The OMPIRBuilder, AddressSanitizer, GCOVProfiling, MemorySanitizer and ThreadSanitizer passes are with this patch hopefully now doing this properly.
Reviewed By: Eli Friedman, Ulrich Weigand, Johannes Doerfert
Differential Revision: https://reviews.llvm.org/D133949
show more ...
|
| #
21c3df4b |
| 27-Nov-2022 |
Matt Arsenault <Matthew.Arsenault@amd.com> |
MemorySanitizer: Convert tests to opaque pointers
Required fixups: alloca.ll avx2-intrinsics-x86.ll csr.ll instrumentation-with-call-threshold.ll msan_asm_conservative.ll msan_basic.ll
MemorySanitizer: Convert tests to opaque pointers
Required fixups: alloca.ll avx2-intrinsics-x86.ll csr.ll instrumentation-with-call-threshold.ll msan_asm_conservative.ll msan_basic.ll msan_debug_info.ll msan_kernel_basic.ll msan_x86intrinsics.ll mul_by_constant.ll
show more ...
|
| #
e7bac3b9 |
| 06-Sep-2022 |
Vitaly Buka <vitalybuka@google.com> |
[msan] Convert Msan to ModulePass
MemorySanitizerPass function pass violatied requirement 4 of function pass to do not insert globals. Msan nees to insert globals for origin tracking, and paramerete
[msan] Convert Msan to ModulePass
MemorySanitizerPass function pass violatied requirement 4 of function pass to do not insert globals. Msan nees to insert globals for origin tracking, and paramereters tracking.
https://llvm.org/docs/WritingAnLLVMPass.html#the-functionpass-class
Reviewed By: kstoimenov, fmayer
Differential Revision: https://reviews.llvm.org/D133336
show more ...
|
|
Revision tags: llvmorg-15.0.0 |
|
| #
ad2b356f |
| 02-Sep-2022 |
Vitaly Buka <vitalybuka@google.com> |
[msan] Use no-origin functions when possible
Saves 1.8% of .text size on CTMark
Reviewed By: kda
Differential Revision: https://reviews.llvm.org/D133077
|
| #
16f6c37c |
| 02-Sep-2022 |
Vitaly Buka <vitalybuka@google.com> |
[test][msan] Add implicit-check-not rename some prefixes
|
| #
a1f7b313 |
| 01-Sep-2022 |
Vitaly Buka <vitalybuka@google.com> |
[test][msan] Re-format RUN lines
|
|
Revision tags: llvmorg-15.0.0-rc3 |
|
| #
c47ec955 |
| 11-Aug-2022 |
Marco Elver <elver@google.com> |
[MemorySanitizer] Support memcpy.inline and memset.inline
Other sanitizers (ASan, TSan, see added tests) already handle memcpy.inline and memset.inline by not relying on InstVisitor to turn the intr
[MemorySanitizer] Support memcpy.inline and memset.inline
Other sanitizers (ASan, TSan, see added tests) already handle memcpy.inline and memset.inline by not relying on InstVisitor to turn the intrinsics into calls. Only MSan instrumentation currently does not support them due to missing InstVisitor callbacks.
Fix it by actually making InstVisitor handle Mem*InlineInst.
While the mem*.inline intrinsics promise no calls to external functions as an optimization, for the sanitizers we need to break this guarantee since access into the runtime is required either way, and performance can no longer be guaranteed. All other cases, where generating a call is incorrect, should instead use no_sanitize.
Fixes: https://github.com/llvm/llvm-project/issues/57048
Reviewed By: vitalybuka, dvyukov
Differential Revision: https://reviews.llvm.org/D131577
show more ...
|
|
Revision tags: llvmorg-15.0.0-rc2, llvmorg-15.0.0-rc1, llvmorg-16-init, llvmorg-14.0.6, llvmorg-14.0.5, llvmorg-14.0.4, llvmorg-14.0.3, llvmorg-14.0.2 |
|
| #
9727c77d |
| 25-Apr-2022 |
David Green <david.green@arm.com> |
[NFC] Rename Instrinsic to Intrinsic
|
|
Revision tags: llvmorg-14.0.1, llvmorg-14.0.0, llvmorg-14.0.0-rc4, llvmorg-14.0.0-rc3, llvmorg-14.0.0-rc2, llvmorg-14.0.0-rc1, llvmorg-15-init, llvmorg-13.0.1, llvmorg-13.0.1-rc3, llvmorg-13.0.1-rc2, llvmorg-13.0.1-rc1 |
|
| #
bd81c391 |
| 12-Nov-2021 |
Zarko Todorovski <zarko@ca.ibm.com> |
[NFC][llvm] Remove uses of blacklist in llvm/test/Instrumentation
Small patch that changes blacklisted_global to blocked_global and a change in comments.
Reviewed By: pgousseau
Differential Revisi
[NFC][llvm] Remove uses of blacklist in llvm/test/Instrumentation
Small patch that changes blacklisted_global to blocked_global and a change in comments.
Reviewed By: pgousseau
Differential Revision: https://reviews.llvm.org/D113692
show more ...
|
|
Revision tags: llvmorg-13.0.0, llvmorg-13.0.0-rc4, llvmorg-13.0.0-rc3, llvmorg-13.0.0-rc2, llvmorg-13.0.0-rc1, llvmorg-14-init |
|
| #
7b789562 |
| 21-Jul-2021 |
Fangrui Song <i@maskray.me> |
[sanitizer] Place module_ctor/module_dtor in llvm.used
This removes an abuse of ELF linker behaviors while keeping Mach-O/COFF linker behaviors unchanged.
ELF: when module_ctor is in a comdat, this
[sanitizer] Place module_ctor/module_dtor in llvm.used
This removes an abuse of ELF linker behaviors while keeping Mach-O/COFF linker behaviors unchanged.
ELF: when module_ctor is in a comdat, this patch removes reliance on a linker abuse (an SHT_INIT_ARRAY in a section group retains the whole group) by using SHF_GNU_RETAIN. No linker behavior difference when module_ctor is not in a comdat.
Mach-O: module_ctor gets `N_NO_DEAD_STRIP`. No linker behavior difference because module_ctor is already referenced by a `S_MOD_INIT_FUNC_POINTERS` section (GC root).
PE/COFF: no-op. SanitizerCoverage already appends module_ctor to `llvm.used`. Other sanitizers: llvm.used for local linkage is not implemented in `TargetLoweringObjectFileCOFF::emitLinkerDirectives` (once implemented or switched to a non-local linkage, COFF can use module_ctor in comdat (i.e. generalize ELF-specific rL301586)).
There is no object file size difference.
Reviewed By: vitalybuka
Differential Revision: https://reviews.llvm.org/D106246
show more ...
|
|
Revision tags: llvmorg-12.0.1, llvmorg-12.0.1-rc4, llvmorg-12.0.1-rc3, llvmorg-12.0.1-rc2, llvmorg-12.0.1-rc1 |
|
| #
775a9483 |
| 21-Apr-2021 |
Fangrui Song <i@maskray.me> |
[IR][sanitizer] Set nounwind on module ctor/dtor, additionally set uwtable if -fasynchronous-unwind-tables
On ELF targets, if a function has uwtable or personality, or does not have nounwind (`needs
[IR][sanitizer] Set nounwind on module ctor/dtor, additionally set uwtable if -fasynchronous-unwind-tables
On ELF targets, if a function has uwtable or personality, or does not have nounwind (`needsUnwindTableEntry`), it marks that `.eh_frame` is needed in the module.
Then, a function gets `.eh_frame` if `needsUnwindTableEntry` or `-g[123]` is specified. (i.e. If -g[123], every function gets `.eh_frame`. This behavior is strange but that is the status quo on GCC and Clang.)
Let's take asan as an example. Other sanitizers are similar. `asan.module_[cd]tor` has no attribute. `needsUnwindTableEntry` returns true, so every function gets `.eh_frame` if `-g[123]` is specified. This is the root cause that `-fno-exceptions -fno-asynchronous-unwind-tables -g` produces .debug_frame while `-fno-exceptions -fno-asynchronous-unwind-tables -g -fsanitize=address` produces .eh_frame.
This patch
* sets the nounwind attribute on sanitizer module ctor/dtor. * let Clang emit a module flag metadata "uwtable" for -fasynchronous-unwind-tables. If "uwtable" is set, sanitizer module ctor/dtor additionally get the uwtable attribute.
The "uwtable" mechanism is generic: synthesized functions not cloned/specialized from existing ones should consider `Function::createWithDefaultAttr` instead of `Function::create` if they want to get some default attributes which have more of module semantics.
Other candidates: "frame-pointer" (https://github.com/ClangBuiltLinux/linux/issues/955 https://github.com/ClangBuiltLinux/linux/issues/1238), dso_local, etc.
Differential Revision: https://reviews.llvm.org/D100251
show more ...
|
|
Revision tags: llvmorg-12.0.0, llvmorg-12.0.0-rc5, llvmorg-12.0.0-rc4, llvmorg-12.0.0-rc3, llvmorg-12.0.0-rc2, llvmorg-11.1.0, llvmorg-11.1.0-rc3, llvmorg-12.0.0-rc1, llvmorg-13-init, llvmorg-11.1.0-rc2, llvmorg-11.1.0-rc1, llvmorg-11.0.1, llvmorg-11.0.1-rc2, llvmorg-11.0.1-rc1 |
|
| #
06c192d4 |
| 20-Nov-2020 |
Matt Arsenault <Matthew.Arsenault@amd.com> |
OpaquePtr: Bulk update tests to use typed byval
Upgrade of the IR text tests should be the only thing blocking making typed byval mandatory. Partially done through regex and partially manual.
|
|
Revision tags: llvmorg-11.0.0, llvmorg-11.0.0-rc6, llvmorg-11.0.0-rc5, llvmorg-11.0.0-rc4, llvmorg-11.0.0-rc3, llvmorg-11.0.0-rc2 |
|
| #
05e3ab41 |
| 14-Aug-2020 |
Gui Andrade <guiand@google.com> |
[MSAN] Avoid dangling ActualFnStart when replacing instruction
This would be a problem if the entire instrumented function was a call to e.g. memcpy
Use FnPrologueEnd Instruction* instead of Actual
[MSAN] Avoid dangling ActualFnStart when replacing instruction
This would be a problem if the entire instrumented function was a call to e.g. memcpy
Use FnPrologueEnd Instruction* instead of ActualFnStart BB*
Differential Revision: https://reviews.llvm.org/D86001
show more ...
|
| #
36ebabc1 |
| 14-Aug-2020 |
Gui Andrade <guiand@google.com> |
[MSAN] Convert ActualFnStart to be a particular Instruction *, not BB
This allows us to add addtional instrumentation before the function start, without splitting the first BB.
Differential Revisio
[MSAN] Convert ActualFnStart to be a particular Instruction *, not BB
This allows us to add addtional instrumentation before the function start, without splitting the first BB.
Differential Revision: https://reviews.llvm.org/D85985
show more ...
|
|
Revision tags: llvmorg-11.0.0-rc1, llvmorg-12-init, llvmorg-10.0.1, llvmorg-10.0.1-rc4, llvmorg-10.0.1-rc3, llvmorg-10.0.1-rc2 |
|
| #
6a822e20 |
| 22-Jun-2020 |
Zequan Wu <zequanwu@google.com> |
[ASan][MSan] Remove EmptyAsm and set the CallInst to nomerge to avoid from merging.
Summary: `nomerge` attribute was added at D78659. So, we can remove the EmptyAsm workaround in ASan the MSan and u
[ASan][MSan] Remove EmptyAsm and set the CallInst to nomerge to avoid from merging.
Summary: `nomerge` attribute was added at D78659. So, we can remove the EmptyAsm workaround in ASan the MSan and use this attribute.
Reviewers: vitalybuka
Reviewed By: vitalybuka
Subscribers: hiraditya, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D82322
show more ...
|
| #
b0ffa8be |
| 15-Jun-2020 |
Gui Andrade <guiand@google.com> |
[MSAN] Pass Origin by parameter to __msan_warning functions
Summary: Normally, the Origin is passed over TLS, which seems like it introduces unnecessary overhead. It's in the (extremely) cold path t
[MSAN] Pass Origin by parameter to __msan_warning functions
Summary: Normally, the Origin is passed over TLS, which seems like it introduces unnecessary overhead. It's in the (extremely) cold path though, so the only overhead is in code size.
But with eager-checks, calls to __msan_warning functions are extremely common, so this becomes a useful optimization.
This can save ~5% code size.
Reviewers: eugenis, vitalybuka
Reviewed By: eugenis, vitalybuka
Subscribers: hiraditya, #sanitizers, llvm-commits
Tags: #sanitizers, #llvm
Differential Revision: https://reviews.llvm.org/D81700
show more ...
|