LLVM/project a3d643dflang/lib/Optimizer/CodeGen CodeGen.cpp, flang/test/Fir/CUDA cuda-code-gen.mlir

[flang][cuda] Fix invalid address space in addressof op conversion (#192111)

The change in lowering order introduced in
https://github.com/llvm/llvm-project/pull/183268 exposed an issue when
converting addressof op pointing to globals with different address
space. Look at the fir::GlobalOp when it has not been converted.
DeltaFile
+32-0flang/test/Fir/CUDA/cuda-code-gen.mlir
+19-3flang/lib/Optimizer/CodeGen/CodeGen.cpp
+51-32 files

LLVM/project f62b138clang/include/clang/CIR/Dialect/IR CIRTypes.td, clang/lib/CIR/CodeGen CIRGenTypes.cpp

[CIR] Raise IntType max bitwidth to match LLVM IR (#191499)

Follow-up to #188113 per @erichkeane's feedback about the 128-bit cap.

CIR's IntType was hard-limited to 128 bits, which meant any _BitInt
wider than that hit an errorNYI. LLVM IR goes up to 2^23 (about 8
million bits), and there are real tests/users at those sizes. This
raises CIR's limit to match and drops the guard that was working around
it.

Tests: added a _BitInt(256) global to bitint.c and a 1024-bit round-trip
to bitint.cir.

Made with [Cursor](https://cursor.com)
DeltaFile
+23-0clang/test/CIR/CodeGen/bitint.c
+6-8clang/lib/CIR/CodeGen/CIRGenTypes.cpp
+3-2clang/include/clang/CIR/Dialect/IR/CIRTypes.td
+3-2clang/test/CIR/IR/bitint.cir
+35-124 files

LLVM/project a36e9d1clang/include/clang/CIR/Dialect/IR CIROps.td CIRDialect.td, clang/lib/CIR/CodeGen CIRGenVTables.cpp

[CIR] Add musttail thunks and covariant return null-check (#191255)

Implement variadic thunk emission via musttail and null-check
pointer returns in covariant thunk adjustment, matching classic
codegen behavior.

Adds musttail UnitAttr to cir.call/cir.try_call with lowering
to LLVM::MustTail.

Made with [Cursor](https://cursor.com)
DeltaFile
+54-14clang/lib/CIR/CodeGen/CIRGenVTables.cpp
+63-0clang/test/CIR/CodeGen/thunks.cpp
+8-0clang/lib/CIR/Dialect/IR/CIRDialect.cpp
+4-1clang/lib/CIR/Lowering/DirectToLLVM/LowerToLLVM.cpp
+1-0clang/include/clang/CIR/Dialect/IR/CIROps.td
+1-0clang/include/clang/CIR/Dialect/IR/CIRDialect.td
+131-156 files

LLVM/project 9c94881clang/test/Driver serenity.cpp

[clang] Attempt to unbreak clang/test/Driver/serenity.cpp on bots more (#192113)

This snippet fails on (at least) this bot:
https://lab.llvm.org/buildbot/#/builders/10/builds/26512
DeltaFile
+0-9clang/test/Driver/serenity.cpp
+0-91 files

LLVM/project ae0c5dcclang/test/CodeGen 2006-01-23-FileScopeAsm.c asm_incbin.c

Mark tests as unsupported on z/OS (#191843)

z/OS has a platform specific requirement to not allow asm statements at
file scope. These tests generate that message rather than the expected
IR. Mark the tests as unsupported on z/OS.
DeltaFile
+1-0clang/test/CodeGen/2006-01-23-FileScopeAsm.c
+1-0clang/test/CodeGen/asm_incbin.c
+2-02 files

LLVM/project 1c46118clang/include/clang/Basic FileManager.h, clang/lib/Basic Module.cpp

Load AST files as binary on z/OS (#191840)

The ast files need to be loaded as binary on z/OS to avoid translation.
Add the `IsText=false` option to all of the relevant file open calls.
DeltaFile
+11-3clang/lib/Serialization/ASTReader.cpp
+9-4clang/lib/Serialization/ModuleManager.cpp
+3-2clang/include/clang/Basic/FileManager.h
+2-1clang/lib/Basic/Module.cpp
+25-104 files

LLVM/project 01a83d3clang/lib/Format ContinuationIndenter.cpp

[clang-format][NFC] Remove superflous checks (#191872)

Doesn't change anything, must be a leftover now handled by some other
code.
DeltaFile
+1-4clang/lib/Format/ContinuationIndenter.cpp
+1-41 files

LLVM/project 838bf51compiler-rt/lib/sanitizer_common sanitizer_linux.cpp sanitizer_netbsd.cpp

[sanitizer] Make internal_close_range available on all POSIX platforms (#191971)

Make internal_close_range available on all POSIX platforms so callers
can use it without platform-specific #if guards. Platforms without
close_range return -1, letting callers fall back gracefully.

Currently only FreeBSD has a real implementation. A TODO is left for
adding Linux support (__NR_close_range, kernel 5.9+).

The Linux support will be added in
https://github.com/llvm/llvm-project/pull/191450.
DeltaFile
+4-2compiler-rt/lib/sanitizer_common/sanitizer_linux.cpp
+4-0compiler-rt/lib/sanitizer_common/sanitizer_netbsd.cpp
+2-2compiler-rt/lib/sanitizer_common/sanitizer_posix.h
+4-0compiler-rt/lib/sanitizer_common/sanitizer_solaris.cpp
+4-0compiler-rt/lib/sanitizer_common/sanitizer_mac.cpp
+4-0compiler-rt/lib/sanitizer_common/sanitizer_haiku.cpp
+22-46 files

LLVM/project 6d11ac4llvm/utils/gn/secondary/clang/lib/Driver BUILD.gn

[gn build] Port 934f795064ab (#192107)
DeltaFile
+1-0llvm/utils/gn/secondary/clang/lib/Driver/BUILD.gn
+1-01 files

LLVM/project 3f8fa45clang/test/Driver serenity.cpp

[clang] Attempt to unbreak clang/test/Driver/serenity.cpp on bots (#192105)

The c++/v1 paths aren't found on bots, so remove them for now until this
is analyzed.

Match on `-isysroot` to get SYSROOT var instead.

Also remove what looks like one unintentional SYSROOT: capture for
crt0.o.
DeltaFile
+6-7clang/test/Driver/serenity.cpp
+6-71 files

LLVM/project ce8251elldb/docs/_ext lldb_setting.py build_include.py, lldb/docs/_static lldb-setting.css

[LLDB][Docs] List available settings (#168245)

This PR adds a documentation page that lists all available settings. The
page is automatically generated.

Having the settings listed in the online documentation makes it easier
to search for users. It also has the advantage of being indexed by
search engines.

To generate the docs, we first generate JSON out of the TableGen
definitions with `-dump-json`.

Once all properties are available as JSON, a Markdown file with the
merged documentation (`settings.md`) is generated. I chose Markdown over
RST, because some descriptions already use backticks, which would become
references in RST.

Currently, enum names/descriptions are not visible, because they're
defined in C++. In the future, these could be moved to TableGen as well.
DeltaFile
+154-0lldb/scripts/gen-property-docs-from-json.py
+83-0lldb/docs/_static/lldb-setting.css
+73-0lldb/docs/_ext/lldb_setting.py
+29-23lldb/source/Plugins/Process/MacOSX-Kernel/CMakeLists.txt
+48-0lldb/docs/_ext/build_include.py
+25-19lldb/source/Plugins/Process/FreeBSD-Kernel-Core/CMakeLists.txt
+412-4224 files not shown
+540-6330 files

LLVM/project 4326a54llvm/lib/Transforms/Scalar GVN.cpp

[GVN] Clean up `reportMayClobberedLoad` to use the dependency instruction (NFC) (#192103)

Minor opportunity to clean `reportMayClobberedLoad` routine, which was
previously receiving the entire `MemDepResult` object, though only using
the dependency instruction.

Co-authored-by: Momchil Velikov <momchil.velikov at arm.com>
DeltaFile
+3-3llvm/lib/Transforms/Scalar/GVN.cpp
+3-31 files

LLVM/project 0c18d74clang/cmake/caches Fuchsia.cmake Fuchsia-stage2-instrumented.cmake

[clang][cmake] Add check-clang-extra to bootstrap targets for Fuchsia

Not having these prevents us from testing the clang-tool-extra targets in
our CI, and multi stage builds.
DeltaFile
+2-0clang/cmake/caches/Fuchsia.cmake
+1-0clang/cmake/caches/Fuchsia-stage2-instrumented.cmake
+3-02 files

LLVM/project 11f3a56clang/include/clang/Basic HLSLIntrinsics.td

Use ascii for dashes (#191892)

Use the standard ascii character for the dashes.
DeltaFile
+4-4clang/include/clang/Basic/HLSLIntrinsics.td
+4-41 files

LLVM/project 51822a6llvm/utils/gn/secondary/clang/lib/ScalableStaticAnalysisFramework/Analyses BUILD.gn

[gn build] Port fc12e59d1d8b (#192101)

[gn build] Port fc12e59d1d8b
DeltaFile
+1-0llvm/utils/gn/secondary/clang/lib/ScalableStaticAnalysisFramework/Analyses/BUILD.gn
+1-01 files

LLVM/project 7b4c821llvm/utils/gn/secondary/llvm/unittests/ExecutionEngine/Orc BUILD.gn

[gn build] Port a2bf43d6b18d (#192100)

[gn build] Port a2bf43d6b18d
DeltaFile
+1-0llvm/utils/gn/secondary/llvm/unittests/ExecutionEngine/Orc/BUILD.gn
+1-01 files

LLVM/project 585a4a2llvm/utils/gn/secondary/clang/unittests/CIR BUILD.gn

[gn build] Port 472aa4e326be (#192098)

[gn build] Port 472aa4e326be
DeltaFile
+1-0llvm/utils/gn/secondary/clang/unittests/CIR/BUILD.gn
+1-01 files

LLVM/project 3e94498llvm/utils/gn/secondary/llvm/lib/Target/AArch64/MCTargetDesc BUILD.gn

[gn build] Port 3fe0bdfaa592 (#192096)

[gn build] Port 3fe0bdfaa592
DeltaFile
+1-0llvm/utils/gn/secondary/llvm/lib/Target/AArch64/MCTargetDesc/BUILD.gn
+1-01 files

LLVM/project a8f36ccllvm/lib/Target/AArch64 AArch64InstrInfo.cpp

[AArch64] Check Subtarget via STI in getInstSizeInBytes (#192089)

The InstSizes test (`llvm/unittests/Target/AArch64/InstSizes.cpp`)
destroys the Subtarget field early (`ST` created on the stack in
[`createInstrInfo`](https://github.com/llvm/llvm-project/blob/40a585e742ed6b28306d7511380079325ba1a003/llvm/unittests/Target/AArch64/InstSizes.cpp#L32)),
causing a use-after-free if it is used in `getInstSizeInBytes`. This
causes a failure when running the test with hwasan (reported by build
bot). To fix this, this PR switches to using `STI` instead of
`Subtarget` in `getInstSizeInBytes` for checking `isLFI`, which survives
for the lifetime of the test.

I think fixing the test itself (the root of the issue, as far as I can
tell) would be more involved. Perhaps I should open an issue for it
though?

I have tested the fix on an AArch64 machine with hwasan to confirm that
it resolves the issue.
DeltaFile
+2-2llvm/lib/Target/AArch64/AArch64InstrInfo.cpp
+2-21 files

LLVM/project 1bc5719llvm/test/Analysis/CostModel/AArch64 sve-fptoi_sat.ll fptoi_sat.ll

[AArch64] Add additional cost coverage for SVE fptosi.sat and fptoui.sat. NFC (#192095)
DeltaFile
+179-0llvm/test/Analysis/CostModel/AArch64/sve-fptoi_sat.ll
+0-166llvm/test/Analysis/CostModel/AArch64/fptoi_sat.ll
+179-1662 files

LLVM/project c1d6f76llvm/docs/CommandGuide lit.rst, llvm/utils/lit/lit cl_arguments.py ProgressBar.py

[lit] Add an option to lit which ratelimits progressbar output. (#186479)

Add a new option --min-output-interval, which ratelimits updates to the
progress bar.

When running Lit with the full curses progressbar, it updates both the
bar, and the status text below on every test completion. Running
check-llvm on my laptop runs about 44k tests and takes about 260 seconds
for a release build. Or about 171 tests/second on average.

Moreover, when ssh'd to another host, this generates quite a bit of
traffic. Using tcpdump, I measured the traffic for a run of check-llvm
and -clang. With all updates, its about 8.7 megabytes. With a rate limit
of 5 update/sec, this came down to 175 kilobytes. This can be
significant on slow/metered connections.

This patch adds an option to limit lit's output to once per a given
interval. This only affects the progressbar and status message below,
not any log messages above. It also does not affect anything when not

    [5 lines not shown]
DeltaFile
+26-0llvm/utils/lit/lit/cl_arguments.py
+17-1llvm/utils/lit/lit/ProgressBar.py
+5-0llvm/docs/CommandGuide/lit.rst
+3-1llvm/utils/lit/lit/display.py
+51-24 files

LLVM/project 19344adclang/test/CodeGen/RISCV/rvv-intrinsics-autogenerated/zvzip/policy/non-overloaded vpaire.c, clang/test/CodeGen/RISCV/rvv-intrinsics-autogenerated/zvzip/policy/overloaded vpaire.c vpairo.c

Merge branch 'main' into users/ziqingluo/PR-172429193-pre-2
DeltaFile
+6,877-0llvm/test/tools/llvm-mca/AArch64/Cortex/C1Ultra-sve-instructions.s
+5,336-0llvm/test/tools/llvm-mca/AArch64/Cortex/C1Ultra-writeback.s
+3,167-0llvm/test/tools/llvm-mca/AArch64/Cortex/C1Ultra-neon-instructions.s
+2,723-0clang/test/CodeGen/RISCV/rvv-intrinsics-autogenerated/zvzip/policy/overloaded/vpaire.c
+2,723-0clang/test/CodeGen/RISCV/rvv-intrinsics-autogenerated/zvzip/policy/overloaded/vpairo.c
+2,723-0clang/test/CodeGen/RISCV/rvv-intrinsics-autogenerated/zvzip/policy/non-overloaded/vpaire.c
+23,549-0674 files not shown
+87,632-9,781680 files

LLVM/project 560004bflang/lib/Lower/OpenMP OpenMP.cpp, flang/test/Lower/OpenMP omp-declarative-allocate-align.f90

[Flang] [OpenMP] [MLIR] Add lowering support for OMP ALLOCATE directives and its clauses (#187167)

This patch implementation is primarily focused on

- Lowering to LLVM IR, by generating appropriate kmpc_alloc() and kmpc_alligned_alloc() calls for variable(s) and before the end of scope generating kmpc_free() for the same variable(s).
- Also handled, usage of array variables in the OMP ALLOCATE directive.
- Define omp.allocate_free operation in MLIR and slight changes to existing MLIR definition of ALLOCATOR clause.
- Add test cases for variations of usage of OMP ALLOCATE directive and its clauses ALIGN and ALLOCATOR.
DeltaFile
+162-0mlir/lib/Target/LLVMIR/Dialect/OpenMP/OpenMPToLLVMIRTranslation.cpp
+117-0mlir/test/Target/LLVMIR/openmp-allocate-directive.mlir
+51-2flang/lib/Lower/OpenMP/OpenMP.cpp
+51-0flang/test/Lower/OpenMP/omp-declarative-allocate-align.f90
+32-8mlir/test/Dialect/OpenMP/ops.mlir
+23-2llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp
+436-129 files not shown
+515-3615 files

LLVM/project 05c982allvm/lib/IR Instruction.cpp, llvm/test/Transforms/InstCombine freeze.ll

[IR] treat nofpclass as a poison-generating return attribute (#192016)

- For: #191338

Failing nofpclass attribute will generate poison.
This change adds nofpclass attributes to
`hasPoisonGeneratingReturnAttributes`/`dropPoisonGeneratingReturnAttributes`.
DeltaFile
+12-0llvm/test/Transforms/InstCombine/freeze.ll
+3-1llvm/lib/IR/Instruction.cpp
+15-12 files

LLVM/project 1e8bcecclang/lib/CIR/CodeGen CIRGenBuiltin.cpp, clang/test/CIR/CodeGen builtin-verbose-trap.cpp

[CIR] Implement __builtin_verbose_trap (#191935)

Route BI__builtin_verbose_trap to the existing emitTrap() path so that
it no longer hits the NYI fallback. Debug info message attachment from
the string arguments is not yet implemented (tracked by
MissingFeatures::generateDebugInfo).

This is the single largest NYI category in libcxx testing, unblocking
~1,008 test failures.
DeltaFile
+35-0clang/test/CIR/CodeGen/builtin-verbose-trap.cpp
+3-0clang/lib/CIR/CodeGen/CIRGenBuiltin.cpp
+38-02 files

LLVM/project 9145467llvm/include/llvm/TargetParser RISCVTargetParser.h, llvm/lib/Target/RISCV RISCVInsertVSETVLI.cpp RISCVInstrInfo.cpp

[RISCV] Prevent emitting vsetvli with e32alt or e64alt. (#191960)

The e32alt and e64alt encodings for vtype are reserved.

Non-fp instructions ignore altfmt and we want to use that to avoid
vtype toggle when using load, store, slide, gather, etc. to manipulate
bf16 vectors. This is why we have a Demanded bit for AltFmt.

We need to make sure we don't keep the AltFmt set when we're changing
SEW to 32 or 64.

A new isValidVType function has been added to help catch illegal
vtype earlier.
DeltaFile
+23-0llvm/test/CodeGen/RISCV/rvv/mixed-float-bf16-arith.ll
+11-5llvm/include/llvm/TargetParser/RISCVTargetParser.h
+6-3llvm/lib/Target/RISCV/RISCVInsertVSETVLI.cpp
+2-2llvm/lib/Target/RISCV/RISCVInstrInfo.cpp
+1-2llvm/lib/Target/RISCV/MCTargetDesc/RISCVInstPrinter.cpp
+43-125 files

LLVM/project 516c4d9lldb/include/lldb/Target RegisterContextUnwind.h, lldb/source/Target RegisterContextUnwind.cpp

[lldb] Replace remaining uses of `UnwindLogMsg()` with UNWIND_LOG macro (#192038)

This mostly replaces `"0x%" PRIx64` with `"{:x}"`, but also replaces
'%d' (used for register / scheme numbers and CFA offsets) and '%s' with
simple `{}`, removing the now redundant casts and calls to
`GetCString()` / `AsCString()`.

`UnwindLogMsg()` is no longer used and has been removed.
DeltaFile
+88-105lldb/source/Target/RegisterContextUnwind.cpp
+0-2lldb/include/lldb/Target/RegisterContextUnwind.h
+88-1072 files

LLVM/project 2b77a52clang/lib/CIR/Lowering/DirectToLLVM LowerToLLVM.cpp, clang/test/CIR/CodeGenBuiltins builtin-memchr.c

[CIR] Add noundef to memchr declaration and call sites (#191457)

The memchr LLVM declaration created by MemChrOp lowering had no
arg_attrs, so the lowered IR was missing `noundef` on all three
parameters.  OGCG emits `noundef` on them.

Adds `noundef` to both the `@memchr` declaration and each
`call @memchr` instruction.

Made with [Cursor](https://cursor.com)
DeltaFile
+25-6clang/lib/CIR/Lowering/DirectToLLVM/LowerToLLVM.cpp
+2-2clang/test/CIR/CodeGenBuiltins/builtin-memchr.c
+27-82 files

LLVM/project 472aa4eclang/lib/CIR/Dialect/IR CIRTypes.cpp, clang/unittests/CIR UnionTypeSizeTest.cpp CMakeLists.txt

[CIR] Fix union RecordType::getTypeSizeInBits to return bits (#191516)

RecordType::getTypeSizeInBits for unions was calling
dataLayout.getTypeSize (which returns bytes) instead of
dataLayout.getTypeSizeInBits.  This returned a value 8x too
small.  Also handle the empty-union case where
getLargestMember returns nullptr.
DeltaFile
+79-0clang/unittests/CIR/UnionTypeSizeTest.cpp
+6-2clang/lib/CIR/Dialect/IR/CIRTypes.cpp
+1-0clang/unittests/CIR/CMakeLists.txt
+86-23 files

LLVM/project 39c0ba5llvm/docs LFI.rst, llvm/lib/Target/AArch64 AArch64InstrInfo.cpp

Revert "[LFI][AArch64] Add AArch64 LFI rewrites for system instructions (#186…"

This reverts commit 3fe0bdfaa592cc0d7ce9f695a94522fa92366c6f.
DeltaFile
+0-210llvm/lib/Target/AArch64/MCTargetDesc/AArch64MCLFIRewriter.cpp
+36-72llvm/docs/LFI.rst
+0-81llvm/lib/Target/AArch64/MCTargetDesc/AArch64MCLFIRewriter.h
+0-45llvm/test/MC/AArch64/LFI/reserved.s
+0-25llvm/lib/Target/AArch64/AArch64InstrInfo.cpp
+0-13llvm/test/MC/AArch64/LFI/tp.s
+36-4463 files not shown
+36-4659 files