SuccessChanges

Summary

  1. Reland Fix gn build after 943660f (details)
  2. [gn build] (manually) merge 943660fd15f193 (details)
  3. Revert "Reland "[InstCombine] Lower infinite combine loop detection thresholds""" (details)
  4. [TRE] allow TRE for non-capturing calls. (details)
  5. [AMDGPU] Move LowerSwitch pass to CodeGenPrepare. (details)
  6. [Attributor][NFC] Add more debug output for deleted functions (details)
  7. [fix-irreducible] Skip unreachable predecessors. (details)
  8. Fix `-Wunused-variable` warnings. NFC. (details)
  9. [MLIR] Parallelize affine.for op to 1-D affine.parallel op (details)
  10. [flang][openmp] Check clauses allowed semantic with tablegen generated map (details)
  11. Fix regression due to test hip-version.hip (details)
  12. [OpenMP] Silence unused symbol warning with proper ifdefs (details)
  13. [openmp] Remove unused variable in DirectiveEmitter (details)
  14. [examples] fix ExceptionDemo (details)
  15. [X86] Add test cases for missed opportunities to use vpternlog due to a bitcast between the logic ops. (details)
  16. Fix some memory leak in MLIRContext with respect to registered types/attributes interfaces (details)
  17. Fix one memory leak in the MLIRParser by using std::unique_ptr to hold the new block pointer (details)
  18. Fix `-Wreturn-type` warning. NFC. (details)
  19. [NewGVN] Regenerate test checks (NFC) (details)
  20. [Attributor] Introudce attribute seed allow list. (details)
Commit 35af6f11e04b777b73035f59bfabb68a08ca4ad9 by n.james93
Reland Fix gn build after 943660f
The file was modifiedllvm/utils/gn/secondary/llvm/lib/Frontend/OpenMP/BUILD.gn
Commit 09a95f51fb1fb86442418d891f67a43e2a3ca698 by thakis
[gn build] (manually) merge 943660fd15f193
The file was modifiedllvm/lib/Frontend/OpenMP/CMakeLists.txt
The file was modifiedllvm/utils/gn/secondary/llvm/lib/Frontend/OpenMP/BUILD.gn
The file was modifiedllvm/utils/gn/secondary/llvm/include/llvm/Frontend/OpenMP/BUILD.gn
Commit 4500db8c59621a31c622862a2946457fdee481ce by lebedev.ri
Revert "Reland "[InstCombine] Lower infinite combine loop detection thresholds"""

And there's a new hit: https://bugs.llvm.org/show_bug.cgi?id=46680
This reverts commit 7103c87596efccd532e9fe04a6ba6a200fed8481.
The file was modifiedllvm/lib/Transforms/InstCombine/InstructionCombining.cpp
Commit f7907e9d223d8484f9afd457ba614c2db2ae4743 by a.v.lapshin
[TRE] allow TRE for non-capturing calls.

The current implementation of Tail Recursion Elimination has a very restricted
pre-requisite: AllCallsAreTailCalls. i.e. it requires that no function
call receives a pointer to local stack. Generally, function calls that
receive a pointer to local stack but do not capture it - should not
break TRE. This fix allows us to do TRE if it is proved that no pointer
to the local stack is escaped.

Reviewed by: efriedma

Differential Revision: https://reviews.llvm.org/D82085
The file was modifiedllvm/lib/Transforms/Scalar/TailRecursionElimination.cpp
The file was modifiedllvm/test/Transforms/TailCallElim/basic.ll
The file was addedllvm/test/Transforms/TailCallElim/tre-noncapturing-alloca-calls.ll
The file was addedllvm/test/Transforms/TailCallElim/tre-multiple-exits.ll
Commit d7a05698efcfa6c596bcaadd8d5154612990f8f3 by cdevadas
[AMDGPU] Move LowerSwitch pass to CodeGenPrepare.

It is possible that LowerSwitch pass leaves certain blocks
unreachable from the entry. If not removed, these dead blocks
can cause undefined behavior in the subsequent passes.
It caused a crash in the AMDGPU backend after the instruction
selection when a PHI node has its incoming values coming from
these unreachable blocks.

In the AMDGPU pass flow, the last invocation of UnreachableBlockElim
precedes where LowerSwitch is currently placed and eventually
missed out on the opportunity to get these blocks eliminated.
This patch ensures that LowerSwitch pass get inserted earlier
to make use of the existing unreachable block elimination pass.

Reviewed By: sameerds, arsenm

Differential Revision: https://reviews.llvm.org/D83584
The file was addedllvm/test/CodeGen/AMDGPU/switch-default-block-unreachable.ll
The file was modifiedllvm/lib/Target/AMDGPU/AMDGPUTargetMachine.cpp
Commit 850b150cff3dfb5f2113d9c3c483e2d22b318ced by sstipanovic
[Attributor][NFC] Add more debug output for deleted functions
The file was modifiedllvm/lib/Transforms/IPO/Attributor.cpp
Commit 0b4cf802fad4f504aefbeb70c061e60cff10d153 by michael.hliao
[fix-irreducible] Skip unreachable predecessors.

Summary:
- Skip unreachable predecessors during header detection in SCC. Those
  unreachable blocks would be generated in the switch lowering pass in
  the corner cases or other frontends. Even though they could be removed
  through the CFG simplification, we should skip them during header
  detection.

Reviewers: sameerds

Subscribers: hiraditya, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D83562
The file was addedllvm/test/Transforms/FixIrreducible/unreachable.ll
The file was modifiedllvm/lib/Transforms/Utils/FixIrreducible.cpp
Commit 81db614411bdc8f95e5b7e2acaf551507eb7201b by michael.hliao
Fix `-Wunused-variable` warnings. NFC.
The file was modifiedllvm/lib/Transforms/IPO/OpenMPOpt.cpp
Commit 102828249c8ec9ab43ee84f496274f2853ed899c by uday
[MLIR] Parallelize affine.for op to 1-D affine.parallel op

Introduce pass to convert parallel affine.for op into 1-D affine.parallel op.
Run using --affine-parallelize. Removes test-detect-parallel: pass for checking
parallel affine.for ops.

Signed-off-by: Yash Jain <yash.jain@polymagelabs.com>

Differential Revision: https://reviews.llvm.org/D83193
The file was addedmlir/lib/Dialect/Affine/Transforms/AffineParallelize.cpp
The file was modifiedmlir/lib/Dialect/Affine/Utils/Utils.cpp
The file was modifiedmlir/include/mlir/Dialect/Affine/Passes.td
The file was removedmlir/test/Dialect/Affine/parallelism-detection.mlir
The file was modifiedmlir/include/mlir/Dialect/Affine/Utils.h
The file was addedmlir/test/Dialect/Affine/parallelize.mlir
The file was modifiedmlir/tools/mlir-opt/mlir-opt.cpp
The file was modifiedmlir/include/mlir/Dialect/Affine/Passes.h
The file was modifiedmlir/lib/Dialect/Affine/Transforms/CMakeLists.txt
The file was modifiedmlir/test/lib/Dialect/Affine/CMakeLists.txt
The file was removedmlir/test/lib/Dialect/Affine/TestParallelismDetection.cpp
Commit 6e42a417bacbfd5a1f58b0ccb7c9b34ff9e54523 by clementval
[flang][openmp] Check clauses allowed semantic with tablegen generated map

Summary:
This patch is enabling the generation of clauses enum sets for semantics check in Flang through
tablegen. Enum sets and directive - sets map is generated by the new tablegen infrsatructure for OpenMP
and other directive languages.
The semantic checks for OpenMP are modified to use this newly generated map.

Reviewers: DavidTruby, sscalpone, kiranchandramohan, ichoyjx, jdoerfert

Reviewed By: DavidTruby, ichoyjx

Subscribers: mgorny, yaxunl, hiraditya, guansong, sstefan1, aaron.ballman, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D83326
The file was modifiedllvm/test/TableGen/directive2.td
The file was modifiedllvm/include/llvm/Frontend/OpenMP/OMP.td
The file was modifiedllvm/utils/TableGen/DirectiveEmitter.cpp
The file was modifiedflang/lib/Semantics/check-omp-structure.h
The file was modifiedllvm/test/TableGen/directive1.td
The file was modifiedllvm/include/llvm/Frontend/OpenMP/CMakeLists.txt
The file was modifiedllvm/utils/TableGen/TableGenBackends.h
The file was modifiedllvm/utils/TableGen/TableGen.cpp
The file was modifiedflang/test/Semantics/omp-clause-validity01.f90
The file was modifiedflang/lib/Semantics/check-omp-structure.cpp
The file was modifiedllvm/include/llvm/Frontend/Directive/DirectiveBase.td
Commit 5d2c3e031a6861b3e95673d0e238c09938dd9c0d by Yaxun.Liu
Fix regression due to test hip-version.hip

Added RocmInstallationDetector to Darwin and MinGW.

Fixed duplicate ROCm detector in ROCm toolchain.
The file was modifiedclang/lib/Driver/ToolChains/Darwin.h
The file was modifiedclang/lib/Driver/ToolChains/FreeBSD.h
The file was modifiedclang/lib/Driver/ToolChains/FreeBSD.cpp
The file was modifiedclang/lib/Driver/ToolChains/AMDGPU.cpp
The file was modifiedclang/lib/Driver/ToolChains/HIP.cpp
The file was modifiedclang/test/Driver/hip-version.hip
The file was modifiedclang/lib/Driver/ToolChains/MinGW.cpp
The file was modifiedclang/lib/Driver/ToolChains/MinGW.h
The file was modifiedclang/lib/Driver/ToolChains/AMDGPU.h
The file was modifiedclang/lib/Driver/ToolChains/Darwin.cpp
Commit 5937434677afc5be47977f8d340ff499589f2ef3 by johannes
[OpenMP] Silence unused symbol warning with proper ifdefs
The file was modifiedopenmp/libomptarget/deviceRTLs/common/src/reduction.cu
Commit 8f183d9f3d13d66a679bd449b1f5d34942560028 by clementval
[openmp] Remove unused variable in DirectiveEmitter
The file was modifiedllvm/utils/TableGen/DirectiveEmitter.cpp
Commit d8c35031a39e7b1bf9524ddd325c7a91dbb05f1d by stephen.neuendorffer
[examples] fix ExceptionDemo

Code didn't compile in a release build.  Guard debug output with
ifndef NDEBUG.

Differential Revision: https://reviews.llvm.org/D83628
The file was modifiedllvm/examples/ExceptionDemo/ExceptionDemo.cpp
Commit 47872adf6ae236c798d05b7229e00f363ab2fe0f by craig.topper
[X86] Add test cases for missed opportunities to use vpternlog due to a bitcast between the logic ops.

These test cases fail to use vpternlog because the AND was converted
to a blend shuffle and then converted back to AND during shuffle lowering.
This results in the AND having a different type than it started with.
This prevents our custom matching logic from seeing the two logic ops.
The file was modifiedllvm/test/CodeGen/X86/avx512-logic.ll
The file was modifiedllvm/test/CodeGen/X86/avx512vl-logic.ll
Commit 3b04af4d84fbffa6a2e90cfd187ed01092b45684 by joker.eph
Fix some memory leak in MLIRContext with respect to registered types/attributes interfaces

Differential Revision: https://reviews.llvm.org/D83618
The file was modifiedmlir/lib/IR/MLIRContext.cpp
Commit 44b0b7cf6605c41728f445c363415b9b6f48db04 by joker.eph
Fix one memory leak in the MLIRParser by using std::unique_ptr to hold the new block pointer

This is NFC when there is no parsing error.

Differential Revision: https://reviews.llvm.org/D83619
The file was modifiedmlir/lib/Parser/Parser.cpp
Commit b8409c03ed90807f3d49c7d98dceea98cf461f7a by michael.hliao
Fix `-Wreturn-type` warning. NFC.
The file was modifiedclang/lib/Tooling/Syntax/BuildTree.cpp
Commit 6792069a3fdb412d06dd3cc42a6181c6fb7db860 by nikita.ppv
[NewGVN] Regenerate test checks (NFC)
The file was modifiedllvm/test/Transforms/NewGVN/assumes.ll
Commit 4dbe82eef34e5ab8a9b0dabdbca194ff6858fc7f by kuterdinel
[Attributor] Introudce attribute seed allow list.
The file was modifiedllvm/lib/Transforms/IPO/Attributor.cpp
The file was addedllvm/test/Transforms/Attributor/allow_list.ll
The file was modifiedllvm/include/llvm/Transforms/IPO/Attributor.h