Files
sdk/runtime/vm/compiler/backend
Martin Kustermann f41277178c Revert "[vm/compiler] Always allow CSE of LoadStaticField & loosen assertion in AllowsCSE"
This reverts commit ff1c9c9916.

Reason for revert: Most likely cause of failures in AOT, e.g.

    python tools/test.py -n dartkp-strong-linux-release-x64 co19/LanguageFeatures/nnbd/late_A06_t05

Original change's description:
> [vm/compiler] Always allow CSE of LoadStaticField & loosen assertion in AllowsCSE
>
> Loosening of assertion:
>
> There is no guarantee that a static-final field has been initialized by
> the time a function is compiled (in optimized mode) that uses such a
> field.
>
> We should therefore loosen the ASSERT to not require the field to be
> initialized and rather allows CSE
>
> Enabling of CSE:
>
> In the past we had separate InitStaticField and LoadStaticField. The
> load itself had no side-effects and could therefore be moved
> arbitrarily. Though we couldn't allow it to be moved before it's
> InitStaticField. This dependency was not explicitly made and we
> therefore disabled CSE / LICM if the actual field was not initialized
> (or field may be reset) - see [0].
>
> Though after merging of InitStaticField and LoadStaticField in [1] there
> is no longer a need for tracking any dependencies: The side-effects
> of InitStaticField are now reported by LoadStaticField.
> => We can therefore always allow CSE of LoadStaticFieldinstr and
> any code motion would respect side-effects of the instruction.
>
> [0] https://codereview.chromium.org/1497783002
> [1] https://dart-review.googlesource.com/c/sdk/+/148283
>
> TEST=Fixes flaky test.
>
> Closes https://github.com/dart-lang/sdk/issues/45133
>
> Change-Id: I547702586d980f5d02fde0e8d12b057ca4d8c363
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/192740
> Commit-Queue: Martin Kustermann <kustermann@google.com>
> Reviewed-by: Vyacheslav Egorov <vegorov@google.com>

TBR=vegorov@google.com,kustermann@google.com

Change-Id: I921c6e8929bbc9f58392d6be6db599dddb8e4b4c
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/192922
Reviewed-by: Martin Kustermann <kustermann@google.com>
2021-03-24 14:45:13 +00:00
..
2021-03-22 15:08:04 +00:00