LLVM/project fbf0ab2mlir/lib/Dialect/Arith/IR InferIntRangeInterfaceImpls.cpp, mlir/lib/Dialect/Index/IR InferIntRangeInterfaceImpls.cpp

address review comments
DeltaFile
+1-1mlir/lib/Dialect/Arith/IR/InferIntRangeInterfaceImpls.cpp
+1-1mlir/lib/Dialect/Index/IR/InferIntRangeInterfaceImpls.cpp
+2-22 files

LLVM/project 58c7785compiler-rt/lib/ctx_profile CtxInstrProfiling.cpp

[nfc][ctx_profile] Fix printf - related `-Wformat-pedantic`
DeltaFile
+3-2compiler-rt/lib/ctx_profile/CtxInstrProfiling.cpp
+3-21 files

LLVM/project 1118c2elibcxx/src atomic.cpp chrono.cpp, libcxxabi/src cxa_guard_impl.h

[libcxx][libcxxabi] Fix build for OpenBSD (#92186)

- No indirect syscalls on OpenBSD. Instead there is a `futex` function
which issues a direct syscall.

- Monotonic clock is available despite the full POSIX suite of timers
not being available in its entirety.

  See https://lists.boost.org/boost-bugs/2015/07/41690.php and
  https://github.com/boostorg/log/commit/c98b1f459add14d5ce3e9e63e2469064601d7f71
  for a description of an analogous problem and fix for Boost.

(cherry picked from commit af7467ce9f447d6fe977b73db1f03a18d6bbd511)
DeltaFile
+14-2libcxx/src/atomic.cpp
+15-1libcxxabi/src/cxa_guard_impl.h
+3-1libcxx/src/chrono.cpp
+32-43 files

LLVM/project e90126eflang/lib/Optimizer/Dialect/CUF CMakeLists.txt

[flang][cuf] Add attr gen dependency to fix #92635
DeltaFile
+1-0flang/lib/Optimizer/Dialect/CUF/CMakeLists.txt
+1-01 files

LLVM/project 33550b4mlir/include/mlir/Analysis CFGLoopInfo.h, mlir/include/mlir/IR Block.h

[mlir] Add operator<< for printing `Block` (#92550)

Turns out it was already in Analysis/CFGLoopInfo, so just move it
to IR/AsmPrinter.
DeltaFile
+5-0mlir/lib/IR/AsmPrinter.cpp
+0-5mlir/lib/Analysis/CFGLoopInfo.cpp
+3-0mlir/include/mlir/IR/Block.h
+0-2mlir/include/mlir/Analysis/CFGLoopInfo.h
+8-74 files

LLVM/project 4b62afcllvm/lib/Target/X86 X86FlagsCopyLowering.cpp X86InstrInfo.cpp, llvm/test/CodeGen/X86/apx ccmp-flags-copy-lowering.mir

[X86][CodeGen] Support flags copy lowering for CCMP/CTEST (#91849)

```
%1:gr64 = COPY $eflags
OP1 may update eflags
$eflags = COPY %1
OP2 may use eflags
```

To use eflags as input at 4th instruction, we need to use SETcc to
preserve the eflags before 2, and update the source condition of OP2
according to value in GPR %1.

In this patch, we support CCMP/CTEST as OP2.
DeltaFile
+51-0llvm/test/CodeGen/X86/apx/ccmp-flags-copy-lowering.mir
+33-0llvm/lib/Target/X86/X86FlagsCopyLowering.cpp
+8-1llvm/lib/Target/X86/X86InstrInfo.cpp
+3-0llvm/lib/Target/X86/X86InstrInfo.h
+95-14 files

LLVM/project 778826fllvm/include/llvm/Target/GlobalISel Combine.td, llvm/lib/CodeGen/GlobalISel CombinerHelper.cpp

[GlobalIsel] Combine select to integer min max more (#92570)

DeltaFile
+10-3llvm/lib/CodeGen/GlobalISel/CombinerHelper.cpp
+1-2llvm/test/CodeGen/AArch64/GlobalISel/combine-select.mir
+1-1llvm/include/llvm/Target/GlobalISel/Combine.td
+12-63 files

LLVM/project e501da0mlir/include/mlir/Interfaces/Utils InferIntRangeCommon.h, mlir/lib/Dialect/Arith/IR InferIntRangeInterfaceImpls.cpp

[mlir][intrange] Use `nsw`,`nuw` flags in inference

This patch includes the "no signed wrap" and "no unsigned wrap" flags,
which can be used to annotate some Ops in the `arith` dialect and also
in LLVMIR, in the integer range inference.

The general approach is to use saturating arithmetic operations to infer
bounds which are assumed to not wrap and use overflowing arithmetic
operations in the normal case. If overflow is detected in the normal case,
special handling makes sure that we don't underestimate the result range.
DeltaFile
+133-0mlir/test/Dialect/Arith/int-range-interface.mlir
+58-40mlir/lib/Interfaces/Utils/InferIntRangeCommon.cpp
+21-4mlir/include/mlir/Interfaces/Utils/InferIntRangeCommon.h
+18-4mlir/lib/Dialect/Index/IR/InferIntRangeInterfaceImpls.cpp
+18-4mlir/lib/Dialect/Arith/IR/InferIntRangeInterfaceImpls.cpp
+1-1mlir/test/Dialect/Arith/int-range-opts.mlir
+249-536 files

LLVM/project 5cebb09mlir/test/Dialect/Arith int-range-opts.mlir int-range-interface.mlir, mlir/test/lib/Dialect/Test TestOpDefs.cpp

[mlir][intrange] Represent bounds of `ReflectBoundsOp` as `si`/`ui`

This patch adapts the `test.reflect_bounds` test Op to use explicitly
signed and unsigned representation for signed and unsigned bounds of
`IntegerType`s.

This is mostly a cosmetic change as the internal representation of the
ranges is unchanged. However, it improves readability of tests.

Example:
```mlir
// old:
test.reflect_bounds {smax = 127 : i8, smin = -128 : i8, umax = -56 : i8, umin = 100 : i8}
// new:
test.reflect_bounds {smax = 127 : si8, smin = -128 : si8, umax = 200 : ui8, umin = 100 : ui8}
```
DeltaFile
+14-5mlir/test/lib/Dialect/Test/TestOpDefs.cpp
+2-2mlir/test/Dialect/Arith/int-range-opts.mlir
+1-1mlir/test/Dialect/Arith/int-range-interface.mlir
+17-83 files

LLVM/project f7b0b99clang/include/clang/Serialization ASTWriter.h, clang/lib/Basic SourceManager.cpp

[clang][NFC] Further improvements to const-correctness
DeltaFile
+11-12clang/lib/Serialization/ASTWriter.cpp
+3-3clang/lib/Basic/SourceManager.cpp
+2-4clang/lib/Serialization/ASTReader.cpp
+2-1clang/include/clang/Serialization/ASTWriter.h
+1-2clang/lib/Frontend/CompilerInstance.cpp
+1-1clang/lib/Serialization/ASTWriterStmt.cpp
+20-236 files

LLVM/project 2c2e050clang/lib/Analysis ThreadSafetyCommon.cpp, clang/test/SemaCXX warn-thread-safety-analysis.cpp

[clang][ThreadSafety] Skip past implicit cast in `translateAttrExpr`

Ignore `ImplicitCastExpr` when building `AttrExp` for capability
attribute diagnostics.

Fixes: https://github.com/llvm/llvm-project/issues/92118.
DeltaFile
+1-1clang/lib/Analysis/ThreadSafetyCommon.cpp
+1-1clang/test/SemaCXX/warn-thread-safety-analysis.cpp
+2-22 files

LLVM/project 7b4dfecllvm/test/MC/AsmParser macro-irp.s macro-rept.s

[MCAsmParser] Improve .rept/.irp tests
DeltaFile
+33-16llvm/test/MC/AsmParser/macro-irp.s
+21-1llvm/test/MC/AsmParser/macro-rept.s
+0-7llvm/test/MC/AsmParser/macro-rept-err2.s
+0-6llvm/test/MC/AsmParser/macro-rept-err1.s
+54-304 files

LLVM/project 2a97b50flang/lib/Lower/OpenMP DataSharingProcessor.cpp OpenMP.cpp, flang/test/Lower/OpenMP wsloop-collapse.f90 parallel-wsloop.f90

[flang][OpenMP] Try to unify induction var privatization for OMP regions. (#91116)

DeltaFile
+73-35flang/lib/Lower/OpenMP/DataSharingProcessor.cpp
+30-14flang/test/Lower/OpenMP/wsloop-collapse.f90
+24-8flang/test/Lower/OpenMP/parallel-wsloop.f90
+19-8flang/test/Lower/OpenMP/default-clause.f90
+17-10flang/lib/Lower/OpenMP/OpenMP.cpp
+23-0flang/test/Lower/OpenMP/critical.f90
+186-7555 files not shown
+390-21861 files

LLVM/project bfeebdaflang/test lit.cfg.py lit.site.cfg.py.in, flang/test/Lower/OpenMP omp-lib-num-threads.f90 atomic-capture.f90

[flang][OpenMP] Re-enable tests when building OpenMP as a runtime (#89046)

DeltaFile
+9-0flang/test/lit.cfg.py
+4-4flang/test/Lower/OpenMP/omp-lib-num-threads.f90
+5-1flang/test/lit.site.cfg.py.in
+2-3flang/test/Lower/OpenMP/atomic-capture.f90
+2-2flang/test/Lower/OpenMP/sections.f90
+2-2flang/test/Parser/OpenMP/allocate-tree.f90
+24-1248 files not shown
+78-6454 files

LLVM/project 195ba45llvm/lib/MC/MCParser AsmParser.cpp, llvm/test/MC/AsmParser macro-rept.s macro-arg.s

[MCAsmParser] .macro/.rept/.irp/.irpc: remove excess \n after expansion

```
.irp foo,1
nop
.endr
nop
```

expands to an excess EOL between two nop lines. Other loop directives
and .macro have the same issue.

`Lex()` at "Jump to the macro instantiation and prime the lexer"
requires that there is one single \n token in CurTok. Therefore, we
cannot consume the trailing \n when parsing the macro(-like) body.
(commit c6e787f771d1f9d6a846b2d9b8db6adcd87e8dba (reverted by
1e5f29af81a5f6fda308074f6345b9fba4faa71c))

Instead, skip the potential \n after jumpToLoc at handleMacroExit.
DeltaFile
+17-18llvm/lib/MC/MCParser/AsmParser.cpp
+13-12llvm/test/MC/AsmParser/macro-rept.s
+2-4llvm/test/MC/AsmParser/macro-arg.s
+2-0llvm/test/MC/AsmParser/macro-irp.s
+34-344 files

LLVM/project 219476d. etime-function.mlir

Fix: remove wrongly pushed etime-function.mlir at toplevel (#92634)

The purpose of this PR is to remove the 'etime-function.mlir' file that
I mistakenly committed in
https://github.com/llvm/llvm-project/pull/92571. This file is not
necessary in source code control, and its presence may cause confusion
or misunderstanding.
DeltaFile
+0-25etime-function.mlir
+0-251 files

LLVM/project 9e98815.github dependabot.yml

[Github] Revert accidental changes to dependabot config

f3524e9aebbfabed0c60d0087b39ce14d8f778da accidentally touched the
dependabot config. This patch reverts that change.
DeltaFile
+16-10.github/dependabot.yml
+16-101 files

LLVM/project cfe9deb.github dependabot.yml, compiler-rt/lib/ctx_profile CMakeLists.txt

Reapply "[ctx_profile] Integration test (#92456)"

This reverts commit 881f20e958e80bd30463fc57d2d3e891bcb8a571.

Passing -ldl -lpthread explicitly
DeltaFile
+103-0compiler-rt/test/ctx_profile/TestCases/generate-context.cpp
+10-16.github/dependabot.yml
+9-0compiler-rt/lib/ctx_profile/CMakeLists.txt
+4-0compiler-rt/test/ctx_profile/lit.cfg.py
+126-164 files

LLVM/project 702198fflang/lib/Lower ConvertVariable.cpp, flang/test/Lower/CUDA cuda-program-global.cuf

[flang][cuda] Add data attribute to program globals (#92610)

DeltaFile
+19-0flang/test/Lower/CUDA/cuda-program-global.cuf
+4-1flang/lib/Lower/ConvertVariable.cpp
+23-12 files

LLVM/project faf39f4lld/ELF InputSection.cpp, lld/test/ELF loongarch-relax-align-ldr.s loongarch-relax-emit-relocs.s

Revert "[LoongArch] Use R_LARCH_ALIGN with section symbol (#84741)"

This reverts commit 01f79899ba349a0200586c8d05f5e22cca2ced31.

This unusual special case has been discussed on the binutils mailing
list. The approach will be revisited:
https://sourceware.org/pipermail/binutils/2024-May/134092.html

Pull Request: https://github.com/llvm/llvm-project/pull/92584
DeltaFile
+0-28lld/test/ELF/loongarch-relax-align-ldr.s
+6-8llvm/test/MC/LoongArch/Relocations/relax-align.s
+5-2llvm/lib/Target/LoongArch/MCTargetDesc/LoongArchAsmBackend.cpp
+1-5lld/ELF/InputSection.cpp
+2-3lld/test/ELF/loongarch-relax-emit-relocs.s
+1-1llvm/test/MC/LoongArch/Relocations/relax-addsub.s
+15-476 files

LLVM/project 1e9324alldb/include/lldb/API SBExpressionOptions.h, lldb/source/API SBExpressionOptions.cpp

[lldb] Namespace SBSourceLanguageName (NFC)
DeltaFile
+1-1lldb/include/lldb/API/SBExpressionOptions.h
+1-1lldb/source/API/SBExpressionOptions.cpp
+2-22 files

LLVM/project b672d9ellvm/lib/CodeGen/AsmPrinter DwarfDebug.cpp, llvm/test/DebugInfo/X86 debug-names-split-dwarf-inlining.ll

DebugInfo: Don't emit .debug_names entries for split-dwarf-inlining info
DeltaFile
+84-0llvm/test/DebugInfo/X86/debug-names-split-dwarf-inlining.ll
+2-1llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
+86-12 files

LLVM/project 881f20ecompiler-rt/lib/ctx_profile CMakeLists.txt, compiler-rt/test/ctx_profile lit.cfg.py

Revert "[ctx_profile] Integration test (#92456)"

This reverts commit 487d5af6482ea5f074c12d29d7e376d3fc697706.

This was causing failures on some buildbots.
https://lab.llvm.org/buildbot/#/builders/247/builds/18559
DeltaFile
+0-103compiler-rt/test/ctx_profile/TestCases/generate-context.cpp
+0-9compiler-rt/lib/ctx_profile/CMakeLists.txt
+0-4compiler-rt/test/ctx_profile/lit.cfg.py
+0-1163 files

LLVM/project 86e511bflang/runtime io-api.cpp

[flang] Fixed https://lab.llvm.org/buildbot/#/builders/270/builds/14406
DeltaFile
+1-0flang/runtime/io-api.cpp
+1-01 files

LLVM/project 48c1364clang/lib/Driver/ToolChains OpenBSD.cpp

[clang] Don't assume location of compiler-rt for OpenBSD (#92183)

If the `/usr/lib/...` path where compiler-rt is conventionally installed
on OpenBSD does not exist, fall back to the regular logic to find it.

This is a minimal change to allow OpenBSD cross compilation from a
toolchain that doesn't adopt all of OpenBSD's monorepo's conventions.

(cherry picked from commit be10746f3a4381456eb5082a968766201c17ab5d)
DeltaFile
+2-1clang/lib/Driver/ToolChains/OpenBSD.cpp
+2-11 files

LLVM/project cef6387clang/include/clang/Basic DiagnosticSemaKinds.td DiagnosticGroups.td, clang/lib/Sema SemaDeclAttr.cpp

[Bounds-Safety] Temporarily relax a `counted_by` attribute restriction on flexible array members

In 0ec3b972e58bcbcdc1bebe1696ea37f2931287c3 an additional restriction
was added when applying the `counted_by` attribute to flexible array
members in structs. The restriction prevented the element type being
a struct that itself had a flexible array member. E.g.:

```
struct has_unannotated_VLA {
  int count;
  char buffer[];
};

struct buffer_of_structs_with_unnannotated_vla {
  int count;
  struct has_unannotated_VLA Arr[] __counted_by(count);
};
```


    [13 lines not shown]
DeltaFile
+15-2clang/lib/Sema/SemaDeclAttr.cpp
+6-3clang/test/Sema/attr-counted-by-vla.c
+7-1clang/include/clang/Basic/DiagnosticSemaKinds.td
+4-0clang/include/clang/Basic/DiagnosticGroups.td
+32-64 files

LLVM/project b80e0fbmlir/include/mlir/Dialect/Polynomial/IR Polynomial.td PolynomialAttributes.td, utils/bazel/llvm-project-overlay/mlir BUILD.bazel

[mlir][polynomial] split attributes into its own tablegen (#92613)

Out of tree we have other dialects that use the ring attribute, but we
get compilation errors when generating ops while pulling in all the
Polynomial tablegen ops (there's no `-dialect` flag in `mlir-tblgen` for
op generation like there is for attributes and types).

This PR simply moves the attributes into its own file, so it can be
included separately, and this also requires moving the dialect
declaration into its own file.
DeltaFile
+2-151mlir/include/mlir/Dialect/Polynomial/IR/Polynomial.td
+125-0mlir/include/mlir/Dialect/Polynomial/IR/PolynomialAttributes.td
+55-0mlir/include/mlir/Dialect/Polynomial/IR/PolynomialDialect.td
+1-1utils/bazel/llvm-project-overlay/mlir/BUILD.bazel
+1-1mlir/include/mlir/Dialect/Polynomial/IR/CMakeLists.txt
+184-1535 files

LLVM/project ab7930bflang/include/flang/Semantics tools.h, flang/lib/Semantics check-declarations.cpp

[flang] Relax checking of dummy procedures under BIND(C) (#92474)

As was done recently to allow derived types that are not explicitly
BIND(C), but meet the requirements of BIND(C), to be acceptable for use
in contexts nominally requiring BIND(C), this patch allows procedures
that are not explicitly BIND(C) to be used in contexts that nominally
require BIND(C) so long as (1) they meet the requirements of BIND(C),
and (2) don't use dummy arguments whose implementations may vary under
BIND(C), such as VALUE.
DeltaFile
+266-174flang/lib/Semantics/check-declarations.cpp
+68-3flang/test/Semantics/bind-c12.f90
+13-14flang/include/flang/Semantics/tools.h
+9-9flang/test/Semantics/bind-c09.f90
+3-3flang/test/Semantics/bind-c03.f90
+1-1flang/test/Semantics/resolve82.f90
+360-2041 files not shown
+361-2047 files

LLVM/project fe2ff54flang/runtime io-api.cpp io-api-minimal.cpp

[flang][runtime] Decouple scalar output APIs from descriptors (#92444)

For testing purposes the implementations of the output APIs like
OutputInteger32 have been simply constructing descriptors and executing
the operation through the general DescriptorIO template. This patch
decouples those APIs from that mechanism so that programs using simple
"PRINT *" statements for output can link to a smaller portion of the I/O
runtime support library. (This is the only form of I/O accepted in GPU
device code by previous CUDA Fortran and Fortran OpenACC compilers.)
DeltaFile
+6-214flang/runtime/io-api.cpp
+163-0flang/runtime/io-api-minimal.cpp
+93-0flang/runtime/io-api-common.h
+1-2flang/runtime/descriptor-io.h
+1-0flang/runtime/CMakeLists.txt
+264-2165 files

LLVM/project 34c1fe3compiler-rt/lib/sanitizer_common sanitizer_symbolizer_posix_libcdep.cpp

[𝘀𝗽𝗿] initial version

Created using spr 1.3.4
DeltaFile
+8-1compiler-rt/lib/sanitizer_common/sanitizer_symbolizer_posix_libcdep.cpp
+8-11 files