Commit graph

431079 commits

Author SHA1 Message Date
Kazu Hirata 9e88cbcc40 Use any_of (NFC) 2022-07-24 14:48:11 -07:00
Kazu Hirata bafeb63448 [Hexagon] Remove unused declaration CanReturnSmallStruct (NFC)
The declaration was introduced without a corresponding definition on
Dec 12, 2011 in commit 1213a7a57f.
2022-07-24 14:48:09 -07:00
Kazu Hirata 49f72cb5bd [Hexagon] Remove unused declaration SelectZeroExtend (NFC)
The corresponding definition was removed on Jan 23, 2018 in commit
3780a0e1fa.
2022-07-24 14:48:08 -07:00
Kazu Hirata 8ac2d06195 [IPO] Use range-based for loops (NFC) 2022-07-24 14:48:06 -07:00
Sanjay Patel a925bef70c [ValueTracking] allow vector types in isImpliedCondition()
The matching of constants assumed integers, but we can handle
splat vector constants seamlessly with m_APInt.
2022-07-24 17:46:48 -04:00
Sanjay Patel 4da47bee48 [ValueTracking] add test for isImpliedCondition with vector types; NFC 2022-07-24 17:07:17 -04:00
Sanjay Patel 13853cf730 [PhaseOrdering] add explanatory comment for test; NFC
This note was going to be added in D129650, but we
solved the problem by reverting another patch, and
I missed transferring the comment.
2022-07-24 17:07:17 -04:00
LLVM GN Syncbot 80cb0cab4e [gn build] Port b7aa9c4ac8 2022-07-24 20:22:32 +00:00
Nikolas Klauser b7aa9c4ac8 [libc++] Granularize some more type_traits
Reviewed By: ldionne, #libc

Spies: libcxx-commits, mgorny

Differential Revision: https://reviews.llvm.org/D128948
2022-07-24 22:22:12 +02:00
Kazu Hirata ea29810c9d [CodeGen] Remove a redundant void (NFC)
Identified with modernize-redundant-void-arg.
2022-07-24 12:27:14 -07:00
Kazu Hirata ec8fa36d7c [ExecutionEngine] Fix a header guard (NFC)
Identified with llvm-header-guard.
2022-07-24 12:27:12 -07:00
Kazu Hirata 87d627b623 Remove redundant string initialization (NFC)
Identified with readability-redundant-string-init.
2022-07-24 12:27:11 -07:00
Kazu Hirata 1d9231de70 [lldb] Remove redundant member initialization (NFC)
Identified with readability-redundant-member-init.
2022-07-24 12:27:09 -07:00
Kazu Hirata 4f8a2194c9 [lldb] Use nullptr instead of NULL (NFC)
Identified with modernize-use-nullptr.
2022-07-24 12:27:08 -07:00
Kazu Hirata 559463e94e [lldb] Use true instead of 0 (NFC)
Identified with modernize-use-bool-literals.
2022-07-24 12:27:06 -07:00
Kazu Hirata c661bd0886 [llvm] Remove unused forward declarations (NFC) 2022-07-24 12:27:05 -07:00
Fangrui Song 85cfd91723 [ELF] Optimize some non-constant alignTo with alignToPowerOf2. NFC
My x86-64 lld executable is 2KiB smaller. .eh_frame writing gets faster as there
were lots of divisions.
2022-07-24 11:20:49 -07:00
LLVM GN Syncbot 81f0f5a0e5 [gn build] Port 46ae26e7eb 2022-07-24 17:43:27 +00:00
Andrew Turner 92df59c83d [Driver] Enable some sanitizers on FreeBSD AArch64
They have been ported and tested to work on AArch64
(see D125883, D125758, and D125873).

Reviewed By: dim, MaskRay

Differential Revision: https://reviews.llvm.org/D130063
2022-07-24 10:41:21 -07:00
Jonas Toth 46ae26e7eb [clang-tidy] implement new check 'misc-const-correctness' to add 'const' to unmodified variables
This patch connects the check for const-correctness with the new general
utility to add `const` to variables.
The code-transformation is only done, if the detected variable for const-ness
is not part of a group-declaration.

The check allows to control multiple facets of adding `const`, e.g. if pointers themself should be
marked as `const` if they are not changed.

Reviewed By: njames93

Differential Revision: https://reviews.llvm.org/D54943
2022-07-24 19:37:54 +02:00
Khem Raj 8f24a56a3a [compiler-rt][CMake] Enable TF intrinsics on powerpc32 Linux
clang generates calls to these intrinsics when used for ppc32/linux, when using libgcc this works ok but when using compiler-rt for rtlib it fails with missing intrinsic symbols. also see [1]

[1] https://lists.llvm.org/pipermail/llvm-dev/2014-May/072784.html

Reviewed By: MaskRay, glaubitz

Differential Revision: https://reviews.llvm.org/D121379
2022-07-24 10:17:22 -07:00
Amaury Séchet b33aeee3e3 [X86] Autogenerate atomic tests. NFC 2022-07-24 16:42:34 +00:00
Matt Arsenault 40abb28f61 RegAllocGreedy: Fix subranges when rematerializing dead subreg defs
This would create a new interval missing the subrange and hit this
verifier error:

*** Bad machine code: Live interval for subreg operand has no subranges ***
- function:    test_remat_subreg_def
- basic block: %bb.0  (0xa568758) [0B;128B)
- instruction: 32B	dead undef %4.sub0:vreg_64 = V_MOV_B32_e32 2, implicit $exec
2022-07-24 11:51:59 -04:00
Amaury Séchet 162ec611e9 [X86] Autogenerate cfguard-x86-64-vectorcall.ll. NFC 2022-07-24 15:45:51 +00:00
Matt Arsenault 12144a12da AMDGPU: Fix broken test checks 2022-07-24 11:25:49 -04:00
Simon Pilgrim 562ee7cc5f [DAG] visitSMUL_LOHI/visitUMUL_LOHI - ensure we canonicalize constants to the RHS 2022-07-24 16:09:56 +01:00
Amaury Séchet 85efa22ee6 [X86] Autogenerate some of the fp128 tests. NFC 2022-07-24 14:42:47 +00:00
Simon Pilgrim 428c0f2adc [DAG] getNode - assert that SMUL_LOHI/UMUL_LOHI nodes have the correct ops + types 2022-07-24 15:30:57 +01:00
Simon Pilgrim d040c1a115 [X86] Regenerate hoist-and-by-const-from-lshr-in-eqcmp-zero.ll with common SSE2 prefix 2022-07-24 15:30:57 +01:00
Corentin Jabot fa8a1896a7 [Clang] Add missing paper revisions in the release notes [NFC] 2022-07-24 16:24:11 +02:00
Corentin Jabot c68baa73eb [clang] Fix incorrect constant folding of if consteval
Fixes https://github.com/llvm/llvm-project/issues/55638.

`if consteval` was evaluated incorrectly when in a
non-constant context that could be constant-folded.

Reviewed By: aaron.ballman

Differential Revision: https://reviews.llvm.org/D130437
2022-07-24 16:18:12 +02:00
Corentin Jabot 0ba128f7c8 [Clang] De-deprecate volatile compound operations
As per P2327R1,

|=, &= and ^= are no longer deprecated in all languages mode.

Reviewed By: aaron.ballman

Differential Revision: https://reviews.llvm.org/D130421
2022-07-24 16:16:52 +02:00
David Chisnall 94c3b16978 Fix crash in ObjC codegen introduced with 5ab6ee7599
5ab6ee7599 assumed that if `RValue::isScalar()` returns true then `RValue::getScalarVal` will return a valid value.  This is not the case when the return value is `void` and so void message returns would crash if they hit this path.  This is triggered only for cases where the nil-handling path needs to do something non-trivial (destroy arguments that should be consumed by the callee).

Reviewed By: triplef

Differential Revision: https://reviews.llvm.org/D123898
2022-07-24 13:59:45 +01:00
Simon Pilgrim 0708771cce [DAG] MaskedVectorIsZero - don't bother with (-1).isSubsetOf mask check. NFC.
Just use KnownBits::isZero() to ensure all the bits are known zero.
2022-07-24 13:12:21 +01:00
Simon Pilgrim e82d49bfed [DAG] SimplifyMultipleUseDemandedBits - early-out for any scalable vector types
Noticed while working to remove SelectionDAG::GetDemandedBits - we were relying on the callers to have already bailed for scalable vectors
2022-07-24 12:59:43 +01:00
Simon Pilgrim a3e38b4a20 [DAG] SimplifyDemandedVectorElts - if every and/mul element-pair has a zero/undef then just constant fold to zero 2022-07-24 12:00:31 +01:00
Simon Pilgrim 69d1e805ce [X86] combineAndnp - remove unused variable. NFC. 2022-07-24 11:32:44 +01:00
Simon Pilgrim ce81a0df67 [X86][SSE] Enable X86ISD::ANDNP constant folding 2022-07-24 11:07:34 +01:00
Simon Pilgrim 293899c64b [X86] Don't assume an AND/ANDNP element is undef/undemanded just because one element is undef
For mask ops like these, the other operand's corresponding element might be zero (result = zero) - so we must demand all the bits and that element.

This appears to be what D128570 was trying to fix - both sides of the funnel shift mask of the vXi64 (legalized to v2Xi32) were incorrectly simplifying the upper 32-bit halves to undef, resulting in bad folds later on.

I intend to address the test case regressions, but this close to the release branch I'd prefer to get a fix in first.
2022-07-24 10:53:38 +01:00
Fangrui Song 7feab85df8 [MC] Remove unused renameELFSection 2022-07-24 01:23:07 -07:00
Fangrui Song 6977ff4006 [MC] Delete dead zlib-gnu code and simplify writeSectionData 2022-07-24 01:17:34 -07:00
Nathan Ridge 2eba08fd9a [clangd] Do not try to use $0 as a placeholder in completion snippets
$0 can only be used as a tab stop, not as a placeholder (e.g.
`${0:expression}` is not valid)

Fixes https://github.com/clangd/clangd/issues/1190

Differential Revision: https://reviews.llvm.org/D128621
2022-07-24 03:01:18 -04:00
Kazu Hirata 5bbe452e75 Revert "[Orc] Use default member initialization (NFC)"
This reverts commit d534967b66.

The patch causes build failures, such as:

https://lab.llvm.org/buildbot/#/builders/121/builds/21760
2022-07-23 21:10:10 -07:00
Kazu Hirata 068d5066b3 [Hexagon] Remove unused declaration getByteVectorTy (NFC)
The declaration was introduced without a corresponding definition on
Sep 7, 2020 in commit f5d07a05bb.
2022-07-23 19:40:44 -07:00
Fangrui Song 89357f0cb9 [Passes] Simplify ChangePrinter names. NFC 2022-07-23 19:32:13 -07:00
Brad Smith ba1915028e [libcxx] Remove static inline and make use of _LIBCPP_HIDE_FROM_ABI in __support/xlocale/__nop_locale_mgmt.h header
Reviewed By: ldionne

Differential Revision: https://reviews.llvm.org/D129949
2022-07-23 22:12:37 -04:00
Kazu Hirata 2201d1827f [Analysis] Use default member initialization (NFC) 2022-07-23 18:36:24 -07:00
Kazu Hirata d534967b66 [Orc] Use default member initialization (NFC)
Identified with modernize-use-default-member-init
2022-07-23 18:36:23 -07:00
Craig Topper 9adc00a9d0 [RISCV] Add a continue to reduce nesting. NFC 2022-07-23 17:36:12 -07:00
NAKAMURA Takumi 944cb96429 clang/include/clang/module.modulemap: Mark Tooling/Inclusions/*.inc as textual.
Fixes llvmorg-15-init-917-g46a6f5ae148a
2022-07-24 09:32:34 +09:00