Age | Commit message (Collapse) | Author | Files | Lines |
|
Created using spr 1.3.5
[skip ci]
|
|
Unify parts of ASI and Prefetch tag matching at `parseASITag`
and `parsePrefetchTag` to use a common function to parse any immediate
expressions. This introduces a slight regression to error messages,
but is needed so we can enable `ParseForAllFeatures`
in `MatchOperandParserImpl` in a future patch.
Reviewers: jrtc27, brad0, rorth, s-barannikov
Reviewed By: s-barannikov
Pull Request: https://github.com/llvm/llvm-project/pull/96020
|
|
We currently cannot generate bytecode for statements once we've decided
we want to generate bytecode for expressions. This is a problem for `StmtExpr`, which is
an expression that requires us to evaluate a statement.
Merge ByteCodeExprGen and ByteCodeStmtGen, so we don't do that distinction anymore. Rename them to Compiler at the same time.
|
|
Replace them with forward declarations.
|
|
There are chunks of code repeated in a number of functions. This patch
moves some of that code into individual functions.
|
|
This patch initializes the `ptr` dialect directories and base files,
adding the `!ptr.ptr` type and the `#ptr.spec<...>` data layout spec
attribute.
The `!ptr.ptr` type is an opaque pointer type optionally parameterized
by a memory space. This type typically represents a handle to an object
in memory or target-dependent values like `nullptr`.
The implementation of the `DataLayoutTypeInterface` interface for
`!ptr.ptr` was adapted from `!llvm.ptr`'s implementation. This
implementation uses the `#ptr.spec<...>` attribute for defining the data
layout specification.
See [[RFC] `ptr` dialect & modularizing ptr ops in the LLVM
dialect](https://discourse.llvm.org/t/rfc-ptr-dialect-modularizing-ptr-ops-in-the-llvm-dialect/75142)
for rationale and roadmap.
|
|
multiplies is not guaranteed to be NSW
https://rust.godbolt.org/z/3f1bevnoT
https://alive2.llvm.org/ce/z/cjixBY
Noticed by @alexfh
|
|
getAs<> results
Use castAs<> to assert the cast is valid to help avoid null dereferences
Fixes static analyser warnings
|
|
Align with PostDominatorTree.
|
|
Use cast<> to assert the cast is valid to help avoid null dereferences
Fixes static analyser warnings
|
|
Use castAs<> to assert the cast is valid to help avoid null dereferences
Fixes static analyser warning
|
|
Fixes a crash caused by abf5969.
|
|
Using the existing `getMaskFormat()` this can be extended to support
`arith.constant` masks.
|
|
Now all operations with a reduction clause have an array of bools
controlling whether each reduction variable should be passed by
reference or value.
This was already supported for Wsloop and Parallel. The new operations
modified here currently have no flang lowering or translation to LLVMIR
and so further changes are not needed.
It isn't possible to check the verifier in
mlir/test/Dialect/OpenMP/invalid.mlir because there is no way of parsing
an operation to have an incorrect number of byref attributes. The
verifier exists to pick up buggy operation builders or in-place
operation modification.
|
|
template parameters (#96864)
As discussed in
https://github.com/llvm/llvm-project/pull/96084#discussion_r1654629993,
it would be nice to present these trailing constraints on template
parameters when printing CTAD decls through a DeclPrinter.
|
|
After landing 9a9ec228cdcf, some of the `TestStepScripted.py` methods
started failing on various bots:
- https://lab.llvm.org/buildbot/#/builders/162/builds/851
- https://lab.llvm.org/buildbot/#/builders/59/builds/650
-
https://green.lab.llvm.org/job/llvm.org/view/LLDB/job/as-lldb-cmake/6546/
- https://green.lab.llvm.org/job/llvm.org/view/LLDB/job/lldb-cmake/3359/
Since I'm not able to reproduce the test failure locally (tested on
darwin x86_64/arm64 & linux arm64), I'll mark these as XFAIL until I can
reproduce it or attach to a bot to investigate the issue on it directly.
Signed-off-by: Med Ismail Bennani <ismail@bennani.ma>
|
|
To make it more easy to check a bug later.
|
|
constexpr implies inline.
|
|
In NewPM pass managers, add a "pretty stack frame" that tells you which
pass crashed while running which function.
For example `opt -O3 -passes-ep-peephole=trigger-crash-function test.ll`
will print something like this:
```
Stack dump:
0. Program arguments: build/bin/opt -S -O3 -passes-ep-peephole=trigger-crash-function test.ll
1. Running pass "function<eager-inv>(mem2reg,instcombine<max-iterations=1;no-use-loop-info;no-verify-fixpoint>,trigger-crash-function,simplifycfg<bonus-inst-threshold=1;no-forward-switch-cond;switch-range-to-icmp;no-switch-to-lookup;keep-loops;no-hoist-common-insts;no-sink-common-insts;speculate-blocks;simplify-cond-branch>)" on module "test.ll"
2. Running pass "trigger-crash-function" on function "fshl_concat_i8_i8"
```
While the crashing pass is usually evident from the stack trace, this
also shows which function triggered the crash, as well as the pipeline
string for the pass (including options).
Similar functionality existed in the LegacyPM.
|
|
error occurs" (#96365)" (#96774)
The fix broke llvm-test-suite, so it was reverted previously. With test
fixes added in https://github.com/llvm/llvm-test-suite/pull/137, it
should now pass the tests
This reverts commit 435635652fd226fa292abcff6a10d3df9dbd74e3.
|
|
|
|
|
|
Previously, if a ptr had align N, then the NVPTX lowering was taking
this align N to refer to the alignment of the pointer type itself, as
opposed to the alignment of the memory that it points to.
As such, if a kernel with signature
```
define void @foo(ptr align 4 %_arg_ptr)
```
takes align 4 to be the alignment of the parameter, this would result in
breaking the ld.param into two separate loads like so:
```
ld.param.u32 %rd1, [foo_param_0+4];
shl.b64 %rd2, %rd1, 32;
ld.param.u32 %rd3, [foo_param_0];
or.b64 %rd4, %rd2, %rd3;
```
It isn't necessary as far as I can tell from the PTX ISA documents to
specify the alignment of params, nor to break the loading of params into
smaller loads based on their alignment. So this patch changes the
codegen to the better:
```
ld.param.u64 %rd1, [foo_param_0];
```
|
|
This teaches lldb to parse the enum XML elements sent by lldb-server,
and make use of the information in `register read` and `register info`.
The format is described in
https://sourceware.org/gdb/current/onlinedocs/gdb.html/Enum-Target-Types.html.
The target XML parser will drop any invalid enum or evalue. If we find
multiple evalue for the same value, we will use the last one we find.
The order of evalues from the XML is preserved as there may be good
reason they are not in numerical order.
|
|
1. Add TTI interface for conditional load/store.
2. Mark 1 x i16/i32/i64 masked load/store legal so that it's not
legalized in pass scalarize-masked-mem-intrin.
3. Visit 1 x i16/i32/i64 masked load/store to build a target-specific
CLOAD/CSTORE node to avoid error in
`DAGTypeLegalizer::ScalarizeVectorResult`.
4. Combine DAG to simplify the nodes for CLOAD/CSTORE.
5. Lower CLOAD/CSTORE to CFCMOV by pattern match.
This is CodeGen part of #95515
|
|
to a new place, NFC (#96758)
This is a refactoring change for better code isolation and reuse, the
first step to extend it for assignments.
|
|
(#70392) (#96868)
This patch makes ScriptedThreadPlan conforming to the ScriptedInterface
& ScriptedPythonInterface facilities by introducing 2
ScriptedThreadPlanInterface & ScriptedThreadPlanPythonInterface classes.
This allows us to get rid of every ScriptedThreadPlan-specific SWIG
method and re-use the same affordances as other scripting offordances,
like Scripted{Process,Thread,Platform} & OperatingSystem.
To do so, this adds new transformer methods for `ThreadPlan`, `Stream` &
`Event`, to allow the bijection between C++ objects and their python
counterparts.
This just re-lands #70392 after fixing test failures.
Signed-off-by: Med Ismail Bennani <ismail@bennani.ma>
|
|
Mark both the intrinsic and the selected MachineInstr as having side
effects to prevent MachineLICM and MachineCSE from moving/removing them.
|
|
(#95125)
Currently the logic is generate field information for all registers in
LinuxArm64RegisterFlags and then as we walk the existing register info,
only those that are in that existing info will get the new fields
patched in.
This works fine but on a review for FreeBSD support it was pointed out
that this is not obvious from the source code.
So instead I've allowed the construction of empty lists of fields, and
field detection methods can return an empty field list if they think
that the register will never exist.
Then the pre-existing code will see the empty field list, and never look
for that register in the register info.
I think removing the assert is ok because the GDB classes filter out
empty field lists at runtime, and anyone updating the built in field
information would presumably notice if none of the fields they intended
to add were displayed.
mte_ctrl and svcr are the only registers that need this so far.
There is no extra testing here as the behaviour is the same, it doesn't
add field information to regiters that don't exist. The mechanism is
just clearer now.
|
|
value (#96706)
**Rationale**
- With the current flexibility of supporting any type of value, we will
need to offer type-specific APIs to fetch a value (e.g.,
`getDevicePropertyValueAsInt` for integer type,
`getDevicePropertyValueAsFloat` for float type, etc.) A single type of
value will eliminate this need.
- Current flexibility can also lead to typing errors when a user fetches
the value of a property using an API that is not consistent with the
type of the value.
**What is the change**
For following system description,
```
module attributes {
dlti.target_system_spec = #dlti.target_system_spec<
"CPU": #dlti.target_device_spec<
#dlti.dl_entry<"max_vector_op_width", 64.0 : f32>>,
"GPU": #dlti.target_device_spec<
#dlti.dl_entry<"max_vector_op_width", 128 : ui32>>
>} {}
```
a user no longer needs to use `getDevicePropertyValueAsInt` for
retrieving GPU's `max_vector_op_width` and
`getDevicePropertyValueAsFloat` for retrieving CPU's
`max_vector_op_width`. Instead it can be done with a uniform API of
`getDevicePropertyValue`.
|
|
|
|
This reverts #94241.
See buildbot failure
https://lab.llvm.org/buildbot/#/builders/51/builds/570
|
|
|
|
|
|
This reverts commit 2274c66e6faaaf29ad693b1ae3e5a7b0228a1950. It makes
libc++ non-conforming, see discussion on the PR.
|
|
arguments (#96207)"
This reverts commit f1e0657d144f5a3cfef4b625d0f875f4dacd21d1.
It breaks SCF conversion, see test case on the PR.
|
|
materialization logic (#96329)"
This reverts commit c01ce797619359ee282773dfc4b1e91ff0a30435. It depends
on f1e0657d144f5a3cfef4b625d0f875f4dacd21d1 which breaks SCF lowering.
|
|
Depends on #94240.
Define the following pseudos for lowering ptrauth constants in code:
- non-`extern_weak`:
- no GOT load needed: `MOVaddrPAC` - similar to `MOVaddr`, with added
PAC;
- GOT load needed: `LOADgotPAC` - similar to `LOADgot`, with added PAC;
- `extern_weak`: `LOADauthptrstatic` - similar to `LOADgot`, but use a
special stub slot named `sym$auth_ptr$key$disc` filled by dynamic linker
during relocation resolving instead of a GOT slot.
---------
Co-authored-by: Ahmed Bougacha <ahmed@bougacha.org>
|
|
Reverts llvm/llvm-project#96389
Some ppc bots failed.
|
|
This PR fixes the issue reported in
[comment](https://github.com/llvm/llvm-project/pull/93529#discussion_r1653311765).
|
|
Create a dummy variable for those cases.
|
|
Most of MVT has simple mapping to the LLVM type, so it would be nice to
auto generate that from ValueTypes.td, that could reduce the effort when
we adding new MVT, especially new vector MVT with different size.
|
|
|
|
This is the only use of string_view in the file. Switch to StringRef
for consistency.
|
|
Like IR version `print<branch-prob>`, there is also a
`print<machine-branch-prob>`.
|
|
The build rule for hwasan_preinit outputs libclang_rt.hwasan_preinit,
but clang expects hwasan-preinit (with a dash, rather than an
underscore) when selecting the library in the frontend.
Also, we were missing the hwasan-preinit dependency in check-hwasan.
For posterity, this now passes hwasan unit tests on Android with:
$ cat args.gn
clang_base_path = "/usr/local"
llvm_enable_assertions = true
llvm_targets_to_build = "all"
android_ndk_path = "/path/to/Android.sdk/ndk/25.2.9519653"
$ /path/to/llvm/utils/gn/gn.py gen build
$ ANDROID_SERIAL=xxx ninja -C build check-hwasan
|
|
This is similar to `callArgs` but for construct exprs like `S(42)` or
`{42}`.
|
|
pointer to data and integral types (#96590)
As cited here, https://github.com/llvm/llvm-project/pull/92477, undname
needs updating to support the new auto NTTP name mangling.
In short the deduced type of the auto NTTP parameter is mangled as `$M
<type> <nttp-param>`. However the deduced type is not printed for the
undecorated name so the `$M <type>` is parsed but simply ignored when
stringifying the generated AST.
|
|
Reverts llvm/llvm-project#95369
Many build bots failed
|
|
|