SuccessChanges

Summary

  1. [ARM] Change getScalarizationOverhead overload used in gather costs. NFC (details)
  2. Correct swift_bridge duplicate attribute warning logic (details)
  3. [Test] Add test that exposed failure on reverted patch in codegen (details)
  4. [gn build] Port b4993cf54d7f (details)
  5. Return "[Codegenprepare][X86] Use usub with overflow opt for IV increment" (details)
  6. [OpenCL] Fix missing const attributes for get_image_ builtins (details)
  7. [ARM] Copy-paste error in ARMv87a architecture definition. (details)
  8. [lldb/test] Automatically find debug servers to test (details)
  9. [Attr] Apply GNU-style attributes to expression statements (details)
  10. [mlir] Make JitRunnerMain main take a DialectRegistry (details)
  11. [mlir] make ModuleTranslation mapping fields private (details)
  12. [DebugInfo] Only perform TypeSize -> unsigned cast when necessary (details)
  13. [lld][WebAssembly] Common superclass for input globals/events/tables (details)
  14. Improve STRICT_FSETCC codegen in absence of no NaN (details)
Commit e771614bae0a05585f720812d5936a0b81dcddf0 by david.green
[ARM] Change getScalarizationOverhead overload used in gather costs. NFC

This changes which of the getScalarizationOverhead overloads is used in
the gather/scatter cost to use the base variant directly, not relying on
the version using heuristics on the number of args with no args
provided. It should still produce the same costs for scalarized
gathers/scatters.
The file was modifiedllvm/lib/Target/ARM/ARMTargetTransformInfo.cpp
Commit 81bc1365d8f85a125a6db6a5a1acff3ceddcbe9e by aaron
Correct swift_bridge duplicate attribute warning logic

The swift_bridge attribute warns when the attribute is applied multiple
times to the same declaration. However, it warns about the arguments
being different to the attribute without ever checking if the arguments
actually are different. If the arguments are different, diagnose,
otherwise silently accept the code. Either way, drop the duplicated
attribute.
The file was modifiedclang/lib/Sema/SemaDeclAttr.cpp
The file was modifiedclang/test/SemaObjC/attr-swift_bridge.m
Commit af1cccfa12c8d38a70593743402492e177583a26 by mkazantsev
[Test] Add test that exposed failure on reverted patch in codegen
The file was modifiedllvm/test/CodeGen/X86/usub_inc_iv.ll
Commit 78717f56ba4e777db02d80cb86db89282bd9bd8f by thakis
[gn build] Port b4993cf54d7f
The file was modifiedllvm/utils/gn/secondary/compiler-rt/lib/sanitizer_common/BUILD.gn
Commit 418c218efa950245ba075b9bb3a53505b807c5df by mkazantsev
Return "[Codegenprepare][X86] Use usub with overflow opt for IV increment"

The patch did not account for one corner case where cmp does not dominate
the loop latch. This patch adds this check, hopefully it's cheap because
the CFG does not change during the transform, so DT queries should be
executed quickly.

If you see compile time slowness from this, please revert.

Differential Revision: https://reviews.llvm.org/D96119
The file was modifiedllvm/test/CodeGen/X86/2020_12_02_decrementing_loop.ll
The file was modifiedllvm/lib/CodeGen/CodeGenPrepare.cpp
The file was modifiedllvm/test/CodeGen/X86/lsr-loop-exit-cond.ll
The file was modifiedllvm/test/CodeGen/X86/usub_inc_iv.ll
Commit 3a29ac2a61f78aae049a46369203757ece315e23 by sven.vanhaastregt
[OpenCL] Fix missing const attributes for get_image_ builtins

Various get_image builtin function declarations did not have the const
attribute.  Bring the const attributes of `-fdeclare-opencl-builtins`
more in sync with `opencl-c.h`.
The file was modifiedclang/lib/Sema/OpenCLBuiltins.td
Commit 69f1a7ad82fdcabc8d8e46a80b239c0e772d8e39 by simon.tatham
[ARM] Copy-paste error in ARMv87a architecture definition.

In the tablegen architecture definition, the Name field for the
ARMv87a record read "ARMv86a". All the other records contain their own
names.

Corrected it to "ARMv87a", and added the necessary value in
ARMArchEnum for that to refer to.

Reviewed By: pratlucas

Differential Revision: https://reviews.llvm.org/D96493
The file was modifiedllvm/lib/Target/ARM/ARM.td
The file was modifiedllvm/lib/Target/ARM/ARMSubtarget.h
Commit 7df4eaaa937332c0617aa665080533966e2c98a0 by pavel
[lldb/test] Automatically find debug servers to test

Our test configuration logic assumes that the tests can be run either
with debugserver or with lldb-server. This is not entirely correct,
since lldb server has two "personalities" (platform server and debug
server) and debugserver is only a replacement for the latter.

A consequence of this is that it's not possible to test the platform
behavior of lldb-server on macos, as it is not possible to get a hold of
the lldb-server binary.

One solution to that would be to duplicate the server configuration
logic to be able to specify both executables. However, that seems
excessively redundant.

A well-behaved lldb should be able to find the debug server on its own,
and testing lldb with a different (lldb-|debug)server does not seem very
useful (even in the out-of-tree debugserver setup, we copy the server
into the build tree to make it appear "real").

Therefore, this patch deletes the configuration altogether and changes
the low-level server retrieval functions to be able to both lldb-server
and debugserver paths. They do this by consulting the "support
executable" directory of the lldb under test.

Differential Revision: https://reviews.llvm.org/D96202
The file was modifiedlldb/test/API/CMakeLists.txt
The file was modifiedlldb/utils/lldb-dotest/lldb-dotest.in
The file was modifiedlldb/test/API/lit.site.cfg.py.in
The file was modifiedlldb/packages/Python/lldbsuite/test/dotest_args.py
The file was modifiedlldb/packages/Python/lldbsuite/test/dotest.py
The file was modifiedlldb/utils/lldb-dotest/CMakeLists.txt
The file was modifiedlldb/packages/Python/lldbsuite/test/tools/lldb-server/lldbgdbserverutils.py
The file was modifiedlldb/test/API/commands/platform/sdk/TestPlatformSDK.py
Commit 81a9707723845a5b880245da24633c519493205c by vsavchenko
[Attr] Apply GNU-style attributes to expression statements

Before this commit, expression statements could not be annotated
with statement attributes.  Whenever parser found attribute, it
unconditionally assumed that it was followed by a declaration.
This not only doesn't allow expression attributes to have attributes,
but also produces spurious error diagnostics.

In order to maintain all previously compiled code, we still assume
that GNU attributes are followed by declarations unless ALL of those
are statement attributes.  And even in this case we are not forcing
the parser to think that it should parse a statement, but rather
let it proceed as if no attributes were found.

Differential Revision: https://reviews.llvm.org/D93630
The file was addedclang/test/Parser/stmt-attributes.c
The file was modifiedclang/include/clang/Basic/Features.def
The file was addedclang/test/Parser/stmt-attributes.cpp
The file was addedclang/test/Parser/stmt-attributes.m
The file was modifiedclang/lib/Parse/ParseStmt.cpp
Commit 9a08f760fe37094b6181c81575cd19f280dbbff5 by zinenko
[mlir] Make JitRunnerMain main take a DialectRegistry

Historically, JitRunner has been registering all available dialects with the
context and depending on them without the real need. Make it take a registry
that contains only the dialects that are expected in the input and stop linking
in all dialects.

Reviewed By: mehdi_amini

Differential Revision: https://reviews.llvm.org/D96436
The file was modifiedmlir/lib/ExecutionEngine/JitRunner.cpp
The file was modifiedmlir/tools/mlir-rocm-runner/mlir-rocm-runner.cpp
The file was modifiedmlir/include/mlir/ExecutionEngine/JitRunner.h
The file was modifiedmlir/tools/mlir-cuda-runner/CMakeLists.txt
The file was modifiedmlir/tools/mlir-spirv-cpu-runner/mlir-spirv-cpu-runner.cpp
The file was modifiedmlir/tools/mlir-vulkan-runner/CMakeLists.txt
The file was modifiedmlir/tools/mlir-spirv-cpu-runner/CMakeLists.txt
The file was modifiedmlir/tools/mlir-cuda-runner/mlir-cuda-runner.cpp
The file was modifiedmlir/tools/mlir-rocm-runner/CMakeLists.txt
The file was modifiedmlir/tools/mlir-vulkan-runner/mlir-vulkan-runner.cpp
The file was modifiedmlir/tools/mlir-cpu-runner/CMakeLists.txt
The file was modifiedmlir/tools/mlir-cpu-runner/mlir-cpu-runner.cpp
Commit 0881a4f1bf769a588e7d6d6af8501a230a2f42c8 by zinenko
[mlir] make ModuleTranslation mapping fields private

ModuleTranslation contains multiple fields that keep track of the mappings
between various MLIR and LLVM IR components. The original ModuleTranslation
extension model was based on inheritance, with these fields being protected and
thus accessible in the ModuleTranslation and derived classes. The
inheritance-based model doesn't scale to translation of more than one derived
dialect and will be progressively replaced with a more flexible one based on
dialect interfaces and a translation state that is separate from
ModuleTranslation. This change prepares the replacement by making the mappings
private and providing public methods to access them.

Depends On D96436

Reviewed By: mehdi_amini

Differential Revision: https://reviews.llvm.org/D96437
The file was modifiedmlir/include/mlir/Target/LLVMIR/ModuleTranslation.h
The file was modifiedmlir/lib/Target/LLVMIR/ModuleTranslation.cpp
The file was modifiedmlir/tools/mlir-tblgen/LLVMIRConversionGen.cpp
Commit 67464dfe366b533045dc3c15a069d0768a20629f by joe.ellis
[DebugInfo] Only perform TypeSize -> unsigned cast when necessary

This commit moves a line in SelectionDAGBuilder::handleDebugValue to
avoid implicitly casting a TypeSize object to an unsigned earlier than
necessary. It was possible that we bail out of the loop before the value
is ever used, which means we could create a superfluous TypeSize
warning.

Reviewed By: DavidTruby

Differential Revision: https://reviews.llvm.org/D96423
The file was modifiedllvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
Commit a56e57493b18a04339d7980fcd4f000c518c1017 by wingo
[lld][WebAssembly] Common superclass for input globals/events/tables

This commit regroups commonalities among InputGlobal, InputEvent, and
InputTable into the new InputElement.  The subclasses are defined
inline in the new InputElement.h.  NFC.

Reviewed By: sbc100

Differential Revision: https://reviews.llvm.org/D94677
The file was modifiedlld/wasm/SymbolTable.cpp
The file was modifiedlld/wasm/InputFiles.cpp
The file was modifiedlld/wasm/MarkLive.cpp
The file was modifiedlld/wasm/Driver.cpp
The file was addedlld/wasm/InputElement.h
The file was modifiedlld/wasm/MapFile.cpp
The file was removedlld/wasm/InputGlobal.h
The file was modifiedlld/include/lld/Common/LLVM.h
The file was modifiedlld/wasm/WriterUtils.cpp
The file was modifiedlld/wasm/SyntheticSections.cpp
The file was modifiedlld/wasm/WriterUtils.h
The file was modifiedlld/wasm/Writer.cpp
The file was removedlld/wasm/InputEvent.h
The file was modifiedlld/wasm/Symbols.cpp
The file was removedlld/wasm/InputTable.h
Commit bad0290ce3744d4f62dbe82380e6f648c1aa39c5 by thomasp
Improve STRICT_FSETCC codegen in absence of no NaN

As for SETCC, use a less expensive condition code when generating
STRICT_FSETCC if the node is known not to have Nan.

Reviewed By: SjoerdMeijer

Differential Revision: https://reviews.llvm.org/D91972
The file was modifiedllvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
The file was addedllvm/test/CodeGen/AArch64/arm64-constrained-fcmp-no-nans-opt.ll