Skip to content

Commit d3728f4

Browse files
committed
Merge remote-tracking branch 'origin/main' into vplan-induction-resume-values
2 parents a14749c + 7085ac8 commit d3728f4

File tree

104 files changed

+2671
-585
lines changed

Some content is hidden

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

104 files changed

+2671
-585
lines changed

clang-tools-extra/clang-tidy/bugprone/ThrowKeywordMissingCheck.cpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,6 @@ using namespace clang::ast_matchers;
1515
namespace clang::tidy::bugprone {
1616

1717
void ThrowKeywordMissingCheck::registerMatchers(MatchFinder *Finder) {
18-
auto CtorInitializerList =
19-
cxxConstructorDecl(hasAnyConstructorInitializer(anything()));
20-
2118
Finder->addMatcher(
2219
cxxConstructExpr(
2320
hasType(cxxRecordDecl(
@@ -27,7 +24,7 @@ void ThrowKeywordMissingCheck::registerMatchers(MatchFinder *Finder) {
2724
stmt(anyOf(cxxThrowExpr(), callExpr(), returnStmt()))),
2825
hasAncestor(decl(anyOf(varDecl(), fieldDecl()))),
2926
hasAncestor(expr(cxxNewExpr(hasAnyPlacementArg(anything())))),
30-
allOf(hasAncestor(CtorInitializerList),
27+
allOf(hasAncestor(cxxConstructorDecl()),
3128
unless(hasAncestor(cxxCatchStmt()))))))
3229
.bind("temporary-exception-not-thrown"),
3330
this);

clang-tools-extra/docs/ReleaseNotes.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,10 @@ Changes in existing checks
177177
usages of ``sizeof()``, ``alignof()``, and ``offsetof()`` when adding or
178178
subtracting from a pointer directly or when used to scale a numeric value.
179179

180+
- Improved :doc:`bugprone-throw-keyword-missing
181+
<clang-tidy/checks/bugprone/throw-keyword-missing>` by fixing a false positive
182+
when using non-static member initializers and a constructor.
183+
180184
- Improved :doc:`bugprone-unchecked-optional-access
181185
<clang-tidy/checks/bugprone/unchecked-optional-access>` to support
182186
`bsl::optional` and `bdlb::NullableValue` from

clang-tools-extra/test/clang-tidy/checkers/bugprone/throw-keyword-missing.cpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,15 @@ CtorInitializerListTest::CtorInitializerListTest(float) try : exc(RegularExcepti
139139
RegularException();
140140
}
141141

142+
namespace GH115055 {
143+
class CtorInitializerListTest2 {
144+
public:
145+
CtorInitializerListTest2() {}
146+
private:
147+
RegularException exc{};
148+
};
149+
} // namespace GH115055
150+
142151
RegularException funcReturningExceptionTest(int i) {
143152
return RegularException();
144153
}

clang/test/Driver/riscv-profiles.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@
5757
// RVA22U64: "-target-feature" "+f"
5858
// RVA22U64: "-target-feature" "+d"
5959
// RVA22U64: "-target-feature" "+c"
60+
// RVA22U64: "-target-feature" "+b"
6061
// RVA22U64: "-target-feature" "+zic64b"
6162
// RVA22U64: "-target-feature" "+zicbom"
6263
// RVA22U64: "-target-feature" "+zicbop"
@@ -83,6 +84,7 @@
8384
// RVA22S64: "-target-feature" "+f"
8485
// RVA22S64: "-target-feature" "+d"
8586
// RVA22S64: "-target-feature" "+c"
87+
// RVA22S64: "-target-feature" "+b"
8688
// RVA22S64: "-target-feature" "+zic64b"
8789
// RVA22S64: "-target-feature" "+zicbom"
8890
// RVA22S64: "-target-feature" "+zicbop"
@@ -118,6 +120,7 @@
118120
// RVA23U64: "-target-feature" "+f"
119121
// RVA23U64: "-target-feature" "+d"
120122
// RVA23U64: "-target-feature" "+c"
123+
// RVA23U64: "-target-feature" "+b"
121124
// RVA23U64: "-target-feature" "+v"
122125
// RVA23U64: "-target-feature" "+zic64b"
123126
// RVA23U64: "-target-feature" "+zicbom"
@@ -156,6 +159,7 @@
156159
// RVA23S64: "-target-feature" "+f"
157160
// RVA23S64: "-target-feature" "+d"
158161
// RVA23S64: "-target-feature" "+c"
162+
// RVA23S64: "-target-feature" "+b"
159163
// RVA23S64: "-target-feature" "+v"
160164
// RVA23S64: "-target-feature" "+h"
161165
// RVA23S64: "-target-feature" "+zic64b"
@@ -217,6 +221,7 @@
217221
// RVB23U64: "-target-feature" "+f"
218222
// RVB23U64: "-target-feature" "+d"
219223
// RVB23U64: "-target-feature" "+c"
224+
// RVB23U64: "-target-feature" "+b"
220225
// RVB23U64: "-target-feature" "+zic64b"
221226
// RVB23U64: "-target-feature" "+zicbom"
222227
// RVB23U64: "-target-feature" "+zicbop"
@@ -249,6 +254,7 @@
249254
// RVB23S64: "-target-feature" "+f"
250255
// RVB23S64: "-target-feature" "+d"
251256
// RVB23S64: "-target-feature" "+c"
257+
// RVB23S64: "-target-feature" "+b"
252258
// RVB23S64: "-target-feature" "+zic64b"
253259
// RVB23S64: "-target-feature" "+zicbom"
254260
// RVB23S64: "-target-feature" "+zicbop"
@@ -290,6 +296,7 @@
290296
// RUN: %clang --target=riscv32 -### -c %s 2>&1 -march=rvm23u32 -menable-experimental-extensions \
291297
// RUN: | FileCheck -check-prefix=RVM23U32 %s
292298
// RVM23U32: "-target-feature" "+m"
299+
// RVM23U32: "-target-feature" "+b"
293300
// RVM23U32: "-target-feature" "+zicbop"
294301
// RVM23U32: "-target-feature" "+zicond"
295302
// RVM23U32: "-target-feature" "+zicsr"
@@ -309,6 +316,7 @@
309316
// PROFILE-WITH-ADDITIONAL: "-target-feature" "+f"
310317
// PROFILE-WITH-ADDITIONAL: "-target-feature" "+d"
311318
// PROFILE-WITH-ADDITIONAL: "-target-feature" "+c"
319+
// PROFILE-WITH-ADDITIONAL: "-target-feature" "+b"
312320
// PROFILE-WITH-ADDITIONAL: "-target-feature" "+zicbom"
313321
// PROFILE-WITH-ADDITIONAL: "-target-feature" "+zicbop"
314322
// PROFILE-WITH-ADDITIONAL: "-target-feature" "+zicboz"

compiler-rt/lib/ctx_profile/CtxInstrContextNode.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@
88
//==============================================================================
99
//
1010
// NOTE!
11-
// llvm/lib/ProfileData/CtxInstrContextNode.h and
11+
// llvm/include/llvm/ProfileData/CtxInstrContextNode.h and
1212
// compiler-rt/lib/ctx_profile/CtxInstrContextNode.h
13-
// must be exact copies of each other
13+
// must be exact copies of each other.
1414
//
1515
// compiler-rt creates these objects as part of the instrumentation runtime for
1616
// contextual profiling. LLVM only consumes them to convert a contextual tree
@@ -114,4 +114,4 @@ class ContextNode final {
114114
};
115115
} // namespace ctx_profile
116116
} // namespace llvm
117-
#endif
117+
#endif

lld/test/ELF/aarch64-feature-pac.s

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -76,12 +76,14 @@
7676
# PACDYN-NOT: 0x0000000070000001 (AARCH64_BTI_PLT)
7777
# PACDYN-NOT: 0x0000000070000003 (AARCH64_PAC_PLT)
7878

79-
## Turn on PAC entries with the -z pac-plt command line option. There are no
80-
## warnings in this case as the choice to use PAC in PLT entries is orthogonal
81-
## to the choice of using PAC in relocatable objects. The presence of the PAC
82-
## .note.gnu.property is an indication of preference by the relocatable object.
79+
## Turn on PAC entries with the -z pac-plt command line option. For files w/o
80+
## GNU_PROPERTY_AARCH64_FEATURE_1_PAC set in GNU_PROPERTY_AARCH64_FEATURE_1_AND
81+
## property, emit a warning.
82+
83+
# RUN: ld.lld %t.o %t2.o -z pac-plt %t.so -o %tpacplt.exe 2>&1 | FileCheck -DFILE=%t2.o --check-prefix WARN %s
84+
85+
# WARN: warning: [[FILE]]: -z pac-plt: file does not have GNU_PROPERTY_AARCH64_FEATURE_1_PAC property
8386

84-
# RUN: ld.lld %t.o %t2.o -z pac-plt %t.so -o %tpacplt.exe
8587
# RUN: llvm-readelf -n %tpacplt.exe | FileCheck --check-prefix=PACPROP %s
8688
# RUN: llvm-readelf --dynamic-table %tpacplt.exe | FileCheck --check-prefix PACDYN2 %s
8789
# RUN: llvm-objdump --no-print-imm-hex -d --mattr=+v8.3a --no-show-raw-insn %tpacplt.exe | FileCheck --check-prefix PACPLT %s

lldb/tools/lldb-dap/DAP.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -692,7 +692,7 @@ bool DAP::HandleObject(const llvm::json::Object &object) {
692692
const auto packet_type = GetString(object, "type");
693693
if (packet_type == "request") {
694694
const auto command = GetString(object, "command");
695-
auto handler_pos = request_handlers.find(std::string(command));
695+
auto handler_pos = request_handlers.find(command);
696696
if (handler_pos != request_handlers.end()) {
697697
handler_pos->second(object);
698698
return true; // Success

lldb/tools/lldb-dap/DAP.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ struct DAP {
171171
// the old process here so we can detect this case and keep running.
172172
lldb::pid_t restarting_process_id;
173173
bool configuration_done_sent;
174-
std::map<std::string, RequestCallback> request_handlers;
174+
std::map<std::string, RequestCallback, std::less<>> request_handlers;
175175
bool waiting_for_run_in_terminal;
176176
ProgressEventReporter progress_event_reporter;
177177
// Keep track of the last stop thread index IDs as threads won't go away

llvm/docs/NVPTXUsage.rst

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -599,6 +599,70 @@ described in the ``s2g.tile`` mode intrinsics above.
599599
For more information, refer PTX ISA
600600
`<https://docs.nvidia.com/cuda/parallel-thread-execution/index.html#data-movement-and-conversion-instructions-cp-async-bulk-tensor>`_.
601601

602+
'``llvm.nvvm.cp.async.bulk.tensor.prefetch.tile.[1-5]d``'
603+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
604+
605+
Syntax:
606+
"""""""
607+
608+
.. code-block:: llvm
609+
610+
declare void @llvm.nvvm.cp.async.bulk.tensor.prefetch.tile.1d(ptr %tensor_map, i32 %d0, i64 %ch, i1 %flag_ch)
611+
declare void @llvm.nvvm.cp.async.bulk.tensor.prefetch.tile.2d(..., i32 %d0, i32 %d1, ...)
612+
declare void @llvm.nvvm.cp.async.bulk.tensor.prefetch.tile.3d(..., i32 %d0, i32 %d1, i32 %d2, ...)
613+
declare void @llvm.nvvm.cp.async.bulk.tensor.prefetch.tile.4d(..., i32 %d0, i32 %d1, i32 %d2, i32 %d3, ...)
614+
declare void @llvm.nvvm.cp.async.bulk.tensor.prefetch.tile.5d(..., i32 %d0, i32 %d1, i32 %d2, i32 %d3, i32 %d4, ...)
615+
616+
Overview:
617+
"""""""""
618+
619+
The '``@llvm.nvvm.cp.async.bulk.tensor.prefetch.tile.[1-5]d``' intrinsics
620+
correspond to the ``cp.async.bulk.prefetch.tensor.[1-5]d.L2.global*`` set
621+
of PTX instructions. These instructions initiate an asynchronous prefetch
622+
of tensor data from global memory to the L2 cache. In tile mode, the
623+
multi-dimensional layout of the source tensor is preserved at the destination.
624+
The dimension of the tensor data ranges from 1d to 5d with the coordinates
625+
specified by the ``i32 %d0 ... i32 %d4`` arguments.
626+
627+
* The last argument to these intrinsics is a boolean flag
628+
indicating support for cache_hint. This flag argument must
629+
be a compile-time constant. When set, it indicates a valid
630+
cache_hint (``i64 %ch``) and generates the ``.L2::cache_hint``
631+
variant of the PTX instruction.
632+
633+
For more information, refer PTX ISA
634+
`<https://docs.nvidia.com/cuda/parallel-thread-execution/#data-movement-and-conversion-instructions-cp-async-bulk-prefetch-tensor>`_.
635+
636+
'``llvm.nvvm.cp.async.bulk.tensor.prefetch.im2col.[1-5]d``'
637+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
638+
639+
Syntax:
640+
"""""""
641+
642+
.. code-block:: llvm
643+
644+
declare void @llvm.nvvm.cp.async.bulk.tensor.prefetch.im2col.3d(ptr %tensor_map, i32 %d0, i32 %d1, i32 %d2, i16 %im2col0, i64 %ch, i1 %flag_ch)
645+
declare void @llvm.nvvm.cp.async.bulk.tensor.prefetch.im2col.4d(..., i32 %d0, i32 %d1, i32 %d2, i32 %d3, i16 %im2col0, i16 %im2col1, ...)
646+
declare void @llvm.nvvm.cp.async.bulk.tensor.prefetch.im2col.5d(..., i32 %d0, i32 %d1, i32 %d2, i32 %d3, i32 %d4, i16 %im2col0, i16 %im2col1, i16 %im2col2, ...)
647+
648+
Overview:
649+
"""""""""
650+
651+
The '``@llvm.nvvm.cp.async.bulk.tensor.prefetch.im2col.[1-5]d``' intrinsics
652+
correspond to the ``cp.async.bulk.prefetch.tensor.[1-5]d.L2.global*`` set
653+
of PTX instructions. These instructions initiate an asynchronous prefetch
654+
of tensor data from global memory to the L2 cache. In im2col mode, some
655+
dimensions of the source tensor are unrolled into a single dimensional
656+
column at the destination. In this mode, the tensor has to be at least
657+
three-dimensional. Along with the tensor coordinates, im2col offsets are
658+
also specified (denoted by ``i16 im2col0...i16 %im2col2``). The number
659+
of im2col offsets is two less than the number of dimensions of the tensor
660+
operation. The last argument to these intrinsics is a boolean flag, with
661+
the same functionality as described in the ``tile`` mode intrinsics above.
662+
663+
For more information, refer PTX ISA
664+
`<https://docs.nvidia.com/cuda/parallel-thread-execution/#data-movement-and-conversion-instructions-cp-async-bulk-prefetch-tensor>`_.
665+
602666
Other Intrinsics
603667
----------------
604668

llvm/include/llvm/ADT/STLExtras.h

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -416,7 +416,8 @@ static constexpr bool HasFreeFunctionRBegin =
416416
} // namespace detail
417417

418418
// Returns an iterator_range over the given container which iterates in reverse.
419-
template <typename ContainerTy> auto reverse(ContainerTy &&C) {
419+
// Does not mutate the container.
420+
template <typename ContainerTy> [[nodiscard]] auto reverse(ContainerTy &&C) {
420421
if constexpr (detail::HasFreeFunctionRBegin<ContainerTy>)
421422
return make_range(adl_rbegin(C), adl_rend(C));
422423
else
@@ -1182,11 +1183,13 @@ template <typename ValueT, typename... RangeTs> class concat_range {
11821183

11831184
} // end namespace detail
11841185

1185-
/// Concatenated range across two or more ranges.
1186+
/// Returns a concatenated range across two or more ranges. Does not modify the
1187+
/// ranges.
11861188
///
11871189
/// The desired value type must be explicitly specified.
11881190
template <typename ValueT, typename... RangeTs>
1189-
detail::concat_range<ValueT, RangeTs...> concat(RangeTs &&... Ranges) {
1191+
[[nodiscard]] detail::concat_range<ValueT, RangeTs...>
1192+
concat(RangeTs &&...Ranges) {
11901193
static_assert(sizeof...(RangeTs) > 1,
11911194
"Need more than one range to concatenate!");
11921195
return detail::concat_range<ValueT, RangeTs...>(

0 commit comments

Comments
 (0)