[flang] clang-format flang/lib/Semantics/resolve-directives.cpp
The changes are only on 5 lines, but now the entire file is invariant
under clang-format.
[clang-format] Update QtPropertyKeywords to Qt 6.11 documentation (#190543)
Qt 6.11 added `OVERRIDE` and `VIRTUAL` keywords to the [property
system](https://doc.qt.io/qt-6.11/properties.html).
[AMDGPU] Use value's DebugLoc for bitcast in performStoreCombine (#186766)
## Description
When `AMDGPUTargetLowering::performStoreCombine` inserts a synthetic
bitcast to convert vector types (e.g. `<1 x float>` → `i32`) for stores,
the bitcast inherits the **store's** SDLoc. When
`DAGCombiner::visitBITCAST` later folds `bitcast(load)` → `load`, the
resulting load loses its original debug location.
## Analysis
The bitcast is **not** present in the initial SelectionDAG — it is
inserted during DAGCombine by
`AMDGPUTargetLowering::performStoreCombine`. This can be observed with
`-debug-only=isel,dagcombine`:
```
Initial selection DAG: no bitcast, load is v1f32 directly used by store
[59 lines not shown]
[AsmPrinter] Use AsmPrinterAnalysis to hold AsmPrinter
AsmPrinter needs to hold state between doInitialization,
runOnMachineFunction, and doFinalization, which are all separate passes
in the NewPM. Storing this state externally somewhere like
MachineModuleInfo or a new analysis is possible, but a bit messy given
some state, particularly EHHandler objects, has backreferences into the
AsmPrinter and assumes there is a single AsmPrinter throughout the
entire compilation. So instead, store AsmPrinter in an analysis that
stays constant throughout compilation which solves all these problems.
This also means we can also just let AsmPrinter continue to own the
MCStreamer, which means object file emission should work after this as
well.
This does require passing the ModuleAnalysisManager into
buildCodeGenPipeline to register the AsmPrinterAnalysis, but that seems
pretty reasonable to do.
Reviewers: paperchalice, RKSimon, arsenm
Pull Request: https://github.com/llvm/llvm-project/pull/191535
[AMDGPU] Add object linking support for LDS and named barrier lowering in the middle end
This is the first patch in a series introducing object linking support for
AMDGPU.
This PR adds the -amdgpu-enable-object-linking flag to enable object linking in
the backend. It also updates the AMDGPULowerModuleLDSPass and
AMDGPULowerExecSync passes to support lowering LDS and named barrier globals
when object linking is enabled.
[Clang] Track constraint's SubstIndex only if it contains outer parameter packs (#191484)
I believe that is the intent of SubstIndex in AssociatedConstraint.
So this enforces the checking explicitly, in case nested SubstIndexes
confuses our poor constraint evaluator.
I reverted the previous fix 257cc5ad89840cdfba4affcc8fe62cf9d02d9017
because that was wrong.
As a drive-by fix, this also removes an strange assertion and an
unnecessary
SubstIndex setup in nested requirement transform.
No release note because this is a regression fix.
Fixes https://github.com/llvm/llvm-project/issues/188505
Fixes https://github.com/llvm/llvm-project/issues/190169
[clang-doc] Avoid merging into default Info types
When merging into arenas, the code assumed that all using a default
constructed info would be safe, since in the merge we replace any
differing data. However, that appears to be a risky assumption, due
to default initialized members participating in comparisons, and
other operations, leading the program to read garbage data in some
cases. Earlier patches added default initializers to these fields,
but we should prefer (which the old code used to do) to just start
with properly initialized and complete data from the start.
This patch updates the remaining Info types to have copy constructors
that support choosing the arena to allocate into. This is already the
strategy used in several places to avoid use after free bugs. Since
the handling is now uniform, we can simplify things a bit at the same
time and extract the cloning operation into a helper, making the logic
very clear.
This should avoid any potential pitfalls or missed cases that resulted
in the errors discover after landing #190054.
[lldb][Platform] Use the module's FileSpec instead of the script's FileSpec when checking LoadScriptFromSymFile setting (#191473)
We were incorrectly passing the script's `FileSpec` into
`GetScriptLoadStyleForModule`. Meaning if a script name wasn't actually
the same as the module name, the `target.auto-load-scripts-for-modules`
didn't take effect.
This patch passes the module's `FileSpec` instead. For `dSYM`s we save
the original `FileSpec` because the loop tries to strip extensions until
it finds a script. But we still want to use the module's name.
**AI Usage**:
- Used Claude to write the unit-test skeletons. Then reviewed/adjusted
them manually
[AMDGPU][Scheduler] Use MIR-level rematerializer in rematerialization stage
This makes the scheduler's rematerialization stage use the
target-independent rematerializer. Previosuly duplicate logic is
deleted, and restrictions are put in place in the stage so that the
same cosntraints as before apply on rematerializable registers (as the
rematerializer is able to expose many more rematerialization
opportunities than what the stage can track at the moment).
Consequently it is not expected that this change improves performance
overall, but it is a first step toward being able to use the
rematerializer's more advanced capabilities during scheduling.
This is *not* a NFC for 2 reasons.
- Score equalities between two rematerialization candidates with
otherwise equivalent score are decided by their corresponding
register's index handle in the rematerializer (previously the pointer
to their state object's value). This is determined by the
rematerializer's register collection order, which is different from
[10 lines not shown]
[AMDGPU][Scheduler] Prepare remat stage for rematerializer integration (NFC) (#189489)
This NFC prepares the scheduler's rematerialization stage for
integration with the target-independent rematerializer. It brings
various small design changes and optimizations to the stage's internal
state to make the not-exactly-NFC rematerializer integration as small as
possible.
The main changes are, in no particular order:
- Sort and pick useful rematerialization candidates by their index in
the vector of candidates instead of directly sorting objects within the
candidate vector. This reduces the amount of data movement and
simplifies the candidate selection logic.
- Move some data members from `PreRARematStage::RematReg` to
`PreRARematStage::ScoredRemat`. This makes the former a simplified
version of the rematerializer's own internal register representation
(`Rematerializer::Reg`), which can be cleanly deleted during
integration.
[7 lines not shown]
[lldb] Fix output of `help format` (#190409)
The output currently contains
```
"unicode32"
'u' or "unsigned decimal"
'p' or
"pointer"
"char[]"
"int8_t[]"
```
The 'p' and "pointer" are supposed to appear on the same line. When
we're about to print "pointer," we check whether it would exceed the
column limit (in which case, we insert a line feed). This check only
checks for spaces as separators, but in this case, "words" may be
separated by newlines as well. Look for them too.