[X86] EltsFromConsecutiveLoads - if all loads are oneuse frozen loads then freeze as a consecutive load (#203957)
Alive2: https://alive2.llvm.org/ce/z/W5jYjH
[AIX][libc++] Fix sized_delete.pass.cpp for AIX by adding -fsized-deallocation flag (#199366)
By default `-fno-sized-deallocation` is passed for libc++ in AIX.
https://github.com/llvm/llvm-project/blob/47e6290a34507ba1b3f4e0a49bad28982ff3e3ef/clang/lib/Driver/ToolChains/AIX.cpp#L578
As many other targets have passed the argument through
`ADDITIONAL_COMPILE_FLAGS` using the same for PPC.
`ADDITIONAL_COMPILE_FLAGS` does not take regex so added a new feature to
recognize target triple as `PowerPC` or `PowerPC64`.
---------
Co-authored-by: himadhith <himadhith.v at ibm.com>
[NFC][mlir][linalg] add `toContractionDimensions` for healthy code reuse (#203916)
Follow-up to #203323.
This PR adds the `toContractionDimensions` static function, aligning
with what we suggested in #203323.
---------
Signed-off-by: Federico Bruzzone <federico.bruzzone.i at gmail.com>
[AMDGPU][NFC] Test 32/64-bit sdiv with operands in 22-bit range (#204155)
Pre-commit test results for 32/64-bit sdiv where operands are in 22-bit
range.
Signed-off-by: John Lu <John.Lu at amd.com>
[Lower] Wrap unstructured Fortran constructs in scf.execute_region
Extend the PFT-to-MLIR (HLFIR/FIR) lowering so that unstructured Fortran
constructs are emitted inside scf.execute_region. The goal is to let
downstream lowerings (OpenACC, OpenMP) see a single, opaque op where
they would otherwise reject multi-block content.
The wrap is enabled by default via
-mmlir --wrap-unstructured-constructs-in-execute-region
and engaged from genFIR for both DoConstruct and IfConstruct via a
shared pre-wrap path: the wrap is created up-front in the current
builder region, the construct's blocks are created inside the
scf.execute_region's region, and the construct's exit is redirected to
a yield block inside the region.
PFTBuilder's isUnstructured propagation no longer fires for constructs
the wrap will fold, so parent constructs whose only unstructured
content is a wrappable child stay structured (e.g. an outer DO whose
body is just an inner DO with `exit` becomes a fir.do_loop, with the
[61 lines not shown]
[Dexter] Add ability to check float values within a range
Adds a new node type, !float, which can be used to match debugger ouptut as
float values rather than as strings, optionally allowing a range to be
specified for inexact matches. This new node allows a list of values to be
given, effectively a shorthand for a list of individual !float nodes.
[Dexter] Add condition check to state nodes
This patch enables the ability for state nodes to check conditions, meaning
they will be active only if the condition is met.
Condition evaluation is somewhat language specific; we directly check
whether the value of the evaluated expression is "true" (case-insensitive),
which works for the languages we actually use Dexter with, but may require
generalizing in future.
We also cache conditions as they are evaluated; each time we step, we clear
all cached conditions for the current frame and any expired frames, but we
keep the cached conditions for any frames rootwards from the current frame;
this prevents us from unexpectedly exiting out of a callee frame because of
debug info not surviving a stack unwind; if the early exit is desired, an
!and{at_frame_idx, condition} under the lower frame may suffice.
[Dexter] Enable after_hit_count for state nodes
The after_hit_count attribute for a state node causes it to become active
only after it would have become active N times. This uses the existing logic
for incrementing hit counts, i.e. after the node becomes "active", we will
not add another hit count until it stops being active for at least one step.
Since state nodes with after_hit_count do not become active before reaching
the required hit count, this requires us to keep track of an "early" set of
state nodes, meaning nodes that would be active if not for their
after_hit_count.
[Dexter] Add at_frame_idx to check values in frames above current
This patch adds a new attribute for !and nodes, `at_frame_idx`, which
matches against frames above its parent node; for example, in the script:
```
!where {function: foo}:
!where {function: bar}:
!and {at_frame_idx: 1}:
!value x: 0
```
The `!value x` node checks the value of 'x' in 'foo' while the debugger is
inside 'bar'. Use of this attribute comes with some restrictions: a !where
node can never be nested under a !and{at_frame_idx} node, and neither can
another !and{at_frame_idx} node.
[Dexter] Add for_hit_count for state nodes
This patch adds the ability for state nodes to use a `for_hit_count: <int>`
field to limit the number of times that a given state node will be active.
[Dexter] Add !step node for testing stepping behaviour
This patch adds a node for generating metrics based on lines stepped on. The
new node has 3 versions: !step exactly, !step order, and !step never, which
check an expected list of line numbers against the actual line numbers seen
while the expect is active.
[Dexter] Write expects for variables in Debugger scopes
Following on from the previous patch, this patch adds support for writing
expects from !value/all nodes, generating separate expects for each
variable in the requested debugger scope, for each continuous range of lines
it is live for.
[Dexter] Add support for writing !step values
Following from the previous patch, this patch adds support to Dexter for
generating expected values for !step nodes. This is relatively limited:
the kind of !step which this is most well-suited to this is !step exactly,
as the !step order of ignoring extra lines is redundant (all lines are added
as expected values), and !step never can't know what lines could have been
stepped on but weren't without some extra work (e.g. finding viable
breakpoint locations in the enclosing state node).
[Dexter] Allow matching lists of values for aggregate members
This patch slightly extends the matching of aggregate members to allow for
lists of expected values for individual members, functioning the same as
lists of expected values for scalar values.
[Dexter] Add !type and !type/all nodes to test variable types
This patch adds the second kind of variable expect, !type, which tests the
type of a variable as reported by the debugger. As with !value, this is a
string comparison of the debugger output with the script expected value -
this means that even if two types are identical (e.g. typedef), a !type node
will only match the one that the debugger displays by default.
Script writing and aggregates work the same for !type as for !value, and the
metrics reported are largely similar, with the exception that "unexpected",
"seen", and "missing" metrics are reported separately for values and types.
[Dexter] Allow fetching "scopes" from the debugger
To further improve Dexter's script writing ability, this patch starts
implementing the ability for Dexter to fetch all variables with in a given
"scope", as defined by the DAP "scopes" request. This allows the test to
collect all available variables without needing to specify them explicitly
in the script, aiding in fast script generation/re-generation.
This patch does not add any script-writing functionality, but adds the
!value/all Node, which fetches all variable values from the given scope, and
enables fetching these values from DAP-based debuggers.
[Dexter] Add !address node
Adds a node type for Dexter that allows checking abstract labels instead of
concrete addresses. Each address node has a label and optional offset, and
the first time during evaluation that a given address label is matched
against a valid pointer value, the address label will be assigned a value
that matches the seen address (adjusting for any offset). From that point,
the resolved address value will be used for the remainder of the test
evaluation.
[Dexter] Add !then node
In order to exercise more control over stepping in Dexter tests, this patch
adds the `!then` node which can be used to step out of a function or exit
the current test. Unlike expect nodes, !then nodes appear as direct singular
children of a state node:
!where {lines: 10}: !then finish
The two currently available commands are "step_out" and "finish". step_out
performs a debugger "step out" command, skipping over all !wheres in the
current frame and not stepping into any lower !wheres. The finish command
ends the debugger session immediately after finishing the current step.
[Dexter] Add ability to rewrite scripts to fill-in unknown values
This patch adds a feature to Dexter that allows scripts to be passed to
Dexter with missing expected values (`null` values in YAML), which Dexter
will attempt to "fill-in" with expected values that match the debugger's
actual output. The result is written to a file with the same name as the
original test file, in the directory given by --results-directory if one
is present; all content outside of the Dexter script itself is preserved
exactly as-is.