Skip to content

Commit efb561c

Browse files
committed
Merge "merge main into amd-staging" into amd-staging
2 parents c1f4f16 + 92ae70c commit efb561c

File tree

28 files changed

+3068
-165
lines changed

28 files changed

+3068
-165
lines changed

.ci/generate-buildkite-pipeline-premerge

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,6 @@ function exclude-linux() {
153153
for project in ${projects}; do
154154
case ${project} in
155155
cross-project-tests) ;; # tests failing
156-
lldb) ;; # tests failing
157156
openmp) ;; # https://github.com/google/llvm-premerge-checks/issues/410
158157
*)
159158
echo "${project}"
@@ -170,7 +169,7 @@ function exclude-windows() {
170169
compiler-rt) ;; # tests taking too long
171170
openmp) ;; # TODO: having trouble with the Perl installation
172171
libc) ;; # no Windows support
173-
lldb) ;; # tests failing
172+
lldb) ;; # custom environment requirements (https://github.com/llvm/llvm-project/pull/94208#issuecomment-2146256857)
174173
bolt) ;; # tests are not supported yet
175174
*)
176175
echo "${project}"
@@ -213,7 +212,7 @@ function check-targets() {
213212
echo "check-unwind"
214213
;;
215214
lldb)
216-
echo "check-all" # TODO: check-lldb may not include all the LLDB tests?
215+
echo "check-lldb"
217216
;;
218217
pstl)
219218
echo "check-all"

.ci/monolithic-linux.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ targets="${2}"
3939

4040
echo "--- cmake"
4141
pip install -q -r "${MONOREPO_ROOT}"/mlir/python/requirements.txt
42+
pip install -q -r "${MONOREPO_ROOT}"/lldb/test/requirements.txt
4243
cmake -S "${MONOREPO_ROOT}"/llvm -B "${BUILD_DIR}" \
4344
-D LLVM_ENABLE_PROJECTS="${projects}" \
4445
-G Ninja \

clang/examples/PrintFunctionNames/PrintFunctionNames.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ class PrintFunctionsConsumer : public ASTConsumer {
7272
*sema.LateParsedTemplateMap.find(FD)->second;
7373
sema.LateTemplateParser(sema.OpaqueParser, LPT);
7474
llvm::errs() << "late-parsed-decl: \"" << FD->getNameAsString() << "\"\n";
75-
}
75+
}
7676
}
7777
};
7878

libcxx/include/__type_traits/promote.h

Lines changed: 38 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,47 @@
1111

1212
#include <__config>
1313
#include <__type_traits/integral_constant.h>
14-
#include <__type_traits/is_same.h>
15-
#include <__utility/declval.h>
14+
#include <__type_traits/is_arithmetic.h>
15+
16+
#if defined(_LIBCPP_CLANG_VER) && _LIBCPP_CLANG_VER == 1700
17+
# include <__type_traits/is_same.h>
18+
# include <__utility/declval.h>
19+
#endif
1620

1721
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
1822
# pragma GCC system_header
1923
#endif
2024

2125
_LIBCPP_BEGIN_NAMESPACE_STD
2226

27+
// TODO(LLVM-20): Remove this workaround
28+
#if !defined(_LIBCPP_CLANG_VER) || _LIBCPP_CLANG_VER != 1700
29+
30+
template <class... _Args>
31+
class __promote {
32+
static_assert((is_arithmetic<_Args>::value && ...));
33+
34+
static float __test(float);
35+
static double __test(char);
36+
static double __test(int);
37+
static double __test(unsigned);
38+
static double __test(long);
39+
static double __test(unsigned long);
40+
static double __test(long long);
41+
static double __test(unsigned long long);
42+
# ifndef _LIBCPP_HAS_NO_INT128
43+
static double __test(__int128_t);
44+
static double __test(__uint128_t);
45+
# endif
46+
static double __test(double);
47+
static long double __test(long double);
48+
49+
public:
50+
using type = decltype((__test(_Args()) + ...));
51+
};
52+
53+
#else
54+
2355
template <class _Tp>
2456
struct __numeric_type {
2557
static void __test(...);
@@ -31,10 +63,10 @@ struct __numeric_type {
3163
static double __test(unsigned long);
3264
static double __test(long long);
3365
static double __test(unsigned long long);
34-
#ifndef _LIBCPP_HAS_NO_INT128
66+
# ifndef _LIBCPP_HAS_NO_INT128
3567
static double __test(__int128_t);
3668
static double __test(__uint128_t);
37-
#endif
69+
# endif
3870
static double __test(double);
3971
static long double __test(long double);
4072

@@ -89,6 +121,8 @@ class __promote_imp<_A1, void, void, true> {
89121
template <class _A1, class _A2 = void, class _A3 = void>
90122
class __promote : public __promote_imp<_A1, _A2, _A3> {};
91123

124+
#endif // !defined(_LIBCPP_CLANG_VER) || _LIBCPP_CLANG_VER >= 1700
125+
92126
_LIBCPP_END_NAMESPACE_STD
93127

94128
#endif // _LIBCPP___TYPE_TRAITS_PROMOTE_H

lld/test/ELF/aarch64-reloc-pauth.s

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# REQUIRES: aarch64
22

3+
# RUN: rm -rf %t
34
# RUN: llvm-mc -filetype=obj -triple=aarch64 %p/Inputs/shared2.s -o %t.a.o
45
# RUN: ld.lld -shared %t.a.o -soname=so -o %t.a.so
56
# RUN: llvm-mc -filetype=obj -triple=aarch64 %s -o %t.o

lldb/source/API/SBBreakpoint.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -714,7 +714,7 @@ void SBBreakpoint::GetNames(SBStringList &names) {
714714
bkpt_sp->GetTarget().GetAPIMutex());
715715
std::vector<std::string> names_vec;
716716
bkpt_sp->GetNames(names_vec);
717-
for (std::string name : names_vec) {
717+
for (const std::string &name : names_vec) {
718718
names.AppendString(name.c_str());
719719
}
720720
}

lldb/source/API/SBTarget.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1147,7 +1147,7 @@ void SBTarget::GetBreakpointNames(SBStringList &names) {
11471147

11481148
std::vector<std::string> name_vec;
11491149
target_sp->GetBreakpointNames(name_vec);
1150-
for (auto name : name_vec)
1150+
for (const auto &name : name_vec)
11511151
names.AppendString(name.c_str());
11521152
}
11531153
}

lldb/source/Breakpoint/Breakpoint.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -885,7 +885,7 @@ void Breakpoint::GetDescription(Stream *s, lldb::DescriptionLevel level,
885885
s->Printf("Names:");
886886
s->EOL();
887887
s->IndentMore();
888-
for (std::string name : m_name_list) {
888+
for (const std::string &name : m_name_list) {
889889
s->Indent();
890890
s->Printf("%s\n", name.c_str());
891891
}

lldb/source/Breakpoint/BreakpointIDList.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,7 @@ llvm::Error BreakpointIDList::FindAndReplaceIDRanges(
259259

260260
if (!names_found.empty()) {
261261
for (BreakpointSP bkpt_sp : target->GetBreakpointList().Breakpoints()) {
262-
for (std::string name : names_found) {
262+
for (const std::string &name : names_found) {
263263
if (bkpt_sp->MatchesName(name.c_str())) {
264264
StreamString canonical_id_str;
265265
BreakpointID::GetCanonicalReference(

llvm/examples/BrainF/BrainF.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@
3737
#include "llvm/IR/Intrinsics.h"
3838
#include "llvm/IR/Module.h"
3939
#include "llvm/IR/Type.h"
40-
#include "llvm/Support/Casting.h"
4140
#include <cstdlib>
4241
#include <iostream>
4342

llvm/examples/BrainF/BrainFDriver.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@
2828
#include "llvm/Bitcode/BitcodeWriter.h"
2929
#include "llvm/ExecutionEngine/ExecutionEngine.h"
3030
#include "llvm/ExecutionEngine/GenericValue.h"
31-
#include "llvm/ExecutionEngine/MCJIT.h"
3231
#include "llvm/IR/BasicBlock.h"
3332
#include "llvm/IR/Constants.h"
3433
#include "llvm/IR/DerivedTypes.h"
@@ -38,13 +37,11 @@
3837
#include "llvm/IR/Module.h"
3938
#include "llvm/IR/Value.h"
4039
#include "llvm/IR/Verifier.h"
41-
#include "llvm/Support/Casting.h"
4240
#include "llvm/Support/CommandLine.h"
4341
#include "llvm/Support/FileSystem.h"
4442
#include "llvm/Support/ManagedStatic.h"
4543
#include "llvm/Support/TargetSelect.h"
4644
#include "llvm/Support/raw_ostream.h"
47-
#include <algorithm>
4845
#include <cstdlib>
4946
#include <fstream>
5047
#include <iostream>

llvm/include/llvm/ProfileData/InstrProfReader.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -708,7 +708,7 @@ class IndexedInstrProfReader : public InstrProfReader {
708708
const uint8_t *BinaryIdsStart = nullptr;
709709

710710
// Index to the current record in the record array.
711-
unsigned RecordIndex;
711+
unsigned RecordIndex = 0;
712712

713713
// Read the profile summary. Return a pointer pointing to one byte past the
714714
// end of the summary data if it exists or the input \c Cur.
@@ -721,7 +721,7 @@ class IndexedInstrProfReader : public InstrProfReader {
721721
std::unique_ptr<MemoryBuffer> DataBuffer,
722722
std::unique_ptr<MemoryBuffer> RemappingBuffer = nullptr)
723723
: DataBuffer(std::move(DataBuffer)),
724-
RemappingBuffer(std::move(RemappingBuffer)), RecordIndex(0) {}
724+
RemappingBuffer(std::move(RemappingBuffer)) {}
725725
IndexedInstrProfReader(const IndexedInstrProfReader &) = delete;
726726
IndexedInstrProfReader &operator=(const IndexedInstrProfReader &) = delete;
727727

llvm/include/llvm/ProfileData/MemProf.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@ enum IndexedVersion : uint64_t {
2828
Version1 = 1,
2929
// Version 2: Added a call stack table.
3030
Version2 = 2,
31-
// Version 3: Under development.
31+
// Version 3: Added a radix tree for call stacks. Switched to linear IDs for
32+
// frames and call stacks.
3233
Version3 = 3,
3334
};
3435

llvm/include/llvm/ProfileData/MemProfReader.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ class RawMemProfReader final : public MemProfReader {
137137
public:
138138
RawMemProfReader(const RawMemProfReader &) = delete;
139139
RawMemProfReader &operator=(const RawMemProfReader &) = delete;
140-
virtual ~RawMemProfReader() override = default;
140+
~RawMemProfReader() override = default;
141141

142142
// Prints the contents of the profile in YAML format.
143143
void printYAML(raw_ostream &OS);
@@ -161,7 +161,7 @@ class RawMemProfReader final : public MemProfReader {
161161
// Returns a list of build ids recorded in the segment information.
162162
static std::vector<std::string> peekBuildIds(MemoryBuffer *DataBuffer);
163163

164-
virtual Error
164+
Error
165165
readNextRecord(GuidMemProfRecordPair &GuidRecord,
166166
std::function<const Frame(const FrameId)> Callback) override;
167167

llvm/include/llvm/ProfileData/SampleProfWriter.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ class SampleProfileWriterText : public SampleProfileWriter {
169169

170170
protected:
171171
SampleProfileWriterText(std::unique_ptr<raw_ostream> &OS)
172-
: SampleProfileWriter(OS), Indent(0) {}
172+
: SampleProfileWriter(OS) {}
173173

174174
std::error_code writeHeader(const SampleProfileMap &ProfileMap) override {
175175
LineCount = 0;
@@ -180,7 +180,7 @@ class SampleProfileWriterText : public SampleProfileWriter {
180180
/// Indent level to use when writing.
181181
///
182182
/// This is used when printing inlined callees.
183-
unsigned Indent;
183+
unsigned Indent = 0;
184184

185185
friend ErrorOr<std::unique_ptr<SampleProfileWriter>>
186186
SampleProfileWriter::create(std::unique_ptr<raw_ostream> &OS,

llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10112,7 +10112,7 @@ SDValue DAGCombiner::visitSHL(SDNode *N) {
1011210112
// fold (shl X, cttz(Y)) -> (mul (Y & -Y), X) if cttz is unsupported on the
1011310113
// target.
1011410114
if (((N1.getOpcode() == ISD::CTTZ &&
10115-
VT.getScalarSizeInBits() >= ShiftVT.getScalarSizeInBits()) ||
10115+
VT.getScalarSizeInBits() <= ShiftVT.getScalarSizeInBits()) ||
1011610116
N1.getOpcode() == ISD::CTTZ_ZERO_UNDEF) &&
1011710117
N1.hasOneUse() && !TLI.isOperationLegalOrCustom(ISD::CTTZ, ShiftVT) &&
1011810118
TLI.isOperationLegalOrCustom(ISD::MUL, VT)) {

llvm/lib/ProfileData/InstrProfReader.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -145,11 +145,11 @@ readBinaryIdsInternal(const MemoryBuffer &DataBuffer,
145145

146146
static void
147147
printBinaryIdsInternal(raw_ostream &OS,
148-
std::vector<llvm::object::BuildID> &BinaryIds) {
148+
const std::vector<llvm::object::BuildID> &BinaryIds) {
149149
OS << "Binary IDs: \n";
150-
for (auto BI : BinaryIds) {
151-
for (uint64_t I = 0; I < BI.size(); I++)
152-
OS << format("%02x", BI[I]);
150+
for (const auto &BI : BinaryIds) {
151+
for (auto I : BI)
152+
OS << format("%02x", I);
153153
OS << "\n";
154154
}
155155
}

llvm/lib/Target/RISCV/RISCVInstrInfo.td

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -943,6 +943,9 @@ def : InstAlias<"ret", (JALR X0, X1, 0), 4>;
943943
def : InstAlias<"jr $rs, $offset", (JALR X0, GPR:$rs, simm12:$offset), 0>;
944944
def : InstAlias<"jalr $rs, $offset", (JALR X1, GPR:$rs, simm12:$offset), 0>;
945945
def : InstAlias<"jalr $rd, $rs, $offset", (JALR GPR:$rd, GPR:$rs, simm12:$offset), 0>;
946+
def : InstAlias<"jr (${rs})", (JALR X0, GPR:$rs, 0), 0>;
947+
def : InstAlias<"jalr (${rs})", (JALR X1, GPR:$rs, 0), 0>;
948+
def : InstAlias<"jalr $rd, (${rs})", (JALR GPR:$rd, GPR:$rs, 0), 0>;
946949

947950
def : InstAlias<"fence", (FENCE 0xF, 0xF)>; // 0xF == iorw
948951

llvm/lib/Target/X86/X86InstrCompiler.td

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1125,7 +1125,9 @@ multiclass ATOMIC_LOAD_FP_BINOP_MI<string Name, SDNode op> {
11251125
Requires<[HasAVX512]>;
11261126
}
11271127
defm : ATOMIC_LOAD_FP_BINOP_MI<"ADD", fadd>;
1128-
// FIXME: Add fsub, fmul, fdiv, ...
1128+
defm : ATOMIC_LOAD_FP_BINOP_MI<"SUB", fsub>;
1129+
defm : ATOMIC_LOAD_FP_BINOP_MI<"MUL", fmul>;
1130+
defm : ATOMIC_LOAD_FP_BINOP_MI<"DIV", fdiv>;
11291131

11301132
multiclass RELEASE_UNOP<string Name, dag dag8, dag dag16, dag dag32,
11311133
dag dag64> {

0 commit comments

Comments
 (0)