Age | Commit message (Collapse) | Author | Files | Lines |
|
interp__builtin_elementwise_int_binop (#160362)
Fixes #160281
|
|
value" warning. NFC. (#161168)
|
|
|
|
|
|
Fix a double assignment to a local variable and use the new
popToAPSInt() overload.
|
|
In the important places. They are all fully covered switch statements so
we know where to add code when adding a new pointer type.
|
|
Program itself is unused in that file, so just include the needed
headers.
|
|
Fixes #157492
|
|
This patch fixes:
clang/lib/AST/ByteCode/InterpBuiltin.cpp:2603:15: error: unused
variable 'VT1' [-Werror,-Wunused-variable]
|
|
Instead of going the way through `Pointer::isUnknownSizeArray()`.
|
|
pack intrinsics to be used in constexpr (#156003)
Fixes #154283
|
|
... for dynamic memory allocation. This happens when the requested array
size is too large.
Fixes #152951
|
|
Instead of keeping the `Pointer`s itself in `InterpFrame`, just save
them as offsets and use stackRef<>() when we need them.
|
|
On z/OS `strnlen()` is not available by default so we use the wrapper
header `zOSSupport.h` to make it visible. This will fix the following
error:
```
clang/lib/AST/ByteCode/Context.cpp:250:16: error: use of undeclared identifier 'strnlen'
250 | Result = strnlen(reinterpret_cast<const char *>(Ptr.getRawAddress()), N);
| ^~~~~~~
1 error generated.
```
|
|
interp__builtin_elementwise_int_unaryop callback (#160332)
Fix #160287
|
|
ops (#160280)
Add interp__builtin_elementwise_int_unaryop - similar to what we already have with interp__builtin_elementwise_int_binop to handle binops
Update x86 lzcnt/tzcnt intrinsics to use with a suitable callback
I'll add vector handling in a future patch when we add x86 vector intrinsics that can use it
|
|
Fixes #153948
Signed-off-by: Osama Abdelkader <osama.abdelkader@gmail.com>
|
|
This doesn't seem to be needed anymore and causes problems.
Fixes #159787
|
|
(#159998)
Fixes #158646
|
|
So ignore the rest in `checkFullyInitialized()`.
Fixes #160071
|
|
As happens in C.
Fixes #158482
|
|
in Program::dump().
|
|
Fix two older FIXME items from the `functions.cpp` test.
|
|
Summary:
The added bit counting builtins for vectors used `cttz` and `ctlz`,
which is consistent with the LLVM naming convention. However, these are
clang builtins and implement exactly the `__builtin_ctzg` and
`__builtin_clzg` behavior. It is confusing to people familiar with other
other builtins that these are the only bit counting intrinsics named
differently. This includes the additional operation for the undefined
zero case, which was added as a `clzg` extension.
|
|
So the static invoker's Function still points to the static invoker
instead of the call operator of the lambda record. This is important for
a later commit.
|
|
AVX/AVX512 subvector insertion intrinsics to be used in constexpr #157709 (#158778)
AVX/AVX512 vector insert intrinsics now support constexpr evaluation in both the AST evaluator and bytecode interpreter paths.
FIXES: #157709
|
|
Replace `StackChunk::End` with `StackChunk::Size`, mark the allocating
code paths as unlikely and move `grow()` into the header, which allows
us to template this for the `Size` parameter. Since we only push our
primitive types on the stack and all the sizes are aligned to pointer
size multiples, this only results in a few instantiations.
|
|
They are only pointer-sized and copying them is cheaper than taking the
const ref.
|
|
Instead of having `State::getLangOpts()`, which does a virtual call to
`getASTContext()` to call `getLangOpts()` on that, just move
`getLangOpts()` to the subclasses so we can do that without the virtual
call. We never call `getLangOpts()` in `State.cpp`, so it's not needed
in the base class.
|
|
Both the expression (the initializer) as well as the VarDecl can't be
null here. Assert that.
|
|
The bottom frame is the one without a parent. No need to save that
information separately.
|
|
Add a variant that takes a QualType and one that takes an expression.
That way we don't have to repeat the clunky classify() calls all over
the place.
|
|
Try harder to avoid creating a new `Pointer` for the element.
|
|
(#158852)
Access the Parent state one less time.
|
|
We often don't need it (especially in C), so make this optional and
create it only when we first allocate something.
|
|
Reject bitcasts to pointer types unless it's to `nullptr_t` and always
reject bitcasts to member pointer types.
Fixes #156174
|
|
This is not implemented at compile time and asserts in assertion builds,
so reject it here.
Fixed the coding style in `BuiltinShuffleVector` at the same time.
Fixes #158471
|
|
Unused these days.
|
|
(#157776)
This marks the following builtins as constexpr, which allows their
corresponding intrinsics to be used in constexprs.
| Intrinsics | X86 Builtins | CPUID Flags | Header |
| -------------------- | --------------------------- | ----------- |
----------- |
| `_mm_blend_pd` | `__builtin_ia32_blendpd` | SSE4.1 | smmintrin.h |
| `_mm256_blend_pd` | `__builtin_ia32_blendpd256` | AVX | immintrin.h |
| `_mm_blend_ps` | `__builtin_ia32_blendps` | SSE4.1 | smmintrin.h |
| `_mm256_blend_ps` | `__builtin_ia32_blendps256` | AVX | immintrin.h |
| `_mm_blend_epi16` | `__builtin_ia32_pblendw128` | SSE4.1 | smmintrin.h
|
| `_mm256_blend_epi16` | `__builtin_ia32_pblendw256` | AVX2 |
immintrin.h |
| `_mm_blend_epi32` | `__builtin_ia32_pblendd128` | AVX2 | immintrin.h |
| `_mm256_blend_epi32` | `__builtin_ia32_pblendd256` | AVX2 |
immintrin.h |
Fixes #157065
---------
Co-authored-by: Timm Baeder <tbaeder@redhat.com>
Co-authored-by: Simon Pilgrim <llvm-dev@redking.me.uk>
|
|
See if this fixes the documentation.
|
|
They can't be written to or read from.
Fixes #158535
|
|
They were left out.
Fixes #153920
|
|
We just called `getInit()`, which isn't always correct and used the
wrong initializer in the module test case.
|
|
|
|
Set the EvalMode on InterpState and abort when initalizing a global
temporary, like the current interpreter does. The rest is just plumbing
in EvaluateAsLValue.
Fixes #157497
|
|
We can save ourselves the conversion to an APValue here since we will do
that later in updateGlobalTemporaries() anyway.
|
|
Make it an enum class and move the enum to State.h as well as the
`EvalMode` member to `State`. This is in preparation of using the
evaluation mode from `InterpState` as well.
|
|
|
|
|
|
Fixes #157422
|