In general, if we see an allocation, we associate the immutable memory
space with the constructed memory region.
This works fine if we see the allocation.
However, with symbolic regions it's not great because there we don't
know anything about their memory spaces, thus put them into the Unknown
space.
The unfortunate consequence is that once we learn about some aliasing
with this Symbolic Region, we can't change the memory space to the
deduced one.
In this patch, we open up the memory spaces as a trait, basically
allowing associating a better memory space with a memregion that
was created with the Unknown memory space.
As a side effect, this means that now queriing the memory space of a
region depends on the State, but many places in the analyzer, such as
the Store, doesn't have (and cannot have) access to the State by design.
This means that some uses must solely rely on the memspaces of the
region, but any other users should use the getter taking a State.
Co-authored-by: Balazs Benics <benicsbalazs@gmail.com>
Replace binary of of two reductions with one reduction of the binary op
applied to vectors. For example:
```
%v0_red = tail call i32 @llvm.vector.reduce.add.v16i32(<16 x i32> %v0)
%v1_red = tail call i32 @llvm.vector.reduce.add.v16i32(<16 x i32> %v1)
%res = add i32 %v0_red, %v1_red
```
gets transformed to:
```
%1 = add <16 x i32> %v0, %v1
%res = call i32 @llvm.vector.reduce.add.v16i32(<16 x i32> %1)
```
Set VPBBs predecessors before creating VPInstructions, as setting
incoming values for non-header phis directly there will require
predecessors to be available.
Common code has been unified and generalized.
Original commit: 123dca9b56e1359d8ec7771ea3bd0afd4b1ea6af
Previously reverted due to accidentally merged incompletely. The issue has
been addressed by restoring missing code.
If the ECSYMBOLS section is missing in the archive, the archive could be
either a native-only ARM64 or x86_64 archive. Check the machine type of
the object containing a symbol to determine which symbol table to use.
If we were to delay checker constructions after we have a filled
ASTContext, then we could get rid of a bunch of "lazy initializers" in
checkers.
Turns out in the register functions of the checkers we could transfer
the ASTContext and all other things to checkers, so those could benefit
from in-class initializers and const fields.
For example, if a checker would take the ASTContext as the first field,
then the rest of the fields could use it in their in-class initializers,
so the ctor of the checker would only need to set a single field!
This would open uup countless opportunities for cleaning up the
asthetics of our checkers.
I attached a single use-case for the AST and the PP as demonstrating
purposes. You can imagine the rest.
**FYI: This may be a breaking change** to some downstream users that may
had some means to attach different listeners and what not to e.g. the
Preprocessor inside their checker register functions. Since we delay the
calls to these register fns after parsing is already done, they would of
course miss the parsing Preprocessor events.
I noticed this when looking at all allocations by clang. For a medium
sized file this was around 6000 calls to operator new, although i
suspect there were more allocations in total as the SmallVectors in
DataLayout may have their own allocations in some cases.
In a follow-up i'm tempted to make the DataLayout copy constructor
private, to avoid this in future. There are a few tests which copy the
DataLayout, and perhaps need to (I didn't check yet), but we could
provide a clone() method for them if needed. Its only accidental copying
I think we should consider avoiding, not people who really do need to
copy it for reasons.
`intrin.h` contains declarations for both `xbegin` and `_xend`, but they
should already be included transitively from `rtmintrin.h` via
`immintrin.h` and/or `x86intrin.h`. Having them in both places causes
problems if both headers are included.
Furthermore, the `intrin.h` declaration of `xbegin` seems to be bugged
anyway, since it's missing its leading underscore.
Fixes#95133
The follow-up diagnostic would otherwise be:
array.cpp:111:33: note: undefined constructor '(unnamed struct at
array.cpp:111:11)' cannot be used in a constant expression
array.cpp:111:11: note: declared here
111 | constexpr struct { Unknown U; } InvalidCtor;
| ^
... and complaining about the undefined constructor of a class that is
invalid anyway doesn't make much sense.
The checks only checked if the operands were either valid dims and
symbols without checking which ones should be valid dims and which
should be valid symbols. The necessary methods to check already existed.
With this fix, for some existing tests, it leads to a more accurate
error message. In other cases, invalid IRs are caught as shown in the
test case added.
Related to: https://github.com/llvm/llvm-project/issues/120189
This patch fixes:
lldb/tools/lldb-dap/lldb-dap.cpp:5184:9: error: 'scoped_lock' may
not intend to support class template argument deduction
[-Werror,-Wctad-maybe-unsupported]
lldb/tools/lldb-dap/lldb-dap.cpp:5200:7: error: 'unique_lock' may
not intend to support class template argument deduction
[-Werror,-Wctad-maybe-unsupported]
lldb/tools/lldb-dap/lldb-dap.cpp:5222:5: error: 'scoped_lock' may
not intend to support class template argument deduction
[-Werror,-Wctad-maybe-unsupported]
lldb/tools/lldb-dap/lldb-dap.cpp:5236:3: error: 'unique_lock' may
not intend to support class template argument deduction
[-Werror,-Wctad-maybe-unsupported]
`N` may get merged with existing nodes inside the loop. Early exit when
it is deleted to avoid the crash.
Alternative solution: use `DAGNodeDeletedListener` to refresh the value
of N.
Closes https://github.com/llvm/llvm-project/issues/128143.
This adjusts the lldb-dap listening mode to accept multiple clients.
Each client initializes a new instance of DAP and an associated
`lldb::SBDebugger` instance.
The listening mode is configured with the `--connection` option and
supports listening on a port or a unix socket on supported platforms.
When running in server mode launch and attach performance should
be improved by lldb sharing symbols for core libraries between debug
sessions.
Currently when we do a CUDA data transfer from a constant, we embox it
and delegate the assignment to the runtime. When the type of the
constant is not exactly the same as the destination descriptor, the
runtime will emit an assignment mismatch error.
Convert the constant when necessary so the assignment is fine.
This implements assembler support for the XRivosVizip custom/vendor
extension from Rivos Inc. which is defined in:
https://github.com/rivosinc/rivos-custom-extensions (See
src/xrivosvizip.adoc)
Codegen support will follow in a separate change.
This patch is mainly to deal with folding `truncf`, as follows:
`truncf(extf(a))` -> `a`, if `a` has the same bitwidth as the result
`truncf(extf(a))` -> `truncf(a)`, if `a` has larger bitwidth than the
result
T16D16 table is implemented in
https://github.com/llvm/llvm-project/pull/127673
this is a follow up patch to add load/store pseudo for:
flat_store
global_load/global_store
scratch_load/scratch_store
in true16 mode and updated the codegen test file
This commit aligns the operator descriptions to the v1.0 spec
(https://www.mlplatform.org/tosa/tosa_spec.html)
Co-authored-by: Peng Sun <[peng.sun@arm.com](mailto:peng.sun@arm.com)>
Signed-off-by: Luke Hutton
<[luke.hutton@arm.com](mailto:luke.hutton@arm.com)>
Signed-off-by: Luke Hutton <luke.hutton@arm.com>
Co-authored-by: Luke Hutton <luke.hutton@arm.com>
Co-authored-by: Peng Sun <peng.sun@arm.com>
For builds that cannot be easily modified and enabled with
`-ffat-lto-objects`, `-fno-fat-lto-objects` acts as an escape hatch to
disable this option (which is standard to how clang and lld flags are
used).