Changes

Summary

  1. [CodeGen] Add missing includes (NFC) (details)
  2. [TargetLowering] Move methods out of line (NFC) (details)
  3. [Clang][OpenMP] Add static version of getSingleClause<ClauseT>. NFC. (details)
  4. AssumeBundleQueries.cpp - don't dereference a dyn_cast<> result. NFCI. (details)
  5. X86Operand.h - fix uninitialized variable warnings in constructor. NFCI. (details)
  6. [LexicalScopesTest] Add missing IRBuilder.h include (NFC) (details)
  7. [TargetLowering] Use IRBuilderBase instead of IRBuilder<> (NFC) (details)
  8. X86MachObjectWriter.cpp - silence null deference warnings. NFCI. (details)
  9. [Clang][OpenMP] Refactor checking for mutually exclusive clauses. NFC. (details)
  10. Revert "[LoopUnrollAndJam] Change LoopUnrollAndJamPass to LoopNest pass" (details)
Commit 99142003933c19d7d91e1c89fe038876cf429e4a by nikita.ppv
[CodeGen] Add missing includes (NFC)

These currently rely on the IRBuilder.h include in TargetLowering.h.
Make them explicit.
The file was modifiedllvm/lib/CodeGen/InterleavedLoadCombinePass.cpp
The file was modifiedllvm/lib/Target/AMDGPU/AMDGPUCodeGenPrepare.cpp
The file was modifiedllvm/lib/Target/RISCV/RISCVISelLowering.cpp
The file was modifiedllvm/lib/CodeGen/GlobalISel/GISelKnownBits.cpp
The file was modifiedllvm/lib/Target/AMDGPU/AMDGPUTargetTransformInfo.cpp
The file was modifiedllvm/lib/Target/AArch64/AArch64StackTagging.cpp
The file was modifiedllvm/lib/Target/AMDGPU/AMDGPULowerKernelArguments.cpp
The file was modifiedllvm/lib/Target/Hexagon/HexagonISelLowering.cpp
The file was modifiedllvm/lib/Target/AMDGPU/SIISelLowering.cpp
The file was modifiedllvm/lib/Target/X86/X86ISelLowering.cpp
The file was modifiedllvm/lib/Target/AArch64/AArch64LowerHomogeneousPrologEpilog.cpp
The file was modifiedllvm/lib/Target/AMDGPU/AMDGPULibCalls.cpp
The file was modifiedllvm/lib/Target/AMDGPU/AMDGPUPerfHintAnalysis.cpp
Commit 506875c87926b8009664ffc15a1f8233e8460cde by nikita.ppv
[TargetLowering] Move methods out of line (NFC)

Move methods using IRBuilder out of line, so we can drop the
dependency on the header.
The file was modifiedllvm/include/llvm/CodeGen/TargetLowering.h
The file was modifiedllvm/lib/CodeGen/TargetLoweringBase.cpp
Commit d466ca087aae958d1c0a965c561be07d2cb3e7e2 by llvm-project
[Clang][OpenMP] Add static version of getSingleClause<ClauseT>. NFC.

The current method getSingleClause requires an instance of OMPExecutableDirective to be called. Introduce a static version taking a list of clauses as argument instead that can be used during parsing/Sema before any OMPExecutableDirective has been created.

This is the same approach as taken for getClausesOfKind for getting more more than a single clause of a type which also has a method and static version. NFC patch extracted out of D99459 by request.

Reviewed By: ABataev

Differential Revision: https://reviews.llvm.org/D103665
The file was modifiedclang/include/clang/AST/StmtOpenMP.h
Commit 76a1be05fa00638532bfda02839f1847ab15ede7 by llvm-dev
AssumeBundleQueries.cpp - don't dereference a dyn_cast<> result. NFCI.

Use cast<> instead which will assert that the cast is correct and not just return null - the match() should have already failed if the cast isn't valid anyhow.

Fixes static analysis warning.
The file was modifiedllvm/lib/Analysis/AssumeBundleQueries.cpp
Commit 0f938a6ed8f43a8b3923208131ce9c28f723d45f by llvm-dev
X86Operand.h - fix uninitialized variable warnings in constructor. NFCI.
The file was modifiedllvm/lib/Target/X86/AsmParser/X86Operand.h
Commit 85dfb377dd2bba4e88bec049a4ced3d2ba5e34ca by nikita.ppv
[LexicalScopesTest] Add missing IRBuilder.h include (NFC)

This currently depends on a transitive include via TargetLowering.h.
The file was modifiedllvm/unittests/CodeGen/LexicalScopesTest.cpp
Commit 1ffa6499ea3b7fde687666a45e89909fbf72a450 by nikita.ppv
[TargetLowering] Use IRBuilderBase instead of IRBuilder<> (NFC)

Don't require a specific kind of IRBuilder for TargetLowering hooks.
This allows us to drop the IRBuilder.h include from TargetLowering.h.

Differential Revision: https://reviews.llvm.org/D103759
The file was modifiedllvm/lib/Target/AArch64/AArch64ISelLowering.cpp
The file was modifiedllvm/lib/Target/RISCV/RISCVISelLowering.cpp
The file was modifiedllvm/lib/Target/PowerPC/PPCISelLowering.cpp
The file was modifiedllvm/lib/Target/AArch64/AArch64ISelLowering.h
The file was modifiedllvm/lib/Target/X86/X86ISelLowering.cpp
The file was modifiedllvm/lib/Target/RISCV/RISCVISelLowering.h
The file was modifiedllvm/include/llvm/CodeGen/TargetLowering.h
The file was modifiedllvm/lib/Target/Hexagon/HexagonISelLowering.h
The file was modifiedllvm/lib/Target/Hexagon/HexagonISelLowering.cpp
The file was modifiedllvm/lib/Target/ARM/ARMISelLowering.cpp
The file was modifiedllvm/lib/Target/ARM/ARMISelLowering.h
The file was modifiedllvm/lib/Target/X86/X86ISelLowering.h
The file was modifiedllvm/lib/Target/PowerPC/PPCISelLowering.h
The file was modifiedllvm/lib/CodeGen/TargetLoweringBase.cpp
Commit b69e16b5cce6987dd9da3570c1b97e4b7e437d85 by llvm-dev
X86MachObjectWriter.cpp - silence null deference warnings. NFCI.

The MCSymbol data should always be present for non-absolute sections so assert that it is to silence static analysis warnings.
The file was modifiedllvm/lib/Target/X86/MCTargetDesc/X86MachObjectWriter.cpp
Commit c41a8fbfbb096995367947e5ef7d36501b04d493 by llvm-project
[Clang][OpenMP] Refactor checking for mutually exclusive clauses. NFC.

Multiple clauses are mutually exclusive. This patch refactors the functions that check for pairs of mutually exclusive clauses into a generalized function which also also accepts a list of clause types if which at most one can appear.

NFC patch extracted out of D99459 by request.

Reviewed By: ABataev

Differential Revision: https://reviews.llvm.org/D103666
The file was modifiedclang/lib/Sema/SemaOpenMP.cpp
Commit 0a9d0799316c7a601a0b20a123bd99922ac6455b by konndennsa
Revert "[LoopUnrollAndJam] Change LoopUnrollAndJamPass to LoopNest pass"

This reverts commit 21653600034084e8335374ddc1eb8d362158d9a8.

To fix the crash problem in legacy pass manager
The file was modifiedllvm/include/llvm/Transforms/Scalar/LoopUnrollAndJamPass.h
The file was modifiedllvm/lib/Passes/PassBuilder.cpp
The file was modifiedllvm/test/Transforms/LoopUnrollAndJam/innerloop.ll
The file was modifiedllvm/lib/Passes/PassRegistry.def
The file was modifiedllvm/lib/Transforms/Scalar/LoopUnrollAndJamPass.cpp
The file was modifiedllvm/include/llvm/Transforms/Scalar/LoopPassManager.h