[CIR] Add ASTVarDeclInterface for AST attribute access
Add the ASTVarDeclInterface which provides methods to access clang AST
VarDecl information from CIR attributes. This interface enables:
- mangleStaticGuardVariable: Mangle guard variable names using clang's
MangleContext
- isLocalVarDecl: Check if a variable is function-local
- getTLSKind: Get thread-local storage kind
- isInline: Check if the variable is inline
- getTemplateSpecializationKind: Get template specialization info
- getVarDecl: Direct access to the underlying VarDecl pointer
This infrastructure is needed for proper handling of static local
variables with guard variables in LoweringPrepare.
[lldb] Add tree-sitter based syntax highlighting
This adds the necessary infrastructure to use tree-sitter for syntax
highlighting in LLDB. It provides the base class for a tree-sitter
highlighter plugin. Its primary function is interfacing with the
tree-sitter library, and converting captures to highlighting styles.
Adding a new tree-sitter highlighter consists of creating an LLDB plugin
that inherits from this class. The plugin has two core responsibilities:
1. Loading the tree-sitter grammar.
2. Specifying the tree-sitter syntax highlighting query.
Everything else is handled by the base class, making it extremely easy
to add a new language.
For more context and the motivation behind using tree-sitter for syntax
highlighting, see #170250.
gn build: Port d090311aa7dfe60a69ab8a9e created a dependency on clangFrontend from clangDriver.
This broke the build of clang-offload-bundler because it only depends
on Driver (and only in debug builds, probably because the dependency was
dead code in clang-offload-bundler). Add the dependency to fix the build,
which also ports d090311aa7df from CMake.
[RISCV][NFC] Simplify the vector pipe names in SiFive7 sched model (#181268)
Instead of creating a `VA` for single vector pipe configuration (e.g.
X280) and `VA1` + `VA2` for dual vector pipes ones (e.g. X390), we could
have just use `VA1` in the former case to simplify the related name
aliases.
NFC.
[gn] port 5e2518f2cc54de7 (lldb highlight plugins)
The GN build doesn't have unittests for lldb, so nothing depends
on these new targets. But it at least gets the build building again.
[CIR] Add CIRGen support for static local variables with non-constant initializers
This adds CIRGen infrastructure for C++ function-local static variables
that require guarded initialization (Itanium C++ ABI).
Changes:
- Add ASTVarDeclAttr to carry VarDecl AST through the pipeline
- Add emitGuardedInit() to CIRGenCXXABI for guarded initialization
- Add emitCXXGuardedInit() to CIRGenFunction
- Replace NYI in addInitializerToStaticVarDecl() with ctor region emission
- Set static_local attribute on GlobalOp and GetGlobalOp
The global's ctor region contains the initialization code, which will be
lowered by LoweringPrepare to emit the actual guard variable pattern with
__cxa_guard_acquire/__cxa_guard_release calls.
[RISCV] Fix ordering of CHECK prefixes in some tests to mitigate UTC bug. NFCI (#181259)
This patch fixes the exact same problem as #173125 . Where certain order
of CHECK prefixes will somehow causing UTC to incorrectly (re)generate
surplus check lines and failed the tests.
[mlir][tensor]-Handle Dynamic Offset in BubbleUpSliceOpThroughCollapse (#178921)
This patch extends the `BubbleUpExtractSliceThroughCollapseShape`
pattern to handle cases where `tensor.extract_slice` has a dynamic
offset.
During tile and fuse transformations, it is common to encounter IR where
`tensor.extract_slice` operations appear after `tensor.collapse_shape`.
These patterns are used as cleanup transformations to canonicalize the
IR by bubbling up the slice operation before the reshape. This enables
further optimizations and simplifications downstream.
Previously, the pattern only handled:
1. Static offsets and sizes.
2. Dynamic sizes with a single non-unit expanded dimension.
This left a gap for additional common cases where we may have:
- Dynamic offsets with size == 1 (single element extraction).
- Size greater than 1 but the offset is computed dynamically.
[23 lines not shown]
[VPlan] Check scalar VF in removeRedundantCanonicalIVs.
When the plan has only a scalar VF, we never generate vectors for IVs,
so we can always perform the replacement.
[AMDGPU] Disable generic DAG combines at -O0 to preserve debuggability.
Disable generic DAG combines for AMDGPU at -O0 via disableGenericCombines()
to preserve instructions that users may want to set breakpoints
on during debugging.
Since power-of-2 division/remainder for types > i64 was dependent on
DAG combine optimizations, added shouldExpandPowerOf2DivRem()
to request IR-level expansion for these cases at -O0.
workflows/release-documentation: Add release environment (#181063)
This way we can limit access to the secrets to the main and release
branches.
This is a partial re-commit of b6ee085068972a41f3b2735a9f7e3ca48eab0f00
[CIR] Add CIRGen support for static local variables with non-constant initializers
This adds CIRGen infrastructure for C++ function-local static variables
that require guarded initialization (Itanium C++ ABI).
Changes:
- Add ASTVarDeclAttr to carry VarDecl AST through the pipeline
- Add emitGuardedInit() to CIRGenCXXABI for guarded initialization
- Add emitCXXGuardedInit() to CIRGenFunction
- Replace NYI in addInitializerToStaticVarDecl() with ctor region emission
- Set static_local attribute on GlobalOp and GetGlobalOp
The global's ctor region contains the initialization code, which will be
lowered by LoweringPrepare to emit the actual guard variable pattern with
__cxa_guard_acquire/__cxa_guard_release calls.
[clang] Mark `PrivateFieldNames.def` as textual header in module map (#181250)
When building with modules enabled (`LLVM_ENABLE_MODULES=ON`), the
module system attempts to transform the inclusion of
`PrivateFieldNames.def` into a module import. Since this `#include`
appears inside the `SerializationFormat` class definition (to generate
accessor methods via macros), the resulting module import violates C++
modules rules that imports must appear at file scope. The fix is to mark
`PrivateFieldNames.def` as a textual header in the `Clang_Analysis`
module to ensure the file is processed as a traditional textual include.
rdar://170257449