Skip to content

Commit f7da4b9

Browse files
authored
Merge branch 'llvm:main' into proc_distance
2 parents 9c08e19 + 33e5d01 commit f7da4b9

File tree

718 files changed

+40745
-91547
lines changed

Some content is hidden

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

718 files changed

+40745
-91547
lines changed

bolt/lib/Target/RISCV/RISCVMCPlusBuilder.cpp

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ class RISCVMCPlusBuilder : public MCPlusBuilder {
244244
Inst.clear();
245245
Inst.addOperand(MCOperand::createExpr(RISCVMCExpr::create(
246246
MCSymbolRefExpr::create(Target, MCSymbolRefExpr::VK_None, *Ctx),
247-
RISCVMCExpr::VK_RISCV_CALL, *Ctx)));
247+
RISCVMCExpr::VK_CALL, *Ctx)));
248248
}
249249

250250
void createCall(MCInst &Inst, const MCSymbol *Target,
@@ -434,19 +434,19 @@ class RISCVMCPlusBuilder : public MCPlusBuilder {
434434
case ELF::R_RISCV_TLS_GOT_HI20:
435435
// The GOT is reused so no need to create GOT relocations
436436
case ELF::R_RISCV_PCREL_HI20:
437-
return RISCVMCExpr::create(Expr, RISCVMCExpr::VK_RISCV_PCREL_HI, Ctx);
437+
return RISCVMCExpr::create(Expr, RISCVMCExpr::VK_PCREL_HI, Ctx);
438438
case ELF::R_RISCV_PCREL_LO12_I:
439439
case ELF::R_RISCV_PCREL_LO12_S:
440-
return RISCVMCExpr::create(Expr, RISCVMCExpr::VK_RISCV_PCREL_LO, Ctx);
440+
return RISCVMCExpr::create(Expr, RISCVMCExpr::VK_PCREL_LO, Ctx);
441441
case ELF::R_RISCV_HI20:
442-
return RISCVMCExpr::create(Expr, RISCVMCExpr::VK_RISCV_HI, Ctx);
442+
return RISCVMCExpr::create(Expr, RISCVMCExpr::VK_HI, Ctx);
443443
case ELF::R_RISCV_LO12_I:
444444
case ELF::R_RISCV_LO12_S:
445-
return RISCVMCExpr::create(Expr, RISCVMCExpr::VK_RISCV_LO, Ctx);
445+
return RISCVMCExpr::create(Expr, RISCVMCExpr::VK_LO, Ctx);
446446
case ELF::R_RISCV_CALL:
447-
return RISCVMCExpr::create(Expr, RISCVMCExpr::VK_RISCV_CALL, Ctx);
447+
return RISCVMCExpr::create(Expr, RISCVMCExpr::VK_CALL, Ctx);
448448
case ELF::R_RISCV_CALL_PLT:
449-
return RISCVMCExpr::create(Expr, RISCVMCExpr::VK_RISCV_CALL_PLT, Ctx);
449+
return RISCVMCExpr::create(Expr, RISCVMCExpr::VK_CALL_PLT, Ctx);
450450
}
451451
}
452452

@@ -471,8 +471,8 @@ class RISCVMCPlusBuilder : public MCPlusBuilder {
471471
switch (cast<RISCVMCExpr>(ImmExpr)->getKind()) {
472472
default:
473473
return false;
474-
case RISCVMCExpr::VK_RISCV_CALL:
475-
case RISCVMCExpr::VK_RISCV_CALL_PLT:
474+
case RISCVMCExpr::VK_CALL:
475+
case RISCVMCExpr::VK_CALL_PLT:
476476
return true;
477477
}
478478
}

clang/docs/ClangOffloadBundler.rst

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -266,15 +266,14 @@ without differentiation based on offload kind.
266266
The target triple of the code object. See `Target Triple
267267
<https://clang.llvm.org/docs/CrossCompilation.html#target-triple>`_.
268268

269-
The bundler accepts target triples with or without the optional environment
270-
field:
269+
LLVM target triples can be with or without the optional environment field:
271270

272271
``<arch><sub>-<vendor>-<sys>``, or
273272
``<arch><sub>-<vendor>-<sys>-<env>``
274273

275-
However, in order to standardize outputs for tools that consume bitcode
276-
bundles, bundles written by the bundler internally use only the 4-field
277-
target triple:
274+
However, in order to standardize outputs for tools that consume bitcode bundles
275+
and to parse target ID containing dashes, the bundler only accepts target
276+
triples in the 4-field format:
278277

279278
``<arch><sub>-<vendor>-<sys>-<env>``
280279

@@ -543,4 +542,4 @@ The compressed offload bundle begins with a header followed by the compressed bi
543542
- **Compressed Data**:
544543
The actual compressed binary data follows the header. Its size can be inferred from the total size of the file minus the header size.
545544

546-
> **Note**: Version 3 of the format is under development. It uses 64-bit fields for Total File Size and Uncompressed Binary Size to support files larger than 4GB. To experiment with version 3, set the environment variable `COMPRESSED_BUNDLE_FORMAT_VERSION=3`. This support is experimental and not recommended for production use.
545+
> **Note**: Version 3 of the format is under development. It uses 64-bit fields for Total File Size and Uncompressed Binary Size to support files larger than 4GB. To experiment with version 3, set the environment variable `COMPRESSED_BUNDLE_FORMAT_VERSION=3`. This support is experimental and not recommended for production use.

clang/docs/LanguageExtensions.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1652,6 +1652,7 @@ Designated initializers (N494) C
16521652
Array & element qualification (N2607) C23 C89
16531653
Attributes (N2335) C23 C89
16541654
``#embed`` (N3017) C23 C89, C++
1655+
Octal literals prefixed with ``0o`` or ``0O`` C2y C89, C++
16551656
============================================= ================================ ============= =============
16561657

16571658
Builtin type aliases

clang/docs/ReleaseNotes.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,13 @@ C2y Feature Support
129129
- Implemented `WG14 N3411 <https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3411.pdf>`_
130130
which allows a source file to not end with a newline character. This is still
131131
reported as a conforming extension in earlier language modes.
132+
- Implemented `WG14 N3353 <https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3353.htm>_`
133+
which adds the new ``0o`` and ``0O`` ocal literal prefixes and deprecates
134+
octal literals other than ``0`` which do not start with the new prefix. This
135+
feature is exposed in earlier language modes and in C++ as an extension. The
136+
paper also introduced octal and hexadecimal delimited escape sequences (e.g.,
137+
``"\x{12}\o{12}"``) which are also supported as an extension in older C
138+
language modes.
132139

133140
C23 Feature Support
134141
^^^^^^^^^^^^^^^^^^^

clang/include/clang/Analysis/ProgramPoint.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,9 @@ class ProgramPointTag {
3939
public:
4040
ProgramPointTag(void *tagKind = nullptr) : TagKind(tagKind) {}
4141
virtual ~ProgramPointTag();
42+
43+
/// The description of this program point which will be displayed when the
44+
/// ExplodedGraph is dumped in DOT format for debugging.
4245
virtual StringRef getTagDescription() const = 0;
4346

4447
/// Used to implement 'isKind' in subclasses.

clang/include/clang/Basic/DiagnosticGroups.td

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@ def EnumCompare : DiagGroup<"enum-compare", [EnumCompareSwitch,
9292
def DeprecatedAnonEnumEnumConversion : DiagGroup<"deprecated-anon-enum-enum-conversion">;
9393
def DeprecatedEnumEnumConversion : DiagGroup<"deprecated-enum-enum-conversion">;
9494
def DeprecatedEnumFloatConversion : DiagGroup<"deprecated-enum-float-conversion">;
95+
def DeprecatedOctalLiterals : DiagGroup<"deprecated-octal-literals">;
9596
def AnonEnumEnumConversion : DiagGroup<"anon-enum-enum-conversion",
9697
[DeprecatedAnonEnumEnumConversion]>;
9798
def EnumEnumConversion : DiagGroup<"enum-enum-conversion",
@@ -235,7 +236,8 @@ def Deprecated : DiagGroup<"deprecated", [DeprecatedAnonEnumEnumConversion,
235236
DeprecatedVolatile,
236237
DeprecatedWritableStr,
237238
DeprecatedRedundantConstexprStaticDef,
238-
DeprecatedMissingCommaVariadicParam
239+
DeprecatedMissingCommaVariadicParam,
240+
DeprecatedOctalLiterals
239241
]>,
240242
DiagCategory<"Deprecations">;
241243

clang/include/clang/Basic/DiagnosticLexKinds.td

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -148,14 +148,14 @@ def ext_mathematical_notation : ExtWarn<
148148
InGroup<DiagGroup<"mathematical-notation-identifier-extension">>;
149149

150150
def ext_delimited_escape_sequence : Extension<
151-
"%select{delimited|named}0 escape sequences are a "
152-
"%select{Clang|C++23}1 extension">,
153-
InGroup<DiagGroup<"delimited-escape-sequence-extension">>;
154-
151+
"%select{delimited|named}0 escape sequences are a %select{C++23|C2y|Clang}1 "
152+
"extension">, InGroup<DiagGroup<"delimited-escape-sequence-extension">>;
155153
def warn_cxx23_delimited_escape_sequence : Warning<
156-
"%select{delimited|named}0 escape sequences are "
157-
"incompatible with C++ standards before C++23">,
158-
InGroup<CXXPre23Compat>, DefaultIgnore;
154+
"%select{delimited|named}0 escape sequences are incompatible with C++ "
155+
"standards before C++23">, InGroup<CXXPre23Compat>, DefaultIgnore;
156+
def warn_c2y_delimited_escape_sequence : Warning<
157+
"delimited escape sequences are incompatible with C standards before C2y">,
158+
InGroup<CPre2yCompat>, DefaultIgnore;
159159

160160
def err_delimited_escape_empty : Error<
161161
"delimited escape sequence cannot be empty">;
@@ -256,6 +256,17 @@ def warn_cxx17_hex_literal : Warning<
256256
"hexadecimal floating literals are incompatible with "
257257
"C++ standards before C++17">,
258258
InGroup<CXXPre17CompatPedantic>, DefaultIgnore;
259+
def ext_octal_literal : Extension<
260+
"octal integer literals are a C2y extension">, InGroup<C2y>;
261+
def ext_cpp_octal_literal : Extension<
262+
"octal integer literals are a Clang extension">,
263+
InGroup<DiagGroup<"octal-prefix-extension">>;
264+
def warn_c2y_compat_octal_literal : Warning<
265+
"octal integer literals are incompatible with standards before C2y">,
266+
InGroup<CPre2yCompat>, DefaultIgnore;
267+
def warn_unprefixed_octal_deprecated : Warning<
268+
"octal literals without a '0o' prefix are deprecated">,
269+
InGroup<DeprecatedOctalLiterals>;
259270
def ext_binary_literal : Extension<
260271
"binary integer literals are a C23 extension">, InGroup<C23>;
261272
def warn_c23_compat_binary_literal : Warning<

clang/include/clang/Basic/DiagnosticSemaKinds.td

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7639,9 +7639,13 @@ def warn_arith_conv_mixed_enum_types_cxx20 : Warning<
76397639
"%sub{select_arith_conv_kind}0 "
76407640
"different enumeration types%diff{ ($ and $)|}1,2 is deprecated">,
76417641
InGroup<DeprecatedEnumEnumConversion>;
7642-
def err_conv_mixed_enum_types_cxx26 : Error<
7642+
7643+
def err_conv_mixed_enum_types: Error <
76437644
"invalid %sub{select_arith_conv_kind}0 "
76447645
"different enumeration types%diff{ ($ and $)|}1,2">;
7646+
def warn_conv_mixed_enum_types_cxx26 : Warning <
7647+
err_conv_mixed_enum_types.Summary>,
7648+
InGroup<EnumEnumConversion>, DefaultError;
76457649

76467650
def warn_arith_conv_mixed_anon_enum_types : Warning<
76477651
warn_arith_conv_mixed_enum_types.Summary>,

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

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -468,6 +468,54 @@ def BrOp : CIR_Op<"br",
468468
}];
469469
}
470470

471+
//===----------------------------------------------------------------------===//
472+
// UnaryOp
473+
//===----------------------------------------------------------------------===//
474+
475+
def UnaryOpKind_Inc : I32EnumAttrCase<"Inc", 1, "inc">;
476+
def UnaryOpKind_Dec : I32EnumAttrCase<"Dec", 2, "dec">;
477+
def UnaryOpKind_Plus : I32EnumAttrCase<"Plus", 3, "plus">;
478+
def UnaryOpKind_Minus : I32EnumAttrCase<"Minus", 4, "minus">;
479+
def UnaryOpKind_Not : I32EnumAttrCase<"Not", 5, "not">;
480+
481+
def UnaryOpKind : I32EnumAttr<
482+
"UnaryOpKind",
483+
"unary operation kind",
484+
[UnaryOpKind_Inc,
485+
UnaryOpKind_Dec,
486+
UnaryOpKind_Plus,
487+
UnaryOpKind_Minus,
488+
UnaryOpKind_Not,
489+
]> {
490+
let cppNamespace = "::cir";
491+
}
492+
493+
def UnaryOp : CIR_Op<"unary", [Pure, SameOperandsAndResultType]> {
494+
let summary = "Unary operations";
495+
let description = [{
496+
`cir.unary` performs the unary operation according to
497+
the specified opcode kind: [inc, dec, plus, minus, not].
498+
499+
It requires one input operand and has one result, both types
500+
should be the same.
501+
502+
```mlir
503+
%7 = cir.unary(inc, %1) : i32 -> i32
504+
%8 = cir.unary(dec, %2) : i32 -> i32
505+
```
506+
}];
507+
508+
let results = (outs CIR_AnyType:$result);
509+
let arguments = (ins Arg<UnaryOpKind, "unary op kind">:$kind, Arg<CIR_AnyType>:$input);
510+
511+
let assemblyFormat = [{
512+
`(` $kind `,` $input `)` `:` type($input) `,` type($result) attr-dict
513+
}];
514+
515+
let hasVerifier = 1;
516+
let hasFolder = 1;
517+
}
518+
471519
//===----------------------------------------------------------------------===//
472520
// GlobalOp
473521
//===----------------------------------------------------------------------===//

clang/include/clang/CIR/MissingFeatures.h

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

75+
// Unary operator handling
76+
static bool opUnarySignedOverflow() { return false; }
77+
static bool opUnaryPromotionType() { return false; }
78+
7579
// Misc
7680
static bool scalarConversionOpts() { return false; }
7781
static bool tryEmitAsConstant() { return false; }
@@ -86,6 +90,11 @@ struct MissingFeatures {
8690
static bool aggValueSlot() { return false; }
8791

8892
static bool unsizedTypes() { return false; }
93+
static bool sanitizers() { return false; }
94+
static bool CGFPOptionsRAII() { return false; }
95+
96+
// Missing types
97+
static bool vectorType() { return false; }
8998
};
9099

91100
} // namespace cir

0 commit comments

Comments
 (0)