[libc++][docs] Avoid talking about other implementations on DR status (#210637)
Standard library implementations consistently treat (or will
consistently treat) some LWG papers as Defect Reports that are also
applied to old modes, despite that they are not officially listed as
Defect Reports in WG21 meeting minutes. We used to say "other
implementations (namely MSVC STL and libstdc++) will do the same" for
some of them.
However, such sentences will become outdated soon when other
implementations actually do so. It is possibly better to avoid saying
so, which potentially requires synchronizing our documentation with
other implementations.
AMDGPU: Use module flags to control xnack and sramecc
This ensures these ABI details are encoded in the IR module
rather than depending on external state from command-line flags.
Previously, these were encoded as function-level subtarget features.
The code object output was a single target ID directive implied
by the global subtarget. The backend would previously check if a
function's subtarget feature mismatched the global subtarget. This
is avoided by making xnack and sramecc module-level properties from
the start. This also provides proper linker compatibility
enforcement, moving the error point earlier.
The old encoding was also an abuse of the subtarget feature system.
Subtarget features are a bitvector, and later features in the string
can override earlier ones. The old handling added a special case
where explicit settings were preserved: ordinarily +feature,-feature
should result in the feature being disabled, but +xnack,-xnack would
preserve the explicit "-xnack" state, which differs from the absence
of any xnack setting.
[25 lines not shown]
[flang] Enable allocation-placement pass by default
Make the unified allocation-placement pass the default in the FIR optimizer
pipeline in place of the legacy stack-arrays and memory-allocation-opt passes,
by defaulting -enable-allocation-placement to true. Passing
-enable-allocation-placement=false restores the legacy passes for comparison.
Add a -disable-allocation-placement switch that skips the pass entirely (wired
through addAllocationPlacement like the other optimizer passes), so codegen
tests can opt out of placement policy independently of the legacy fallback.
Update the pipeline-dump tests to expect AllocationPlacement, and disable the
pass in the alloca/allocmem codegen tests (alloc.fir, coordinateof.fir) so they
keep testing lowering rather than placement policy. Document the unified pass,
its policy, thresholds, and options in fstack-arrays.md.
[compiler-rt] Move sanitizer ignorelists to sanitizer-ignorelists target (#200518)
This adds a `sanitizer-ignorelists` target to compiler-rt, allowing the
ignorelists to be built independently of the sanitizer runtimes. The
ignorelists are still built by default, but this change is not quite
NFC: when any of the sanitizers are built, all of the ignorelists will
be included (rather than the individual runtime ignorelists being built
with their respective runtimes).
For _why_ we want to be able to build these independently of the
runtimes, see
https://github.com/llvm/llvm-project/pull/195690#issuecomment-4384573223
I did not move the dfsan abilist to this new target because it is not as
straightforward as a copying a static file.
Assisted-by: Claude
rdar://175962064
[mlir][EmitC] Create a pass to add a reflection map to a class (#205464)
This creates the `add-reflection-map` pass to add a reflection map and a
helper method to EmitC classes for runtime field lookup.
Details:
- Add headers to import `map` and `string` if not already present.
- For every `ClassOp`:
- Collect all the `FieldOp`s that contain the attribute whose value we
want as the reflection map key. We ignore all `FieldOp`s that contain an
attribute present in `excludedFieldAttrs` and if there's a `FieldOp`
that neither has the attribute we're looking for and isn't excluded by
the presence of one of the `excludedFieldAttrs`, emit and error.
- Create the reflection map where the key is the value of the attribute
in each applicable `FieldOp`'s attribute dictionary and the value is a
pointer to the field's contents.
- Create a `getBufferForName` method which serves as a getter method for
the reflection map.
[6 lines not shown]
[flang] Add command-line control of allocation-placement thresholds
Expose the small-array byte-size threshold and the per-function stack budget
used by the allocation-placement pass as shared command-line options
(-allocation-placement-small-array-size and -allocation-placement-stack-limit),
and thread them through addAllocationPlacement so the pipeline honors them.
[flang][OpenACC] Allow blanks around ':' in more clause separators (#210446)
Several OpenACC clause parsers glue a keyword directly to its `:`
separator in the token string (`"DEVNUM:"`, `"QUEUES:"`, `"FORCE:"`,
`"ZERO:"`, `"READONLY:"`). A blank in a `TokenStringMatch` pattern is
the only place a blank is accepted between characters of the token, so
these spellings rejected an otherwise valid separating space, e.g.
```fortran
!$acc wait(devnum : 1 : 2, 3)
!$acc loop collapse(force : 2)
!$acc data copyin(readonly : a) create(zero : b)
```
This moves the blank in each token string to before the `:` so zero or
more blanks are accepted on either side of the separator, matching
free-form Fortran's treatment of blanks and the spec grammar (which
writes these with spaces around the `:`). It mirrors the earlier fix for
the gang `static`/`dim`/`num` arguments.
[5 lines not shown]
Fix IPA SMB machine account setup and self-heal old joins
Set the SMB machine-account password from the generated value when
retrieving the keytab and write that same value to secrets.tdb as raw
bytes, so the keytab and secrets.tdb agree. Report changesecretpw
stderr on failure and drop the unawaited backup() call.
Regenerate smb.conf before creating the SMB service principal so the
machine account uses the current NetBIOS name, and make principal
creation failures fatal so partial joins roll back.
Stamp a credential version in secrets.tdb; the IPA health check
regenerates the SMB machine account in place, via the host credential,
for systems joined by an earlier build that wrote it wrong. Expose the
same regeneration as an explicit recovery action.
Add unit and integration tests.
[MLIR][XeGPU] Enhance unrolling of convert layout (#209822)
This PR adds rewriteWithRegrouping to unroll ConvertLayoutOp by
extracting at the input inst_data granularity and inserting at the
target inst_data granularity for cancellation during canonicalization.
Assisted by Claude
[clang] improve diagnostics for enums (#204682)
This patch makes clang attempt printing enumerator names rather than
C-style cast expressions in more diagnostics (notably static_assert) iff
the value matches an enumerator exactly.
For example, consider a static assertion `static_assert(E ==
TestEnum::B);` where `E` is a constant template argument. Assuming
`(TestEnum)1 == TestEnum::A`, this changes emitted diagnostics as
follows:
```
// old
static assertion failed due to requirement '(TestEnum)1 == TestEnum::B'
// new
static assertion failed due to requirement 'TestEnum::A == TestEnum::B'
```
[clang][NFC] Extract LookupOverloadedUnaryOp (#210567)
This patch extracts `LookupOverloadedUnaryOp` from
`CreateOverloadedUnaryOp` for consistency with
`LookupOverloadedBinOp`/`CreateOverloadedBinOp`.
man: Fix RFC 1918 network prefix lengths
According to RFC 1918, the following IP prefixes are reserved for
private internets:
10.0.0.0/8
172.16.0.0/12
192.168.0.0/16
This PR fixes the prefix lengths in references to private networks
("RFC 1918 networks", "the standard private IP address ranges").
The changes are limited to man pages.
Signed-off-by: Yusuke Ichiki <public at yusuke.pub>
Pull Request: https://github.com/freebsd/freebsd-src/pull/2328
(cherry picked from commit 1403ca10189c47ad1de3915eeb030deddc114685)
man: Fix RFC 1918 network prefix lengths
According to RFC 1918, the following IP prefixes are reserved for
private internets:
10.0.0.0/8
172.16.0.0/12
192.168.0.0/16
This PR fixes the prefix lengths in references to private networks
("RFC 1918 networks", "the standard private IP address ranges").
The changes are limited to man pages.
Signed-off-by: Yusuke Ichiki <public at yusuke.pub>
Pull Request: https://github.com/freebsd/freebsd-src/pull/2328
(cherry picked from commit 1403ca10189c47ad1de3915eeb030deddc114685)
[clang] fix a crash for uses of a pseudo-destructor of enum without definition (#210424)
Lookup for the destuctor name in the object type only applies to record
types.
Since this will be backported, there are no release notes.
Fixes #209808
[flang][NFC] Remove unreachable legacy FORALL/WHERE lowering code from Bridge.cpp (#210639)
The HLFIR lowering migration left a cluster of legacy, now-unreachable
code in Bridge.cpp behind. None of it has a live caller (FORALL is
lowered by genForallNest; DO CONCURRENT by getConcurrentControl):
- forceControlVariableBinding and the old DoLoopOp-based genFIR(const
parser::ConcurrentHeader &) FORALL-nest lowering (the ConcurrentHeader
is not a PFT evaluation node and is never visited).
- The member genInitializerExprValue, implicitIterationSpace/
explicitIterationSpace, genArrayAssignment, and the NDEBUG-only
isFuncResultDesignator.
- The analyzeExplicitSpace overload set, analyzeExplicitSpacePop, and
addMaskVariable.
- The explicitIterSpace / implicitIterSpace members.
These were the only Bridge.cpp users of the legacy expression lowering
(createSome*Assignment / createSomeInitializerExpression) and of
IterationSpace, so their includes (ConvertExpr.h, IterationSpace.h, and
[2 lines not shown]