Skip to content

Commit a98fd9a

Browse files
SC llvm teamSC llvm team
authored andcommitted
Merged main:1035cc702918 into amd-gfx:b5901a749cda
Local branch amd-gfx b5901a7 Merged main:9a485b02f9e3 into amd-gfx:3660ee508c65 Remote branch main 1035cc7 [OpenMP][NFC] Encapsulate Devices.size() (llvm#74010)
2 parents b5901a7 + 1035cc7 commit a98fd9a

File tree

119 files changed

+2620
-1544
lines changed

Some content is hidden

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

119 files changed

+2620
-1544
lines changed

clang/lib/Driver/ToolChains/FreeBSD.cpp

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -400,13 +400,6 @@ FreeBSD::FreeBSD(const Driver &D, const llvm::Triple &Triple,
400400
getFilePaths().push_back(concat(getDriver().SysRoot, "/usr/lib"));
401401
}
402402

403-
unsigned FreeBSD::GetDefaultDwarfVersion() const {
404-
unsigned Major = getTriple().getOSMajorVersion();
405-
if (Major >= 12 || Major == 0)
406-
return 4;
407-
return 2;
408-
}
409-
410403
void FreeBSD::AddClangSystemIncludeArgs(
411404
const llvm::opt::ArgList &DriverArgs,
412405
llvm::opt::ArgStringList &CC1Args) const {
@@ -510,13 +503,3 @@ SanitizerMask FreeBSD::getSupportedSanitizers() const {
510503
}
511504
return Res;
512505
}
513-
514-
void FreeBSD::addClangTargetOptions(const ArgList &DriverArgs,
515-
ArgStringList &CC1Args,
516-
Action::OffloadKind) const {
517-
unsigned Major = getTriple().getOSMajorVersion();
518-
if (!DriverArgs.hasFlag(options::OPT_fuse_init_array,
519-
options::OPT_fno_use_init_array,
520-
(Major >= 12 || Major == 0)))
521-
CC1Args.push_back("-fno-use-init-array");
522-
}

clang/lib/Driver/ToolChains/FreeBSD.h

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -82,14 +82,10 @@ class LLVM_LIBRARY_VISIBILITY FreeBSD : public Generic_ELF {
8282
getDefaultUnwindTableLevel(const llvm::opt::ArgList &Args) const override;
8383
bool isPIEDefault(const llvm::opt::ArgList &Args) const override;
8484
SanitizerMask getSupportedSanitizers() const override;
85-
unsigned GetDefaultDwarfVersion() const override;
85+
unsigned GetDefaultDwarfVersion() const override { return 4; }
8686
// Until dtrace (via CTF) and LLDB can deal with distributed debug info,
8787
// FreeBSD defaults to standalone/full debug info.
8888
bool GetDefaultStandaloneDebug() const override { return true; }
89-
void
90-
addClangTargetOptions(const llvm::opt::ArgList &DriverArgs,
91-
llvm::opt::ArgStringList &CC1Args,
92-
Action::OffloadKind DeviceOffloadKind) const override;
9389

9490
protected:
9591
Tool *buildAssembler() const override;

clang/test/Driver/clang-g-opts.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
// RUN: | FileCheck --check-prefix=CHECK-WITH-G-DWARF2 %s
88
// RUN: %clang -### -S %s -g -target i686-pc-openbsd 2>&1 \
99
// RUN: | FileCheck --check-prefix=CHECK-WITH-G-DWARF2 %s
10-
// RUN: %clang -### -S %s -g -target x86_64-pc-freebsd10.0 2>&1 \
11-
// RUN: | FileCheck --check-prefix=CHECK-WITH-G-DWARF2 %s
10+
// RUN: %clang -### -S %s -g -target x86_64-pc-freebsd 2>&1 \
11+
// RUN: | FileCheck --check-prefix=CHECK-WITH-G-DWARF4 %s
1212
// RUN: %clang -### -S %s -g --target=x86_64-unknown-haiku 2>&1 \
1313
// RUN: | FileCheck --check-prefix=CHECK-WITH-G-DWARF4 %s
1414

@@ -27,8 +27,8 @@
2727
// RUN: | FileCheck --check-prefix=CHECK-WITH-G-STANDALONE %s
2828
// RUN: %clang -### -S %s -g0 -g -target i686-pc-openbsd 2>&1 \
2929
// RUN: | FileCheck --check-prefix=CHECK-WITH-G-DWARF2 %s
30-
// RUN: %clang -### -S %s -g0 -g -target x86_64-pc-freebsd10.0 2>&1 \
31-
// RUN: | FileCheck --check-prefix=CHECK-WITH-G-DWARF2 %s
30+
// RUN: %clang -### -S %s -g0 -g -target x86_64-pc-freebsd 2>&1 \
31+
// RUN: | FileCheck --check-prefix=CHECK-WITH-G-DWARF4 %s
3232
// RUN: %clang -### -S %s -g0 -g --target=x86_64-unknown-haiku 2>&1 \
3333
// RUN: | FileCheck --check-prefix=CHECK-WITH-G-DWARF4 %s
3434
// RUN: %clang -### -S %s -g0 -g --target=i386-pc-solaris 2>&1 \

clang/test/Driver/constructors.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -75,10 +75,6 @@
7575
// RUN: --target=arm64-none-none-eabi \
7676
// RUN: | FileCheck --check-prefix=CHECK-INIT-ARRAY %s
7777

78-
// RUN: %clang -### %s -fsyntax-only 2>&1 \
79-
// RUN: --target=i386-unknown-freebsd11 \
80-
// RUN: | FileCheck --check-prefix=CHECK-NO-INIT-ARRAY %s
81-
//
8278
// RUN: %clang -### %s -fsyntax-only 2>&1 \
8379
// RUN: --target=i386-unknown-freebsd \
8480
// RUN: | FileCheck --check-prefix=CHECK-INIT-ARRAY %s

clang/test/Driver/debug-options.c

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -76,10 +76,7 @@
7676
// RUN: | FileCheck -check-prefix=G_STANDALONE %s
7777

7878
// FreeBSD.
79-
// RUN: %clang -### -c -g %s -target x86_64-pc-freebsd11.0 2>&1 \
80-
// RUN: | FileCheck -check-prefix=G_GDB \
81-
// RUN: -check-prefix=G_DWARF2 %s
82-
// RUN: %clang -### -c -g %s -target x86_64-pc-freebsd12.0 2>&1 \
79+
// RUN: %clang -### -c -g %s -target x86_64-pc-freebsd 2>&1 \
8380
// RUN: | FileCheck -check-prefix=G_GDB \
8481
// RUN: -check-prefix=G_DWARF4 %s
8582

@@ -188,16 +185,12 @@
188185
// RUN: | FileCheck -check-prefix=GLTO_ONLY %s
189186
// RUN: %clang -### -c -gline-tables-only %s -target i686-pc-openbsd 2>&1 \
190187
// RUN: | FileCheck -check-prefix=GLTO_ONLY_DWARF2 %s
191-
// RUN: %clang -### -c -gline-tables-only %s -target x86_64-pc-freebsd10.0 2>&1 \
192-
// RUN: | FileCheck -check-prefix=GLTO_ONLY_DWARF2 %s
193188
// RUN: %clang -### -c -gline-tables-only -g %s -target x86_64-linux-gnu 2>&1 \
194189
// RUN: | FileCheck -check-prefix=G_ONLY %s
195190
// RUN: %clang -### -c -gline-tables-only -g %s -target x86_64-apple-darwin16 2>&1 \
196191
// RUN: | FileCheck -check-prefix=G_STANDALONE -check-prefix=G_DWARF4 %s
197192
// RUN: %clang -### -c -gline-tables-only -g %s -target i686-pc-openbsd 2>&1 \
198193
// RUN: | FileCheck -check-prefix=G_ONLY_DWARF2 %s
199-
// RUN: %clang -### -c -gline-tables-only -g %s -target x86_64-pc-freebsd10.0 2>&1 \
200-
// RUN: | FileCheck -check-prefix=G_ONLY_DWARF2 %s
201194
// RUN: %clang -### -c -gline-tables-only -g %s --target=i386-pc-solaris 2>&1 \
202195
// RUN: | FileCheck -check-prefix=G_ONLY %s
203196
// RUN: %clang -### -c -gline-tables-only -g0 %s 2>&1 \
@@ -207,16 +200,12 @@
207200
// RUN: | FileCheck -check-prefix=GLIO_ONLY %s
208201
// RUN: %clang -### -c -gline-directives-only %s -target i686-pc-openbsd 2>&1 \
209202
// RUN: | FileCheck -check-prefix=GLIO_ONLY_DWARF2 %s
210-
// RUN: %clang -### -c -gline-directives-only %s -target x86_64-pc-freebsd10.0 2>&1 \
211-
// RUN: | FileCheck -check-prefix=GLIO_ONLY_DWARF2 %s
212203
// RUN: %clang -### -c -gline-directives-only -g %s -target x86_64-linux-gnu 2>&1 \
213204
// RUN: | FileCheck -check-prefix=G_ONLY %s
214205
// RUN: %clang -### -c -gline-directives-only -g %s -target x86_64-apple-darwin16 2>&1 \
215206
// RUN: | FileCheck -check-prefix=G_STANDALONE -check-prefix=G_DWARF4 %s
216207
// RUN: %clang -### -c -gline-directives-only -g %s -target i686-pc-openbsd 2>&1 \
217208
// RUN: | FileCheck -check-prefix=G_ONLY_DWARF2 %s
218-
// RUN: %clang -### -c -gline-directives-only -g %s -target x86_64-pc-freebsd10.0 2>&1 \
219-
// RUN: | FileCheck -check-prefix=G_ONLY_DWARF2 %s
220209
// RUN: %clang -### -c -gline-directives-only -g %s --target=i386-pc-solaris 2>&1 \
221210
// RUN: | FileCheck -check-prefix=G_ONLY %s
222211
// RUN: %clang -### -c -gline-directives-only -g0 %s 2>&1 \

clang/test/Index/initializer-memory.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@ struct S {
1313
S data2[1000000] = {0};
1414
S data_empty_init2[1000000] = {};
1515

16-
// CHECK: TOTAL = {{.*}} (0.{{.*}} MBytes)
16+
// CHECK: TOTAL = {{.*}} ({{0|1}}.{{.*}} MBytes)

flang/include/flang/Optimizer/Dialect/FIRAttr.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ class ExactTypeAttr
3838
using Base::Base;
3939
using ValueType = mlir::Type;
4040

41+
static constexpr llvm::StringLiteral name = "fir.type_is";
4142
static constexpr llvm::StringRef getAttrName() { return "type_is"; }
4243
static ExactTypeAttr get(mlir::Type value);
4344

@@ -51,6 +52,7 @@ class SubclassAttr
5152
using Base::Base;
5253
using ValueType = mlir::Type;
5354

55+
static constexpr llvm::StringLiteral name = "fir.class_is";
5456
static constexpr llvm::StringRef getAttrName() { return "class_is"; }
5557
static SubclassAttr get(mlir::Type value);
5658

@@ -63,6 +65,7 @@ class MustBeHeapAttr : public mlir::BoolAttr {
6365
public:
6466
using BoolAttr::BoolAttr;
6567

68+
static constexpr llvm::StringLiteral name = "fir.must_be_heap";
6669
static constexpr llvm::StringRef getAttrName() { return "fir.must_be_heap"; }
6770
};
6871

@@ -78,6 +81,7 @@ class ClosedIntervalAttr
7881
public:
7982
using Base::Base;
8083

84+
static constexpr llvm::StringLiteral name = "fir.interval";
8185
static constexpr llvm::StringRef getAttrName() { return "interval"; }
8286
static ClosedIntervalAttr get(mlir::MLIRContext *ctxt);
8387
};
@@ -92,6 +96,7 @@ class UpperBoundAttr
9296
public:
9397
using Base::Base;
9498

99+
static constexpr llvm::StringLiteral name = "fir.upper";
95100
static constexpr llvm::StringRef getAttrName() { return "upper"; }
96101
static UpperBoundAttr get(mlir::MLIRContext *ctxt);
97102
};
@@ -106,6 +111,7 @@ class LowerBoundAttr
106111
public:
107112
using Base::Base;
108113

114+
static constexpr llvm::StringLiteral name = "fir.lower";
109115
static constexpr llvm::StringRef getAttrName() { return "lower"; }
110116
static LowerBoundAttr get(mlir::MLIRContext *ctxt);
111117
};
@@ -120,6 +126,7 @@ class PointIntervalAttr
120126
public:
121127
using Base::Base;
122128

129+
static constexpr llvm::StringLiteral name = "fir.point";
123130
static constexpr llvm::StringRef getAttrName() { return "point"; }
124131
static PointIntervalAttr get(mlir::MLIRContext *ctxt);
125132
};
@@ -135,6 +142,7 @@ class RealAttr
135142
using Base::Base;
136143
using ValueType = std::pair<int, llvm::APFloat>;
137144

145+
static constexpr llvm::StringLiteral name = "fir.real";
138146
static constexpr llvm::StringRef getAttrName() { return "real"; }
139147
static RealAttr get(mlir::MLIRContext *ctxt, const ValueType &key);
140148

lldb/include/lldb/Breakpoint/BreakpointSite.h

Lines changed: 37 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,9 @@ class BreakpointSite : public std::enable_shared_from_this<BreakpointSite>,
4545
// display any breakpoint opcodes.
4646
};
4747

48+
typedef lldb::break_id_t SiteID;
49+
typedef lldb::break_id_t ConstituentID;
50+
4851
~BreakpointSite() override;
4952

5053
// This section manages the breakpoint traps
@@ -77,8 +80,8 @@ class BreakpointSite : public std::enable_shared_from_this<BreakpointSite>,
7780
/// Tells whether the current breakpoint site is enabled or not
7881
///
7982
/// This is a low-level enable bit for the breakpoint sites. If a
80-
/// breakpoint site has no enabled owners, it should just get removed. This
81-
/// enable/disable is for the low-level target code to enable and disable
83+
/// breakpoint site has no enabled constituents, it should just get removed.
84+
/// This enable/disable is for the low-level target code to enable and disable
8285
/// breakpoint sites when single stepping, etc.
8386
bool IsEnabled() const;
8487

@@ -101,44 +104,46 @@ class BreakpointSite : public std::enable_shared_from_this<BreakpointSite>,
101104
/// Standard Dump method
102105
void Dump(Stream *s) const override;
103106

104-
/// The "Owners" are the breakpoint locations that share this breakpoint
105-
/// site. The method adds the \a owner to this breakpoint site's owner list.
107+
/// The "Constituents" are the breakpoint locations that share this breakpoint
108+
/// site. The method adds the \a constituent to this breakpoint site's
109+
/// constituent list.
106110
///
107-
/// \param[in] owner
108-
/// \a owner is the Breakpoint Location to add.
109-
void AddOwner(const lldb::BreakpointLocationSP &owner);
111+
/// \param[in] constituent
112+
/// \a constituent is the Breakpoint Location to add.
113+
void AddConstituent(const lldb::BreakpointLocationSP &constituent);
110114

111115
/// This method returns the number of breakpoint locations currently located
112116
/// at this breakpoint site.
113117
///
114118
/// \return
115-
/// The number of owners.
116-
size_t GetNumberOfOwners();
119+
/// The number of constituents.
120+
size_t GetNumberOfConstituents();
117121

118122
/// This method returns the breakpoint location at index \a index located at
119-
/// this breakpoint site. The owners are listed ordinally from 0 to
120-
/// GetNumberOfOwners() - 1 so you can use this method to iterate over the
121-
/// owners
123+
/// this breakpoint site. The constituents are listed ordinally from 0 to
124+
/// GetNumberOfConstituents() - 1 so you can use this method to iterate over
125+
/// the constituents
122126
///
123127
/// \param[in] idx
124-
/// The index in the list of owners for which you wish the owner location.
128+
/// The index in the list of constituents for which you wish the
129+
/// constituent location.
125130
///
126131
/// \return
127132
/// A shared pointer to the breakpoint location at that index.
128-
lldb::BreakpointLocationSP GetOwnerAtIndex(size_t idx);
133+
lldb::BreakpointLocationSP GetConstituentAtIndex(size_t idx);
129134

130-
/// This method copies the breakpoint site's owners into a new collection.
131-
/// It does this while the owners mutex is locked.
135+
/// This method copies the breakpoint site's constituents into a new
136+
/// collection. It does this while the constituents mutex is locked.
132137
///
133138
/// \param[out] out_collection
134-
/// The BreakpointLocationCollection into which to put the owners
139+
/// The BreakpointLocationCollection into which to put the constituents
135140
/// of this breakpoint site.
136141
///
137142
/// \return
138143
/// The number of elements copied into out_collection.
139-
size_t CopyOwnersList(BreakpointLocationCollection &out_collection);
144+
size_t CopyConstituentsList(BreakpointLocationCollection &out_collection);
140145

141-
/// Check whether the owners of this breakpoint site have any thread
146+
/// Check whether the constituents of this breakpoint site have any thread
142147
/// specifiers, and if yes, is \a thread contained in any of these
143148
/// specifiers.
144149
///
@@ -151,7 +156,7 @@ class BreakpointSite : public std::enable_shared_from_this<BreakpointSite>,
151156
bool ValidForThisThread(Thread &thread);
152157

153158
/// Print a description of this breakpoint site to the stream \a s.
154-
/// GetDescription tells you about the breakpoint site's owners. Use
159+
/// GetDescription tells you about the breakpoint site's constituents. Use
155160
/// BreakpointSite::Dump(Stream *) to get information about the breakpoint
156161
/// site itself.
157162
///
@@ -203,9 +208,10 @@ class BreakpointSite : public std::enable_shared_from_this<BreakpointSite>,
203208

204209
void BumpHitCounts();
205210

206-
/// The method removes the owner at \a break_loc_id from this breakpoint
211+
/// The method removes the constituent at \a break_loc_id from this breakpoint
207212
/// list.
208-
size_t RemoveOwner(lldb::break_id_t break_id, lldb::break_id_t break_loc_id);
213+
size_t RemoveConstituent(lldb::break_id_t break_id,
214+
lldb::break_id_t break_loc_id);
209215

210216
BreakpointSite::Type m_type; ///< The type of this breakpoint site.
211217
uint8_t m_saved_opcode[8]; ///< The saved opcode bytes if this breakpoint site
@@ -215,20 +221,20 @@ class BreakpointSite : public std::enable_shared_from_this<BreakpointSite>,
215221
bool
216222
m_enabled; ///< Boolean indicating if this breakpoint site enabled or not.
217223

218-
// Consider adding an optimization where if there is only one owner, we don't
219-
// store a list. The usual case will be only one owner...
220-
BreakpointLocationCollection m_owners; ///< This has the BreakpointLocations
221-
///that share this breakpoint site.
222-
std::recursive_mutex
223-
m_owners_mutex; ///< This mutex protects the owners collection.
224+
// Consider adding an optimization where if there is only one constituent, we
225+
// don't store a list. The usual case will be only one constituent...
226+
BreakpointLocationCollection
227+
m_constituents; ///< This has the BreakpointLocations
228+
/// that share this breakpoint site.
229+
std::recursive_mutex m_constituents_mutex; ///< This mutex protects the
230+
///< constituents collection.
224231

225232
static lldb::break_id_t GetNextID();
226233

227234
// Only the Process can create breakpoint sites in
228235
// Process::CreateBreakpointSite (lldb::BreakpointLocationSP &, bool).
229-
BreakpointSite(BreakpointSiteList *list,
230-
const lldb::BreakpointLocationSP &owner, lldb::addr_t m_addr,
231-
bool use_hardware);
236+
BreakpointSite(const lldb::BreakpointLocationSP &constituent,
237+
lldb::addr_t m_addr, bool use_hardware);
232238

233239
BreakpointSite(const BreakpointSite &) = delete;
234240
const BreakpointSite &operator=(const BreakpointSite &) = delete;

0 commit comments

Comments
 (0)