Skip to content

Commit d88c086

Browse files
author
Georgios Rokos
committed
Merge from '"main"' to '"sycl-web"' (2 commits)
CONFLICT (content): Merge conflict in clang/test/CodeGenSYCL/unique_stable_name.cpp CONFLICT (content): Merge conflict in clang/test/CodeGenSYCL/address-space-mangling.cpp
2 parents ebc3864 + 8ca4b3e commit d88c086

File tree

1,275 files changed

+55108
-52583
lines changed

Some content is hidden

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

1,275 files changed

+55108
-52583
lines changed

clang/docs/ReleaseNotes.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,12 @@ X86 Support in Clang
177177

178178
- Support for ``AVX512-FP16`` instructions has been added.
179179

180+
Arm and AArch64 Support in Clang
181+
--------------------------------
182+
183+
- Support has been added for the following processors (command-line identifiers in parentheses):
184+
- Arm Cortex-A510 (``cortex-a510``)
185+
180186
Internal API Changes
181187
--------------------
182188

clang/include/clang/ASTMatchers/ASTMatchersInternal.h

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2249,11 +2249,7 @@ class HasAnyOperatorNameMatcher : public SingleNodeMatcherInterface<T> {
22492249

22502250
bool matchesNode(const T &Node) const override {
22512251
Optional<StringRef> OptOpName = getOpName(Node);
2252-
if (!OptOpName)
2253-
return false;
2254-
return llvm::any_of(Names, [OpName = *OptOpName](const std::string &Name) {
2255-
return Name == OpName;
2256-
});
2252+
return OptOpName && llvm::is_contained(Names, *OptOpName);
22572253
}
22582254

22592255
private:

clang/include/clang/Basic/BuiltinsWebAssembly.def

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,5 +167,10 @@ TARGET_BUILTIN(__builtin_wasm_fms_f32x4, "V4fV4fV4fV4f", "nc", "relaxed-simd")
167167
TARGET_BUILTIN(__builtin_wasm_fma_f64x2, "V2dV2dV2dV2d", "nc", "relaxed-simd")
168168
TARGET_BUILTIN(__builtin_wasm_fms_f64x2, "V2dV2dV2dV2d", "nc", "relaxed-simd")
169169

170+
TARGET_BUILTIN(__builtin_wasm_laneselect_i8x16, "V16ScV16ScV16ScV16Sc", "nc", "relaxed-simd")
171+
TARGET_BUILTIN(__builtin_wasm_laneselect_i16x8, "V8sV8sV8sV8s", "nc", "relaxed-simd")
172+
TARGET_BUILTIN(__builtin_wasm_laneselect_i32x4, "V4iV4iV4iV4i", "nc", "relaxed-simd")
173+
TARGET_BUILTIN(__builtin_wasm_laneselect_i64x2, "V2LLiV2LLiV2LLiV2LLi", "nc", "relaxed-simd")
174+
170175
#undef BUILTIN
171176
#undef TARGET_BUILTIN

clang/include/clang/Basic/CodeGenOptions.def

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ CODEGENOPT(DisableLifetimeMarkers, 1, 0) ///< Don't emit any lifetime markers
6464
CODEGENOPT(DisableO0ImplyOptNone , 1, 0) ///< Don't annonate function with optnone at O0
6565
CODEGENOPT(ExperimentalStrictFloatingPoint, 1, 0) ///< Enables the new, experimental
6666
///< strict floating point.
67-
CODEGENOPT(EnableNoundefAttrs, 1, 0) ///< Enable emitting `noundef` attributes on IR call arguments and return values
67+
CODEGENOPT(DisableNoundefAttrs, 1, 0) ///< Disable emitting `noundef` attributes on IR call arguments and return values
6868
CODEGENOPT(LegacyPassManager, 1, 0) ///< Use the legacy pass manager.
6969
CODEGENOPT(DebugPassManager, 1, 0) ///< Prints debug information for the new
7070
///< pass manager.

clang/include/clang/Driver/Options.td

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5438,9 +5438,9 @@ def disable_free : Flag<["-"], "disable-free">,
54385438
def clear_ast_before_backend : Flag<["-"], "clear-ast-before-backend">,
54395439
HelpText<"Clear the Clang AST before running backend code generation">,
54405440
MarshallingInfoFlag<CodeGenOpts<"ClearASTBeforeBackend">>;
5441-
def enable_noundef_analysis : Flag<["-"], "enable-noundef-analysis">, Group<f_Group>,
5442-
HelpText<"Enable analyzing function argument and return types for mandatory definedness">,
5443-
MarshallingInfoFlag<CodeGenOpts<"EnableNoundefAttrs">>;
5441+
def disable_noundef_analysis : Flag<["-"], "disable-noundef-analysis">, Group<f_Group>,
5442+
HelpText<"Disable analyzing function argument and return types for mandatory definedness">,
5443+
MarshallingInfoFlag<CodeGenOpts<"DisableNoundefAttrs">>;
54445444
def discard_value_names : Flag<["-"], "discard-value-names">,
54455445
HelpText<"Discard value names in LLVM IR">,
54465446
MarshallingInfoFlag<CodeGenOpts<"DiscardValueNames">>;

clang/lib/Basic/Targets/OSTargets.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -743,7 +743,6 @@ class AIXTargetInfo : public OSTargetInfo<Target> {
743743

744744
// AIX sets FLT_EVAL_METHOD to be 1.
745745
unsigned getFloatEvalMethod() const override { return 1; }
746-
bool hasInt128Type() const override { return false; }
747746

748747
bool defaultsToAIXPowerAlignment() const override { return true; }
749748
};

clang/lib/CodeGen/CGBuiltin.cpp

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18314,6 +18314,17 @@ Value *CodeGenFunction::EmitWebAssemblyBuiltinExpr(unsigned BuiltinID,
1831418314
Function *Callee = CGM.getIntrinsic(IntNo, A->getType());
1831518315
return Builder.CreateCall(Callee, {A, B, C});
1831618316
}
18317+
case WebAssembly::BI__builtin_wasm_laneselect_i8x16:
18318+
case WebAssembly::BI__builtin_wasm_laneselect_i16x8:
18319+
case WebAssembly::BI__builtin_wasm_laneselect_i32x4:
18320+
case WebAssembly::BI__builtin_wasm_laneselect_i64x2: {
18321+
Value *A = EmitScalarExpr(E->getArg(0));
18322+
Value *B = EmitScalarExpr(E->getArg(1));
18323+
Value *C = EmitScalarExpr(E->getArg(2));
18324+
Function *Callee =
18325+
CGM.getIntrinsic(Intrinsic::wasm_laneselect, A->getType());
18326+
return Builder.CreateCall(Callee, {A, B, C});
18327+
}
1831718328
default:
1831818329
return nullptr;
1831918330
}

clang/lib/CodeGen/CGCall.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2262,7 +2262,7 @@ void CodeGenModule::ConstructAttributeList(
22622262
getLangOpts().Sanitize.has(SanitizerKind::Return);
22632263

22642264
// Determine if the return type could be partially undef
2265-
if (CodeGenOpts.EnableNoundefAttrs && HasStrictReturn) {
2265+
if (!CodeGenOpts.DisableNoundefAttrs && HasStrictReturn) {
22662266
if (!RetTy->isVoidType() && RetAI.getKind() != ABIArgInfo::Indirect &&
22672267
DetermineNoUndef(RetTy, getTypes(), DL, RetAI))
22682268
RetAttrs.addAttribute(llvm::Attribute::NoUndef);
@@ -2397,7 +2397,7 @@ void CodeGenModule::ConstructAttributeList(
23972397

23982398
// Decide whether the argument we're handling could be partially undef
23992399
bool ArgNoUndef = DetermineNoUndef(ParamType, getTypes(), DL, AI);
2400-
if (CodeGenOpts.EnableNoundefAttrs && ArgNoUndef)
2400+
if (!CodeGenOpts.DisableNoundefAttrs && ArgNoUndef)
24012401
Attrs.addAttribute(llvm::Attribute::NoUndef);
24022402

24032403
// 'restrict' -> 'noalias' is done in EmitFunctionProlog when we

clang/lib/CodeGen/CGOpenMPRuntime.cpp

Lines changed: 9 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -8580,10 +8580,8 @@ class MappableExprsHandler {
85808580
if (!C)
85818581
continue;
85828582
MapKind Kind = Other;
8583-
if (!C->getMapTypeModifiers().empty() &&
8584-
llvm::any_of(C->getMapTypeModifiers(), [](OpenMPMapModifierKind K) {
8585-
return K == OMPC_MAP_MODIFIER_present;
8586-
}))
8583+
if (llvm::is_contained(C->getMapTypeModifiers(),
8584+
OMPC_MAP_MODIFIER_present))
85878585
Kind = Present;
85888586
else if (C->getMapType() == OMPC_MAP_alloc)
85898587
Kind = Allocs;
@@ -8602,10 +8600,8 @@ class MappableExprsHandler {
86028600
if (!C)
86038601
continue;
86048602
MapKind Kind = Other;
8605-
if (!C->getMotionModifiers().empty() &&
8606-
llvm::any_of(C->getMotionModifiers(), [](OpenMPMotionModifierKind K) {
8607-
return K == OMPC_MOTION_MODIFIER_present;
8608-
}))
8603+
if (llvm::is_contained(C->getMotionModifiers(),
8604+
OMPC_MOTION_MODIFIER_present))
86098605
Kind = Present;
86108606
const auto *EI = C->getVarRefs().begin();
86118607
for (const auto L : C->component_lists()) {
@@ -8620,10 +8616,8 @@ class MappableExprsHandler {
86208616
if (!C)
86218617
continue;
86228618
MapKind Kind = Other;
8623-
if (!C->getMotionModifiers().empty() &&
8624-
llvm::any_of(C->getMotionModifiers(), [](OpenMPMotionModifierKind K) {
8625-
return K == OMPC_MOTION_MODIFIER_present;
8626-
}))
8619+
if (llvm::is_contained(C->getMotionModifiers(),
8620+
OMPC_MOTION_MODIFIER_present))
86278621
Kind = Present;
86288622
const auto *EI = C->getVarRefs().begin();
86298623
for (const auto L : C->component_lists()) {
@@ -9191,18 +9185,13 @@ class MappableExprsHandler {
91919185
const MapData &RHS) {
91929186
ArrayRef<OpenMPMapModifierKind> MapModifiers = std::get<2>(LHS);
91939187
OpenMPMapClauseKind MapType = std::get<1>(RHS);
9194-
bool HasPresent = !MapModifiers.empty() &&
9195-
llvm::any_of(MapModifiers, [](OpenMPMapModifierKind K) {
9196-
return K == clang::OMPC_MAP_MODIFIER_present;
9197-
});
9188+
bool HasPresent =
9189+
llvm::is_contained(MapModifiers, clang::OMPC_MAP_MODIFIER_present);
91989190
bool HasAllocs = MapType == OMPC_MAP_alloc;
91999191
MapModifiers = std::get<2>(RHS);
92009192
MapType = std::get<1>(LHS);
92019193
bool HasPresentR =
9202-
!MapModifiers.empty() &&
9203-
llvm::any_of(MapModifiers, [](OpenMPMapModifierKind K) {
9204-
return K == clang::OMPC_MAP_MODIFIER_present;
9205-
});
9194+
llvm::is_contained(MapModifiers, clang::OMPC_MAP_MODIFIER_present);
92069195
bool HasAllocsR = MapType == OMPC_MAP_alloc;
92079196
return (HasPresent && !HasPresentR) || (HasAllocs && !HasAllocsR);
92089197
});

clang/lib/Driver/ToolChains/Clang.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5101,6 +5101,7 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA,
51015101
// cleanup.
51025102
if (!C.isForDiagnostics())
51035103
CmdArgs.push_back("-disable-free");
5104+
CmdArgs.push_back("-clear-ast-before-backend");
51045105

51055106
#ifdef NDEBUG
51065107
const bool IsAssertBuild = false;

0 commit comments

Comments
 (0)