Skip to content

Commit b43515b

Browse files
committed
rebase
Created using spr 1.3.5-bogner
2 parents b8b2f67 + f2ff298 commit b43515b

File tree

270 files changed

+19796
-17737
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

270 files changed

+19796
-17737
lines changed

.ci/generate_test_report_lib.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ def plural(num_tests):
9292
]
9393
)
9494
elif failures:
95-
report.extend(["", "## Failed Tests", "(click to see output)"])
95+
report.extend(["", "## Failed Tests", "(click on a test name to see its output)"])
9696

9797
for testsuite_name, failures in failures.items():
9898
report.extend(["", f"### {testsuite_name}"])

.ci/generate_test_report_lib_test.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
# See https://llvm.org/LICENSE.txt for license information.
33
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
44

5+
# To run these tests:
6+
# python -m unittest generate_test_report_lib_test.py
7+
58
import unittest
69
from io import StringIO
710
from textwrap import dedent
@@ -150,7 +153,7 @@ def test_report_single_file_single_testsuite(self):
150153
* 2 tests failed
151154
152155
## Failed Tests
153-
(click to see output)
156+
(click on a test name to see its output)
154157
155158
### Bar
156159
<details>
@@ -182,7 +185,7 @@ def test_report_single_file_single_testsuite(self):
182185
* 2 tests failed
183186
184187
## Failed Tests
185-
(click to see output)
188+
(click on a test name to see its output)
186189
187190
### ABC
188191
<details>

clang-tools-extra/clang-doc/CMakeLists.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,4 +36,9 @@ clang_target_link_libraries(clangDoc
3636
clangToolingCore
3737
)
3838

39+
target_link_libraries(clangDoc
40+
PRIVATE
41+
clangDocSupport
42+
)
43+
3944
add_subdirectory(tool)

clang/docs/ReleaseNotes.rst

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,18 @@ C23 Feature Support
162162
- Fixed a bug where you could not cast a null pointer constant to type
163163
``nullptr_t``. Fixes #GH133644.
164164

165+
C11 Feature Support
166+
^^^^^^^^^^^^^^^^^^^
167+
- Implemented `WG14 N1285 <https://www.open-std.org/jtc1/sc22/wg14/www/docs/n1285.htm>`_
168+
which introduces the notion of objects with a temporary lifetime. When an
169+
expression resulting in an rvalue with structure or union type and that type
170+
contains a member of array type, the expression result is an automatic storage
171+
duration object with temporary lifetime which begins when the expression is
172+
evaluated and ends at the evaluation of the containing full expression. This
173+
functionality is also implemented for earlier C language modes because the
174+
C99 semantics will never be implemented (it would require dynamic allocations
175+
of memory which leaks, which users would not appreciate).
176+
165177
Non-comprehensive list of changes in this release
166178
-------------------------------------------------
167179

clang/include/clang/Basic/AddressSpaces.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ enum class LangAS : unsigned {
5959
// HLSL specific address spaces.
6060
hlsl_groupshared,
6161
hlsl_constant,
62+
hlsl_private,
6263

6364
// Wasm specific address spaces.
6465
wasm_funcref,

clang/include/clang/CIR/Dialect/Builder/CIRBaseBuilder.h

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,19 @@ class CIRBaseBuilderTy : public mlir::OpBuilder {
201201
return create<cir::PtrStrideOp>(loc, base.getType(), base, stride);
202202
}
203203

204+
//===--------------------------------------------------------------------===//
205+
// Call operators
206+
//===--------------------------------------------------------------------===//
207+
208+
cir::CallOp createCallOp(mlir::Location loc, mlir::SymbolRefAttr callee) {
209+
auto op = create<cir::CallOp>(loc, callee);
210+
return op;
211+
}
212+
213+
cir::CallOp createCallOp(mlir::Location loc, cir::FuncOp callee) {
214+
return createCallOp(loc, mlir::SymbolRefAttr::get(callee));
215+
}
216+
204217
//===--------------------------------------------------------------------===//
205218
// Cast/Conversion Operators
206219
//===--------------------------------------------------------------------===//

clang/include/clang/CIR/Dialect/IR/CIROps.td

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1342,6 +1342,48 @@ def FuncOp : CIR_Op<"func", [
13421342
let hasVerifier = 1;
13431343
}
13441344

1345+
//===----------------------------------------------------------------------===//
1346+
// CallOp
1347+
//===----------------------------------------------------------------------===//
1348+
1349+
class CIR_CallOpBase<string mnemonic, list<Trait> extra_traits = []>
1350+
: Op<CIR_Dialect, mnemonic,
1351+
!listconcat(extra_traits,
1352+
[DeclareOpInterfaceMethods<CIRCallOpInterface>,
1353+
DeclareOpInterfaceMethods<SymbolUserOpInterface>])> {
1354+
let hasCustomAssemblyFormat = 1;
1355+
let skipDefaultBuilders = 1;
1356+
let hasVerifier = 0;
1357+
1358+
// TODO(cir): for now cir.call is just a tiny shell of what it will become.
1359+
// More attributes, arguments, and properties will be added in the future as
1360+
// the upstreaming process moves on. The verifiers is also missing for now,
1361+
// will add in the future.
1362+
1363+
dag commonArgs = (ins FlatSymbolRefAttr:$callee);
1364+
}
1365+
1366+
def CallOp : CIR_CallOpBase<"call", [NoRegionArguments]> {
1367+
let summary = "call a function";
1368+
let description = [{
1369+
The `cir.call` operation represents a direct call to a function that is
1370+
within the same symbol scope as the call. The callee is encoded as a symbol
1371+
reference attribute named `callee`.
1372+
1373+
Example:
1374+
1375+
```mlir
1376+
%0 = cir.call @foo()
1377+
```
1378+
}];
1379+
1380+
let arguments = commonArgs;
1381+
1382+
let builders = [OpBuilder<(ins "mlir::SymbolRefAttr":$callee), [{
1383+
$_state.addAttribute("callee", callee);
1384+
}]>];
1385+
}
1386+
13451387
//===----------------------------------------------------------------------===//
13461388
// UnreachableOp
13471389
//===----------------------------------------------------------------------===//

clang/include/clang/CIR/Interfaces/CIROpInterfaces.td

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,17 @@
1515

1616
include "mlir/IR/OpBase.td"
1717
include "mlir/IR/SymbolInterfaces.td"
18+
include "mlir/Interfaces/CallInterfaces.td"
1819

1920
let cppNamespace = "::cir" in {
21+
// The CIRCallOpInterface must be used instead of CallOpInterface when looking
22+
// at arguments and other bits of CallOp. This creates a level of abstraction
23+
// that's useful for handling indirect calls and other details.
24+
def CIRCallOpInterface : OpInterface<"CIRCallOpInterface", []> {
25+
// Currently we don't have any methods defined in CIRCallOpInterface. We'll
26+
// add more methods as the upstreaming proceeds.
27+
}
28+
2029
def CIRGlobalValueInterface
2130
: OpInterface<"CIRGlobalValueInterface", [Symbol]> {
2231

clang/include/clang/CIR/MissingFeatures.h

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,24 @@ struct MissingFeatures {
7272
static bool opFuncLinkage() { return false; }
7373
static bool opFuncVisibility() { return false; }
7474

75+
// CallOp handling
76+
static bool opCallBuiltinFunc() { return false; }
77+
static bool opCallPseudoDtor() { return false; }
78+
static bool opCallArgs() { return false; }
79+
static bool opCallReturn() { return false; }
80+
static bool opCallArgEvaluationOrder() { return false; }
81+
static bool opCallCallConv() { return false; }
82+
static bool opCallSideEffect() { return false; }
83+
static bool opCallChainCall() { return false; }
84+
static bool opCallNoPrototypeFunc() { return false; }
85+
static bool opCallMustTail() { return false; }
86+
static bool opCallIndirect() { return false; }
87+
static bool opCallVirtual() { return false; }
88+
static bool opCallInAlloca() { return false; }
89+
static bool opCallAttrs() { return false; }
90+
static bool opCallSurroundingTry() { return false; }
91+
static bool opCallASTAttr() { return false; }
92+
7593
// ScopeOp handling
7694
static bool opScopeCleanupRegion() { return false; }
7795

@@ -90,7 +108,10 @@ struct MissingFeatures {
90108
static bool lowerModeOptLevel() { return false; }
91109
static bool opTBAA() { return false; }
92110
static bool objCLifetime() { return false; }
111+
static bool objCBlocks() { return false; }
93112
static bool emitNullabilityCheck() { return false; }
113+
static bool emitLValueAlignmentAssumption() { return false; }
114+
static bool emitLifetimeMarkers() { return false; }
94115
static bool astVarDeclInterface() { return false; }
95116
static bool stackSaveOp() { return false; }
96117
static bool aggValueSlot() { return false; }
@@ -113,6 +134,8 @@ struct MissingFeatures {
113134
static bool incrementProfileCounter() { return false; }
114135
static bool insertBuiltinUnpredictable() { return false; }
115136
static bool objCGC() { return false; }
137+
static bool weakRefReference() { return false; }
138+
static bool hip() { return false; }
116139

117140
// Missing types
118141
static bool dataMemberType() { return false; }
@@ -132,6 +155,7 @@ struct MissingFeatures {
132155
static bool complexImagOp() { return false; }
133156
static bool complexRealOp() { return false; }
134157
static bool ifOp() { return false; }
158+
static bool invokeOp() { return false; }
135159
static bool labelOp() { return false; }
136160
static bool ptrDiffOp() { return false; }
137161
static bool ptrStrideOp() { return false; }

clang/include/clang/Sema/Sema.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4328,6 +4328,7 @@ class Sema final : public SemaBase {
43284328
NamedDecl *findLocallyScopedExternCDecl(DeclarationName Name);
43294329

43304330
void deduceOpenCLAddressSpace(ValueDecl *decl);
4331+
void deduceHLSLAddressSpace(VarDecl *decl);
43314332

43324333
/// Adjust the \c DeclContext for a function or variable that might be a
43334334
/// function-local external declaration.

0 commit comments

Comments
 (0)