tests: add repo_filelist_data regression test
Verify that data.pkg never contains file lists or directories
regardless of --list-files, and that -l still generates the file
database (files.pkg) listing the package files.
repo: keep file lists out of the data catalog
The data catalog (data.pkg) and per-package manifest must not contain
file lists or directories; those belong only to the file database emitted
via -l/--list-files. Emit the data catalog in compact form so data.pkg
is identical whether or not --list-files is used. Previously -l caused the
full +MANIFEST (with files) to be read and re-emitted into data, ballooning
the catalog (e.g. a full i386 repo grew from ~60MB to ~2GB).
Revert "[RISCV] Run EarlyMachineLICM before VLOptimizer to hoist constant splats" (#210937)
Reverts llvm/llvm-project#210028
I've bisected the hangs on rva20 to this commit:
https://lab.llvm.org/buildbot/#/builders/210/builds/11806
[clang] Add flag for making pointer subtraction defined (#196392)
The C and C++ standards require both operands of pointer subtraction to
refer to elements of the same array object. Clang/LLVM currently relies
on this rule in several optimizations:
- `inbounds` GEP introduces UB assumptions once the computed address
escapes the originating object bounds.
- `sdiv exact` assumes %op1 is divisable by %op2 otherwise it is a
poison value.
The first issue may be addressed with -fwrapv-pointer command line
option, however there is no option in clang to mitigate the second
issue. Patch adds a new -fdefined-pointer-subtraction to address this.
[lldb][NFC] Remove Stream::Printf calls with constant strings in Target/* (#210287)
`Stream::Printf` needs to call various other (variadic) functions, needs
to parse the input string and potentially handle too-long format
outputs. Calling in with a constant string is wasting a lot of
instruction on doing nothing.
assisted-by: claude
[lldb][NFC] Remove Stream::Printf calls with constants in Commands/ (#210291)
`Stream::Printf` needs to call various other (variadic) functions, needs
to parse the input string and potentially handle too-long format
outputs. Calling in with a constant string is wasting a lot of
instruction on doing nothing.
assisted-by: claude
[lldb][NFC] Remove Stream::Printf calls with constant strings in Interpreter/* (#210289)
`Stream::Printf` needs to call various other (variadic) functions, needs
to parse the input string and potentially handle too-long format
outputs. Calling in with a constant string is wasting a lot of
instruction on doing nothing.
assisted-by: claude
[Xtensa] Support 'f' Inline Assembly Constraint (#202345)
This adds the 'f' inline assembly constraint, as supported by GCC. An
'f'-constrained operand is passed in a floating point register.
[Clang] Don't print extra whitespace for comma expression in StmtPrinter (#210920)
For binary expression `1, 2`, StmtPrinter used to print it as `1 , 2`
which doesn't look very pretty.
[X86] Synchronise middle and backend test coverage for ADDSUBPS/PD patterns (#210919)
Use the same test names wherever possible and ensure sse3-avx-addsub.ll
has test coverage for the IR emitted by the middle-end (no matter how
poor it is)
Prep work for #144489 (sse3-avx-addsub-2.ll will be deleted along with
lowerToAddSubOrFMAddSub)
[lldb][docs] Add platform/target support requirements doc (#207166)
This is a very delayed follow up to:
https://discourse.llvm.org/t/rfc-surveying-lldbs-supported-platforms-and-architectures/83978
Where I realised that even for upstream supported targets, the level of
testing and attention they get varies a lot. Which I think is not a bad
thing, because LLDB would be much more chaotic if it were a bad thing.
The problem I see is that no one really knows how to start writing
proposals for new targets, and no one really knows how to properly
assess one.
Me included, but what I can do is write out some starting points for
both parties. Hopefully this makes the process a bit more fair for those
not used to writing RFCs.
(and if we want to make the rules more strict, we will now have a place
[22 lines not shown]
[flang] Remove legacy stack-arrays and memory-allocation-opt passes
The unified allocation-placement pass now supersedes both the heap-to-stack
stack-arrays pass and the stack-to-heap memory-allocation-opt pass, and is the
default in the FIR optimizer pipeline. Remove the two legacy passes: their
TableGen definitions, the MemoryAllocation.cpp source, the memory-allocation-opt
command-line options, the enable-allocation-placement fallback switch, and the
addMemoryAllocationOpt pipeline helper. The pass-only portions of
StackArrays.cpp are dropped while its analysis and rewrite pattern, now shared
with allocation-placement, are kept.
The legacy tests are retargeted onto allocation-placement to show it reproduces
both prior behaviors: the stack-arrays tests use "stack-arrays=true", and the
memory-allocation-opt tests use the default policy (runtime-sized and big
constant-size temporaries go on the heap).
[flang] Wire allocation-placement into the optimizer pipeline (experimental)
Add a hidden -enable-allocation-placement flag that, when set, replaces the
stack-arrays and memory-allocation-opt passes in the default FIR optimizer
pipeline with the unified allocation-placement pass. The flag is off by
default, so the legacy passes remain the default path and behavior is
unchanged.
When enabled, the pass runs with its default byte-size thresholds; the
-fstack-arrays strategy is forwarded through the new stackArrays option.
[flang] Enable allocation-placement pass by default
Make the unified allocation-placement pass the default in the FIR optimizer
pipeline in place of the legacy stack-arrays and memory-allocation-opt passes,
by defaulting -enable-allocation-placement to true. Passing
-enable-allocation-placement=false restores the legacy passes for comparison.
Add a -disable-allocation-placement switch that skips the pass entirely (wired
through addAllocationPlacement like the other optimizer passes), so codegen
tests can opt out of placement policy independently of the legacy fallback.
Update the pipeline-dump tests to expect AllocationPlacement, and disable the
pass in the alloca/allocmem codegen tests (alloc.fir, coordinateof.fir) so they
keep testing lowering rather than placement policy. Document the unified pass,
its policy, thresholds, and options in fstack-arrays.md.
[flang] Add policy-driven allocation-placement pass
Introduce a new function-level pass, allocation-placement, that unifies the
stack/heap placement decisions currently split between the stack-arrays and
memory-allocation-opt passes. For each array allocation it consults a policy
to decide whether it should live on the stack (fir.alloca) or the heap
(fir.allocmem) and rewrites it accordingly, reusing fir::replaceAllocas for
stack-to-heap and the StackArrays analysis/rewrite for heap-to-stack (so
heap-to-stack only happens where it is provably safe).
The default policy (AllocationPlacementPolicy.h) is threshold-driven:
- small constant-size arrays go on the stack within a per-function stack
budget, otherwise on the heap;
- big constant-size arrays: user variables stay on the stack, temporaries
go on the heap;
- runtime-sized arrays go on the heap;
- an aggressive mode places all arrays on the stack (best effort).
User variables are distinguished from compiler temporaries via the presence
of a uniqued name. A hook lets downstream users override the thresholds per
[4 lines not shown]
[SelectionDAG] Merge consecutive loads feeding as shuffle operands (#207303)
Perform the following fold given loadA and loadB can be proven
consecutive:
```
concat(shuffle(loadA, loadB, mask0), shuffle(loadA, loadB, mask1))
-> shuffle(loadAB, poison, concat(mask0, mask1))
```
jimtcl: updated to 0.84
0.84
Allow bootstrap jimsh to build with MSVC on Windows
update codeql actions
aio: add support for translation binary|text
build: win32: fix install of build-jim-ext
dict set/unset: ensure dicts modified via dict sugar are unshared
Add more build generated files to .gitignore
update master from master-next branch
regex improvements
JSON decode fixes
aio gets: add -eol and -keep options
A couple of small segfault fixes
jimiocompat: Avoid unused variable compiler warnings
Linenoise update
jim-redis: add support for multiexec
source documentation improvements
[DTLTO] Overlap temporary file removal (#209423)
Deleting the temporary files produced by the DTLTO pipeline can be
expensive on Windows hosts. For a Clang link (Debug build with
sanitizers and instrumentation) using an optimized toolchain (PGO
non-LTO, llvmorg-22.1.0) on a Windows 11 Pro (Build 26200), AMD Family
25 @ ~4.5 GHz, 16 cores/32 threads, 64 GB RAM machine, the mean duration
of the "Remove DTLTO temporary files" time trace scope was 1267.789 ms
(measured over 10 runs).
This patch performs the deletions on a background thread, allowing them
to overlap with the tail of the link to hide this cost.
This is a re-implementation of the asynchronous cleanup idea from
https://github.com/llvm/llvm-project/pull/186988, which had to be
reverted in https://github.com/llvm/llvm-project/pull/189043 because
cleanup was not guaranteed to complete before LLD invoked
timeTraceProfilerCleanup(). In certain cases timeTraceProfilerCleanup()
was called before temporary file deletion had completed in LLD, which
[8 lines not shown]
[MLIR] Rerun control for actions in execution context (#209197)
Adds a Rerun control value to ExecutionContext::Control that allows the
re-execution of the current action immediately after it completes,
without restarting the full compilation pipeline. This is analogous to
GDB's ability to restart execution from a breakpoint. When the callback
returns Rerun, the action is executed normally, then re-dispatched
through the full ExecutionContext::operator() pipeline, including
breakpoint matching, so the user gets a fresh opportunity to inspect or
control the re-execution. As a practical usage example, a breakpoint +
an observer can be added, to save and restore IR between runs to check
if each run produces the same IR or something different each time. A
depth-keyed structure is used, so rerun requests survive nested action
dispatch and are consumed by the correct stack frame.
DNS names are not proper C strings, they can contain NUL octets.
If we want to use string functions (e.g. for comparison) we first need
to convert them.
with dgl some time ago
OK dlg