Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[AutoBump] Merge with 770393bb (Jun 17) (79) #343

Merged
merged 102 commits into from
Sep 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
102 commits
Select commit Hold shift + click to select a range
93ffe17
[mlir][tosa] Only match rfft2d of floats in linalg conversion (#93432)
KB9 Jun 14, 2024
98b117e
Reapply "[libc] printf, putchar and vprintf in bareemetal entrypoints…
zeroomega Jun 14, 2024
0b24b47
[libc] Add the implementation of the fdopen function (#94186)
simonzgx Jun 14, 2024
daac13f
[flang] Fixing PPC lit failure due to alloca reordering. (#95621)
VijayKandiah Jun 14, 2024
7042fcc
[MLIR][Arith][Resubmit] add fastMathAttr on arith::extf and arith::tr…
crazydemo Jun 14, 2024
84e9401
[AMDGPU] Fix lit failure (#95620)
jrbyrnes Jun 14, 2024
cfbed2c
[Support] Import SipHash c reference implementation. (#94393)
ahmedbougacha Jun 14, 2024
577c3f1
[Support] Integrate SipHash.cpp into libSupport. (#94394)
ahmedbougacha Jun 15, 2024
2693811
[gn build] Port cfbed2c0e611
llvmgnsyncbot Jun 15, 2024
2b33591
[llvm][AArch64] Support -mcpu=apple-m4 (#95478)
jroelofs Jun 15, 2024
a0cef2b
[llvm][AArch64] Rearrange Apple CPUs by generation, not product class…
jroelofs Jun 15, 2024
61069bd
[Support] Add SipHash-based 16-bit ptrauth ABI-stable hash. (#93902)
ahmedbougacha Jun 15, 2024
8f74725
[lldb] Adds additional fields to ProcessInfo (#91544)
feg208 Jun 15, 2024
6f5dfbd
[libc][__support][bit] Switch popcount to Brian Kernighan’s Algorithm…
rpbeltran Jun 15, 2024
d7e4813
[mlir][scf]: Copy old attributes of old ForOp in replaceWithAdditiona…
AviadCo Jun 15, 2024
904c53d
[clang][Interp] Use different inline descriptors for global variables
tbaederr Jun 14, 2024
cddb9ce
[clang-format] Don't over-indent comment below unbraced body (#95354)
owenca Jun 15, 2024
675d8d6
(New) Add option to generate additional debug info for expression der…
huangjd Jun 15, 2024
7b6447a
[clang][Interp] Fix calling lambdas with explicit instance pointers...
tbaederr Jun 15, 2024
bb3091a
[clang][Interp][test] Move explicit object parameter test to cxx23.cpp
tbaederr Jun 15, 2024
7c6d0d2
[llvm] Use llvm::unique (NFC) (#95628)
kazutakahirata Jun 15, 2024
8cc6a24
[ELF] -r: force -Bstatic
MaskRay Jun 15, 2024
0a9a5f9
AMDGPU: Legalize atomicrmw fadd for v2f16/v2bf16 for local memory (#9…
arsenm Jun 15, 2024
5021e6d
AMDGPU: Handle legal v2f16/v2bf16 atomicrmw fadd for global/flat (#95…
arsenm Jun 15, 2024
23c1b48
[ARM] Remove duplicate custom SDag node (NFCI) (#93419)
s-barannikov Jun 15, 2024
bfd95a0
MathExtras: rewrite some methods to never overflow (#95556)
artagnon Jun 15, 2024
17712f5
[clang][Interp] Fix checking null pointers for initialization
tbaederr Jun 15, 2024
47f8b85
[Debug Info] Fix debug info ptr to ptr test (#95637)
huangjd Jun 15, 2024
27bebc1
[GISel] Unify multiple instances of getTypeForLLT (NFC) (#95577)
cdevadas Jun 15, 2024
5e9fcb9
[AMDGPU][GISel] Use datalayout alignment for buffer-load legalization…
cdevadas Jun 15, 2024
a78c104
[clang-tidy]fix false positives of the result of std::move() is used …
HerrCai0907 Jun 15, 2024
9476671
[X86] Lower vXi8 multiplies by constant using PMADDUBSW on SSSE3+ tar…
RKSimon Jun 15, 2024
3e8f217
[clang][Interp][NFC] Handle AddressSpaceConversion casts
tbaederr Jun 15, 2024
8e95454
[clang][Interp] Support ExtVectorElementExprs
tbaederr Jun 15, 2024
7d06bdc
[RISCV] Use isCompatible when we need runtime VSETVLIInfo equality. N…
lukel97 Jun 15, 2024
d462076
[x86] Fix -Wunused-value in X86ISelLowering.cpp (NFC)
DamonFool Jun 15, 2024
b381d1e
[X86] Add test showing failure to constant fold (V)PMADDWD nodes
RKSimon Jun 15, 2024
f857ed6
[X86] computeKnownBitsForTargetNode - add handling for (V)PMADDWD nodes
RKSimon Jun 15, 2024
29b0d57
[clang][modules] HeaderSearch::MarkFileModuleHeader sets textual head…
ian-twilightcoder Jun 15, 2024
961dd1a
[RISCV] Add scalar type test coverage for ISD::AVG nodes
RKSimon Jun 15, 2024
7cb5faf
[Clang][Driver] Expose `-fno-eliminate-unused-debug-types` to clang-c…
aganea Jun 15, 2024
95b77d9
Revert "AMDGPU: Handle legal v2f16/v2bf16 atomicrmw fadd for global/f…
nico Jun 15, 2024
417cd33
[X86] Add test showing failure to constant fold (V)PMADDUBSW nodes
RKSimon Jun 15, 2024
0938cdb
[X86] computeKnownBitsForTargetNode - add handling for (V)PMADDUBSW n…
RKSimon Jun 15, 2024
f3b4c00
[mlir][gpu] Add builder to `gpu.launch_func` (#95541)
fabianmcg Jun 15, 2024
e48f211
[libc++][TZDB] Disables a failing test. (#95659)
mordante Jun 15, 2024
ef01c75
[lldb] Remove dead code block (NFC) (#94775)
xgupta Jun 15, 2024
355e4a9
[llvm][CodeGen] Fix failure in window scheduler caused by weak depend…
huaatian Jun 15, 2024
213e308
[DAG] Fold Y = sra (X, size(X)-1); mul (or (Y, 1), X) -> (abs X)
RKSimon Jun 15, 2024
50e222f
[MachineSink] Use SmallDenseMap (NFC) (#95676)
kazutakahirata Jun 15, 2024
7c0c9d6
[LV] Add tests with multiple conditions feedin exit branches.
fhahn Jun 15, 2024
f05b15b
[JumpThreading] Use SmallPtrSet (NFC) (#95674)
kazutakahirata Jun 15, 2024
ecea837
[TargetLibraryInfo] Use std::move (NFC) (#95671)
kazutakahirata Jun 15, 2024
85a7bba
Cleanup MC/DC intrinsics for #82448 (#95496)
chapuni Jun 16, 2024
dcbe0d4
[clang-tidy] fix false negatives for performance-inefficient-vector-o…
HerrCai0907 Jun 16, 2024
22530e7
[CostModel][X86] Update vXi8 mul costs for AVX512BW/AVX2/AVX1/SSE
RKSimon Jun 16, 2024
a74a86c
[TargetLibraryInfo] Use the default move constructor/assignment opera…
kazutakahirata Jun 16, 2024
c44d528
[StackColoring] Declare BitVector outside the loop (#95688)
kazutakahirata Jun 16, 2024
630a6dd
[X86] Fix throughput of AVX2/AVX512VL vector extension/truncations
RKSimon Jun 16, 2024
edabb5c
[clang] Clean up macOS version flags (#95374)
Xazax-hun Jun 16, 2024
f4ce344
Reformat
chapuni Jun 16, 2024
d442bf0
mmapForContinuousMode: Calculate FileOffsetToBitmap from FileOffsetTo…
chapuni Jun 16, 2024
5548ea3
[Clang] Instantiate local constexpr functions eagerly (#95660)
zyn0217 Jun 16, 2024
1644a31
[Clang][AArch64] Generalise streaming mode checks for builtins. (#93802)
sdesmalen-arm Jun 16, 2024
907e739
AMDGPU: Don't use amdgpu_ps for some atomic tests
arsenm Jun 16, 2024
55696db
AMDGPU: Expand raw ptr buffer atomic fadd tests
arsenm Jun 16, 2024
570f362
AMDGPU: Fix legalization for llvm.amdgcn.raw.buffer.atomic.fadd.v2bf16
arsenm Jun 16, 2024
9f69e11
[VPlan] Use VPTransformState::UF in vectorizeInterleaveGroup (NFCI).
fhahn Jun 16, 2024
67285fe
[libcxx] [ci] Simplify the mingw x86_64 configs (#95609)
mstorsjo Jun 16, 2024
a106131
[clang-format] Handle AttributeMacro before access modifiers (#95634)
owenca Jun 16, 2024
fe9aef0
[clang-format] Add DiagHandler parameter to format::getStyle() (#91317)
pointhex Jun 16, 2024
d340f62
[clang][NFC] Update C++ DR issues list
Endilll Jun 16, 2024
fbac697
[Transforms] Replace incorrect uses of m_Deferred with m_Specific (#9…
AZero13 Jun 16, 2024
527e732
[clang-format][NFC] Suppress diagnostic noise in GetStyleOfFile test
owenca Jun 16, 2024
470d59d
[DebugInfo][Reassociate] Fix missing debug location drop (#95355)
Apochens Jun 17, 2024
ef18986
[clang-format] Handle Verilog delay control (#95703)
sstwcw Jun 16, 2024
15bb026
[C++20] [Modules] [Itanium ABI] Generate the vtable in the module uni…
ChuanqiXu9 Jun 17, 2024
e4e350e
[LLDB] Remove dead code (NFC) (#95713)
xgupta Jun 17, 2024
b7b3d17
[InstSimplify] Implement simple folds for `ucmp`/`scmp` intrinsics (#…
Poseydon42 Jun 17, 2024
1d4e857
[InstCombine] simplify average of lsb (#95684)
c8ef Jun 17, 2024
ede27d8
[SimplifyCFG] Add support for sinking instructions with multiple uses…
nikic Jun 17, 2024
5fe7f73
[clang][AArch64] Add validation for Global Register Variable. (#94271)
DanielKristofKiss Jun 17, 2024
9b933e9
LangRef: getelementptr: inbounds is about the object the pointer is '…
RalfJung Jun 17, 2024
5ef768d
[AMDGPULowerBufferFatPointers] Expand const exprs using fat pointers …
nikic Jun 17, 2024
525318e
[AMDGPU][LIT] Added a MIR LIT showing the SGPR spills (#94584)
vg0204 Jun 17, 2024
94a6b9c
[RISCV] Remove getOffsetOfLocalArea() (#93765)
wangpc-pp Jun 17, 2024
9a86d0a
[InstCombine] Prefer source over result element type (NFC)
nikic Jun 17, 2024
995835f
[SelectionDAG] Add support for the 3-way comparison intrinsics [US]CM…
Poseydon42 Jun 17, 2024
657ec73
[mlir][ArmSVE] Lower predicate-sized vector.create_masks to whilelt (…
MacDue Jun 17, 2024
87aed82
AMDGPU: Cleanup struct buffer atomic fadd intrinsic tests
arsenm Jun 16, 2024
e843f02
mlir: fix incorrect usages of divideCeilSigned (#95680)
artagnon Jun 17, 2024
f838f08
[lldb] Add register field enum class (#90063)
DavidSpickett Jun 17, 2024
7e4f7fc
[flang][debug] Support fixed size character type. (#95462)
abidh Jun 17, 2024
f84056c
[DebugInfo] Handle DW_OP_LLVM_extract_bits in SROA (#94638)
john-brawn-arm Jun 17, 2024
1ba8ed0
[libc++] Mark more types as trivially relocatable (#89724)
philnik777 Jun 17, 2024
f06d969
[LLVM][DAGCombiner] Extend coverage for insert_subv(undef, extract_su…
paulwalker-arm Jun 17, 2024
52d87de
[Xtensa] Fix register asm parsing. (#95551)
andreisfr Jun 17, 2024
6d973b4
[clang][CodeGen] Return RValue from `EmitVAArg` (#94635)
Fznamznon Jun 17, 2024
c2d9f25
[clang][CodeGen] Fix EmitInvariantStart for non-zero addrspace (#94346)
brunodf-snps Jun 17, 2024
770393b
[MachineLICM] Correctly Apply Register Masks (#95746)
Pierre-vh Jun 17, 2024
ab22c35
[AutoBump] Merge with fixes of 93ffe179 (Jun 15)
mgehre-amd Sep 12, 2024
7e79490
[AutoBump] Merge with 770393bb (Jun 17)
mgehre-amd Sep 12, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
Original file line number Diff line number Diff line change
Expand Up @@ -105,9 +105,9 @@ void InefficientVectorOperationCheck::addMatcher(
onImplicitObjectArgument(declRefExpr(to(TargetVarDecl))))
.bind(AppendCallName);
const auto AppendCall = expr(ignoringImplicit(AppendCallExpr));
const auto LoopVarInit =
declStmt(hasSingleDecl(varDecl(hasInitializer(integerLiteral(equals(0))))
.bind(LoopInitVarName)));
const auto LoopVarInit = declStmt(hasSingleDecl(
varDecl(hasInitializer(ignoringParenImpCasts(integerLiteral(equals(0)))))
.bind(LoopInitVarName)));
const auto RefersToLoopVar = ignoringParenImpCasts(
declRefExpr(to(varDecl(equalsBoundNode(LoopInitVarName)))));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,13 @@ void MoveConstArgCheck::registerMatchers(MatchFinder *Finder) {
unless(isInTemplateInstantiation()))
.bind("call-move");

Finder->addMatcher(MoveCallMatcher, this);
Finder->addMatcher(
expr(anyOf(
castExpr(hasSourceExpression(MoveCallMatcher)),
cxxConstructExpr(hasDeclaration(cxxConstructorDecl(anyOf(
isCopyConstructor(), isMoveConstructor()))),
hasArgument(0, MoveCallMatcher)))),
this);

auto ConstTypeParmMatcher =
qualType(references(isConstQualified())).bind("invocation-parm-type");
Expand Down
9 changes: 9 additions & 0 deletions clang-tools-extra/docs/ReleaseNotes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -387,6 +387,15 @@ Changes in existing checks
- Improved :doc:`modernize-use-using <clang-tidy/checks/modernize/use-using>`
check by adding support for detection of typedefs declared on function level.

- Improved :doc:`performance-inefficient-vector-operation
<clang-tidy/checks/performance/inefficient-vector-operation>` fixing false
negatives caused by different variable definition type and variable initial
value type in loop initialization expression.

- Improved :doc:`performance-move-const-arg
<clang-tidy/checks/performance/move-const-arg>` check by ignoring
``std::move()`` calls when their target is used as an rvalue.

- Improved :doc:`performance-unnecessary-copy-initialization
<clang-tidy/checks/performance/unnecessary-copy-initialization>` check by
detecting more cases of constant access. In particular, pointers can be
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -387,3 +387,38 @@ void foo(const StructWithFieldContainer &Src) {
B.push_back(Number);
}
}

namespace gh95596 {

void f(std::vector<int>& t) {
{
std::vector<int> gh95596_0;
// CHECK-FIXES: gh95596_0.reserve(10);
for (unsigned i = 0; i < 10; ++i)
gh95596_0.push_back(i);
// CHECK-MESSAGES: :[[@LINE-1]]:7: warning: 'push_back' is called inside a loop; consider pre-allocating the container capacity before the loop
}
{
std::vector<int> gh95596_1;
// CHECK-FIXES: gh95596_1.reserve(10);
for (int i = 0U; i < 10; ++i)
gh95596_1.push_back(i);
// CHECK-MESSAGES: :[[@LINE-1]]:7: warning: 'push_back' is called inside a loop; consider pre-allocating the container capacity before the loop
}
{
std::vector<int> gh95596_2;
// CHECK-FIXES: gh95596_2.reserve(10);
for (unsigned i = 0U; i < 10; ++i)
gh95596_2.push_back(i);
// CHECK-MESSAGES: :[[@LINE-1]]:7: warning: 'push_back' is called inside a loop; consider pre-allocating the container capacity before the loop
}
{
std::vector<int> gh95596_3;
// CHECK-FIXES: gh95596_3.reserve(10U);
for (int i = 0; i < 10U; ++i)
gh95596_3.push_back(i);
// CHECK-MESSAGES: :[[@LINE-1]]:7: warning: 'push_back' is called inside a loop; consider pre-allocating the container capacity before the loop
}
}

} // namespace gh95596
Original file line number Diff line number Diff line change
Expand Up @@ -114,14 +114,18 @@ void f8() {
int f9() { return M2(1); }

template <typename T>
T f10(const int x10) {
T f_unknown_target(const int x10) {
return std::move(x10);
// CHECK-MESSAGES: :[[@LINE-1]]:10: warning: std::move of the const variable 'x10' of the trivially-copyable type 'const int' has no effect; remove std::move() [performance-move-const-arg]
// CHECK-FIXES: return x10;
}

void f11() {
f10<int>(1);
f10<double>(1);
f_unknown_target<int>(1);
f_unknown_target<double>(1);
}

A&& f_return_right_ref() {
static A a{};
return std::move(a);
}

class NoMoveSemantics {
Expand Down
4 changes: 2 additions & 2 deletions clang/docs/CommandGuide/clang.rst
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,7 @@ number of cross compilers, or may only support a native target.

Specify the architecture to build for (all platforms).

.. option:: -mmacosx-version-min=<version>
.. option:: -mmacos-version-min=<version>

When building for macOS, specify the minimum version supported by your
application.
Expand Down Expand Up @@ -723,7 +723,7 @@ ENVIRONMENT

.. envvar:: MACOSX_DEPLOYMENT_TARGET

If :option:`-mmacosx-version-min` is unspecified, the default deployment
If :option:`-mmacos-version-min` is unspecified, the default deployment
target is read from this environment variable. This option only affects
Darwin targets.

Expand Down
4 changes: 2 additions & 2 deletions clang/docs/LanguageExtensions.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2063,7 +2063,7 @@ Objective-C @available
----------------------

It is possible to use the newest SDK but still build a program that can run on
older versions of macOS and iOS by passing ``-mmacosx-version-min=`` /
older versions of macOS and iOS by passing ``-mmacos-version-min=`` /
``-miphoneos-version-min=``.

Before LLVM 5.0, when calling a function that exists only in the OS that's
Expand All @@ -2084,7 +2084,7 @@ When a method that's introduced in the OS newer than the target OS is called, a

void my_fun(NSSomeClass* var) {
// If fancyNewMethod was added in e.g. macOS 10.12, but the code is
// built with -mmacosx-version-min=10.11, then this unconditional call
// built with -mmacos-version-min=10.11, then this unconditional call
// will emit a -Wunguarded-availability warning:
[var fancyNewMethod];
}
Expand Down
1 change: 1 addition & 0 deletions clang/docs/ReleaseNotes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -858,6 +858,7 @@ Bug Fixes to C++ Support
- Fixed several bugs in capturing variables within unevaluated contexts. (#GH63845), (#GH67260), (#GH69307),
(#GH88081), (#GH89496), (#GH90669) and (#GH91633).
- Fixed handling of brace ellison when building deduction guides. (#GH64625), (#GH83368).
- Clang now instantiates local constexpr functions eagerly for constant evaluators. (#GH35052), (#GH94849)

Bug Fixes to AST Handling
^^^^^^^^^^^^^^^^^^^^^^^^^
Expand Down
3 changes: 3 additions & 0 deletions clang/docs/UsersManual.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3347,6 +3347,9 @@ below. If multiple flags are present, the last one is used.
By default, Clang does not emit type information for types that are defined
but not used in a program. To retain the debug info for these unused types,
the negation **-fno-eliminate-unused-debug-types** can be used.
This can be particulary useful on Windows, when using NATVIS files that
can reference const symbols that would otherwise be stripped, even in full
debug or standalone debug modes.

Controlling Macro Debug Info Generation
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Expand Down
3 changes: 3 additions & 0 deletions clang/include/clang/AST/DeclBase.h
Original file line number Diff line number Diff line change
Expand Up @@ -670,6 +670,9 @@ class alignas(8) Decl {
/// Whether this declaration comes from another module unit.
bool isInAnotherModuleUnit() const;

/// Whether this declaration comes from the same module unit being compiled.
bool isInCurrentModuleUnit() const;

/// Whether the definition of the declaration should be emitted in external
/// sources.
bool shouldEmitInExternalSource() const;
Expand Down
5 changes: 2 additions & 3 deletions clang/include/clang/Basic/DiagnosticSemaKinds.td
Original file line number Diff line number Diff line change
Expand Up @@ -3200,9 +3200,8 @@ def err_attribute_bad_sve_vector_size : Error<
def err_attribute_arm_feature_sve_bits_unsupported : Error<
"%0 is only supported when '-msve-vector-bits=<bits>' is specified with a "
"value of 128, 256, 512, 1024 or 2048">;
def warn_attribute_arm_sm_incompat_builtin : Warning<
"builtin call has undefined behaviour when called from a %0 function">,
InGroup<DiagGroup<"undefined-arm-streaming">>;
def err_attribute_arm_sm_incompat_builtin : Error<
"builtin can only be called from a %0 function">;
def warn_attribute_arm_za_builtin_no_za_state : Warning<
"builtin call is not valid when calling from a function without active ZA state">,
InGroup<DiagGroup<"undefined-arm-za">>;
Expand Down
Loading