The CI scripts install some python dependencies primarily for testing
this patch moves these over to a single requirements file that also hash
pins everything using pip-compile to conform to best security and
reproducibility practices.
This patch installs sccache using apt-get in the CI container build
process rather than manually downloading it from github releases. This
makes things quite a bit simpler and means we are not manually handling
things like hash/signature verification. This is only possible now that
we are using ubuntu 24.04 by default.
This patch switches the return type in `MemorySpaceAttrInterface`
methods from `LogicalResult` to `bool`. As `is*` methods are predicates.
Users of the `MemorySpaceAttrInterface` API must note that, if
`emitError` is non-null and the result of a `is*` method is `false`,
then an error was likely emitted. To avoid the emission of an error the
user can pass a default constructed `emitError`.
Ensure the disassembly respects the "target.x86-disassembly-flavor"
setting for x86 and x86_64 targets.
Depends on #134626
---------
Signed-off-by: Ebuka Ezike <yerimyah1@gmail.com>
Co-authored-by: Jonas Devlieghere <jonas@devlieghere.com>
There exists some stale experimental features and the llc complains
it.
We can simply remove these attributes and add the desired features
in `-mattr`.
Completes the ToJSON function for `OptionValue` types and make the interface function pure virtual
---------
Co-authored-by: Jonas Devlieghere <jonas@devlieghere.com>
Try to work around following error on some of the Linux CI:
```
8: (lldb) settings set -f frame-format "custom-frame '${function.basename}'\n"
check:50'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
check:50'1 ? possible intended match
9: (lldb) break set -l 5
check:50'0 ~~~~~~~~~~~~~~~~~~~~~~
10: error: No selected frame to use to find the default file.
check:50'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
11: error: No file supplied and no default file available.
check:50'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
12: (lldb) exit
check:50'0 ~~~~~~~~~~~~
```
This patch introduces a `vp.splat` matching method for VP support by
sinking the `vp.splat` operand of VP operations back into the same basic
block as the VP operation, facilitating the generation of .vx
instructions to reduce vector register pressure.
---------
Co-authored-by: yanming <ming.yan@terapines.com>
The comment was originally added in
b3af755254, but
2898c3e0bb greatly simplified things
making the previous comment invalid. We no longer need to look at
diffing main versus the PR and whether we are doing a two dot or three
dot diff as we are just diffing the merge commit.
When editing the premerge.yaml file it seems like I left some extra yaml
in there that ended up in the run section of one of the steps that ended
up throwing the error.
Simplify initial VPlan construction by not creating a separate
vector.latch block, which isn't needed and will get folded away later.
This has been suggested as independent clean-up multiple times.
Since `LLVMDIBuilderCreateEnumerator` only supports up to 64 bits, this
PR adds a new `LLVMDIBuilderCreateEnumeratorOfArbitraryPrecision`
function that takes an arbitrary number of words, based on
`LLVMConstIntOfArbitraryPrecision`. This allows even larger enumeration
types to represent their values exactly. (It seems LLVM should already
support i128 enums since 13.0.0.)
Previously the inliner always produced a memcpy with alignment 1 for src
and destination, leading to potentially suboptimal Codegen.
Since the Src ptr alignment is only available through the CallBase it
has to be passed to HandleByValArgumentInit. Dst Alignment is already
known so it doesn't have to be passed along.
If there is no specified Src Alignment my changes cause the ptr to have
no align data attached instead of align 1 as before (see
inline-tail.ll), I believe this is fine but since I'm a first time
contributor, please confirm.
My changes are already covered by 4 existing regression tests, so I did
not add any additional ones.
The example from #45778 now results in:
```C
opt -S -passes=inline,instcombine,sroa,instcombine test.ll
define dso_local i32 @test(ptr %t) {
entry:
%.sroa.0.0.copyload = load ptr, ptr %t, align 8 # this used to be align 1 in the original issue
%arrayidx.i = getelementptr inbounds nuw i8, ptr %.sroa.0.0.copyload, i64 24
%0 = load i32, ptr %arrayidx.i, align 4
ret i32 %0
}
```
Fixes#45778.
This reverts commit fa65a228f4.
This relands commit ab405fb6e9.
There was an issue where CMake versions <3.23.0 would not properly parse
dep files, causing the build to file. This patch fixes that by just
making CMake versions <3.23.0 use the fallback behavior.
Fails on Windows CI:
```
| 10: (lldb) break set -l 3
| check:30'0 ~~~~~~~~~~~~~~~~~~~~~~
| 11: error: No selected frame to use to find the default file.
| check:30'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| 12: error: No file supplied and no default file available.
| check:30'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| 13: (lldb) exit
```
This passes fine when compiling on Windows for Linux targets.
This pull request implements mangling for ConstantMatrixType, allowing
matrices to be used on Windows.
Related issues: #53158, #127127
This example code:
```cpp
#include <typeinfo>
#include <stdio.h>
typedef float Matrix4 __attribute__((matrix_type(4, 4)));
int main()
{
printf("%s\n", typeid(Matrix4).name());
}
```
Outputs this:
```
struct __clang::__matrix<float,4,4>
```
These two tests copy the clang binary into the test tree and assume it
will run from a new location. This is incompatible with relative rpath
values, which is what you typically get in a dylib developer build.
Disable these tests if shared libraries are involved. Another way to
make these tests work would be to update the loader search path
environment variables, but it is difficult to do that portably.
CTTZ can be implemented in terms of CTLZ, for which there's a native
instruction in VIS3.
Promote i32 CTTZ in that case so that the native instruction gets used.
Reviewers: rorth, brad0, s-barannikov
Reviewed By: s-barannikov
Pull Request: https://github.com/llvm/llvm-project/pull/135894
Since commit 613a077b05, `flang` doesn't
build any longer on Solaris/amd64:
```
flang/lib/Evaluate/intrinsics-library.cpp:225:26:
error: address of overloaded function 'acos' does not match required type '__float128 (__float128)'
225 | FolderFactory<F, F{std::acos}>::Create("acos"),
| ^~~~~~~~~
```
That patch led to the version of `quadmath.h` deep inside `/usr/gcc/<N>`
to be found, thus `HAS_QUADMATHLIB` is defined. However, the `struct
HostRuntimeLibrary<__float128, LibraryVersion::Libm>` template is
guarded by `_POSIX_C_SOURCE >= 200112L || _XOPEN_SOURCE >= 600`, while
`clang` only predefines `_XOPEN_SOURCE=500`.
This code dates back to commit 0c1941cb05
back in 2012. Currently, this is long obsolete and `gcc` prefefines
`_XOPEN_SOURCE=600` instead since GCC 4.6 back in 2011.
This patch follows that.
Tested on `amd64-pc-solaris2.11` and `sparcv9-sun-solaris2.11`.
Replace "concept based polymorphism" with simpler PImpl idiom.
This pursues two goals:
* Enforce static type checking. Previously, target implementations hid
base class methods and type checking was impossible. Now that they
override the methods, the compiler will complain on mismatched
signatures.
* Make the code easier to navigate. Previously, if you asked your
favorite LSP server to show a method (e.g. `getInstructionCost()`), it
would show you methods from `TTI`, `TTI::Concept`, `TTI::Model`,
`TTIImplBase`, and target overrides. Now it is two less :)
There are three commits to hopefully simplify the review.
The first commit removes `TTI::Model`. This is done by deriving
`TargetTransformInfoImplBase` from `TTI::Concept`. This is possible
because they implement the same set of interfaces with identical
signatures.
The first commit makes `TargetTransformImplBase` polymorphic, which
means all derived classes should `override` its methods. This is done in
second commit to make the first one smaller. It appeared infeasible to
extract this into a separate PR because the first commit landed
separately would result in tons of `-Woverloaded-virtual` warnings (and
break `-Werror` builds).
The third commit eliminates `TTI::Concept` by merging it with the only
derived class `TargetTransformImplBase`. This commit could be extracted
into a separate PR, but it touches the same lines in
`TargetTransformInfoImpl.h` (removes `override` added by the second
commit and adds `virtual`), so I thought it may make sense to land these
two commits together.
Pull Request: https://github.com/llvm/llvm-project/pull/136674
The MachineCopyPropagation pass was incorrectly removing copy (ORRWrs)
instruction that appeared to be a nop. The instruction should not have
been marked as a copy though, the code was incorrectly assuming that
w29 - w0 + x0 == x29, but as x29 is fp it was out of order with the other
registers.
Fixes an issue reported on #129889.