[SimpleLoopUnswitch] Reland "Generalize the notion of trivial unswitching" (#204934)
In the original PR for this feature, the third parameter of
`MemorySSAUpdater::applyUpdates` was not set to `true`. This
caused `DT` to be invalid, resulting in the failures. This PR fixes the
issue and provides an additional testcase.
Also in the original commit had three asserts to confirm
`!ModifiedBranch ` when we bail out. One of these is redundant because
it is enclosed in an `if` statement checking the same condition. This PR removes
the redundant `assert` too.
Revert "Reapply "[InstCombine] Merge consecutive assumes" (#205177)" (#205380)
This surfaces a bug likely fixed by
https://github.com/llvm/llvm-project/pull/205275. Once that lands this
patch can be landed again.
Reverts llvm/llvm-project#205324
NAS-139535 / 25.10.5 / Decode CHANGE-without-DELETE_CHILD share ACL mask as CHANGE
A customer's `sharing.smb.getacl` crashed with `ValueError: 1245631 is not a
valid SDDLAccessMaskStandard` because the stored share ACL contained an ACE with
access mask 0x1301BF -- the CHANGE preset (0x1301FF) minus the
SEC_DIR_DELETE_CHILD bit (0x40). Such masks are produced by some Windows versions
/ older Samba / sharesec shell edits. `sd_bytes_to_share_acl` looked the mask up
directly in the SDDLAccessMaskStandard enum, which raised for the unrecognized
value and returned a 500 from getacl, so the admin could neither view nor fix the
share ACL.
Normalize this known equivalent mask to CHANGE at the single decode site. This
keeps the returned `ae_perm` within the existing API schema
(Literal['FULL','CHANGE','READ']) so there is no public API surface change --
appropriate for a hotfix release. Surfacing a new "CUSTOM" value (as the full
NAS-139535 fix does on master) was deliberately avoided here: it is not in the
v25_10_4 schema, so it raises pydantic ValidationError at result serialization --
swallowed in production only via dump_result_allow_fallback (logging a warning on
every read) and raised outright under the test harness.
[3 lines not shown]
Add limited vtable address querying to `clang::CodeGenerator` (#202807)
This is being used in Carbon (
https://github.com/carbon-language/carbon-lang/pull/7323 ) to implement
cross-language overriding.
I realize this isn't the fully general feature needed for virtual bases,
etc - but this limited functionality is already wrapped up for, if I
understand it correctly, constexpr use cases and some others. So
hopefully it's still something folks feel is general enough to be
worthwhile exporting. For now Carbon doesn't support deriving from a
type with virtual bases, so the extra complexity isn't needed.
[TableGen] Use llvm_unreachable in switch guard for all except gcc 8-
Follow-up to https://github.com/llvm/llvm-project/pull/194728.
For gccs older than v9 use abort. That seems to make everybody happy.
[LifetimeSafety] Fix liveness propagation for all origin flows (#205323)
Previously, the `transfer` function for `OriginFlowFact` only handled
killing the destination origin. It did not propagate liveness backwards
from destination to source, meaning that if an origin flowed into
another, the source was not marked live even when the destination was.
The `transfer` function now propagates liveness from destination to
source: if the destination origin is live, the source origin is also
marked live with the same `LivenessInfo`, before optionally killing the
destination.
Additionally, `handleMovedArgsInCall` now skips rvalue reference
parameters annotated with `[[clang::lifetimebound]]`, since such
parameters should not be treated as moved-from.
This introduces some false positives for invalidations as container
modifications are not considered self-invalidating. The updated test
expectations reflect this, along with `FIXME` comments explaining that
[2 lines not shown]
[docs] Enforce unambiguous toctree in llvm/docs
It seems like using a non-`hidden` `toctree` for page navigation is a
bit of a trap, in that every doc must have a single unique path through
the global toctree to the root doc, and it is very easy to end up with
multiple.
This patch tries to address the warnings (actually infos, hence why it
does not fail the build) in llvm/docs/, namely:
$ sphinx-build -b html -jauto llvm/docs/ /tmp/sphinx-out
checking consistency...
llvm/docs/AMDGPUDwarfExtensionAllowLocationDescriptionOnTheDwarfExpressionStack/AMDGPUDwarfExtensionAllowLocationDescriptionOnTheDwarfExpressionStack.md: document is referenced in multiple toctrees: ['UserGuides', 'AMDGPUUsage'], selecting: UserGuides <- AMDGPUDwarfExtensionAllowLocationDescriptionOnTheDwarfExpressionStack/AMDGPUDwarfExtensionAllowLocationDescriptionOnTheDwarfExpressionStack
llvm/docs/AMDGPUDwarfExtensionsForHeterogeneousDebugging.rst: document is referenced in multiple toctrees: ['UserGuides', 'AMDGPUUsage'], selecting: UserGuides <- AMDGPUDwarfExtensionsForHeterogeneousDebugging
llvm/docs/CommandGuide/llvm-reduce.rst: document is referenced in multiple toctrees: ['CommandGuide/index', 'CommandGuide/index', 'Reference'], selecting: Reference <- CommandGuide/llvm-reduce
llvm/docs/GitHub.rst: document is referenced in multiple toctrees: ['GettingInvolved', 'UserGuides'], selecting: UserGuides <- GitHub
llvm/docs/GlobalISel/IRTranslator.rst: document is referenced in multiple toctrees: ['GlobalISel/index', 'GlobalISel/Pipeline'], selecting: GlobalISel/index <- GlobalISel/IRTranslator
llvm/docs/GlobalISel/InstructionSelect.rst: document is referenced in multiple toctrees: ['GlobalISel/index', 'GlobalISel/Pipeline'], selecting: GlobalISel/index <- GlobalISel/InstructionSelect
llvm/docs/GlobalISel/Legalizer.rst: document is referenced in multiple toctrees: ['GlobalISel/index', 'GlobalISel/Pipeline'], selecting: GlobalISel/index <- GlobalISel/Legalizer
[35 lines not shown]
[docs] Create utils/docs
llvm-project is home to many sphinx documentation sites, each with
configuration quirks and bespoke extensions.
The sphinx config model makes sharing code somewhat difficult. There
are options like sphinx-multiproject, but some of our docs builds are
out of the source tree while some are done out of the binary tree, so
the multiproject configuration itself would need to be generated. It
also would impose more uniformity around extensions than required.
This change instead creates a python package at utils/docs/llvm_sphinx
and makes it available to all sphinx-build processes via PYTHONPATH.
Each conf.py does not modify its own sys.path because not all builds are
out of the source tree, so there isn't a stable relative path to use to
refer to the utils/docs/ directory.
Type checking via pyright in new package is pinned to being python 3.8
compatible.
[29 lines not shown]