[MLIR][IRDL] Add C API for IRDL Variadicity attributes. (#171076)
This add the basic APIs to create VariadicityAttr and
VariadicityArrayAttr attributes from the C API. This is necessary for
C API users that want to create IRDL dialect declarations.
[mlir][acc] Fix build error for tiling API return value (#171546)
The build error looks like:
error: could not convert 'newLoops' from 'SmallVector<[...],3>' to
'SmallVector<[...],6>'
310 | return newLoops;
The fix is to remove the explicit size in the local declaration for the
SmallVector being returned.
[mlir][acc] Add loop tiling utilities for OpenACC (#171490)
Add utilities in OpenACCUtilsTiling.h/.cpp to support tiling
transformations on acc.loop operations:
- uncollapseLoops: Expand collapsed loops with multiple IVs into nested
loop structures when tile count exceeds collapse count
- tileACCLoops: Transform loop nests into tile and element loops based
on provided tile sizes, with automatic resolution of unknown tile sizes
(tile(*) represented as -1)
These utilities prepare for the ACCLoopTiling pass which handles the
OpenACC loop tile directive.
---------
Co-authored-by: Vijay Kandiah <vkandiah at nvidia.com>
[lldb] Fix capitalization in ambiguous command error (#171519)
We follow LLVM's style guide for diagnostics, which instructs to start
the first sentence with a lowercase letter, and finish the last sentence
without a period, if it would end in one otherwise.
[BOLT][DWARF] Improve reporting on missing DWOs (#171506)
List all required missing DWO files and report a summary with
recommendations on how to proceed.
[lldb][Wasm] Handle imports when parsing Wasm name sections (#170960)
LLDB can use the wasm name section to populate its symbol table and get
names for functions. However the index space used in the name section is
the "function index space" which includes imported as well as locally
defined functions.
[NFC][SPIRV] Fix breakage introduced by #170798 (#171513)
Adding support for i128 missed a few quirks of legalisation, which were
masked previously by early erroring out on bitwidth > 64. i128 uses
should be legal, we decide whether or not the resulting module is viable
(i.e. if the required extensions are present) in the ModuleAnalysis
pass.
[Matrix] Add a row\col major toggle in the clang driver (#167628)
fixes #167621
- define the new options in `Options.td` limit the naming to row-major
or column-major.
- In `ToolChains/Clang.cpp` limit the opt usage to only when
`-fenable-matrix` is used.
---------
Co-authored-by: Florian Hahn <flo at fhahn.com>
AMDGPU: Drop and upgrade llvm.amdgcn.atomic.csub/cond.sub to atomicrmw (#105553)
These both perform conditional subtraction, returning the minuend and
zero respectively, if the difference is negative.
[CIR] Add support for thread-local storage (TLS) (#168662)
This commit adds full support for thread-local storage variables in
ClangIR, including code generation, lowering to LLVM IR, and
comprehensive testing.
Changes include:
- Added CIR_TLSModel enum with 4 TLS models (GeneralDynamic,
LocalDynamic, InitialExec, LocalExec) to CIROps.td
- Extended GlobalOp with optional tls_model attribute
- Extended GetGlobalOp with thread_local unit attribute
- Added verification to ensure thread_local GetGlobalOp references
globals with tls_model set
- Implemented GetDefaultCIRTLSModel() and setTLSMode() in CIRGenModule
- Updated getAddrOfGlobalVar() to handle TLS access
- Removed MissingFeatures assertions for TLS operations
- Added lowering of GetGlobalOp with TLS to llvm.threadlocal.address
intrinsic
- Added lowering of GlobalOp with tls_model to LLVM thread_local globals
[6 lines not shown]
[CIR] Add Function Argument Demotion support (#170915)
This PR migrates the Function Argument Demotion feature from the
incubator repository to upstream. The feature handles K&R-style function
parameters that are promoted (e.g., short->int, float->double) and
demotes them back to their declared types.
## Changes
- Add emitArgumentDemotion helper function for type demotion
- Create emitFunctionProlog function to handle function prologue setup
(addresses existing TODO to move parameter handling logic)
- Move parameter handling logic into emitFunctionProlog
- Add test case kr-func-promote.c to verify the feature
Tested: All CIR tests pass (320/321, 99.69%). The one unsupported test
is an expected failure.
[ExtractAPI] Format typedef params correctly (#171516)
Typically, pointer types are formatted in a way where the identifier
comes right after the type definition without a space separating them,
e.g. `int *foo`, where the type is `int *` and the identifier is `foo`.
However, if a type alias to a pointer type is used, the emitted
declaration fragments are incorrect due to the missing space between the
type and identifier, like in the below example:
```
typedef int *T;
// The declaration fragment contains `Tbar` instead of `T bar`
void foo(T bar);
```
This patch checks if pointer types are aliased, and inserts the space
correctly if so.
rdar://132022003
[lldb] Remove CommandReturnObject::AppendRawError (#171517)
Remove `CommandReturnObject::AppendRawError` and replace its two uses
with `AppendError`, which correctly prefixes the message with `error:`.
The comment for the method is outdated and the prefixing is clearly
desired in both situations.