Skip to content

Commit 05dcc8e

Browse files
SC llvm teamSC llvm team
authored andcommitted
Merged main:2a48995a03ca into origin/amd-gfx:9e52601fabfa
Local branch origin/amd-gfx 9e52601 Merged main:3bd71cbec752 into origin/amd-gfx:9fe248e23125 Remote branch main 2a48995 [ARM] Pass ArrayRef by value instead of const reference. NFC
2 parents 9e52601 + 2a48995 commit 05dcc8e

File tree

233 files changed

+4636
-5158
lines changed

Some content is hidden

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

233 files changed

+4636
-5158
lines changed

bolt/test/X86/icf-safe-icp.test

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
# SAFEICFCHECK: skipping function with reference taken Derived3Func
1616
# SAFEICFCHECK-NEXT: ICF iteration 1
1717
# SAFEICFCHECK-NEXT: folding Derived3Destructor into Derived2Destructor
18-
# SAFEICFCHECK-NEXT: ===---------
1918

2019

2120
## generate profile

bolt/test/X86/icf-safe-process-rela-data.test

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
# SAFEICFCHECK: skipping function with reference taken fooAddFunc
1313
# SAFEICFCHECK-NEXT: skipping function with reference taken barAddFunc
1414
# SAFEICFCHECK-NEXT: ICF iteration 1
15-
# SAFEICFCHECK-NEXT: ===---------
1615

1716
## clang++ main.cpp
1817
## Other functions removed for brevity.

bolt/test/X86/icf-safe-test1.test

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,10 @@
1818
# SAFEICFCHECK: skipping function with reference taken barAddFunc
1919
# SAFEICFCHECK-NEXT: ICF iteration 1
2020
# SAFEICFCHECK-NEXT: folding barSubFunc into fooSubFunc
21-
# SAFEICFCHECK-NEXT: ===---------
2221

2322
# SAFEICFCHECKNOCFG: skipping function with reference taken barAddFunc
2423
# SAFEICFCHECKNOCFG-NEXT: ICF iteration 1
2524
# SAFEICFCHECKNOCFG-NEXT: folding barSubFunc into fooSubFunc
26-
# SAFEICFCHECKNOCFG-NEXT: ===---------
2725

2826
## clang++ -c main.cpp -o main.o
2927
## extern int FooVar;

bolt/test/X86/icf-safe-test2GlobalConstPtrNoPic.test

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
# SAFEICFCHECK-NEXT: skipping function with reference taken barMulFunc
1616
# SAFEICFCHECK-NEXT: skipping function with reference taken barAddFunc
1717
# SAFEICFCHECK-NEXT: ICF iteration 1
18-
# SAFEICFCHECK-NEXT: ===---------
1918

2019
## clang++ main.cpp -c -o -fno-PIC
2120
## Similar code gets generated for external reference function.

clang/docs/ReleaseNotes.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -363,6 +363,10 @@ Windows Support
363363
which makes ``offsetof`` provided by Microsoft's ``<stddef.h>`` to be defined
364364
correctly. (#GH59689)
365365

366+
- Clang now can process the `i128` and `ui128` integeral suffixes when MSVC
367+
extensions are enabled. This allows for properly processing ``intsafe.h`` in
368+
the Windows SDK.
369+
366370
LoongArch Support
367371
^^^^^^^^^^^^^^^^^
368372

clang/include/clang/Basic/riscv_vector.td

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -634,7 +634,6 @@ let HeaderCode =
634634
#define __riscv_vsetvl_e32m4(avl) __builtin_rvv_vsetvli((size_t)(avl), 2, 2)
635635
#define __riscv_vsetvl_e32m8(avl) __builtin_rvv_vsetvli((size_t)(avl), 2, 3)
636636

637-
#if __riscv_v_elen >= 64
638637
#define __riscv_vsetvl_e8mf8(avl) __builtin_rvv_vsetvli((size_t)(avl), 0, 5)
639638
#define __riscv_vsetvl_e16mf4(avl) __builtin_rvv_vsetvli((size_t)(avl), 1, 6)
640639
#define __riscv_vsetvl_e32mf2(avl) __builtin_rvv_vsetvli((size_t)(avl), 2, 7)
@@ -643,7 +642,6 @@ let HeaderCode =
643642
#define __riscv_vsetvl_e64m2(avl) __builtin_rvv_vsetvli((size_t)(avl), 3, 1)
644643
#define __riscv_vsetvl_e64m4(avl) __builtin_rvv_vsetvli((size_t)(avl), 3, 2)
645644
#define __riscv_vsetvl_e64m8(avl) __builtin_rvv_vsetvli((size_t)(avl), 3, 3)
646-
#endif
647645

648646
#define __riscv_vsetvlmax_e8mf4() __builtin_rvv_vsetvlimax(0, 6)
649647
#define __riscv_vsetvlmax_e8mf2() __builtin_rvv_vsetvlimax(0, 7)
@@ -663,7 +661,6 @@ let HeaderCode =
663661
#define __riscv_vsetvlmax_e32m4() __builtin_rvv_vsetvlimax(2, 2)
664662
#define __riscv_vsetvlmax_e32m8() __builtin_rvv_vsetvlimax(2, 3)
665663

666-
#if __riscv_v_elen >= 64
667664
#define __riscv_vsetvlmax_e8mf8() __builtin_rvv_vsetvlimax(0, 5)
668665
#define __riscv_vsetvlmax_e16mf4() __builtin_rvv_vsetvlimax(1, 6)
669666
#define __riscv_vsetvlmax_e32mf2() __builtin_rvv_vsetvlimax(2, 7)
@@ -672,7 +669,6 @@ let HeaderCode =
672669
#define __riscv_vsetvlmax_e64m2() __builtin_rvv_vsetvlimax(3, 1)
673670
#define __riscv_vsetvlmax_e64m4() __builtin_rvv_vsetvlimax(3, 2)
674671
#define __riscv_vsetvlmax_e64m8() __builtin_rvv_vsetvlimax(3, 3)
675-
#endif
676672

677673
}] in
678674
def vsetvl_macro: RVVHeader;

clang/include/clang/Lex/LiteralSupport.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,8 @@ class NumericLiteralParser {
8282
bool isAccum : 1; // 1.0hk/k/lk/uhk/uk/ulk
8383
bool isBitInt : 1; // 1wb, 1uwb (C23) or 1__wb, 1__uwb (Clang extension in C++
8484
// mode)
85-
uint8_t MicrosoftInteger; // Microsoft suffix extension i8, i16, i32, or i64.
86-
85+
uint8_t MicrosoftInteger; // Microsoft suffix extension i8, i16, i32, i64, or
86+
// i128.
8787

8888
bool isFixedPointLiteral() const {
8989
return (saw_period || saw_exponent) && saw_fixed_point_suffix;

clang/lib/AST/ASTImporter.cpp

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10527,12 +10527,11 @@ void ASTImporter::CompleteDecl (Decl *D) {
1052710527
}
1052810528

1052910529
Decl *ASTImporter::MapImported(Decl *From, Decl *To) {
10530-
llvm::DenseMap<Decl *, Decl *>::iterator Pos = ImportedDecls.find(From);
10531-
assert((Pos == ImportedDecls.end() || Pos->second == To) &&
10532-
"Try to import an already imported Decl");
10533-
if (Pos != ImportedDecls.end())
10530+
auto [Pos, Inserted] = ImportedDecls.try_emplace(From, To);
10531+
assert((Inserted || Pos->second == To) &&
10532+
"Try to import an already imported Decl");
10533+
if (!Inserted)
1053410534
return Pos->second;
10535-
ImportedDecls[From] = To;
1053610535
// This mapping should be maintained only in this function. Therefore do not
1053710536
// check for additional consistency.
1053810537
ImportedFromDecls[To] = From;

clang/lib/AST/ParentMapContext.cpp

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,11 @@
1212
//===----------------------------------------------------------------------===//
1313

1414
#include "clang/AST/ParentMapContext.h"
15-
#include "clang/AST/RecursiveASTVisitor.h"
1615
#include "clang/AST/Decl.h"
1716
#include "clang/AST/Expr.h"
17+
#include "clang/AST/RecursiveASTVisitor.h"
1818
#include "clang/AST/TemplateBase.h"
19+
#include "llvm/ADT/SmallPtrSet.h"
1920

2021
using namespace clang;
2122

@@ -69,17 +70,21 @@ class ParentMapContext::ParentMap {
6970
for (; N > 0; --N)
7071
push_back(Value);
7172
}
72-
bool contains(const DynTypedNode &Value) {
73-
return Seen.contains(Value);
73+
bool contains(const DynTypedNode &Value) const {
74+
const void *Identity = Value.getMemoizationData();
75+
assert(Identity);
76+
return Dedup.contains(Identity);
7477
}
7578
void push_back(const DynTypedNode &Value) {
76-
if (!Value.getMemoizationData() || Seen.insert(Value).second)
79+
const void *Identity = Value.getMemoizationData();
80+
if (!Identity || Dedup.insert(Identity).second) {
7781
Items.push_back(Value);
82+
}
7883
}
7984
llvm::ArrayRef<DynTypedNode> view() const { return Items; }
8085
private:
81-
llvm::SmallVector<DynTypedNode, 2> Items;
82-
llvm::SmallDenseSet<DynTypedNode, 2> Seen;
86+
llvm::SmallVector<DynTypedNode, 1> Items;
87+
llvm::SmallPtrSet<const void *, 2> Dedup;
8388
};
8489

8590
/// Maps from a node to its parents. This is used for nodes that have

clang/lib/Basic/Targets/PPC.cpp

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -609,13 +609,15 @@ bool PPCTargetInfo::initFeatureMap(
609609
// Privileged instructions are off by default.
610610
Features["privileged"] = false;
611611

612-
// The code generated by the -maix-small-local-[exec|dynamic]-tls option is
613-
// turned off by default.
614-
Features["aix-small-local-exec-tls"] = false;
615-
Features["aix-small-local-dynamic-tls"] = false;
612+
if (getTriple().isOSAIX()) {
613+
// The code generated by the -maix-small-local-[exec|dynamic]-tls option is
614+
// turned off by default.
615+
Features["aix-small-local-exec-tls"] = false;
616+
Features["aix-small-local-dynamic-tls"] = false;
616617

617-
// Turn off TLS model opt by default.
618-
Features["aix-shared-lib-tls-model-opt"] = false;
618+
// Turn off TLS model opt by default.
619+
Features["aix-shared-lib-tls-model-opt"] = false;
620+
}
619621

620622
Features["spe"] = llvm::StringSwitch<bool>(CPU)
621623
.Case("8548", true)

0 commit comments

Comments
 (0)