[flang] Add ability to implicitly use a module (#207824)
Add parser and semantics plumbing for configured implicit USE modules,
reusing
the normal USE-association path so public symbols and common blocks are
imported
consistently.
[Tooling] Preserve backslashes in POSIX source paths (#207499)
On POSIX, backslashes are valid filename characters. Avoid converting
them to slashes when computing absolute source paths in LibTooling,
since doing so changes paths such as `a\b.cc` into `a/b.cc`.
Closes #207396
Fix APInt::concat for zero-width operands (#207475)
APInt::concat triggered undefined behavior (invalid shift exponent) when
concatenating a zero-width operand with a 64-bit operand on the fast
path (combined width <= 64). For example, `I0.concat(I64)` resulted in
`U.VAL << 64`, which is UB.
Fix by checking for zero-width operands early and returning the other
operand. Added regression tests to `APIntTest.cpp`.
CI: move libclang python bindings tests to main CI (#201677)
This removes the separate python bindings CI, which run on the GitHub
free runners and take more than one hour to build libclang.
The tests are executed instead in the monolithic pipelines, whenever
clang would be tested.
That only tests whatever python version we set up for that pipeline.
This is fine in terms of resources because all the dependencies are
built anyway, and the tests themselves take less than one second to run
on the free runners.
[CodeGen] Rename prologpeilog to prolog-epilog (#207870)
This is primarily to ensure consistenct with the new pass manager where
the name of the pass is already prolog-epilog, which is more consistent
with our existing naming scheme. This is necessary to be able to run
existing llc invocations that explicitly specify prolog-epilog under the
NewPM automatically.
Assisted by Gemini.
[ORC] Fix reinterpret_cast warning. (#207874)
https://github.com/llvm/llvm-project/pull/206725#issuecomment-4896222897
reported warnings on windows builds due to reinterpret_cast:
warning C4312: 'reinterpret_cast': conversion from 'unsigned int' to
'void *' of greater size
This commit fixes the issue by using ExecutorAddr::toPtr for conversion
instead of reinterpret_cast.
CI: move libclang python byindings tests to main CI
This removes the separate python bindings CI, which run on the GitHub free
runners and take more than one hour to build libclang.
The tests are executed instead in the monolithic pipelines,
whenever clang would be tested.
This is fine in terms of resources because all the dependencies are
built anyway, and the tests themselves take less than one second to
run on the free runners.
[clang-doc] Move Markdown into its own subdirectory (#207856)
Removes the need for PARTIAL_SOURCES_INTENDED by giving clangDocMarkdown
its own directory. Addresses post-merge feedback on #205609.
[libc][RISC-V] Temporarily disable dirent (#207867)
The RISC-V 32 QEMU buildbot is failing due to missing SYS_fcntl, which
is needed for fdopendir. Since that syscall is referenced in the shared
dir code it's easiest to just disable all the dirent functions for now.
[NFC][LLVM][NVPTX] Minor code cleanup in NVVMReflect (#207549)
Use explicit types instead of auto when the type is not obvious. Use
`StringRef` type in the range for loop over `ReflectList`, allowing
additional code cleanups.
[RISCV] Pass structs containing riscv_rvv_vector_bits types using vector registers. (#203601)
The ABI for this isn't documented. The riscv_rvv_vector_bits feature was
copied from aarch_sve_vector_bits which passes the types in vector
registers. At the time I implemented RISC-V I didn't think about struct
arguments so no ABI support was added.
I think it makes sense to pass structs of these types in vector
registers similar to the vls_cc ABI. We already do use vector registers
for these types when the vls_cc ABI is enabled for a function(unclear if
that was intentional), but we should do it unconditionally.
I will work with gcc maintainers to see if they can do the same. In
practice, there probably isn't much compiler mixing with these types.
This patch was heavily assisted by AI, but I've reviewed it and the
changes seem reasonable to me.
[NFC] Fix dxil-dis/waveactiveballot.ll test (#207446)
It looks like #204478 introduced new intrinsic signature verification,
but since it didn't touch any of the HLSL/DXIL related paths the tests
were never run on a runner that has dxil-dis installed on it.
Assisted-by: copilot
[Attributor] Distinguish COHERENT accesses in addition to exact ones
When we find overlapping accesses, an access is exact when it will hit
the same memory. Otherwise we treated it like an unknown access that
could overwrite any part of the overlapping value. Using size and
alignment we can introduce a new category, COHERENT, which means the
access migth not be at the exact address but if it is affecting the
initial range it will do so with the proper value, e.g., it will not
write part of the range but all or nothing.
CI: move libclang python byindings tests to main CI
This removes the separate python bindings CI, which run on the GitHub free
runners and take more than one hour to build libclang.
The tests are executed instead in the monolithic pipelines,
whenever clang would be tested.
This is fine in terms of resources because all the dependencies are
built anyway, and the tests themselves take less than one second to
run on the free runners.
[mlir][python] Set a static version in the standalone example pyproject.toml (#207860)
The standalone example's pyproject.toml declares `dynamic = ["version"]` but does not configure a `tool.scikit-build metadata.version.provider`. Newer versions of scikit-build-core reject this combination with:
```
AssertionError: project.version is not specified, must be statically present or tool.scikit-build metadata.version.provider configured when dynamic
```
Just pin a static placeholder version instead of adding a "provider".
Assisted by: Claude
[Attributor] AAAddressSpace should use the AA for recursive lookups
If we stripped some values, we can use the AAAddressSpace again for
an optimistic AS value. If we didn't strip any value, we can still use
the TLI.
[mlir][python] Set a static version in the standalone example pyproject.toml
The standalone example's pyproject.toml declares `dynamic = ["version"]`
but does not configure a `tool.scikit-build metadata.version.provider`.
Newer versions of scikit-build-core reject this combination with:
AssertionError: project.version is not specified, must be statically
present or tool.scikit-build metadata.version.provider configured when
dynamic
Since the standalone example is a template that builds a wheel directly,
there is nothing supplying a dynamic version. Pin a static placeholder
version instead so the wheel builds out of the box.
[Archive][COFF] Split hybrid COFF files when adding them to an archive (#205160)
Create a separate member for the embedded hybrid object so that it's
properly reflected in the archive's symbol map and can be correctly
processed by tools unaware of multi-arch object files. Prefix the
embedded member name with 'obj.arm64x/' to avoid name collisions.
The split is performed only when targeting COFF archive format.
[lldb] Change Python site-packages path (#207771)
On POSIX systems, traditionally the lldb Python module is in
lib/pythonx.x/site-packages. We only ever have 1 Python in a given
build, so we don't need to specify the version.
On Windows, we've always had the Python module in lib\site-packages.
Change the behavior on POSIX to match the Windows behavior, and put the
lldb Python module in lib/site-packages.
---------
Co-authored-by: Ted Woodward <tedwood at quicinc.com>
[Attributor] Distinguish COHERENT accesses in addition to exact ones
When we find overlapping accesses, an access is exact when it will hit
the same memory. Otherwise we treated it like an unknown access that
could overwrite any part of the overlapping value. Using size and
alignment we can introduce a new category, COHERENT, which means the
access migth not be at the exact address but if it is affecting the
initial range it will do so with the proper value, e.g., it will not
write part of the range but all or nothing.