[clang][AST] Attributed Type Deduplication Logic Cleanup (#204263)
https://github.com/llvm/llvm-project/pull/200961 implemented
`AttributedType` deduplication using the attributes' arguments. This PR
addresses the post-commit feedback.
The reason to have `llvm_unreachable("profile not implemented for this
type");` in the body of `profileAttrArg` for non-supported attribute
types is that none of the attributes that currently instantiate this
method are type attributes. The methods that are instantiated and not
supported are all for decl attributes. Leaving the body out will lead to
compilation failures, but the method's body should never be executed. If
an unsupported attribute type happens to execute this code path, the
failure should be loud and clear.
AMDGPU: Refactor AMDGPUTargetID to not store MCSubtargetInfo
Store the triple string and GPUKind instead. The dependence
on checking AMDHSA seems like an anti-feature, but maintain the
behavior of not printing the modifiers for other OSes. Start
parsing the target ID instead of performing a direct string
comparison. Also improve test coverage for the treatment of the
environment component of the triple. The main behavioral change
is this will now produce normalized triples in the output and
diagnostics. Practially, this means all of the places that
currently emit "--" will be expanded into "-unknown-".
Co-Authored-By: Claude Opus 4.6 <noreply at anthropic.com>
[Dexter] Switch to using script-mode by default
This patch changes the default mode of Dexter from heuristic-mode to
script-mode. The --use-script argument is replaced with --use-heuristic,
some comments/docs/error messages are updated accordingly, and tests have
their flags switched accordingly.
[Dexter] Update lldb-based dexter-tests to use script-mode
This patch replaces uses of heuristic-mode Dexter in the dexter-tests suite
with uses of the script-mode, for tests that use DAP (via lldb-dap). The
updates are largely straightforward but occasionally non-trivial, and in
some cases some slight modifications have been made to keep the "spirit" of
the test intact.
[Driver][DirectX] Add `-Zss` and `-Zsb` flags (#203960)
Add flags that control whether the shader hash is computed with or
without including debug info (from ILDB or DXIL part).
[AArch64] Update Cost model for CLMUL (#202965)
CLMUL now has custom backend lowering and the efficiency of its lowering
is heavily dependant on available flags. This patch aligns the cost
model from the generic costs to the realistic costs.
[Dexter] Update lldb-based dexter-tests to use script-mode
This patch replaces uses of heuristic-mode Dexter in the dexter-tests suite
with uses of the script-mode, for tests that use DAP (via lldb-dap). The
updates are largely straightforward but occasionally non-trivial, and in
some cases some slight modifications have been made to keep the "spirit" of
the test intact.
[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] 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] Switch to using script-mode by default
This patch changes the default mode of Dexter from heuristic-mode to
script-mode. The --use-script argument is replaced with --use-heuristic,
some comments/docs/error messages are updated accordingly, and tests have
their flags switched accordingly.
[Dexter] Document the structured script model
This patch adds documentation for the script model to the Dexter README,
shunting heuristic-mode information into a separate doc, creating a new
doc for script-mode, and linking to both (with a brief summary of the
differences) from the base README.
[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] 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] 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 !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.