Skip to content

Commit c753eea

Browse files
committed
rebase
Created using spr 1.3.4
2 parents cd4ff6b + 163935a commit c753eea

File tree

96 files changed

+2643
-1480
lines changed

Some content is hidden

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

96 files changed

+2643
-1480
lines changed

.github/workflows/release-binaries.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ jobs:
4949
prepare:
5050
name: Prepare to build binaries
5151
runs-on: ${{ inputs.runs-on }}
52-
if: github.repository == 'llvm/llvm-project'
52+
if: github.repository_owner == 'llvm'
5353
outputs:
5454
release-version: ${{ steps.vars.outputs.release-version }}
5555
ref: ${{ steps.vars.outputs.ref }}
@@ -177,7 +177,7 @@ jobs:
177177
build-release-package:
178178
name: "Build Release Package"
179179
needs: prepare
180-
if: github.repository == 'llvm/llvm-project'
180+
if: github.repository_owner == 'llvm'
181181
runs-on: ${{ needs.prepare.outputs.build-runs-on }}
182182
steps:
183183

@@ -327,7 +327,7 @@ jobs:
327327
- prepare
328328
- build-release-package
329329
if: >-
330-
github.repository == 'llvm/llvm-project'
330+
github.repository_owner == 'llvm'
331331
runs-on: ${{ needs.prepare.outputs.test-runs-on }}
332332
steps:
333333
- name: Checkout Actions

clang/docs/ReleaseNotes.rst

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -363,6 +363,9 @@ Resolutions to C++ Defect Reports
363363
- Clang now allows trailing requires clause on explicit deduction guides.
364364
(`CWG2707: Deduction guides cannot have a trailing requires-clause <https://cplusplus.github.io/CWG/issues/2707.html>`_).
365365

366+
- Respect constructor constraints during CTAD.
367+
(`CWG2628: Implicit deduction guides should propagate constraints <https://cplusplus.github.io/CWG/issues/2628.html>`_).
368+
366369
- Clang now diagnoses a space in the first production of a ``literal-operator-id``
367370
by default.
368371
(`CWG2521: User-defined literals and reserved identifiers <https://cplusplus.github.io/CWG/issues/2521.html>`_).
@@ -1132,6 +1135,20 @@ Windows Support
11321135
LoongArch Support
11331136
^^^^^^^^^^^^^^^^^
11341137

1138+
- Types of parameters and return value of ``__builtin_lsx_vorn_v`` and ``__builtin_lasx_xvorn_v``
1139+
are changed from ``signed char`` to ``unsigned char``. (#GH114514)
1140+
1141+
- ``-mrelax`` and ``-mno-relax`` are supported now on LoongArch that can be used
1142+
to enable / disable the linker relaxation optimization. (#GH123587)
1143+
1144+
- Fine-grained la64v1.1 options are added including ``-m{no-,}frecipe``, ``-m{no-,}lam-bh``,
1145+
``-m{no-,}ld-seq-sa``, ``-m{no-,}div32``, ``-m{no-,}lamcas`` and ``-m{no-,}scq``.
1146+
1147+
- Two options ``-m{no-,}annotate-tablejump`` are added to enable / disable
1148+
annotating table jump instruction to correlate it with the jump table. (#GH102411)
1149+
1150+
- FreeBSD support is added for LoongArch64 and has been tested by building kernel-toolchain. (#GH119191)
1151+
11351152
RISC-V Support
11361153
^^^^^^^^^^^^^^
11371154

clang/include/clang/AST/UnresolvedSet.h

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,9 +71,8 @@ class UnresolvedSetImpl {
7171
UnresolvedSetImpl(const UnresolvedSetImpl &) = default;
7272
UnresolvedSetImpl &operator=(const UnresolvedSetImpl &) = default;
7373

74-
// FIXME: Switch these to "= default" once MSVC supports generating move ops
75-
UnresolvedSetImpl(UnresolvedSetImpl &&) {}
76-
UnresolvedSetImpl &operator=(UnresolvedSetImpl &&) { return *this; }
74+
UnresolvedSetImpl(UnresolvedSetImpl &&) = default;
75+
UnresolvedSetImpl &operator=(UnresolvedSetImpl &&) = default;
7776

7877
public:
7978
// We don't currently support assignment through this iterator, so we might

clang/include/clang/Basic/BuiltinsSPIRV.td

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,3 @@ def SPIRVLength : Builtin {
1919
let Attributes = [NoThrow, Const];
2020
let Prototype = "void(...)";
2121
}
22-
23-
def SPIRVReflect : Builtin {
24-
let Spellings = ["__builtin_spirv_reflect"];
25-
let Attributes = [NoThrow, Const];
26-
let Prototype = "void(...)";
27-
}

clang/include/clang/Basic/DiagnosticDriverKinds.td

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -808,6 +808,9 @@ def err_drv_loongarch_invalid_simd_option_combination : Error<
808808
def err_drv_loongarch_invalid_msimd_EQ : Error<
809809
"invalid argument '%0' to -msimd=; must be one of: none, lsx, lasx">;
810810

811+
def err_drv_loongarch_unsupported_with_linker_relaxation : Error<
812+
"%0 is unsupported with LoongArch linker relaxation (-mrelax)">;
813+
811814
def err_drv_expand_response_file : Error<
812815
"failed to expand response file: %0">;
813816

clang/include/clang/CodeGen/BackendUtil.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@ enum BackendAction {
3939
Backend_EmitObj ///< Emit native object files
4040
};
4141

42-
void emitBackendOutput(CompilerInstance &CI, StringRef TDesc, llvm::Module *M,
43-
BackendAction Action,
42+
void emitBackendOutput(CompilerInstance &CI, CodeGenOptions &CGOpts,
43+
StringRef TDesc, llvm::Module *M, BackendAction Action,
4444
llvm::IntrusiveRefCntPtr<llvm::vfs::FileSystem> VFS,
4545
std::unique_ptr<raw_pwrite_stream> OS,
4646
BackendConsumer *BC = nullptr);

clang/include/clang/Driver/Options.td

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5474,6 +5474,10 @@ def mdiv32 : Flag<["-"], "mdiv32">, Group<m_loongarch_Features_Group>,
54745474
HelpText<"Use div.w[u] and mod.w[u] instructions with input not sign-extended.">;
54755475
def mno_div32 : Flag<["-"], "mno-div32">, Group<m_loongarch_Features_Group>,
54765476
HelpText<"Do not use div.w[u] and mod.w[u] instructions with input not sign-extended.">;
5477+
def mscq : Flag<["-"], "mscq">, Group<m_loongarch_Features_Group>,
5478+
HelpText<"Enable sc.q instruction.">;
5479+
def mno_scq : Flag<["-"], "mno-scq">, Group<m_loongarch_Features_Group>,
5480+
HelpText<"Disable sc.q instruction.">;
54775481
def mannotate_tablejump : Flag<["-"], "mannotate-tablejump">, Group<m_loongarch_Features_Group>,
54785482
HelpText<"Enable annotate table jump instruction to correlate it with the jump table.">;
54795483
def mno_annotate_tablejump : Flag<["-"], "mno-annotate-tablejump">, Group<m_loongarch_Features_Group>,

clang/lib/Basic/Targets/LoongArch.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ void LoongArchTargetInfo::getTargetDefines(const LangOptions &Opts,
206206
// arch feature set will be used to include all sub-features belonging to
207207
// the V1.1 ISA version.
208208
if (HasFeatureFrecipe && HasFeatureLAM_BH && HasFeatureLAMCAS &&
209-
HasFeatureLD_SEQ_SA && HasFeatureDiv32)
209+
HasFeatureLD_SEQ_SA && HasFeatureDiv32 && HasFeatureSCQ)
210210
Builder.defineMacro("__loongarch_arch",
211211
Twine('"') + "la64v1.1" + Twine('"'));
212212
else
@@ -249,6 +249,9 @@ void LoongArchTargetInfo::getTargetDefines(const LangOptions &Opts,
249249
if (HasFeatureDiv32)
250250
Builder.defineMacro("__loongarch_div32", Twine(1));
251251

252+
if (HasFeatureSCQ)
253+
Builder.defineMacro("__loongarch_scq", Twine(1));
254+
252255
StringRef ABI = getABI();
253256
if (ABI == "lp64d" || ABI == "lp64f" || ABI == "lp64s")
254257
Builder.defineMacro("__loongarch_lp64");
@@ -333,6 +336,8 @@ bool LoongArchTargetInfo::handleTargetFeatures(
333336
HasFeatureLD_SEQ_SA = true;
334337
else if (Feature == "+div32")
335338
HasFeatureDiv32 = true;
339+
else if (Feature == "+scq")
340+
HasFeatureSCQ = true;
336341
}
337342
return true;
338343
}

clang/lib/Basic/Targets/LoongArch.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ class LLVM_LIBRARY_VISIBILITY LoongArchTargetInfo : public TargetInfo {
3434
bool HasFeatureLAMCAS;
3535
bool HasFeatureLD_SEQ_SA;
3636
bool HasFeatureDiv32;
37+
bool HasFeatureSCQ;
3738

3839
public:
3940
LoongArchTargetInfo(const llvm::Triple &Triple, const TargetOptions &)
@@ -47,6 +48,7 @@ class LLVM_LIBRARY_VISIBILITY LoongArchTargetInfo : public TargetInfo {
4748
HasFeatureLAMCAS = false;
4849
HasFeatureLD_SEQ_SA = false;
4950
HasFeatureDiv32 = false;
51+
HasFeatureSCQ = false;
5052
LongDoubleWidth = 128;
5153
LongDoubleAlign = 128;
5254
LongDoubleFormat = &llvm::APFloat::IEEEquad();

clang/lib/CodeGen/BackendUtil.cpp

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -206,9 +206,10 @@ class EmitAssemblyHelper {
206206
}
207207

208208
public:
209-
EmitAssemblyHelper(CompilerInstance &CI, llvm::Module *M,
209+
EmitAssemblyHelper(CompilerInstance &CI, CodeGenOptions &CGOpts,
210+
llvm::Module *M,
210211
IntrusiveRefCntPtr<llvm::vfs::FileSystem> VFS)
211-
: CI(CI), Diags(CI.getDiagnostics()), CodeGenOpts(CI.getCodeGenOpts()),
212+
: CI(CI), Diags(CI.getDiagnostics()), CodeGenOpts(CGOpts),
212213
TargetOpts(CI.getTargetOpts()), LangOpts(CI.getLangOpts()),
213214
TheModule(M), VFS(std::move(VFS)),
214215
TargetTriple(TheModule->getTargetTriple()) {}
@@ -1364,14 +1365,14 @@ runThinLTOBackend(CompilerInstance &CI, ModuleSummaryIndex *CombinedIndex,
13641365
}
13651366
}
13661367

1367-
void clang::emitBackendOutput(CompilerInstance &CI, StringRef TDesc,
1368-
llvm::Module *M, BackendAction Action,
1368+
void clang::emitBackendOutput(CompilerInstance &CI, CodeGenOptions &CGOpts,
1369+
StringRef TDesc, llvm::Module *M,
1370+
BackendAction Action,
13691371
IntrusiveRefCntPtr<llvm::vfs::FileSystem> VFS,
13701372
std::unique_ptr<raw_pwrite_stream> OS,
13711373
BackendConsumer *BC) {
13721374
llvm::TimeTraceScope TimeScope("Backend");
13731375
DiagnosticsEngine &Diags = CI.getDiagnostics();
1374-
const auto &CGOpts = CI.getCodeGenOpts();
13751376

13761377
std::unique_ptr<llvm::Module> EmptyModule;
13771378
if (!CGOpts.ThinLTOIndexFile.empty()) {
@@ -1411,7 +1412,7 @@ void clang::emitBackendOutput(CompilerInstance &CI, StringRef TDesc,
14111412
}
14121413
}
14131414

1414-
EmitAssemblyHelper AsmHelper(CI, M, VFS);
1415+
EmitAssemblyHelper AsmHelper(CI, CGOpts, M, VFS);
14151416
AsmHelper.emitAssembly(Action, std::move(OS), BC);
14161417

14171418
// Verify clang's TargetInfo DataLayout against the LLVM TargetMachine's

0 commit comments

Comments
 (0)