Changes

Summary

  1. [NFC][MachineRegisterInfo] Fix typo in comments of getLiveInVirtReg() function (details)
  2. [clang][scan-build] Use cc/c++ instead of gcc/g++ on OpenBSD. (details)
  3. [flang] Make 'this_image()' an intrinsic function (details)
  4. CodeView: static_cast result of getOffset() to size_t. (details)
  5. [examples] Fix SectionMemoryManager deconstruction error with MSVC. (details)
  6. [FuncSpec] Specialising on addresses of const global values. (details)
  7. [Clang] Fix long double availability check (details)
  8. Revert "[examples] Fix SectionMemoryManager deconstruction error with MSVC." (details)
  9. [Test] One more missing opportunity on IndVars check removal (details)
  10. Revert "[PowerPC][ELF] make sure local variable space does not overlap with parameter save area" (details)
  11. [DSE] Add test cases with stores to objects before they escape. (details)
  12. [Test] Add simple test where IndVars fails to remove checks on negative values (details)
  13. [OpenCL] Supports optional pipe types in C++ for OpenCL 2021 (details)
  14. GlobalISel/Utils: Refactor integer/float constant match functions (details)
  15. [SystemZ]  Recognize .machine directive in parser. (details)
  16. [MLIR] Matrix: support resizing horizontally (details)
  17. [MLIR] AffineStructures::removeIdRange: support specifying a range within an IdKind (details)
  18. [MLIR] AffineStructures: support removing a range of constraints at once (details)
  19. [TextAPI] Use const-ref iterator in for-range loop. NFCI. (details)
  20. [TableGen] Record::checkRecordAssertions() - Use const-ref iterator in for-range loop. NFCI. (details)
  21. [AsmPrinter] DebugLocEntry::dump() - Use const-ref iterator in for-range loop. NFCI. (details)
  22. [CodeGen] MachineInstr::getUsedDebugRegs() - Use const-ref iterator in for-range loop. NFCI. (details)
  23. [X86][Atom] Fix integer shuffles uops, latency and throughput (details)
Commit 6403f716f129bb9edad9423cf1c23dc8e29a41d5 by VenkataRamanaiah.Nalamothu
[NFC][MachineRegisterInfo] Fix typo in comments of getLiveInVirtReg() function

Reviewed By: scott.linder

Differential Revision: https://reviews.llvm.org/D109743
The file was modifiedllvm/include/llvm/CodeGen/MachineRegisterInfo.h (diff)
Commit b588f5d665aa01fe88921fe2ffb7256fdedfbfb0 by brad
[clang][scan-build] Use cc/c++ instead of gcc/g++ on OpenBSD.

Differential Revision: https://reviews.llvm.org/D109349
The file was modifiedclang/tools/scan-build/libexec/ccc-analyzer (diff)
Commit ed921282e551f2252ccfcbddd7a85ad8a006ed3f by rasmussen17
[flang] Make 'this_image()' an intrinsic function

Added 'this_image()' to the list of functions that are evaluated as intrinsic.
Added IsCoarray functions to determine if an expression is a coarray (corank > 1).

Added save attribute to coarray variables in test file, this_image.f90.

reviewers: klausler, PeteSteinfeld

Differential Revision: https://reviews.llvm.org/D108059
The file was modifiedflang/lib/Evaluate/intrinsics.cpp (diff)
The file was modifiedflang/include/flang/Evaluate/tools.h (diff)
The file was modifiedflang/lib/Evaluate/tools.cpp (diff)
The file was addedflang/test/Semantics/this_image.f90
The file was modifiedflang/test/Semantics/call10.f90 (diff)
The file was modifiedflang/docs/Intrinsics.md (diff)
Commit fc08cfb8884db2f0a871479f7fc640e364a9ffe9 by peter
CodeView: static_cast result of getOffset() to size_t.

Silences a narrowing conversion warning on 32-bit platforms after D109923.
The file was modifiedllvm/lib/DebugInfo/CodeView/SimpleTypeSerializer.cpp (diff)
Commit 63838d88145feaeb839efff8f40ab1e98597e423 by Lang Hames
[examples] Fix SectionMemoryManager deconstruction error with MSVC.

This commit fixes an order-of-initialization issue: If the default mmapper
object is destroyed while some global SectionMemoryManager is still using it
then calls to the mapper from ~SectionMemoryManager will fail. This issue was
causing failures when running the LLVM Kaleidoscope examples on windows.

Switching to a ManagedStatic solves the initialization order issue.

Patch by Justice Adams. Thanks Justice!

Reviewed By: lhames

Differential Revision: https://reviews.llvm.org/D107087
The file was modifiedllvm/lib/ExecutionEngine/SectionMemoryManager.cpp (diff)
Commit 97cc678cc4a226119ab48d399fd277283f4acc2d by sjoerd.meijer
[FuncSpec] Specialising on addresses of const global values.

This introduces an option to allow specialising on the address of global
values. This option is off by default because it is likely not that profitable
to do so and needs more investigation. Before, we were specialising on addresses
and thus this changes the default behaviour.

Differential Revision: https://reviews.llvm.org/D109775
The file was modifiedllvm/lib/Transforms/IPO/FunctionSpecialization.cpp (diff)
The file was modifiedllvm/test/Transforms/FunctionSpecialization/function-specialization-nonconst-glob.ll (diff)
Commit 0195f8621f1814967f9cd3ef51ee61117e914299 by qiucofan
[Clang] Fix long double availability check

fae0dfa changed code to check 128-bit float availability, since it
introduced a new 128-bit double type on PowerPC. However, there're other
long float types besides IEEE float128 and PPC double-double requiring
this feature.

Reviewed By: ronlieb

Differential Revision: https://reviews.llvm.org/D109943
The file was modifiedclang/lib/Sema/Sema.cpp (diff)
The file was addedclang/test/OpenMP/amdgcn_ldbl_check.cpp
Commit 7e8babeb9d55749e3c9cae8802a644c5c96b1942 by Lang Hames
Revert "[examples] Fix SectionMemoryManager deconstruction error with MSVC."

This reverts commit 63838d88145feaeb839efff8f40ab1e98597e423, which broke tests
on some bots. See e.g. https://lab.llvm.org/buildbot#builders/109/builds/22561
The file was modifiedllvm/lib/ExecutionEngine/SectionMemoryManager.cpp (diff)
Commit 74fa174f339ce378c44010c579634ddefb35ff29 by mkazantsev
[Test] One more missing opportunity on IndVars check removal
The file was modifiedllvm/test/Transforms/IndVarSimplify/outer_phi.ll (diff)
Commit 80584f00564630a9edf51f74049b4eeaff4549b1 by czhengsz
Revert "[PowerPC][ELF] make sure local variable space does not overlap with parameter save area"

This causes mix-compile issues on PowerPC Linux.

This reverts commit 324bd467a217d89b5ab84a8ed66c0d3dc431782a.
The file was modifiedllvm/lib/Target/PowerPC/PPCISelLowering.cpp (diff)
The file was modifiedllvm/test/CodeGen/PowerPC/byval.ll (diff)
Commit bdafe3124c9ac7276df6092e041d4b328684c680 by flo
[DSE] Add test cases with stores to objects before they escape.

Test cases where stores to local objects can be removed because the
object does not escape before calls that may read/write to memory.

Includes test from PR50220.
The file was addedllvm/test/Transforms/DeadStoreElimination/captures-before-call.ll
Commit 690f76958a737ebd1b17f9bc50f781b3aaa4f011 by mkazantsev
[Test] Add simple test where IndVars fails to remove checks on negative values
The file was addedllvm/test/Transforms/IndVarSimplify/negative_ranges.ll
Commit 37cdc7ebd9a373100cbbe39f5b9be7a4e4f7813d by Justas.Janickas
[OpenCL] Supports optional pipe types in C++ for OpenCL 2021

Adds support for a feature macro `__opencl_c_pipes` in C++ for
OpenCL 2021 enabling a respective optional core feature from
OpenCL 3.0.

This change aims to achieve compatibility between C++ for OpenCL
2021 and OpenCL 3.0.

Differential Revision: https://reviews.llvm.org/D109306
The file was modifiedclang/test/CodeGenOpenCL/pipe_types.cl (diff)
The file was modifiedclang/test/CodeGenOpenCL/pipe_types_mangling.cl (diff)
The file was modifiedclang/test/CodeGenOpenCL/address-spaces-mangling.cl (diff)
The file was modifiedclang/lib/Basic/TargetInfo.cpp (diff)
The file was modifiedclang/test/Misc/opencl-c-3.0.incorrect_options.cl (diff)
The file was modifiedclang/test/CodeGenOpenCL/address-spaces.cl (diff)
The file was modifiedclang/test/SemaOpenCL/invalid-pipes-cl2.0.cl (diff)
The file was modifiedclang/test/SemaOpenCL/invalid-pipes-cl1.2.cl (diff)
Commit d477a7c2e704f58be816159cd8ac11d5384334b5 by petar.avramovic
GlobalISel/Utils: Refactor integer/float constant match functions

Rework getConstantstVRegValWithLookThrough in order to make it clear if we
are matching integer/float constant only or any constant(default).
Add helper functions that get DefVReg and APInt/APFloat from constant instr
getIConstantVRegValWithLookThrough: integer constant, only G_CONSTANT
getFConstantVRegValWithLookThrough: float constant, only G_FCONSTANT
getAnyConstantVRegValWithLookThrough: either G_CONSTANT or G_FCONSTANT

Rename getConstantVRegVal and getConstantVRegSExtVal to getIConstantVRegVal
and getIConstantVRegSExtVal. These now only match G_CONSTANT as described
in comment.

Relevant matchers now return both DefVReg and APInt/APFloat.

Replace existing uses of getConstantstVRegValWithLookThrough and
getConstantVRegVal with new helper functions. Any constant match is
only required in:
ConstantFoldBinOp: for constant argument that was bit-cast of float to int
getAArch64VectorSplat: AArch64::G_DUP operands can be any constant
amdgpu select for G_BUILD_VECTOR_TRUNC: operands can be any constant

In other places use integer only constant match.

Differential Revision: https://reviews.llvm.org/D104409
The file was modifiedllvm/lib/Target/AArch64/GISel/AArch64PreLegalizerCombiner.cpp (diff)
The file was modifiedllvm/lib/Target/AArch64/GISel/AArch64PostLegalizerLowering.cpp (diff)
The file was modifiedllvm/lib/CodeGen/GlobalISel/GISelKnownBits.cpp (diff)
The file was modifiedllvm/lib/Target/AMDGPU/AMDGPUInstructionSelector.cpp (diff)
The file was modifiedllvm/include/llvm/CodeGen/GlobalISel/MIPatternMatch.h (diff)
The file was modifiedllvm/lib/CodeGen/GlobalISel/InstructionSelector.cpp (diff)
The file was modifiedllvm/lib/Target/AArch64/GISel/AArch64InstructionSelector.cpp (diff)
The file was modifiedllvm/include/llvm/CodeGen/GlobalISel/Utils.h (diff)
The file was modifiedllvm/lib/Target/AArch64/GISel/AArch64PostLegalizerCombiner.cpp (diff)
The file was modifiedllvm/lib/CodeGen/GlobalISel/LegalizerHelper.cpp (diff)
The file was modifiedllvm/lib/Target/X86/X86InstructionSelector.cpp (diff)
The file was modifiedllvm/unittests/CodeGen/GlobalISel/PatternMatchTest.cpp (diff)
The file was modifiedllvm/lib/CodeGen/GlobalISel/Utils.cpp (diff)
The file was modifiedllvm/lib/CodeGen/GlobalISel/CombinerHelper.cpp (diff)
The file was modifiedllvm/lib/Target/AArch64/GISel/AArch64LegalizerInfo.cpp (diff)
The file was modifiedllvm/lib/Target/AArch64/GISel/AArch64GlobalISelUtils.cpp (diff)
The file was modifiedllvm/lib/Target/AMDGPU/AMDGPURegisterBankInfo.cpp (diff)
The file was modifiedllvm/lib/Target/AMDGPU/AMDGPULegalizerInfo.cpp (diff)
The file was modifiedllvm/lib/Target/AMDGPU/AMDGPURegBankCombiner.cpp (diff)
Commit 1a5ab3e97c15708a0a9a19b3b0ccee73b0d757aa by paulsson
[SystemZ]  Recognize .machine directive in parser.

The .machine directive can be used in assembly files to specify the ISA for
the instructions following it.

Review: Ulrich Weigand
Differential Revision: https://reviews.llvm.org/D109660
The file was addedllvm/lib/Target/SystemZ/SystemZTargetStreamer.h
The file was modifiedllvm/lib/Target/SystemZ/MCTargetDesc/SystemZMCTargetDesc.cpp (diff)
The file was addedllvm/test/MC/SystemZ/machine-directive.s
The file was modifiedllvm/lib/Target/SystemZ/AsmParser/SystemZAsmParser.cpp (diff)
Commit f263ea157113ff0f119cc1bf23d76ce2727c40f9 by arjunpitchanathan
[MLIR] Matrix: support resizing horizontally

Reviewed By: Groverkss

Differential Revision: https://reviews.llvm.org/D109897
The file was modifiedmlir/lib/Analysis/Presburger/Matrix.cpp (diff)
The file was modifiedmlir/unittests/Analysis/Presburger/MatrixTest.cpp (diff)
The file was modifiedmlir/include/mlir/Analysis/Presburger/Matrix.h (diff)
Commit 6607bd9fd819de1a5872dce47ce1a67bbb9a12e8 by arjunpitchanathan
[MLIR] AffineStructures::removeIdRange: support specifying a range within an IdKind

Reviewed By: Groverkss, grosser

Differential Revision: https://reviews.llvm.org/D109896
The file was modifiedmlir/include/mlir/Analysis/AffineStructures.h (diff)
The file was modifiedmlir/lib/Analysis/AffineStructures.cpp (diff)
The file was modifiedmlir/unittests/Analysis/AffineStructuresTest.cpp (diff)
Commit 44db07f11f00b2115e277dd89d830e2abde684ab by arjunpitchanathan
[MLIR] AffineStructures: support removing a range of constraints at once

Reviewed By: Groverkss, grosser

Differential Revision: https://reviews.llvm.org/D109892
The file was modifiedmlir/include/mlir/Analysis/AffineStructures.h (diff)
The file was modifiedmlir/unittests/Analysis/AffineStructuresTest.cpp (diff)
The file was modifiedmlir/lib/Analysis/AffineStructures.cpp (diff)
Commit 8821345e68b2e027ababb5f4e1dba6916825681d by llvm-dev
[TextAPI] Use const-ref iterator in for-range loop. NFCI.

Avoid unnecessary copies, reported by MSVC static analyzer.
The file was modifiedllvm/include/llvm/TextAPI/InterfaceFile.h (diff)
Commit e4b2f66d7f7e27e01ecf4da240f1c39387dd9ede by llvm-dev
[TableGen] Record::checkRecordAssertions() - Use const-ref iterator in for-range loop. NFCI.

Avoid unnecessary copies, reported by MSVC static analyzer.
The file was modifiedllvm/lib/TableGen/Record.cpp (diff)
Commit 9e70d4e5f2e447685ee99d6327bbe60f89962e92 by llvm-dev
[AsmPrinter] DebugLocEntry::dump() - Use const-ref iterator in for-range loop. NFCI.

Avoid unnecessary copies, reported by MSVC static analyzer.
The file was modifiedllvm/lib/CodeGen/AsmPrinter/DebugLocEntry.h (diff)
Commit cbaaedea56fade69bf12164155734efece0f8931 by llvm-dev
[CodeGen] MachineInstr::getUsedDebugRegs() - Use const-ref iterator in for-range loop. NFCI.

Avoid unnecessary copies, reported by MSVC static analyzer.
The file was modifiedllvm/include/llvm/CodeGen/MachineInstr.h (diff)
Commit 5ebe95e256737506f152395b5a3eb66cf448e969 by llvm-dev
[X86][Atom] Fix integer shuffles uops, latency and throughput

The MMX pack/unpck shuffles don't need an override - they have the same behaviour as other shuffles (Port0 only).
The SSE pslldq/psrldq shuffles don't need an override - they have the same behaviour as other shuffles (Port0 only).
The SSE pshufb shuffles use 4uops (+1 load).

Noticed the pslldq/psrldq issue while trying to improve reduction costs via the D103695 helper script, and fixed the others while reviewing. Confirmed with Intel AoM / Agner / InstLatX64.
The file was modifiedllvm/test/tools/llvm-mca/X86/Atom/resources-sse2.s (diff)
The file was modifiedllvm/test/tools/llvm-mca/X86/Atom/resources-ssse3.s (diff)
The file was modifiedllvm/lib/Target/X86/X86ScheduleAtom.td (diff)
The file was modifiedllvm/test/tools/llvm-mca/X86/Atom/resources-mmx.s (diff)