SuccessChanges

Summary

  1. [mlir] NFC - Add AffineMinMaxOpBase getDim/SymbolOperands (details)
  2. Undo initialization of TRI in CGP as this is unconditionally initialized (details)
  3. [lld-macho] Fix PAGEZERO=4GB errors on Windows by ensuring enum is uint64_t (details)
  4. [mlir][Affine] Enable fusion of loops with vector loads/stores (details)
  5. [Clang][A32/T32][Linux] -O1 implies -fomit-frame-pointer (details)
  6. [Analyzer][NFC] Fix markup in WebKit checkers documentation (details)
  7. [StackSafety] Delete useless test (details)
  8. [MTE] Convert StackSafety into analysis (details)
  9. [lldb/Test] Don't use the env to pass around configuration variables (NFC) (details)
  10. [X86] Add a flag to guard the wide load (details)
  11. [mlir][spirv] Fix encoding of cooperative matrix type to match SPIRV spec (details)
  12. [mlir][spirv] Fix coop matrix getExtension (details)
  13. [lldb/Test] Pass Make arguments in invocation instead of environment (details)
  14. [lldb/Test] Don't use the env to pass around configuration variables (NFC) (details)
  15. Remove redundant code (NFC) (details)
  16. [SampleFDO] Add use-sample-profile function attribute. (details)
  17. [MTE] Move tagging in pipeline (details)
  18. [NFC, StackSafety] Change type of internal container (details)
  19. [NFC,MTE] Drop unneeded attribute from test (details)
  20. [JumpThreading] Simplify FindMostPopularDest (NFC) (details)
  21. [AArch64][GlobalISel] Select zip1 and zip2 (details)
  22. Revert "[NFC, StackSafety] Change type of internal container" (details)
  23. Replace dyn_cast<>() with isa<>() when the result isn't used (NFC) (details)
Commit 7de45878059a4e38dd6ceba43a058cee5d283b97 by ntv
[mlir] NFC - Add AffineMinMaxOpBase getDim/SymbolOperands
The file was modifiedmlir/include/mlir/Dialect/Affine/IR/AffineOps.td (diff)
Commit 153a24ab0fc5e1caa2bc304933870bfb5f7198e6 by echristo
Undo initialization of TRI in CGP as this is unconditionally initialized
later.
The file was modifiedllvm/lib/CodeGen/CodeGenPrepare.cpp (diff)
Commit d767de44bf9527cb5058f5fe16aac2f23c21977c by jezng
[lld-macho] Fix PAGEZERO=4GB errors on Windows by ensuring enum is uint64_t

It appears that MSVC doesn't resize the enum properly to fit the
constants.
The file was modifiedlld/MachO/Target.h (diff)
Commit 8a418e5f8e89af7197e2d7dc10e39885b05fe0b8 by diego.caballero
[mlir][Affine] Enable fusion of loops with vector loads/stores

This patch enables affine loop fusion for loops with affine vector loads
and stores. For that, we only had to use affine memory op interfaces in
LoopFusionUtils.cpp and Utils.cpp so that vector loads and stores are
also taken into account.

Reviewed By: andydavis1, ftynse

Differential Revision: https://reviews.llvm.org/D80971
The file was modifiedmlir/include/mlir/Dialect/Affine/IR/AffineOps.td (diff)
The file was modifiedmlir/lib/Transforms/Utils/LoopFusionUtils.cpp (diff)
The file was modifiedmlir/lib/Transforms/Utils/Utils.cpp (diff)
The file was modifiedmlir/include/mlir/Dialect/Affine/IR/AffineMemoryOpInterfaces.td (diff)
The file was modifiedmlir/test/Transforms/loop-fusion.mlir (diff)
Commit 8eda71616fecd098cbd7d2447859c8ac1315966f by ndesaulniers
[Clang][A32/T32][Linux] -O1 implies -fomit-frame-pointer

Summary:
An upgrade of LLVM for CrOS [0] containing [1] triggered a bunch of
errors related to writing to reserved registers for a Linux kernel's
arm64 compat vdso (which is a aarch32 image).

After a discussion on LKML [2], it was determined that
-f{no-}omit-frame-pointer was not being specified. Comparing GCC and
Clang [3], it becomes apparent that GCC defaults to omitting the frame
pointer implicitly when optimizations are enabled, and Clang does not.
ie. setting -O1 (or above) implies -fomit-frame-pointer. Clang was
defaulting to -fno-omit-frame-pointer implicitly unless -fomit-frame-pointer
was set explicitly.

Why this becomes a problem is that the Linux kernel's arm64 compat vdso
contains code that uses r7. r7 is used sometimes for the frame pointer
(for example, when targeting thumb (-mthumb)). See useR7AsFramePointer()
in llvm/llvm-project/llvm/lib/Target/ARM/ARMSubtarget.h. This is mostly
for legacy/compatibility reasons, and the 2019 Q4 revision of the ARM
AAPCS looks to standardize r11 as the frame pointer for aarch32, though
this is not yet implemented in LLVM.

Users that are reliant on the implicit value if unspecified when
optimizations are enabled should explicitly choose -fomit-frame-pointer
(new behavior) or -fno-omit-frame-pointer (old behavior).

[0] https://bugs.chromium.org/p/chromium/issues/detail?id=1084372
[1] https://reviews.llvm.org/D76848
[2] https://lore.kernel.org/lkml/20200526173117.155339-1-ndesaulniers@google.com/
[3] https://godbolt.org/z/0oY39t

Reviewers: kristof.beyls, psmith, danalbert, srhines, MaskRay, ostannard, efriedma

Reviewed By: psmith, danalbert, srhines, MaskRay, efriedma

Subscribers: efriedma, olista01, MaskRay, vhscampos, cfe-commits, llvm-commits, manojgupta, llozano, glider, hctim, eugenis, pcc, peter.smith, srhines

Tags: #clang, #llvm

Differential Revision: https://reviews.llvm.org/D80828
The file was modifiedclang/lib/Basic/Targets/ARM.cpp (diff)
The file was modifiedllvm/docs/ReleaseNotes.rst (diff)
The file was modifiedclang/test/Driver/frame-pointer-elim.c (diff)
The file was modifiedclang/lib/Driver/ToolChains/Clang.cpp (diff)
Commit 39fa431c8ccad45de9ec67e8681da923d0cd28c7 by Jan Korous
[Analyzer][NFC] Fix markup in WebKit checkers documentation
The file was modifiedclang/docs/analyzer/checkers.rst (diff)
Commit fc07c1af69584d71a6a6ab3da7afd4837b08ea37 by Vitaly Buka
[StackSafety] Delete useless test
The file was removedllvm/test/Analysis/StackSafetyAnalysis/scev-udiv.ll
Commit 232d348c6eff8493fc016b1ea8a99db0e5620d81 by Vitaly Buka
[MTE] Convert StackSafety into analysis

This lets us to remove !stack-safe metadata and
better controll when to perform StackSafety
analysis.

Reviewers: eugenis

Subscribers: hiraditya, steven_wu, dexonsmith, cfe-commits, llvm-commits

Tags: #clang, #llvm

Differential Revision: https://reviews.llvm.org/D80771
The file was modifiedllvm/lib/Target/AArch64/AArch64StackTagging.cpp (diff)
The file was modifiedclang/test/Driver/memtag_lto.c (diff)
The file was modifiedllvm/include/llvm/Analysis/StackSafetyAnalysis.h (diff)
The file was modifiedllvm/lib/Target/AArch64/AArch64.h (diff)
The file was modifiedllvm/test/CodeGen/AArch64/O3-pipeline.ll (diff)
The file was modifiedllvm/test/CodeGen/AArch64/stack-tagging.ll (diff)
The file was modifiedllvm/lib/Target/AArch64/AArch64TargetMachine.cpp (diff)
The file was modifiedllvm/lib/Analysis/StackSafetyAnalysis.cpp (diff)
The file was modifiedllvm/lib/Passes/PassRegistry.def (diff)
The file was removedllvm/test/Analysis/StackSafetyAnalysis/ipa-attr.ll
The file was modifiedclang/lib/CodeGen/BackendUtil.cpp (diff)
The file was modifiedclang/test/Driver/memtag.c (diff)
Commit 5138a91ef4f365a3e71eec4cea6b4599dfaabf26 by Jonas Devlieghere
[lldb/Test] Don't use the env to pass around configuration variables (NFC)

Don't use the environment to pass values to the builder that are present
in the dotest configuration module. A subsequent patch will pass the
remaining values through the configuration instead of the environment.
The file was modifiedlldb/packages/Python/lldbsuite/test/dotest.py (diff)
The file was modifiedlldb/packages/Python/lldbsuite/test/plugins/builder_base.py (diff)
Commit 587af86f1d8adc77b229ed27b2f553e99f9710cd by carrot
[X86] Add a flag to guard the wide load

As shown in http://lists.llvm.org/pipermail/llvm-dev/2020-May/141854.html,
widen load can also cause stall. Add a flag to guard the widening code,
so users can disable it and evaluate its performance impact.

Differential Revision: https://reviews.llvm.org/D80943
The file was modifiedllvm/lib/Target/X86/X86ISelDAGToDAG.cpp (diff)
The file was addedllvm/test/CodeGen/X86/no-wide-load.ll
The file was modifiedllvm/lib/Target/X86/X86InstrInfo.td (diff)
Commit bbe79e27bdfbf59838e4d409038aef78a8161989 by thomasraoux
[mlir][spirv] Fix encoding of cooperative matrix type to match SPIRV spec

Scope, rows and columns need to be encoded in a separate constant operation.

Differential Revision: https://reviews.llvm.org/D80852
The file was modifiedmlir/lib/Dialect/SPIRV/Serialization/Deserializer.cpp (diff)
The file was modifiedmlir/lib/Dialect/SPIRV/Serialization/Serializer.cpp (diff)
Commit 81dd3a47189ec2e2c83d5948748dcfadb9463923 by thomasraoux
[mlir][spirv] Fix coop matrix getExtension

Stack variable was being used beyond its lifetime.

Differential Revision: https://reviews.llvm.org/D80948
The file was modifiedmlir/lib/Dialect/SPIRV/SPIRVTypes.cpp (diff)
Commit 393ac216489773e3676ec7d80c3d993f78a29b6a by Jonas Devlieghere
[lldb/Test] Pass Make arguments in invocation instead of environment

The Darwin builder is passing some of the make arguments trough the
environment instead of the command line. Update the dsym builder to do
the same as the other variants.
The file was modifiedlldb/packages/Python/lldbsuite/test/plugins/builder_darwin.py (diff)
Commit 4c53d4801cbbb1b573e4ef758f93ead12e1f59a2 by Jonas Devlieghere
[lldb/Test] Don't use the env to pass around configuration variables (NFC)

Don't use the environment to pass values to the builder. Use the
configuration instead.
The file was modifiedlldb/packages/Python/lldbsuite/test/configuration.py (diff)
The file was modifiedlldb/packages/Python/lldbsuite/test/lldbtest.py (diff)
The file was modifiedlldb/packages/Python/lldbsuite/test/dotest.py (diff)
The file was modifiedlldb/packages/Python/lldbsuite/test/plugins/builder_base.py (diff)
Commit 2d2a603d663328e25774982947e3a8a65e098678 by Adrian Prantl
Remove redundant code (NFC)

This has no effect on the testsuite and was only needed in an early
prototype from before debugserver was able to report the correct
platform.
The file was modifiedlldb/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderDarwin.cpp (diff)
Commit 7a6c89427c9babc8e4a69e8a2b61bbf4a4b80c56 by wmi
[SampleFDO] Add use-sample-profile function attribute.

When sampleFDO is enabled, people may expect they can use
-fno-profile-sample-use to opt-out using sample profile for a certain file.
That could be either for debugging purpose or for performance tuning purpose.
However, when thinlto is enabled, if a function in file A compiled with
-fno-profile-sample-use is imported to another file B compiled with
-fprofile-sample-use, the inlined copy of the function in file B may still
get its profile annotated.

The inconsistency may even introduce profile unused warning because if the
target is not compiled with explicit debug information flag, the function
in file A won't have its debug information enabled (debug information will
be enabled implicitly only when -fprofile-sample-use is used). After it is
imported into file B which is compiled with -fprofile-sample-use, profile
annotation for the outline copy of the function will fail because the
function has no debug information, and that will trigger  profile unused
warning.

We add a new attribute use-sample-profile to control whether a function
will use its sample profile no matter for its outline or inline copies.
That will make the behavior of -fno-profile-sample-use consistent.

Differential Revision: https://reviews.llvm.org/D79959
The file was modifiedllvm/test/Transforms/SampleProfile/early-inline.ll (diff)
The file was modifiedllvm/test/Transforms/SampleProfile/branch.ll (diff)
The file was addedllvm/test/Transforms/Inline/inline-incompat-attrs.ll
The file was addedclang/test/CodeGen/use-sample-profile-attr.c
The file was modifiedllvm/test/Transforms/SampleProfile/cold-indirect-call.ll (diff)
The file was modifiedllvm/test/Transforms/SampleProfile/nolocinfo.ll (diff)
The file was modifiedllvm/test/Transforms/SampleProfile/section-accurate-samplepgo.ll (diff)
The file was modifiedllvm/test/Transforms/SampleProfile/gcc-simple.ll (diff)
The file was modifiedllvm/include/llvm/IR/Attributes.td (diff)
The file was modifiedllvm/test/Transforms/SampleProfile/profile-format-compress.ll (diff)
The file was modifiedllvm/test/Transforms/SampleProfile/indirect-call-gcc.ll (diff)
The file was modifiedllvm/test/Transforms/SampleProfile/inline-mergeprof.ll (diff)
The file was modifiedllvm/test/Transforms/SampleProfile/inline-cold-callsite-samplepgo.ll (diff)
The file was modifiedllvm/test/Transforms/SampleProfile/inline-combine.ll (diff)
The file was modifiedllvm/test/Transforms/SampleProfile/warm-inline-instance.ll (diff)
The file was addedllvm/test/Transforms/SampleProfile/Inputs/use-sample-profile-attr.prof
The file was modifiedllvm/test/Transforms/SampleProfile/entry_counts_cold.ll (diff)
The file was modifiedllvm/test/Transforms/SampleProfile/remarks.ll (diff)
The file was modifiedllvm/test/Transforms/SampleProfile/profile-format.ll (diff)
The file was modifiedllvm/test/Transforms/SampleProfile/propagate.ll (diff)
The file was modifiedllvm/test/Transforms/SampleProfile/cov-zero-samples.ll (diff)
The file was modifiedllvm/test/Transforms/SampleProfile/inline-callee-update.ll (diff)
The file was modifiedllvm/test/Transforms/SampleProfile/profile-sample-accurate.ll (diff)
The file was addedllvm/test/Transforms/SampleProfile/use-sample-profile-attr.ll
The file was modifiedllvm/test/Transforms/SampleProfile/entry_counts.ll (diff)
The file was modifiedllvm/test/Transforms/SampleProfile/entry_counts_missing_dbginfo.ll (diff)
The file was modifiedllvm/test/Transforms/SampleProfile/function_metadata.ll (diff)
The file was modifiedllvm/test/Transforms/SampleProfile/syntax.ll (diff)
The file was modifiedllvm/test/Transforms/SampleProfile/inline.ll (diff)
The file was modifiedllvm/test/Transforms/SampleProfile/discriminator.ll (diff)
The file was modifiedllvm/test/LTO/Resolution/X86/load-sample-prof.ll (diff)
The file was modifiedllvm/test/Transforms/SampleProfile/calls.ll (diff)
The file was modifiedllvm/test/LTO/Resolution/X86/load-sample-prof-lto.ll (diff)
The file was modifiedllvm/test/Transforms/SampleProfile/inline-coverage.ll (diff)
The file was addedllvm/test/Transforms/Inline/partial-inline-incompat-attrs.ll
The file was modifiedllvm/test/Transforms/SampleProfile/inline-topdown.ll (diff)
The file was modifiedllvm/test/Transforms/SampleProfile/inline-cold.ll (diff)
The file was modifiedllvm/test/Transforms/SampleProfile/offset.ll (diff)
The file was modifiedllvm/test/Transforms/SampleProfile/Inputs/profile-symbol-list.ll (diff)
The file was modifiedllvm/test/LTO/Resolution/X86/load-sample-prof-icp.ll (diff)
The file was modifiedllvm/lib/Transforms/IPO/SampleProfile.cpp (diff)
The file was modifiedclang/lib/CodeGen/CodeGenFunction.cpp (diff)
The file was modifiedllvm/test/Transforms/SampleProfile/remap.ll (diff)
The file was modifiedllvm/test/Transforms/SampleProfile/indirect-call.ll (diff)
The file was modifiedllvm/test/Transforms/SampleProfile/fnptr.ll (diff)
The file was modifiedllvm/test/Transforms/SampleProfile/coverage-warning.ll (diff)
The file was modifiedllvm/test/Transforms/SampleProfile/inline-stats.ll (diff)
Commit f48bc44ace1a100bef676e630d5089779e7b87bf by Vitaly Buka
[MTE] Move tagging in pipeline

Summary:
This removes two analyses from pipeline.

Depends on D80771.

Reviewers: eugenis

Reviewed By: eugenis

Subscribers: hiraditya, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D80780
The file was modifiedllvm/lib/Target/AArch64/AArch64TargetMachine.cpp (diff)
The file was modifiedllvm/test/CodeGen/AArch64/O3-pipeline.ll (diff)
Commit f62813e7eae148a6175de28bfa384524a9f2bf94 by Vitaly Buka
[NFC, StackSafety] Change type of internal container

Summary: Depends on D80771.

Reviewers: eugenis

Reviewed By: eugenis

Subscribers: hiraditya, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D80847
The file was modifiedllvm/lib/Analysis/StackSafetyAnalysis.cpp (diff)
Commit 85fdec988fc55d56988d57fa88e2b870f6e0e8e9 by Vitaly Buka
[NFC,MTE] Drop unneeded attribute from test

Summary: Depends on D80847.

Reviewers: eugenis

Reviewed By: eugenis

Subscribers: hiraditya, steven_wu, dexonsmith, cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D80954
The file was modifiedclang/test/Driver/memtag_lto.c (diff)
Commit f355c7fc2f8fb0db829313b8e43f974ed730cf6d by kazu
[JumpThreading] Simplify FindMostPopularDest (NFC)

Summary:
This patch simplifies FindMostPopularDest without changing the
functionality.

Given a list of jump threading destinations, the function finds the
most popular destination.  To ensure determinism when there are
multiple destinations with the highest popularity, the function picks
the first one in the successor list with the highest popularity.

Without this patch:

- The function populates DestPopularity -- a histogram mapping
  destinations to their respective occurrence counts.

- Then we iterate over DestPopularity, looking for the highest
  popularity while building a vector of destinations with the highest
  popularity.

- Finally, we iterate the successor list, looking for the destination
  with the highest popularity.

With this patch:

- We implement DestPopularity with MapVector instead of DenseMap.  We
  populate the map with popularity 0 for all successors in the order
  they appear in the successor list.

- We build the histogram in the same way as before.

- We simply use std::max_element on DestPopularity to find the most
  popular destination.  The use of MapVector ensures determinism.

Reviewers: wmi, efriedma

Reviewed By: wmi

Subscribers: hiraditya, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D81030
The file was modifiedllvm/lib/Transforms/Scalar/JumpThreading.cpp (diff)
Commit 8b96703652ade915eb444b8dae91ae6a16d32d75 by Jessica Paquette
[AArch64][GlobalISel] Select zip1 and zip2

Port the code to recognize a zip1/zip2 shuffle mask from AArch64ISelLowering
and put it into the post-legalizer combiner.

Add G_ZIP1 and G_ZIP2 to AArch64InstrGISel.td and hook them up as equivalent
nodes to AArch64zip1 and AArch64zip2. This allows us to select them.

Minor code size improvements for SPECINT2000 at -O3 on 197.parser, 252.eon, and
186.crafty.

Differential Revision: https://reviews.llvm.org/D80969
The file was addedllvm/test/CodeGen/AArch64/GlobalISel/postlegalizer-combiner-zip.mir
The file was addedllvm/test/CodeGen/AArch64/GlobalISel/select-zip.mir
The file was modifiedllvm/lib/Target/AArch64/AArch64InstrGISel.td (diff)
The file was modifiedllvm/lib/Target/AArch64/AArch64PostLegalizerCombiner.cpp (diff)
The file was modifiedllvm/lib/Target/AArch64/AArch64Combine.td (diff)
Commit f9bb101d394d62027ba33e132691540f1e63cea8 by joker.eph
Revert "[NFC, StackSafety] Change type of internal container"

This reverts commit f62813e7eae148a6175de28bfa384524a9f2bf94.
GCC 5.3 build is broken.
The file was modifiedllvm/lib/Analysis/StackSafetyAnalysis.cpp (diff)
Commit a09bb6d77b39d3f87c76b525b355e158245a63cd by joker.eph
Replace dyn_cast<>() with isa<>() when the result isn't used (NFC)

Fixed warning reported by some GCC version.
The file was modifiedmlir/lib/TableGen/Operator.cpp (diff)