Skip to content

Commit 6fce47f

Browse files
authored
Merge branch 'main' into costmodel-shuffle-select
2 parents 8548a40 + 6b9e6f0 commit 6fce47f

File tree

148 files changed

+2962
-921
lines changed

Some content is hidden

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

148 files changed

+2962
-921
lines changed

clang-tools-extra/clang-doc/JSONGenerator.cpp

Lines changed: 99 additions & 161 deletions
Large diffs are not rendered by default.

clang-tools-extra/clangd/AST.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -440,7 +440,7 @@ QualType declaredType(const TypeDecl *D) {
440440
if (const auto *Args = CTSD->getTemplateArgsAsWritten())
441441
return Context.getTemplateSpecializationType(
442442
TemplateName(CTSD->getSpecializedTemplate()), Args->arguments(),
443-
/*CanonicalArgs=*/std::nullopt);
443+
/*CanonicalArgs=*/{});
444444
return Context.getTypeDeclType(D);
445445
}
446446

clang/docs/ReleaseNotes.rst

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,9 +66,10 @@ C++ Specific Potentially Breaking Changes
6666
- A workaround for libstdc++4.7 has been removed. Note that 4.8.3 remains the oldest
6767
supported libstdc++ version.
6868
- Added ``!nonnull/!align`` metadata to load of references for better codegen.
69-
- Checking for int->enum conversions in constant expressions is more strict;
70-
in particular, ``const E x = (E)-1;`` is not treated as a constant if it's
71-
out of range. This impacts old versions of Boost. (#GH143034)
69+
- Checking for integer to enum conversions in constant expressions is more
70+
strict; in particular, ``const E x = (E)-1;`` is not treated as a constant
71+
if it's out of range. The Boost numeric_conversion library is impacted by
72+
this; it was fixed in Boost 1.81. (#GH143034)
7273

7374
ABI Changes in This Version
7475
---------------------------

clang/include/clang/Basic/OpenACCKinds.h

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -634,16 +634,19 @@ inline llvm::raw_ostream &operator<<(llvm::raw_ostream &Out,
634634
}
635635

636636
// Represents the 'modifier' of a 'modifier-list', as applied to copy, copyin,
637-
// copyout, and create. Implemented as a 'bitmask'
637+
// copyout, and create. Implemented as a 'bitmask'.
638+
// Note: This attempts to synchronize with mlir::acc::DataClauseModifier,
639+
// however has to store `Always` separately(whereas MLIR has it as AlwaysIn &
640+
// AlwaysOut). However, we keep them in sync so that we can cast between them.
638641
enum class OpenACCModifierKind : uint8_t {
639642
Invalid = 0,
640-
Always = 1 << 0,
641-
AlwaysIn = 1 << 1,
642-
AlwaysOut = 1 << 2,
643-
Readonly = 1 << 3,
644-
Zero = 1 << 4,
645-
Capture = 1 << 5,
646-
LLVM_MARK_AS_BITMASK_ENUM(Capture)
643+
Zero = 1 << 0,
644+
Readonly = 1 << 1,
645+
AlwaysIn = 1 << 2,
646+
AlwaysOut = 1 << 3,
647+
Capture = 1 << 4,
648+
Always = 1 << 5,
649+
LLVM_MARK_AS_BITMASK_ENUM(Always)
647650
};
648651

649652
inline bool isOpenACCModifierBitSet(OpenACCModifierKind List,

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

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2455,6 +2455,31 @@ def ComplexImagOp : CIR_Op<"complex.imag", [Pure]> {
24552455
let hasFolder = 1;
24562456
}
24572457

2458+
//===----------------------------------------------------------------------===//
2459+
// ComplexEqualOp
2460+
//===----------------------------------------------------------------------===//
2461+
2462+
def ComplexEqualOp : CIR_Op<"complex.eq", [Pure, SameTypeOperands]> {
2463+
2464+
let summary = "Computes whether two complex values are equal";
2465+
let description = [{
2466+
The `complex.equal` op takes two complex numbers and returns whether
2467+
they are equal.
2468+
2469+
```mlir
2470+
%r = cir.complex.eq %a, %b : !cir.complex<!cir.float>
2471+
```
2472+
}];
2473+
2474+
let results = (outs CIR_BoolType:$result);
2475+
let arguments = (ins CIR_ComplexType:$lhs, CIR_ComplexType:$rhs);
2476+
2477+
let assemblyFormat = [{
2478+
$lhs `,` $rhs
2479+
`:` qualified(type($lhs)) attr-dict
2480+
}];
2481+
}
2482+
24582483
//===----------------------------------------------------------------------===//
24592484
// Assume Operations
24602485
//===----------------------------------------------------------------------===//

clang/include/clang/Driver/Driver.h

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -367,10 +367,9 @@ class Driver {
367367
/// stored in it, and will clean them up when torn down.
368368
mutable llvm::StringMap<std::unique_ptr<ToolChain>> ToolChains;
369369

370-
/// Cache of known offloading architectures for the ToolChain already derived.
371-
/// This should only be modified when we first initialize the offloading
372-
/// toolchains.
373-
llvm::DenseMap<const ToolChain *, llvm::DenseSet<llvm::StringRef>> KnownArchs;
370+
/// The associated offloading architectures with each toolchain.
371+
llvm::DenseMap<const ToolChain *, llvm::SmallVector<llvm::StringRef>>
372+
OffloadArchs;
374373

375374
private:
376375
/// TranslateInputArgs - Create a new derived argument list from the input
@@ -535,11 +534,11 @@ class Driver {
535534

536535
/// Returns the set of bound architectures active for this offload kind.
537536
/// If there are no bound architctures we return a set containing only the
538-
/// empty string. The \p SuppressError option is used to suppress errors.
539-
llvm::DenseSet<StringRef>
537+
/// empty string.
538+
llvm::SmallVector<StringRef>
540539
getOffloadArchs(Compilation &C, const llvm::opt::DerivedArgList &Args,
541540
Action::OffloadKind Kind, const ToolChain *TC,
542-
bool SuppressError = false) const;
541+
bool SpecificToolchain = true) const;
543542

544543
/// Check that the file referenced by Value exists. If it doesn't,
545544
/// issue a diagnostic and return false.

clang/include/clang/Lex/LexHLSLRootSignature.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,10 @@ operator<<(const DiagnosticBuilder &DB, const RootSignatureToken::Kind Kind) {
5050
case RootSignatureToken::Kind::X: \
5151
DB << SPELLING; \
5252
break;
53+
#define PUNCTUATOR(X, SPELLING) \
54+
case RootSignatureToken::Kind::pu_##X: \
55+
DB << #SPELLING; \
56+
break;
5357
#include "clang/Lex/HLSLRootSignatureTokenKinds.def"
5458
}
5559
return DB;

clang/lib/AST/ExprCXX.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1208,7 +1208,7 @@ CXXConstructExpr::CXXConstructExpr(
12081208

12091209
Stmt **TrailingArgs = getTrailingArgs();
12101210
llvm::copy(Args, TrailingArgs);
1211-
assert(llvm::all_of(Args, [](const Stmt *Arg) { return Arg != nullptr; }));
1211+
assert(!llvm::is_contained(Args, nullptr));
12121212

12131213
// CXXTemporaryObjectExpr does this itself after setting its TypeSourceInfo.
12141214
if (SC == CXXConstructExprClass)

clang/lib/AST/StmtOpenACC.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ OpenACCWaitConstruct *OpenACCWaitConstruct::Create(
209209
ArrayRef<Expr *> QueueIdExprs, SourceLocation RParenLoc, SourceLocation End,
210210
ArrayRef<const OpenACCClause *> Clauses) {
211211

212-
assert(llvm::all_of(QueueIdExprs, [](Expr *E) { return E != nullptr; }));
212+
assert(!llvm::is_contained(QueueIdExprs, nullptr));
213213

214214
void *Mem = C.Allocate(
215215
OpenACCWaitConstruct::totalSizeToAlloc<Expr *, OpenACCClause *>(

clang/lib/ASTMatchers/Dynamic/Marshallers.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1060,7 +1060,7 @@ makeMatcherAutoMarshall(ReturnType (*Func)(), StringRef MatcherName) {
10601060
BuildReturnTypeVector<ReturnType>::build(RetTypes);
10611061
return std::make_unique<FixedArgCountMatcherDescriptor>(
10621062
matcherMarshall0<ReturnType>, reinterpret_cast<void (*)()>(Func),
1063-
MatcherName, RetTypes, std::nullopt);
1063+
MatcherName, RetTypes, ArrayRef<ArgKind>());
10641064
}
10651065

10661066
/// 1-arg overload

0 commit comments

Comments
 (0)