LLVM/project ad1e107llvm/lib/Target/PowerPC PPCInstrInfo.td

[PowerPC] Require PPC32 for 32-bit addc/adde/subc/sube (#179186)

Unlike the base add/sub opcodes which will just overflow, these will
produce incorrect results, because the carry operates on the full
64-bits. Trying to use these with i32 operands on PPC64 should result in
a selection failure instead of a silent miscompile, like the one seen in
https://github.com/llvm/llvm-project/pull/178979.
DeltaFile
+17-10llvm/lib/Target/PowerPC/PPCInstrInfo.td
+17-101 files

LLVM/project 680124cllvm/lib/Option Option.cpp

[Option] Fix param name mismatch & coding style (NFC) (#180746)

Align parameter names between the declaration and
definition in Option.cpp.
Also, update variable names to adhere to the LLVM
Coding Standards regarding casing.
See
https://github.com/llvm/llvm-project/blob/6c0ff8d12fe5b7d1d55098ca31dac56d8925bf7b/llvm/include/llvm/Option/Option.h#L242.

However the defination is:

https://github.com/llvm/llvm-project/blob/6c0ff8d12fe5b7d1d55098ca31dac56d8925bf7b/llvm/lib/Option/Option.cpp#L112-L114
DeltaFile
+14-14llvm/lib/Option/Option.cpp
+14-141 files

LLVM/project b2444d0llvm/test/CodeGen/AArch64 branch-cond-split-fcmp.ll, llvm/test/CodeGen/Thumb2 arm_canberra_distance_f32.ll

[AArch64][ARM] Add some tests for fcmp or branches. NFC
DeltaFile
+425-0llvm/test/CodeGen/AArch64/branch-cond-split-fcmp.ll
+88-0llvm/test/CodeGen/Thumb2/arm_canberra_distance_f32.ll
+513-02 files

LLVM/project 8b9fd48offload CMakeLists.txt, offload/plugins-nextgen/host CMakeLists.txt

[OFFLOAD] Support host plugin on Windows (#180401)

Changes to make host plugin compile on Windows:
* Change IO code to be portable
* Adjust Makefiles

Allow plugin to work partially when libffi support is not found
dynamically (compilation works fine even on Windows because of the
wrapper support).
DeltaFile
+48-32offload/plugins-nextgen/host/src/rtl.cpp
+0-6offload/plugins-nextgen/host/CMakeLists.txt
+0-5offload/CMakeLists.txt
+48-433 files

LLVM/project 6c51938mlir/test/lib/Dialect/Test TestOpsSyntax.td, mlir/test/mlir-tblgen op-format.mlir

[MLIR] Guard optional operand resolution in generated op parsers (#180796)

Skip resolveOperands for optional operands when they are absent to
avoid out-of-bounds access on the empty types vector.
DeltaFile
+11-0mlir/test/lib/Dialect/Test/TestOpsSyntax.td
+6-0mlir/test/mlir-tblgen/op-format.mlir
+6-0mlir/tools/mlir-tblgen/OpFormatGen.cpp
+23-03 files

LLVM/project 128437fclang/test/CodeGenOpenCL builtins-amdgcn-asyncmark.cl, llvm/lib/Target/AMDGPU SIInsertWaitcnts.cpp

[AMDGPU] Introduce asyncmark/wait intrinsics (#180467)

Asynchronous operations are memory transfers (usually between the global
memory and LDS) that are completed independently at an unspecified
scope. A thread that requests one or more asynchronous transfers can use
async marks to track their completion. The thread waits for each mark to
be completed, which indicates that requests initiated in program order
before this mark have also completed.

For now, we implement asyncmark/wait operations on pre-GFX12
architectures that support "LDS DMA" operations. Future work will extend
support to GFX12Plus architectures that support "true" async operations.

This is part of a stack split out from #173259
- #180467
- #180466

Co-authored-by: Ryan Mitchell ryan.mitchell at amd.com

Fixes: SWDEV-521121
DeltaFile
+268-12llvm/lib/Target/AMDGPU/SIInsertWaitcnts.cpp
+279-0llvm/test/CodeGen/AMDGPU/asyncmark-max-pregfx12.ll
+194-75llvm/test/CodeGen/AMDGPU/asyncmark-pregfx12.ll
+38-16llvm/test/CodeGen/AMDGPU/async-buffer-loads.ll
+19-0llvm/test/CodeGen/AMDGPU/asyncmark-err.ll
+16-0clang/test/CodeGenOpenCL/builtins-amdgcn-asyncmark.cl
+814-1036 files not shown
+870-10512 files

LLVM/project e0285e4libcxx/test/std/localization/locale.categories/category.time/locale.time.get.byname get_weekday_wide.pass.cpp get_one_wide.pass.cpp, libcxx/test/std/localization/locale.categories/category.time/locale.time.get/locale.time.get.members get_time_wide.pass.cpp

[libc++][test] Include `<ios>` and `<ctime>` in tests for `time` locale facets (#179986)

Add inclusion of `<ios>` and `<ctime>` to ensure that the definitions of `std::basic_ios` and `std::tm` are available.

As a drive-by fix, change uses of `tm` to `std::tm`. The latter is guaranteed to be available in `<ctime>`, but the former isn't.
DeltaFile
+5-2libcxx/test/std/localization/locale.categories/category.time/locale.time.put/locale.time.put.members/put2.pass.cpp
+5-2libcxx/test/std/localization/locale.categories/category.time/locale.time.put.byname/put1.pass.cpp
+4-2libcxx/test/std/localization/locale.categories/category.time/locale.time.put/locale.time.put.members/put1.pass.cpp
+4-1libcxx/test/std/localization/locale.categories/category.time/locale.time.get.byname/get_weekday_wide.pass.cpp
+4-1libcxx/test/std/localization/locale.categories/category.time/locale.time.get/locale.time.get.members/get_time_wide.pass.cpp
+4-1libcxx/test/std/localization/locale.categories/category.time/locale.time.get.byname/get_one_wide.pass.cpp
+26-912 files not shown
+50-1318 files

LLVM/project aa1c310clang/include/clang/CIR/Dialect/IR CIRAttrs.td, clang/lib/CIR/CodeGen CIRGenDeclCXX.cpp CIRGenDecl.cpp

[CIR] Add CIRGen support for static local variables with non-constant initializers

This adds CIRGen infrastructure for C++ function-local static variables
that require guarded initialization (Itanium C++ ABI).

Changes:
- Add ASTVarDeclAttr to carry VarDecl AST through the pipeline
- Add emitGuardedInit() to CIRGenCXXABI for guarded initialization
- Add emitCXXGuardedInit() to CIRGenFunction
- Replace NYI in addInitializerToStaticVarDecl() with ctor region emission
- Set static_local attribute on GlobalOp and GetGlobalOp

The global's ctor region contains the initialization code, which will be
lowered by LoweringPrepare to emit the actual guard variable pattern with
__cxa_guard_acquire/__cxa_guard_release calls.
DeltaFile
+41-0clang/include/clang/CIR/Dialect/IR/CIRAttrs.td
+30-0clang/test/CIR/CodeGen/static-local.cpp
+18-0clang/lib/CIR/CodeGen/CIRGenDeclCXX.cpp
+13-3clang/lib/CIR/CodeGen/CIRGenDecl.cpp
+5-0clang/lib/CIR/CodeGen/CIRGenFunction.h
+2-1clang/lib/CIR/CodeGen/CIRGenCXX.cpp
+109-45 files not shown
+116-811 files

LLVM/project c8e7c3allvm/utils/gn/secondary/llvm/lib/Target/X86 BUILD.gn

[gn build] Port 70b96befd832
DeltaFile
+1-1llvm/utils/gn/secondary/llvm/lib/Target/X86/BUILD.gn
+1-11 files

LLVM/project 70b96bellvm/lib/Target/X86 X86InsertX87Wait.cpp X86InsertWait.cpp, llvm/test/CodeGen/X86 llc-pipeline-npm.ll

[NewPM] Port x86-insert-x87-wait (#180128)

Similar to other portings created by @aidenboom154. No specific test
coverage as there are no MIR->MIR tests that exercise this pass. Going
with other naming conventions, I renamed WaitInsert to
X86InsertX87WaitLegacy
DeltaFile
+142-0llvm/lib/Target/X86/X86InsertX87Wait.cpp
+0-130llvm/lib/Target/X86/X86InsertWait.cpp
+6-1llvm/lib/Target/X86/X86.h
+4-0llvm/test/CodeGen/X86/llc-pipeline-npm.ll
+1-1llvm/lib/Target/X86/X86PassRegistry.def
+1-1llvm/lib/Target/X86/X86TargetMachine.cpp
+154-1332 files not shown
+156-1358 files

LLVM/project 8a00fd0mlir/lib/Dialect/Affine/Analysis Utils.cpp, mlir/test/Dialect/Affine loop-fusion-4.mlir

[MLIR][Affine] Remove restriction in slice validity check on symbols (#180709)

Remove restriction in affine analysis utility for checking slice
validity. This was unnecessarily bailing out still after the underlying
methods were extended. This update enables fusion of affine nests with
symbolic bounds.

Fixes: https://github.com/llvm/llvm-project/issues/61784

Based on and revived from https://reviews.llvm.org/D148559 from
@anoopjs.
DeltaFile
+59-0mlir/test/Dialect/Affine/loop-fusion-4.mlir
+2-6mlir/lib/Dialect/Affine/Analysis/Utils.cpp
+61-62 files

LLVM/project 4b33d45flang/include/flang/Semantics symbol.h, flang/lib/Semantics check-omp-structure.cpp

[Flang][OpenMP] Fix visibility of user-defined reductions for derived types and module imports (#180552)

User-defined reductions declared in a module were not visible to
programs that imported the module via USE statements, causing valid code
to be incorrectly rejected. The reduction identifier defined in the
module scope wasn't being found during semantic analysis of the main
program.

Ref:
OpenMP Spec 5.1 
_"If a directive appears in the specification part of a module then the
behavior is as if that directive,
with the variables, types and procedures that have PRIVATE accessibility
omitted, appears in the
specification part of any compilation unit that references the module
unless otherwise specified "_

Fixes :
[https://github.com/llvm/llvm-project/issues/176279](https://github.com/llvm/llvm-project/issues/176279)

Co-authored-by: Chandra Ghale <ghale at pe31.hpc.amslabs.hpecorp.net>
DeltaFile
+30-0flang/test/Semantics/OpenMP/declare-reduction-derived-module.f90
+16-0flang/include/flang/Semantics/symbol.h
+14-0flang/lib/Semantics/check-omp-structure.cpp
+60-03 files

LLVM/project 7995fc0clang/test/CodeGenOpenCL builtins-amdgcn-asyncmark.cl, llvm/lib/Target/AMDGPU SIInsertWaitcnts.cpp

[AMDGPU] Introduce asyncmark/wait intrinsics

Asynchronous operations are memory transfers (usually between the global memory
and LDS) that are completed independently at an unspecified scope. A thread that
requests one or more asynchronous transfers can use async marks to track their
completion. The thread waits for each mark to be completed, which indicates that
requests initiated in program order before this mark have also completed.

For now, we implement asyncmark/wait operations on pre-GFX12 architectures that
support "LDS DMA" operations. Future work will extend support to GFX12Plus
architectures that support "true" async operations.

Co-authored-by: Ryan Mitchell ryan.mitchell at amd.com

Fixes: SWDEV-521121
DeltaFile
+268-12llvm/lib/Target/AMDGPU/SIInsertWaitcnts.cpp
+279-0llvm/test/CodeGen/AMDGPU/asyncmark-max-pregfx12.ll
+194-75llvm/test/CodeGen/AMDGPU/asyncmark-pregfx12.ll
+38-16llvm/test/CodeGen/AMDGPU/async-buffer-loads.ll
+19-0llvm/test/CodeGen/AMDGPU/asyncmark-err.ll
+16-0clang/test/CodeGenOpenCL/builtins-amdgcn-asyncmark.cl
+814-1037 files not shown
+874-10913 files

LLVM/project f63477fllvm/lib/Target/AMDGPU SIInstrInfo.h

don't move usesLGKM_CNT()
DeltaFile
+4-4llvm/lib/Target/AMDGPU/SIInstrInfo.h
+4-41 files

LLVM/project 67acd02clang/docs ReleaseNotes.rst

Release Note
DeltaFile
+2-0clang/docs/ReleaseNotes.rst
+2-01 files

LLVM/project 186a2bfclang/include/clang/Basic CodeGenOptions.def, clang/include/clang/Options Options.td

[clang] Ensure -mno-outline adds attributes

Before this change, `-mno-outline` and `-moutline` only controlled the
pass pipelines for the invoked compiler/linker.

The drawback of this implementation is that, when using LTO, only the
flag provided to the linker invocation is honoured (and any files which
individually use `-mno-outline` will have that flag ignored).

This change serialises the `-mno-outline` flag into each function's
IR/Bitcode, so that we can correctly disable outlining from functions in
files which disabled outlining, without affecting outlining choices for
functions from other files. This matches how other optimisation flags
are handled so the IR/Bitcode can be correctly merged during LTO.
DeltaFile
+7-10clang/include/clang/Options/Options.td
+14-3clang/test/CodeGen/attr-no-outline.c
+6-5clang/lib/Driver/ToolChains/CommonArgs.cpp
+3-1clang/lib/CodeGen/CodeGenModule.cpp
+3-0clang/include/clang/Basic/CodeGenOptions.def
+1-1clang/test/Driver/aarch64-outliner.c
+34-203 files not shown
+37-239 files

LLVM/project 2aa680eclang/docs ReleaseNotes.rst, clang/test/Sema attr-nooutline.cpp attr-nooutline.c

Address Review Feedback: Flags, Release Notes
DeltaFile
+3-3clang/docs/ReleaseNotes.rst
+1-1clang/test/Sema/attr-nooutline.cpp
+1-1clang/test/Sema/attr-nooutline.c
+5-53 files

LLVM/project 3876629clang/include/clang/Basic AttrDocs.td, clang/test/CodeGen attr-no-outline.c attr-nooutline.c

Change spelling to clang::no_outline, more tests
DeltaFile
+107-0clang/test/CodeGen/attr-no-outline.c
+40-0clang/test/CodeGenObjC/attr-no-outline.m
+0-25clang/test/CodeGen/attr-nooutline.c
+0-18clang/include/clang/Basic/AttrDocs.td
+0-7clang/test/Sema/attr-nooutline.c
+0-7clang/test/Sema/attr-nooutline.cpp
+147-575 files not shown
+166-6211 files

LLVM/project 99d640dclang/docs ReleaseNotes.rst

Release Notes
DeltaFile
+3-0clang/docs/ReleaseNotes.rst
+3-01 files

LLVM/project c20d4c5clang/include/clang/Basic AttrDocs.td Attr.td, clang/test/CodeGen attr-nooutline.c

Address reviewer feedback: Tests, Docs, TableGen
DeltaFile
+30-0clang/include/clang/Basic/AttrDocs.td
+19-10clang/test/CodeGen/attr-nooutline.c
+2-2clang/include/clang/Basic/Attr.td
+51-123 files

LLVM/project 5e156d4clang/include/clang/Basic Attr.td, clang/lib/CodeGen CodeGenModule.cpp

[clang] Add clang::nooutline Attribute

This change:
- Adds a `[[clang::nooutline]]` function attribute for C and C++. There
  is no equivalent GNU syntax for this attribute, so no `__attribute__`
  syntax.
- Uses the presence of `[[clang::nooutline]]` to add the `nooutline`
  attribute to IR function definitions.
- Adds test for the above.

The `nooutline` attribute disables both the Machine Outliner (enabled at
Oz for some targets), and the IR Outliner (disabled by default).
DeltaFile
+16-0clang/test/CodeGen/attr-nooutline.c
+7-0clang/test/Sema/attr-nooutline.c
+7-0clang/test/Sema/attr-nooutline.cpp
+7-0clang/include/clang/Basic/Attr.td
+3-0clang/lib/CodeGen/CodeGenModule.cpp
+1-0clang/test/Misc/pragma-attribute-supported-attributes-list.test
+41-06 files

LLVM/project 0d08cb0llvm/docs ReleaseNotes.md, llvm/include/llvm/IR Attributes.td

[outliners] Turn nooutline into an Enum Attribute (#163665)

This change turns the `"nooutline"` attribute into an enum attribute
called `nooutline`, and adds an auto-upgrader for bitcode to make the
same change to existing IR.

This IR attribute disables both the Machine Outliner (enabled at Oz for
some targets), and the IR Outliner (disabled by default).
DeltaFile
+10-0llvm/test/Bitcode/upgrade-nooutline.ll
+7-0llvm/lib/IR/AutoUpgrade.cpp
+2-2llvm/test/Transforms/IROutliner/nooutline-attribute.ll
+3-0llvm/include/llvm/IR/Attributes.td
+3-0llvm/docs/ReleaseNotes.md
+1-1llvm/test/CodeGen/AArch64/machine-outliner-mapper-debug-output.mir
+26-310 files not shown
+38-616 files

LLVM/project b02b395llvm/docs AMDGPUAsyncOperations.rst, llvm/lib/Target/AMDGPU SIISelLowering.cpp FLATInstructions.td

[AMDGPU] Asynchronous loads from global/buffer to LDS on pre-GFX12 (#180466)

The existing "LDS DMA" builtins/intrinsics copy data from global/buffer
pointer to LDS. These are now augmented with their ".async" version,
where the compiler does not automatically track completion. The
completion is now tracked using explicit mark/wait intrinsics, which
must be inserted by the user. This makes it possible to write programs
with efficient waits in software pipeline loops. The program can now
wait for only the oldest outstanding operations to finish, while
launching more operations for later use.

This change only contains the new names of the builtins/intrinsics,
which continue to behave exactly like their non-async counterparts. A
later change will implement the actual mark/wait semantics in
SIInsertWaitcnts.

This is part of a stack split out from #173259:
- #180467
- #180466

Fixes: SWDEV-521121
DeltaFile
+444-0llvm/test/CodeGen/AMDGPU/asyncmark-pregfx12.ll
+238-0llvm/docs/AMDGPUAsyncOperations.rst
+91-0llvm/test/CodeGen/AMDGPU/async-buffer-loads.ll
+38-5llvm/lib/Target/AMDGPU/SIISelLowering.cpp
+37-0llvm/test/CodeGen/AMDGPU/llvm.amdgcn.load.to.lds.ll
+13-12llvm/lib/Target/AMDGPU/FLATInstructions.td
+861-1723 files not shown
+1,072-7529 files

LLVM/project cf49e40clang/docs ReleaseNotes.rst, clang/test/Sema attr-nooutline.cpp attr-nooutline.c

Address Review Feedback: Flags, Release Notes
DeltaFile
+3-3clang/docs/ReleaseNotes.rst
+1-1clang/test/Sema/attr-nooutline.cpp
+1-1clang/test/Sema/attr-nooutline.c
+5-53 files

LLVM/project 691892dclang/include/clang/Basic CodeGenOptions.def, clang/include/clang/Options Options.td

[clang] Ensure -mno-outline adds attributes

Before this change, `-mno-outline` and `-moutline` only controlled the
pass pipelines for the invoked compiler/linker.

The drawback of this implementation is that, when using LTO, only the
flag provided to the linker invocation is honoured (and any files which
individually use `-mno-outline` will have that flag ignored).

This change serialises the `-mno-outline` flag into each function's
IR/Bitcode, so that we can correctly disable outlining from functions in
files which disabled outlining, without affecting outlining choices for
functions from other files. This matches how other optimisation flags
are handled so the IR/Bitcode can be correctly merged during LTO.
DeltaFile
+7-10clang/include/clang/Options/Options.td
+14-3clang/test/CodeGen/attr-no-outline.c
+6-5clang/lib/Driver/ToolChains/CommonArgs.cpp
+3-1clang/lib/CodeGen/CodeGenModule.cpp
+3-0clang/include/clang/Basic/CodeGenOptions.def
+1-1clang/test/Driver/x86-outliner.c
+34-203 files not shown
+37-239 files

LLVM/project 5a8495bclang/include/clang/Basic AttrDocs.td Attr.td, clang/test/CodeGen attr-nooutline.c

Address reviewer feedback: Tests, Docs, TableGen
DeltaFile
+30-0clang/include/clang/Basic/AttrDocs.td
+19-10clang/test/CodeGen/attr-nooutline.c
+2-2clang/include/clang/Basic/Attr.td
+51-123 files

LLVM/project a0cf394clang/include/clang/Basic AttrDocs.td, clang/test/CodeGen attr-no-outline.c attr-nooutline.c

Change spelling to clang::no_outline, more tests
DeltaFile
+107-0clang/test/CodeGen/attr-no-outline.c
+40-0clang/test/CodeGenObjC/attr-no-outline.m
+0-25clang/test/CodeGen/attr-nooutline.c
+0-18clang/include/clang/Basic/AttrDocs.td
+7-0clang/test/Sema/attr-no-outline.c
+7-0clang/test/Sema/attr-no-outline.cpp
+161-435 files not shown
+166-6211 files

LLVM/project 27d6d60clang/include/clang/Basic Attr.td, clang/lib/CodeGen CodeGenModule.cpp

[clang] Add clang::nooutline Attribute

This change:
- Adds a `[[clang::nooutline]]` function attribute for C and C++. There
  is no equivalent GNU syntax for this attribute, so no `__attribute__`
  syntax.
- Uses the presence of `[[clang::nooutline]]` to add the `nooutline`
  attribute to IR function definitions.
- Adds test for the above.

The `nooutline` attribute disables both the Machine Outliner (enabled at
Oz for some targets), and the IR Outliner (disabled by default).
DeltaFile
+16-0clang/test/CodeGen/attr-nooutline.c
+7-0clang/test/Sema/attr-nooutline.c
+7-0clang/test/Sema/attr-nooutline.cpp
+7-0clang/include/clang/Basic/Attr.td
+3-0clang/lib/CodeGen/CodeGenModule.cpp
+1-0clang/test/Misc/pragma-attribute-supported-attributes-list.test
+41-06 files

LLVM/project f1dc20dclang/docs ReleaseNotes.rst

Release Note
DeltaFile
+2-0clang/docs/ReleaseNotes.rst
+2-01 files

LLVM/project f3dd70bclang/docs ReleaseNotes.rst

Release Notes
DeltaFile
+3-0clang/docs/ReleaseNotes.rst
+3-01 files