Skip to content

Commit a0b23a1

Browse files
committed
merge main into amd-staging
Change-Id: I583c49d883e7253f246e0737ee2f8ece0d39cfc3
2 parents 6cc7495 + 15e915a commit a0b23a1

File tree

269 files changed

+4687
-2029
lines changed

Some content is hidden

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

269 files changed

+4687
-2029
lines changed

clang/docs/ReleaseNotes.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -244,6 +244,8 @@ Improvements to Clang's diagnostics
244244

245245
- Clang now diagnoses when the result of a [[nodiscard]] function is discarded after being cast in C. Fixes #GH104391.
246246

247+
- Don't emit duplicated dangling diagnostics. (#GH93386).
248+
247249
Improvements to Clang's time-trace
248250
----------------------------------
249251

clang/include/clang/Driver/Options.td

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6266,6 +6266,10 @@ def mv8plus : Flag<["-"], "mv8plus">, Group<m_sparc_Features_Group>,
62666266
HelpText<"Enable V8+ mode, allowing use of 64-bit V9 instructions in 32-bit code">;
62676267
def mno_v8plus : Flag<["-"], "mno-v8plus">, Group<m_sparc_Features_Group>,
62686268
HelpText<"Disable V8+ mode">;
6269+
def mfix_gr712rc : Flag<["-"], "mfix-gr712rc">, Group<m_sparc_Features_Group>,
6270+
HelpText<"Enable workarounds for GR712RC errata">;
6271+
def mfix_ut700 : Flag<["-"], "mfix-ut700">, Group<m_sparc_Features_Group>,
6272+
HelpText<"Enable workarounds for UT700 errata">;
62696273
foreach i = 1 ... 7 in
62706274
def ffixed_g#i : Flag<["-"], "ffixed-g"#i>, Group<m_sparc_Features_Group>,
62716275
HelpText<"Reserve the G"#i#" register (SPARC only)">;

clang/lib/AST/ByteCode/Compiler.cpp

Lines changed: 9 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1318,15 +1318,6 @@ bool Compiler<Emitter>::VisitArraySubscriptExpr(const ArraySubscriptExpr *E) {
13181318
template <class Emitter>
13191319
bool Compiler<Emitter>::visitInitList(ArrayRef<const Expr *> Inits,
13201320
const Expr *ArrayFiller, const Expr *E) {
1321-
1322-
QualType QT = E->getType();
1323-
1324-
if (const auto *AT = QT->getAs<AtomicType>())
1325-
QT = AT->getValueType();
1326-
1327-
if (QT->isVoidType())
1328-
return this->emitInvalid(E);
1329-
13301321
// Handle discarding first.
13311322
if (DiscardResult) {
13321323
for (const Expr *Init : Inits) {
@@ -1336,6 +1327,13 @@ bool Compiler<Emitter>::visitInitList(ArrayRef<const Expr *> Inits,
13361327
return true;
13371328
}
13381329

1330+
QualType QT = E->getType();
1331+
if (const auto *AT = QT->getAs<AtomicType>())
1332+
QT = AT->getValueType();
1333+
1334+
if (QT->isVoidType())
1335+
return this->emitInvalid(E);
1336+
13391337
// Primitive values.
13401338
if (std::optional<PrimType> T = classify(QT)) {
13411339
assert(!DiscardResult);
@@ -3251,12 +3249,9 @@ template <class Emitter> bool Compiler<Emitter>::visit(const Expr *E) {
32513249
if (E->getType().isNull())
32523250
return false;
32533251

3254-
if (E->getType()->isVoidType())
3255-
return this->discard(E);
3256-
32573252
// Create local variable to hold the return value.
3258-
if (!E->isGLValue() && !E->getType()->isAnyComplexType() &&
3259-
!classify(E->getType())) {
3253+
if (!E->getType()->isVoidType() && !E->isGLValue() &&
3254+
!E->getType()->isAnyComplexType() && !classify(E->getType())) {
32603255
std::optional<unsigned> LocalIndex = allocateLocal(E);
32613256
if (!LocalIndex)
32623257
return false;

clang/lib/Driver/ToolChains/Arch/Sparc.cpp

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -264,4 +264,17 @@ void sparc::getSparcTargetFeatures(const Driver &D, const ArgList &Args,
264264

265265
if (Args.hasArg(options::OPT_ffixed_i5))
266266
Features.push_back("+reserve-i5");
267+
268+
if (Args.hasArg(options::OPT_mfix_gr712rc)) {
269+
Features.push_back("+fix-tn0009");
270+
Features.push_back("+fix-tn0011");
271+
Features.push_back("+fix-tn0012");
272+
Features.push_back("+fix-tn0013");
273+
}
274+
275+
if (Args.hasArg(options::OPT_mfix_ut700)) {
276+
Features.push_back("+fix-tn0009");
277+
Features.push_back("+fix-tn0010");
278+
Features.push_back("+fix-tn0013");
279+
}
267280
}

0 commit comments

Comments
 (0)