Revision tags: 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 |
|
#
672fb27b |
| 06-Feb-2024 |
Yitzhak Mandelbaum <ymand@users.noreply.github.com> |
[clang][dataflow] Add new `join` API and replace existing `merge` implementations. (#80361)
This patch adds a new interface for the join operation, now properly called `join`. Originally, the framew
[clang][dataflow] Add new `join` API and replace existing `merge` implementations. (#80361)
This patch adds a new interface for the join operation, now properly called `join`. Originally, the framework offered a single `merge` operation, which could serve either as a join or a widening. In practice, though we found this conflation didn't work for non-trivial anlyses, and split of the widening operation (`widen`). This change completes the transition by introducing a proper `join` with strict join semantics.
In the process, it drops an odd (and often misused) aspect of `merge` wherein callees could implictly instruct the framework to drop the current entry by returning `false`. This features was never used correctly in analyses and doesn't belong in a join operation, so it is omitted.
---------
Co-authored-by: Dmitri Gribenko <gribozavr@gmail.com> Co-authored-by: martinboehme <mboehme@google.com>
show more ...
|
Revision tags: llvmorg-18.1.0-rc1, llvmorg-19-init |
|
#
ccf1e322 |
| 23-Jan-2024 |
martinboehme <mboehme@google.com> |
[clang][dataflow] Process terminator condition within `transferCFGBlock()`. (#78127)
In particular, it's important that we create the "fallback" atomic at
this point
(which we produce if the trans
[clang][dataflow] Process terminator condition within `transferCFGBlock()`. (#78127)
In particular, it's important that we create the "fallback" atomic at
this point
(which we produce if the transfer function didn't produce a value for
the
expression) so that it is placed in the correct environment.
Previously, we processed the terminator condition in the
`TerminatorVisitor`,
which put the fallback atomic in a copy of the environment that is
produced as
input for the _successor_ block, rather than the environment for the
block
containing the expression for which we produce the fallback atomic.
As a result, we produce different fallback atomics every time we process
the
successor block, and hence we don't have a consistent representation of
the
terminator condition in the flow condition.
This patch includes a test (authored by ymand@) that fails without the
fix.
show more ...
|
#
2ee396b0 |
| 21-Dec-2023 |
martinboehme <mboehme@google.com> |
[clang][dataflow] Add `Environment::get<>()`. (#76027)
This template function casts the result of `getValue()` or
`getStorageLocation()` to a given subclass of `Value` or
`StorageLocation` (using
[clang][dataflow] Add `Environment::get<>()`. (#76027)
This template function casts the result of `getValue()` or
`getStorageLocation()` to a given subclass of `Value` or
`StorageLocation` (using `cast_or_null`).
It's a common pattern to do something like this:
```cxx
auto *Val = cast_or_null<PointerValue>(Env.getValue(E));
```
This can now be expressed more concisely like this:
```cxx
auto *Val = Env.get<PointerValue>(E);
```
Instead of adding a new method `get()`, I had originally considered
simply adding a template parameter to `getValue()` and
`getStorageLocation()` (with a default argument of `Value` or
`StorageLocation`), but this results in an undesirable repetition at the
callsite, e.g. `getStorageLocation<RecordStorageLocation>(...)`. The
`Value` and `StorageLocation` in the method name adds nothing of value
when the template argument already contains this information, so it
seemed best to shorten the method name to simply `get()`.
show more ...
|
Revision tags: llvmorg-17.0.6, llvmorg-17.0.5, llvmorg-17.0.4 |
|
#
526c9b7e |
| 30-Oct-2023 |
martinboehme <mboehme@google.com> |
[clang][nullability] Use `proves()` and `assume()` instead of deprecated synonyms. (#70297)
|
Revision tags: 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 |
|
#
b244b6ae |
| 31-Jul-2023 |
Martin Braenne <mboehme@google.com> |
[clang][dataflow] Remove `Strict` suffix from accessors.
For the time being, we're keeping the `Strict` versions around as deprecated synonyms so that clients can be migrated, but these synonyms wil
[clang][dataflow] Remove `Strict` suffix from accessors.
For the time being, we're keeping the `Strict` versions around as deprecated synonyms so that clients can be migrated, but these synonyms will be removed soon.
Depends On D156673
Reviewed By: ymandel, xazax.hun
Differential Revision: https://reviews.llvm.org/D156674
show more ...
|
Revision tags: llvmorg-17.0.0-rc1 |
|
#
e95134b9 |
| 26-Jul-2023 |
Martin Braenne <mboehme@google.com> |
[clang][dataflow] Reverse course on `getValue()` deprecation.
In the [value categories RFC](https://discourse.llvm.org/t/70086), I proposed that the end state of the migration should be that `getVal
[clang][dataflow] Reverse course on `getValue()` deprecation.
In the [value categories RFC](https://discourse.llvm.org/t/70086), I proposed that the end state of the migration should be that `getValue()` should only be legal to call on prvalues.
As a stepping stone, to allow migrating off existing calls to `getValue()`, I proposed introducing `getValueStrict()`, which would already have the new semantics.
However, I've now reconsidered this. Any expression, whether prvalue or glvalue, has a value, so really there isn't any reason to forbid calling `getValue()` on glvalues. I'm therefore removing the deprecation from `getValue()` and transitioning existing `getValueStrict()` calls back to `getValue()`.
The other "strict" accessors are a different case. `setValueStrict()` should only be called on prvalues because glvalues need to have a storage location associated with them; it doesn't make sense to only set a value for them. And, of course, `getStorageLocationStrict()` and `setStorageLocationStrict()` should obviously only be called on glvalues because prvalues don't have storage locations.
Reviewed By: ymandel, xazax.hun
Differential Revision: https://reviews.llvm.org/D155921
show more ...
|
Revision tags: llvmorg-18-init |
|
#
6272226b |
| 13-Jul-2023 |
Sam McCall <sam.mccall@gmail.com> |
[dataflow] Remove deprecated BoolValue flow condition accessors
Use the Formula versions instead, now.
Differential Revision: https://reviews.llvm.org/D155152
|
Revision tags: llvmorg-16.0.6, llvmorg-16.0.5 |
|
#
96b22e1c |
| 22-May-2023 |
Martin Braenne <mboehme@google.com> |
[clang][dataflow] Use `Strict` accessors in SignAnalysisTest.cpp.
This patch is part of the ongoing migration to strict handling of value categories (see https://discourse.llvm.org/t/70086 for detai
[clang][dataflow] Use `Strict` accessors in SignAnalysisTest.cpp.
This patch is part of the ongoing migration to strict handling of value categories (see https://discourse.llvm.org/t/70086 for details).
Depends On D150656
Reviewed By: sammccall, ymandel, xazax.hun
Differential Revision: https://reviews.llvm.org/D150657
show more ...
|
Revision tags: llvmorg-16.0.4 |
|
#
0c852dc8 |
| 08-May-2023 |
Martin Braenne <mboehme@google.com> |
[clang][dataflow][NFC] Remove `SkipPast` param from `getValue(const ValueDecl &)`.
This parameter was already a no-op, so removing it doesn't change behavior.
Reviewed By: ymandel
Differential Rev
[clang][dataflow][NFC] Remove `SkipPast` param from `getValue(const ValueDecl &)`.
This parameter was already a no-op, so removing it doesn't change behavior.
Reviewed By: ymandel
Differential Revision: https://reviews.llvm.org/D150137
show more ...
|
#
9940fac7 |
| 08-May-2023 |
Martin Braenne <mboehme@google.com> |
[clang][dataflow][NFC] Remove `SkipPast` parameter from `getStorageLocation(const ValueDecl &).
This parameter was already a no-op, so removing it doesn't change behavior.
Depends On D149144
Revie
[clang][dataflow][NFC] Remove `SkipPast` parameter from `getStorageLocation(const ValueDecl &).
This parameter was already a no-op, so removing it doesn't change behavior.
Depends On D149144
Reviewed By: ymandel, xazax.hun, gribozavr2
Differential Revision: https://reviews.llvm.org/D149151
show more ...
|
Revision tags: 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 |
|
#
6b991ba4 |
| 13-Feb-2023 |
Yitzhak Mandelbaum <yitzhakm@google.com> |
[clang][dataflow] Change `transfer` API to take a reference.
The provided `CFGElement` is never null, so a reference is a more precise type.
Differential Revision: https://reviews.llvm.org/D143920
|
Revision tags: llvmorg-16.0.0-rc2, llvmorg-16.0.0-rc1, llvmorg-17-init |
|
#
3432f4bf |
| 12-Jan-2023 |
Jordan Rupprecht <rupprecht@google.com> |
[test] Split out Annotations from `TestingSupport`
The Annotations helper class does not have a gtest or gmock dependency, but because it's bundled with the rest of TestingSupport, it gets one. By s
[test] Split out Annotations from `TestingSupport`
The Annotations helper class does not have a gtest or gmock dependency, but because it's bundled with the rest of TestingSupport, it gets one. By splitting it out, a target can use it without being forced to use LLVM's copy of gtest.
Reviewed By: GMNGeoffrey, sammccall, gribozavr2
Differential Revision: https://reviews.llvm.org/D141175
show more ...
|
Revision tags: llvmorg-15.0.7 |
|
#
a996cc21 |
| 05-Dec-2022 |
Fangrui Song <i@maskray.me> |
Remove unused #include "llvm/ADT/Optional.h"
|
Revision tags: llvmorg-15.0.6, llvmorg-15.0.5, llvmorg-15.0.4 |
|
#
93ce23ad |
| 25-Oct-2022 |
Gabor Marton <gabor.marton@ericsson.com> |
[clang][dataflow] Add initial sign analysis
This patch adds an initial implementation for sign analysis, with the following lattice (T: top, N: negative, Z: zero, P: positive, B: bottom): T / | \
[clang][dataflow] Add initial sign analysis
This patch adds an initial implementation for sign analysis, with the following lattice (T: top, N: negative, Z: zero, P: positive, B: bottom): T / | \ N Z P \ | / B The lattice is implemented with `BoolValue` properties attached to other `Value`s.
Differential Revision: https://reviews.llvm.org/D136668
show more ...
|