SuccessChanges

Summary

  1. [flang] Parse global compiler directives (details)
  2. [flang] Improve error handling for bad characters in source (details)
  3. [ORC] Fix an endif comment. (details)
  4. [examples] Fix dependencies for OrcV2Examples/LLJITWithThinLTOSummaries. (details)
  5. [test] Add -inject-tli-mapping to -loop-vectorize -vector-library tests (details)
  6. [X86] Mention -march=sapphirerapids in the release notes. (details)
  7. [tsan] On arm64e, strip out ptrauth bits from incoming PCs (details)
  8. [flang] Check that various variables referenced in I/O statements may be defined (details)
  9. [mlir][openacc][NFC] Fix comment about OpenACCExecMapping (details)
  10. [llvm-mca][NFC] Refactor handling of views that examine individual instructions, (details)
  11. [mlir] [LLVMIR] Add get active lane mask intrinsic (details)
  12. [MemDep] Use BatchAA when computing pointer dependencies (details)
  13. Reland "[DebugInfo] Move constructor homing case in shouldOmitDefinition." (details)
  14. [ValueTracking] Add a noundef test for D86477; NFC (details)
  15. [ValueTracking] Let getGuaranteedNonPoisonOp find multiple non-poison operands (details)
  16. [SystemZ][z/OS] Add z/OS Target and define macros (details)
  17. [lldb] Make Reproducer compatbile with SubsystemRAII  (NFC) (details)
  18. [Hexagon] Check if EVT is simple type in HVX lowering (details)
  19. [AMDGPU] Switch to named simm16 in vscnt insertion (details)
  20. [OpenMP] Pack first-private arguments to improve efficiency of data transfer (details)
  21. [mlir] [LLVMIR] Mark reductions as side-effect free (details)
  22. [SDAG] Improve MemSDNode::getBasePtr (details)
  23. [TargetLoweringObjectFileImpl] Make .llvmbc and .llvmcmd non-SHF_ALLOC (details)
  24. [AMDGPU] Remove unsound dependency on ISA version in waitcnt (details)
Commit 13cee14bb1612ccdc3a7e7e770373fa2d2a94254 by pklausler
[flang] Parse global compiler directives

Accept and represent "global" compiler directives that appear
before and between program units in a source file.

Differential Revision: https://reviews.llvm.org/D86555
The file was modifiedflang/lib/Parser/program-parsers.cpp
The file was modifiedflang/lib/Semantics/program-tree.cpp
The file was modifiedflang/include/flang/Parser/parse-tree.h
The file was modifiedflang/lib/Semantics/program-tree.h
The file was modifiedflang/lib/Semantics/resolve-names.cpp
The file was modifiedflang/test/Parser/compiler-directives.f90
Commit a0a1a4e5c83db53c806c56011a8741b31ab598a4 by pklausler
[flang] Improve error handling for bad characters in source

When an illegal character appears in Fortran source (after
preprocessing), catch and report it in the prescanning phase
rather than leaving it for the parser to cope with.

Differential Revision: https://reviews.llvm.org/D86553
The file was modifiedflang/test/Preprocessing/pp130.F90
The file was modifiedflang/lib/Parser/token-sequence.cpp
The file was modifiedflang/include/flang/Parser/characters.h
The file was modifiedflang/lib/Parser/prescan.cpp
The file was modifiedflang/lib/Parser/token-sequence.h
Commit 594107d488646c0d3d874b4624b0ee4f5fee5656 by Lang Hames
[ORC] Fix an endif comment.
The file was modifiedllvm/include/llvm/ExecutionEngine/Orc/TPCIndirectionUtils.h
Commit f436bef5070fb453b5d394b5b3fd6f11a5920c01 by Lang Hames
[examples] Fix dependencies for OrcV2Examples/LLJITWithThinLTOSummaries.
The file was modifiedllvm/examples/OrcV2Examples/LLJITWithThinLTOSummaries/CMakeLists.txt
Commit df5576a852088337e03970641db291c6799afe97 by aeubanks
[test] Add -inject-tli-mapping to -loop-vectorize -vector-library tests

The legacy LoopVectorize has a dependency on InjectTLIMappingsLegacy.
That cannot be expressed in the new PM since they are both normal
passes. Explicitly add -inject-tli-mappings as a pass.

Follow-up to https://reviews.llvm.org/D86492.

Reviewed By: spatel

Differential Revision: https://reviews.llvm.org/D86561
The file was modifiedllvm/test/Transforms/LoopVectorize/PowerPC/massv-altivec.ll
The file was modifiedllvm/test/Transforms/LoopVectorize/PowerPC/massv-nobuiltin.ll
The file was modifiedllvm/test/Transforms/LoopVectorize/PowerPC/massv-calls.ll
The file was modifiedllvm/test/Transforms/LoopVectorize/PowerPC/massv-unsupported.ll
The file was modifiedllvm/test/Transforms/LoopVectorize/X86/veclib-calls.ll
The file was modifiedllvm/test/Transforms/LoopVectorize/X86/svml-calls.ll
The file was modifiedllvm/test/Transforms/LoopVectorize/PowerPC/widened-massv-call.ll
The file was modifiedllvm/test/Transforms/LoopVectorize/X86/svml-calls-finite.ll
Commit 01eb1233db54454b146cb1e70d6f810ffbc354e5 by craig.topper
[X86] Mention -march=sapphirerapids in the release notes.

This was just added in e02d081f2b60b61eb60ef6a49b1a9f907e432d4c.
The file was modifiedclang/docs/ReleaseNotes.rst
The file was modifiedllvm/docs/ReleaseNotes.rst
Commit e713b0ecbc893b70e2ff28b016b64f420137824b by Kuba Mracek
[tsan] On arm64e, strip out ptrauth bits from incoming PCs

Differential Revision: https://reviews.llvm.org/D86378
The file was modifiedcompiler-rt/lib/tsan/rtl/tsan_interface.cpp
The file was modifiedcompiler-rt/lib/tsan/rtl/tsan_external.cpp
The file was modifiedcompiler-rt/lib/tsan/rtl/tsan_interface_inl.h
The file was modifiedcompiler-rt/lib/sanitizer_common/sanitizer_ptrauth.h
Commit bce7a7edf32d5094b37d65c9198b048c86645f99 by pklausler
[flang] Check that various variables referenced in I/O statements may be defined

A number of I/O syntax rules involve variables that will be written to,
and must therefore be definable.  This includes internal file variables,
IOSTAT= and IOMSG= specifiers, most INQUIRE statement specifiers, a few
other specifiers, and input variables.  This patch checks for
these violations, and implements several additional I/O TODO constraint
checks.

Differential Revision: https://reviews.llvm.org/D86557
The file was modifiedflang/test/Semantics/deallocate05.f90
The file was modifiedflang/test/Semantics/io01.f90
The file was modifiedflang/test/Semantics/io03.f90
The file was modifiedflang/test/Semantics/io04.f90
The file was modifiedflang/test/Semantics/io05.f90
The file was modifiedflang/test/Semantics/io06.f90
The file was modifiedflang/lib/Semantics/check-io.cpp
The file was modifiedflang/test/Semantics/io02.f90
The file was modifiedflang/lib/Semantics/check-io.h
Commit 4d69bcb12fa7c89ff68c2ede5869faeb2d294ad8 by clementval
[mlir][openacc][NFC] Fix comment about OpenACCExecMapping
The file was modifiedmlir/include/mlir/Dialect/OpenACC/OpenACC.h
Commit e02920fe55761aaa06b33caec381bc2a1c36ad1c by wolfgang_pieb
[llvm-mca][NFC] Refactor handling of views that examine individual instructions,
including printing them.

Reviewers: andreadb, lebedev.ri

Differential Review: https://reviews.llvm.org/D86390

Introduces a new base class "InstructionView" that such views derive from.
Other views still use the "View" base class.
The file was modifiedllvm/tools/llvm-mca/Views/BottleneckAnalysis.cpp
The file was modifiedllvm/tools/llvm-mca/Views/InstructionInfoView.cpp
The file was modifiedllvm/tools/llvm-mca/Views/View.h
The file was modifiedllvm/tools/llvm-mca/Views/BottleneckAnalysis.h
The file was modifiedllvm/tools/llvm-mca/Views/TimelineView.cpp
The file was modifiedllvm/tools/llvm-mca/Views/InstructionInfoView.h
The file was modifiedllvm/tools/llvm-mca/Views/ResourcePressureView.cpp
The file was modifiedllvm/tools/llvm-mca/Views/ResourcePressureView.h
The file was modifiedllvm/tools/llvm-mca/Views/View.cpp
The file was modifiedllvm/tools/llvm-mca/Views/TimelineView.h
Commit 84fdc33f4785115cd517c789a99fdebb6a74ac3e by ajcbik
[mlir] [LLVMIR] Add get active lane mask intrinsic

Provides fast, generic way of setting a mask up to a certain
point. Potential use cases that may benefit are create_mask
and transfer_read/write operations in the vector dialect.

Reviewed By: bkramer

Differential Revision: https://reviews.llvm.org/D86501
The file was modifiedmlir/include/mlir/Dialect/LLVMIR/LLVMOps.td
The file was modifiedmlir/test/Target/llvmir-intrinsics.mlir
Commit 3a54b6a4b71c21cf3bab4f132cbc2904fb9d997e by nikita.ppv
[MemDep] Use BatchAA when computing pointer dependencies

We're not changing IR while running a single MemDep query, so it's
safe to cache alias analysis results using BatchAA. This adds BatchAA
usage to getSimplePointerDependencyFrom(), which is non-intrusive --
covering larger parts (like a whole processNonLocalLoad query) is
also possible, but requires threading BatchAA through a bunch of APIs.

For the ThinLTO configuration, this is a 1% geomean improvement on CTMark.

Differential Revision: https://reviews.llvm.org/D85583
The file was modifiedllvm/lib/Analysis/MemoryDependenceAnalysis.cpp
Commit b1009ee84fc0242bcebd07889306bf39d9b7170f by akhuang
Reland "[DebugInfo] Move constructor homing case in shouldOmitDefinition."

For some reason the ctor homing case was before the template
specialization case, and could have returned false too early.
I moved the code out into a separate function to avoid this.

This reverts commit 05777ab941063192b9ccb1775358a83a2700ccc1.
The file was modifiedclang/test/CodeGenCXX/debug-info-template-explicit-specialization.cpp
The file was modifiedclang/lib/CodeGen/CGDebugInfo.cpp
Commit 8e51bb249bc2a71ecd13092bc0e1e246995feba6 by aqjune
[ValueTracking] Add a noundef test for D86477; NFC
The file was modifiedllvm/test/Transforms/InstSimplify/freeze-noundef.ll
Commit f753f5b05033bf1d8b89b19b753b78c89de41ae3 by aqjune
[ValueTracking] Let getGuaranteedNonPoisonOp find multiple non-poison operands

This patch helps getGuaranteedNonPoisonOp find multiple non-poison operands.

Instead of special-casing llvm.assume, I think it is also a viable option to
add noundef to Intrinsics.td. If it makes sense, I'll make a patch for that.

Reviewed By: jdoerfert

Differential Revision: https://reviews.llvm.org/D86477
The file was modifiedllvm/lib/Transforms/Instrumentation/PoisonChecking.cpp
The file was modifiedllvm/lib/Analysis/ValueTracking.cpp
The file was modifiedllvm/include/llvm/Analysis/ValueTracking.h
The file was modifiedllvm/test/Transforms/InstSimplify/freeze-noundef.ll
Commit 97ccf93b3615ff4c0d5fe116e6a7c7b616d8ec0c by hubert.reinterpretcast
[SystemZ][z/OS] Add z/OS Target and define macros

This patch adds the z/OS target and defines macros as a stepping stone
towards enabling a native build on z/OS.

Reviewed By: hubert.reinterpretcast

Differential Revision: https://reviews.llvm.org/D85324
The file was addedclang/test/Preprocessor/init-zos.c
The file was modifiedclang/lib/Basic/Targets.cpp
The file was modifiedclang/lib/Basic/Targets/OSTargets.h
Commit 521220690ab7741e382344319b2a9d458be3eb41 by Jonas Devlieghere
[lldb] Make Reproducer compatbile with SubsystemRAII  (NFC)

Make Reproducer compatbile with SubsystemRAII and use it in
LocateSymbolFileTest.
The file was modifiedlldb/include/lldb/Utility/Reproducer.h
The file was modifiedlldb/source/Utility/Reproducer.cpp
The file was modifiedlldb/unittests/Symbol/LocateSymbolFileTest.cpp
Commit 2da1eefb58a11f459461dc040c678da5fc7252b0 by kparzysz
[Hexagon] Check if EVT is simple type in HVX lowering
The file was addedllvm/test/CodeGen/Hexagon/hvx-isel-vselect-v256i16.ll
The file was modifiedllvm/lib/Target/Hexagon/HexagonISelLowering.cpp
The file was modifiedllvm/lib/Target/Hexagon/HexagonISelLoweringHVX.cpp
Commit 817c831f023af3a5a08e72f7454c4fbb771edc1c by Stanislav.Mekhanoshin
[AMDGPU] Switch to named simm16 in vscnt insertion

Differential Revision: https://reviews.llvm.org/D86568
The file was modifiedllvm/lib/Target/AMDGPU/SIInsertWaitcnts.cpp
Commit 0775c1dfbce69d1d13414995de2e77acc942b7eb by tianshilei1992
[OpenMP] Pack first-private arguments to improve efficiency of data transfer

In this patch, we pack all small first-private arguments, allocate and transfer them all at once to reduce the number of data transfer which is very expensive.

Let's take the test case as example.
```
int main() {
  int data1[3] = {1}, data2[3] = {2}, data3[3] = {3};
  int sum[16] = {0};
#pragma omp target teams distribute parallel for map(tofrom: sum) firstprivate(data1, data2, data3)
  for (int i = 0; i < 16; ++i) {
    for (int j = 0; j < 3; ++j) {
      sum[i] += data1[j];
      sum[i] += data2[j];
      sum[i] += data3[j];
    }
  }
}
```
Here `data1`, `data2`, and `data3` are three first-private arguments of the target region. In the previous `libomptarget`, it called data allocation and data transfer three times, each of which allocated and transferred 12 bytes. With this patch, it only calls allocation and transfer once. The size is `(12+4)*3=48` where 12 is the size of each array and 4 is the padding to keep the address aligned with 8. It is implemented in this way:
1. First collect all information for those *first*-private arguments. _private_ arguments are not the case because private arguments don't need to be mapped to target device. It just needs a data allocation. With the patch for memory manager, the data allocation could be very cheap, especially for the small size. For each qualified argument, push a place holder pointer `nullptr` to the `vector` for kernel arguments, and we will update them later.
2. After we have all information, create a buffer that can accommodate all arguments plus their paddings. Copy the arguments to the buffer at the right place, i.e. aligned address.
3. Allocate a target memory with the same size as the host buffer, transfer the host buffer to target device, and finally update all place holder pointers in the arguments `vector`.

The reason we only consider small arguments is, the data transfer is asynchronous. Therefore, for the large argument, we could continue to do things on the host side meanwhile, hopefully, the data is also being transferred. The "small" is defined by that the argument size is less than a predefined value. Currently it is 1024. I'm not sure whether it is a good one, and that is an open question. Another question is, do we need to make it configurable via an environment variable?

Reviewed By: ye-luo

Differential Revision: https://reviews.llvm.org/D86307
The file was addedopenmp/libomptarget/test/mapping/private_mapping.c
The file was modifiedopenmp/libomptarget/src/omptarget.cpp
Commit 66e536bc36fb51da1732c8f093f07b5c600df3fe by ajcbik
[mlir] [LLVMIR] Mark reductions as side-effect free

Attribute was missing from original base class.

Reviewed By: bkramer

Differential Revision: https://reviews.llvm.org/D86569
The file was modifiedmlir/include/mlir/Dialect/LLVMIR/LLVMOpBase.td
Commit 514d6e9a8d91e739292c9024d677b8d3c6d43f0c by kparzysz
[SDAG] Improve MemSDNode::getBasePtr

It returned getOperand(1), except for STORE for which it returned
getOperand(2). Handle MSTORE, MGATHER, and MSCATTER as well.
The file was modifiedllvm/include/llvm/CodeGen/SelectionDAGNodes.h
Commit 82d0749749fafb0303414131dc570781376fdcfb by i
[TargetLoweringObjectFileImpl] Make .llvmbc and .llvmcmd non-SHF_ALLOC

There are two ways .llvmbc can be produced:

* clang -c -fembed-bitcode=all (which also produces .llvmcmd)
* LTO backend: ld.lld -mllvm -lto-embed-bitcode or -plugin-opt=-lto-embed-bitcode

.llvmbc and .llvmcmd have the SHF_ALLOC flag, so they can be dropped by
--gc-sections.

This patch sets SectionKind::Metadata to drop the SHF_ALLOC flag. This
is conceptually correct: the two sections are not part of the process
image, so SHF_ALLOC is not appropriate.

`test/LTO/X86/embed-bitcode.ll`: changed `llvm-objcopy -O binary --only-section` to
`llvm-objcopy --dump-section`. `-O binary` does not dump non-SHF_ALLOC sections.

Reviewed By: tejohnson

Differential Revision: https://reviews.llvm.org/D86374
The file was modifiedllvm/test/LTO/X86/embed-bitcode.ll
The file was addedllvm/test/CodeGen/X86/embed-bitcode.ll
The file was modifiedllvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
Commit b7760c3e5d003ee346847bed929fcb30dbfe488a by Stanislav.Mekhanoshin
[AMDGPU] Remove unsound dependency on ISA version in waitcnt

Differential Revision: https://reviews.llvm.org/D86566
The file was modifiedllvm/lib/Target/AMDGPU/SIInsertWaitcnts.cpp
The file was modifiedllvm/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.h