Guillaume Chatelet [Mon, 12 Jun 2023 08:32:00 +0000 (08:32 +0000)]
Revert D148717 "[libc] Improve memcmp latency and codegen"
This broke aarch64 debug buildbot https://lab.llvm.org/buildbot/#/builders/223/builds/21703
This reverts commit
bd4f978754758d5ef29d1f10370f45362da3de37.
David Carlier [Mon, 12 Jun 2023 08:05:31 +0000 (09:05 +0100)]
sanitizers: intercept FreeBSD's cpuset_getaffinity call.
Reviewed By: melver
Differential Revision: https://reviews.llvm.org/D152609
Guillaume Chatelet [Mon, 12 Jun 2023 07:55:13 +0000 (07:55 +0000)]
[libc] Improve memcmp latency and codegen
This is based on ideas from @nafi to:
- use a branchless version of 'cmp' for 'uint32_t',
- completely resolve the lexicographic comparison through vector
operations when wide types are available. We also get rid of byte
reloads and serializing '__builtin_ctzll'.
I did not include the suggestion to replace comparisons of 'uint16_t'
with two 'uint8_t' as it did not seem to help the codegen. This can
be revisited in sub-sequent patches.
The code been rewritten to reduce nested function calls, making the
job of the inliner easier and preventing harmful code duplication.
Reviewed By: nafi3000
Differential Revision: https://reviews.llvm.org/D148717
Francesco Petrogalli [Mon, 12 Jun 2023 06:57:25 +0000 (08:57 +0200)]
[MISched] Use StartAtCycle in trace dumps.
This commit re-work the methods that dump traces with resource usage to take into account the StartAtCycle value added by https://reviews.llvm.org/D150310.
For each i, the values of the lists StartAtCycle and ReservedCycles is are printed with the interval [StartAtCycle[i], ReservedCycles[i])
```
... | StartAtCycle[i] | ... | ReservedCycles[i] - 1 | ReservedCycles[i] | ...
| xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx | |
```
Reviewed By: andreadb
Differential Revision: https://reviews.llvm.org/D150311
Christian Ulmann [Mon, 12 Jun 2023 06:23:42 +0000 (06:23 +0000)]
[mlir][llvm] Ensure immediate usage in intrinsics
This commit changes intrinsics that have immarg parameter attributes to
model these parameters as attributes, instead of operands. Using
operands only works if the operation is an `llvm.mlir.constant`,
otherwise the exported LLVMIR is invalid.
Reviewed By: gysit
Differential Revision: https://reviews.llvm.org/D151692
Hristo Hristov [Sat, 10 Jun 2023 07:52:09 +0000 (10:52 +0300)]
[libc++][spaceship] P1614R2: Removed global `operator!=` from `allocator`
Implements parts of P1614R2:
- Removed global `operator!=` from `allocator`
Reviewed By: #libc, Mordante
Differential Revision: https://reviews.llvm.org/D152612
Piotr Zegar [Mon, 12 Jun 2023 06:26:19 +0000 (06:26 +0000)]
Revert "[clang-tidy] Move formatDereference to FixitHintUtils"
This reverts commit
636c672751425f1c73c28bea57c1913043cd21b2.
Hristo Hristov [Sat, 10 Jun 2023 07:28:05 +0000 (10:28 +0300)]
[libc++][spaceship] P1612R2: Removed `operator!=` from `bitset`
Implements parts of P1612R2:
- Removed `operator!=` from `bitset`
Reviewed By: #libc, Mordante
Differential Revision: https://reviews.llvm.org/D152611
Hristo Hristov [Sun, 11 Jun 2023 05:28:04 +0000 (08:28 +0300)]
[libc++][spaceship] P1614R2: Removed `operator!=` from `unordered_map`, `unordered_multimap`, `__hash_map_iterator`
Implements parts of P1614R2:
- Removed ops from `unordered_map`
- Removed ops from `unordered_multimap`
- Removed ops from `__hash_map_iterator`
Reviewed By: #libc, Mordante
Differential Revision: https://reviews.llvm.org/D152642
Mike Crowe [Mon, 12 Jun 2023 06:09:17 +0000 (06:09 +0000)]
[clang-tidy] Move formatDereference to FixitHintUtils
I'd like to use RedundantStringCStrCheck's formatDereference function
from the up-coming modernize-use-std-print check. Let's move it to
FixItHintUtils so that the implementation can be shared.
Reviewed By: PiotrZSL
Differential Revision: https://reviews.llvm.org/D150602
Piotr Zegar [Mon, 12 Jun 2023 06:06:41 +0000 (06:06 +0000)]
[clang-tidy][NFC] Sort changes by check name in ReleaseNotes
Sort changes listed in ClangTidy release notes by
a check name.
Felix [Mon, 12 Jun 2023 05:34:08 +0000 (05:34 +0000)]
[clang-tidy] Readability-container-data-pointer adds new option to ignore Containers
Adds a new option to the clang-tidy's check : readability-container-data-pointer to ignore some containers.
This option is useful in the case of std::array where the size is known at compile time and there is no real risk to access the first index of the container. In that case some users might prefer to ignore this type of container.
Relates to : https://github.com/llvm/llvm-project/issues/57445
Reviewed By: PiotrZSL
Differential Revision: https://reviews.llvm.org/D133244
Weining Lu [Mon, 12 Jun 2023 05:47:41 +0000 (13:47 +0800)]
[doc][LoongArch] Use ``lp64s`` instead of `lp64s`. NFC
Haojian Wu [Fri, 9 Jun 2023 16:47:47 +0000 (18:47 +0200)]
[AST] Always set dependent-type for the CallExpr for error-recovery in C.
When build CallExpr for error-recovery where we have any dependent
child nodes), we should set a dependent type for CallExpr to avoid
running into some unexpected following semantic analysis.
This also aligns with the C++ behavior.
This fixes the symptom crashes: https://github.com/llvm/llvm-project/issues/50244
Differential Revision: https://reviews.llvm.org/D152561
wangpc [Mon, 12 Jun 2023 04:06:23 +0000 (12:06 +0800)]
[RISCV] Don't iterate SEW set again for floating-point
We have already iterated over `FPList`, so there is no need to get
and loop over SEW set again. Or we will generate some useless pseudo
instructions like `PseudoXXX_VF16_M1_E64`.
We add SEW to FPR_Info so that we can get it later. And we rewrite
FPR_Info to reduce arguments incidentally.
This should reduce the size of files generated by TableGen.
Reviewed By: craig.topper
Differential Revision: https://reviews.llvm.org/D152524
luxufan [Sat, 10 Jun 2023 07:48:09 +0000 (15:48 +0800)]
[SCCP] Replace new value's value state with removed value's
In replaceSignedInst, if a signed instruction can be repalced with
unsigned instruction, we created a new instruction and removed the old
instruction's value state. If the following instructions has this new
instruction as a use operand, transformations like replaceSignedInst and
refineInstruction would be blocked. The reason is there is no value
state for the new instrution.
This patch set the new instruction's value state with the removed
instruction's value state. I believe it is correct bacause when we
repalce a signed instruction with unsigned instruction, the value state
is not changed.
Reviewed By: nikic
Differential Revision: https://reviews.llvm.org/D152337
Kelvin Li [Fri, 9 Jun 2023 18:47:51 +0000 (14:47 -0400)]
[flang] Improve compiler_version test (NFC)
This patch is to allow an extra string prepended to the compiler_version.
The check is enhanced to verify that "flang version" is followed by
numbers in the form of "n.n.n".
Differential Revision: https://reviews.llvm.org/D152572
Douglas Yung [Mon, 12 Jun 2023 00:53:44 +0000 (17:53 -0700)]
Make test more flexible for platforms that may emit extra arguments.
Fangrui Song [Sun, 11 Jun 2023 22:38:13 +0000 (15:38 -0700)]
[Driver] Default to -fxray-function-index
As explained by commit
849f1dd15e92fda2b83dbb6144e6b28b2cb946e0,
-fxray-function-index was the original default but was accidentally flipped by
commit
d8a8e5d6240a1db809cd95106910358e69bbf299. Restore the previous behavior.
Originally reported by Oleksii Lozovskyi in D145848.
Fangrui Song [Sun, 11 Jun 2023 22:27:22 +0000 (15:27 -0700)]
[XRay] Rename XRayOmitFunctionIndex to XRayFunctionIndex
Apply my post-commit comment on D81995. The negative name misguided commit
d8a8e5d6240a1db809cd95106910358e69bbf299 (`[clang][cli] Remove marshalling from
Opt{In,Out}FFlag`) to:
* accidentally flip the option to not emit the xray_fn_idx section.
* change -fno-xray-function-index (instead of -fxray-function-index) to emit xray_fn_idx
This patch renames XRayOmitFunctionIndex and makes -fxray-function-index emit
xray_fn_idx, but the default remains -fno-xray-function-index .
Florian Hahn [Sun, 11 Jun 2023 20:40:05 +0000 (21:40 +0100)]
[VPlan] Use step from induction recipe directly. (NFC)
Directly use the step of the transformed induction instead of creating
a new step. This allows replacing all uses of strides in D147783.
Kazu Hirata [Sun, 11 Jun 2023 20:19:26 +0000 (13:19 -0700)]
[CodeGen] Use DenseMapBase::lookup (NFC)
Kazu Hirata [Sun, 11 Jun 2023 20:19:25 +0000 (13:19 -0700)]
[ExecutionEngine] Remove unused declaration executeCastOperation
The corresponding function definition was removed by:
commit
7a9c62baa66ae262755db0d3221ce095d48681d5
Author: Reid Spencer <rspencer@reidspencer.com>
Date: Fri Jan 12 07:05:14 2007 +0000
Kazu Hirata [Sun, 11 Jun 2023 20:19:23 +0000 (13:19 -0700)]
[FuzzMutate] Remove unused declaration chooseType
The declaration was added without a corresponding function definition
by:
commit
7d449d31a4d2fe393e32be7c478c18b16b301428
Author: Justin Bogner <mail@justinbogner.com>
Date: Mon Aug 21 22:57:06 2017 +0000
Kazu Hirata [Sun, 11 Jun 2023 20:19:22 +0000 (13:19 -0700)]
Do not unnecessarily include StringSwitch.h
Kazu Hirata [Sun, 11 Jun 2023 20:19:20 +0000 (13:19 -0700)]
[ProfileData] Remove unused class SoftInstrProfErrors
The last use was removed by:
commit
98cce00371d271c9da8de806e4cc4c886a85d56c
Author: David Blaikie <dblaikie@gmail.com>
Date: Mon Jul 10 03:04:59 2017 +0000
Differential Revision: https://reviews.llvm.org/D152640
Kazu Hirata [Sun, 11 Jun 2023 20:19:19 +0000 (13:19 -0700)]
[Scalar] Remove RewriteStatepointsForGCLegacyPass
Differential Revision: https://reviews.llvm.org/D152638
Oleksii Lozovskyi [Sun, 11 Jun 2023 19:53:29 +0000 (12:53 -0700)]
[AArch64][ARM][X86] Split XRay tests for Linux/macOS
XRay instrumentation works for macOS running on Apple Silicon, but
codegen is untested there. I'm going to make changes affecting this
target, get the XRay tests running on AArch64.
Data sections are going to become slightly different on x86_64 soon.
I do want the tests to be specific about symbol names, so instead of
having test check the common step, bifurcate tests a bit and check
the full symbol names.
As for ARM, XRay is not really supported on iOS at the moment, though
ARM is also really used there with modern phones. Nevertheless, codegen
tests exist and the output is going to change a little, make it easier
to write the special case for iOS.
Reviewed By: MaskRay
Differential Revision: https://reviews.llvm.org/D145291
Fangrui Song [Sun, 11 Jun 2023 19:03:08 +0000 (12:03 -0700)]
[Driver] Simplify xray options
Also add driver test missed by D87953 (-fxray-function-groups=).
(test/Driver/XRay/lit.local.cfg misunderstands how driver testing works.
We place the test in test/Driver instead.)
Hristo Hristov [Sun, 11 Jun 2023 05:39:49 +0000 (08:39 +0300)]
[libc++][spaceship] P1614R2: Removed ops from `unordered_multiset`, `unordered_set`
Implements parts of P1614R2:
- Removed ops from `unordered_multiset`,
- Removed ops from `unordered_set`
Reviewed By: #libc, Mordante
Differential Revision: https://reviews.llvm.org/D152643
Fangrui Song [Sun, 11 Jun 2023 18:19:02 +0000 (11:19 -0700)]
[Driver] Simplify -fxray-instrument handling
Simon Pilgrim [Sun, 11 Jun 2023 16:51:50 +0000 (17:51 +0100)]
[GlobalIsel][X86] Ensure bit count legalizer patterns keep matching result + input scalar types
Fangrui Song [Sun, 11 Jun 2023 17:06:39 +0000 (10:06 -0700)]
[Driver] Place -ffixed-r19 and some -m* options in m_Group
For these -m* options, there is no behavior difference other than
documentation difference (Target-dependent compilation options).
Hristo Hristov [Sat, 10 Jun 2023 09:44:03 +0000 (12:44 +0300)]
[libc++][spaceship] P1614R2: Removed ops from `complex`
Implements parts of P1614R2:
- Removed ops from `complex`
Reviewed By: #libc, Mordante
Differential Revision: https://reviews.llvm.org/D152615
Hristo Hristov [Sat, 10 Jun 2023 10:58:56 +0000 (13:58 +0300)]
[libc++][spaceship] P1614R2: Added `operator==` to `slice`
Implements parts of P1614R2:
- Added `operator==` to `slice`
Reviewed By: #libc, Mordante
Differential Revision: https://reviews.llvm.org/D152617
Hristo Hristov [Sat, 10 Jun 2023 20:31:17 +0000 (23:31 +0300)]
[libc++][spaceship] P1614R2: Removed ops from `memory_resource`, `polymorphic_allocator`
Implements parts of P1614R2
- Removed ops from `memory_resource`
- Removed ops from `polymorphic_allocator`
Reviewed By: #libc, Mordante
Differential Revision: https://reviews.llvm.org/D152629
Fangrui Song [Sun, 11 Jun 2023 15:59:42 +0000 (08:59 -0700)]
[Driver] Place -mharden-sls= in m_Group
Fix https://github.com/llvm/llvm-project/issues/63237
With only a link action, we claim all CompileOnly_Group options (including -f*,
-m*, -i*, etc). -mharden-sls= is not in a Group and therefore not claimed,
leading to a spurious -Wunused-command-line-argument warning, and after
5548843d692a92a7840f14002debc3cebcb3cdc3, an error.
Kazu Hirata [Sun, 11 Jun 2023 15:45:07 +0000 (08:45 -0700)]
[IPO] Remove unused forward declarations
Deniz Evrenci [Wed, 7 Jun 2023 00:31:13 +0000 (01:31 +0100)]
[clang-tidy] Check functions called from catch blocks
These functions can rethrow a current exception that is caught by the
catch block. We can pass the currently caught excections to the function
declaration analyzer just like the statement analyzer to handle this
case.
Differential Revision: https://reviews.llvm.org/D152330
Kazu Hirata [Sun, 11 Jun 2023 14:56:37 +0000 (07:56 -0700)]
[InstCombine] Remove unused function createInstructionCombiningPass
The last use was removed by:
commit
934c82d31801e65aa3bbe99a0e64f903621c2e04
Author: Florian Hahn <flo@fhahn.com>
Date: Fri Feb 24 13:39:32 2023 +0100
Once I remove createInstructionCombiningPass, then:
InstructionCombiningPass::InstructionCombiningPass(unsigned MaxIterations)
becomes unused. Once I remove that:
InstructionCombiningPass::MaxIterations is always initialized with
InstCombineDefaultMaxIterations, so this patch does the constant
propagation and removes InstructionCombiningPass::MaxIterations as
well.
Differential Revision: https://reviews.llvm.org/D152641
Antonio Frighetto [Sat, 10 Jun 2023 16:49:33 +0000 (18:49 +0200)]
[ConstraintElimination] Handle `ICMP_EQ` predicates
Simplification of equality predicates is now supported by
transferring equalities into inequalities. This is achieved
by separately checking that both `isConditionImplied(A >= B)`
and `isConditionImplied(A <= B)` hold.
Differential Revision: https://reviews.llvm.org/D152067
David Green [Sun, 11 Jun 2023 09:25:24 +0000 (10:25 +0100)]
[NFC] Replace ;; with ;
Yingwei Zheng [Sun, 11 Jun 2023 08:42:01 +0000 (16:42 +0800)]
[RISCV][NFC] Fix typo in RISCVAsmPrinter::emitNTLHint
David Green [Sun, 11 Jun 2023 08:42:34 +0000 (09:42 +0100)]
[AArch64] Make VECREDUCE_FMIN/FMAX legal. NFCI
VECREDUCE_FMIN/FMAX wil be lowered to fminnmv/fmaxnmv. They needn't be custom
lowered through an intrinsic to do it, and can be treated as Legal instead.
AdityaK [Sun, 11 Jun 2023 06:10:23 +0000 (23:10 -0700)]
[libcxx] Use the unoptimized routines for volatile source types
As reported in: D147741
Reviewers: philnik, var-const, ldionne, hans
Differential Revision: https://reviews.llvm.org/D152571
Kazu Hirata [Sun, 11 Jun 2023 04:52:52 +0000 (21:52 -0700)]
[ObjectYAML] Remove unused struct DebugSubsectionState
The last use was removed by:
commit
a3da4467fa8ed514130736c6c15f01422159d00d
Author: Zachary Turner <zturner@google.com>
Date: Wed Jun 14 05:31:00 2017 +0000
Kazu Hirata [Sun, 11 Jun 2023 04:52:50 +0000 (21:52 -0700)]
[Scalar] Remove unused function createLICMPass
The last use was removed by:
commit
d623b2f95fd559901f008a0588dddd0949a8db01
Author: Arthur Eubanks <aeubanks@google.com>
Date: Fri Mar 10 17:24:19 2023 -0800
Kazu Hirata [Sun, 11 Jun 2023 04:52:49 +0000 (21:52 -0700)]
[CodeGen] Remove unused declaration createNVPTXRuntimeFunction
The corresponding definition was removed by:
commit
3cc1f1fc1d97952136185f4eafb827694875de17
Author: Joseph Huber <jhuber6@vols.utk.edu>
Date: Thu Oct 8 12:03:11 2020 -0400
Kazu Hirata [Sun, 11 Jun 2023 04:52:47 +0000 (21:52 -0700)]
[Transforms] Remove unused declaration createGVExtractionPass
The corresponding function definition was removed by:
commit
2118b9d39b91e93c0146611235072cd6ca0f27b1
Author: Arthur Eubanks <aeubanks@google.com>
Date: Tue Dec 20 12:55:05 2022 -0800
Michael Liao [Sun, 11 Jun 2023 02:03:33 +0000 (22:03 -0400)]
[TableGen] Fix indentation. NFC
Kazu Hirata [Sun, 11 Jun 2023 02:21:00 +0000 (19:21 -0700)]
[llvm] Remove unused declarations initialize.*Pass
Ben Shi [Sun, 11 Jun 2023 00:41:44 +0000 (08:41 +0800)]
[AVR] Optimize 8-bit rotation when rotation bits == 3
Fixes https://github.com/llvm/llvm-project/issues/63100
Reviewed By: aykevl
Differential Revision: https://reviews.llvm.org/D152365
Ben Shi [Sun, 11 Jun 2023 00:36:16 +0000 (08:36 +0800)]
[AVR] Optimize 8-bit rotation when rotation bits >= 4
Fixes https://github.com/llvm/llvm-project/issues/63100
Reviewed By: aykevl, Patryk27, jacquesguan
Differential Revision: https://reviews.llvm.org/D152130
Kazu Hirata [Sat, 10 Jun 2023 22:32:47 +0000 (15:32 -0700)]
[Transforms] Remove AddDiscriminatorsLegacyPass
The last use was removed by:
commit
ae0987d242e266847f21f5fa1bffa97ce3eff586
Author: Kazu Hirata <kazu@google.com>
Date: Sat Jun 10 13:51:35 2023 -0700
Differential Revision: https://reviews.llvm.org/D152636
Kazu Hirata [Sat, 10 Jun 2023 22:20:40 +0000 (15:20 -0700)]
[Scalar] Remove CallSiteSplittingLegacyPass
The last use was removed by:
commit
fd48d0a0adaa5fcdd24d02a58ba8a6210adafc28
Author: Kazu Hirata <kazu@google.com>
Date: Sat Jun 10 13:51:37 2023 -0700
Differential Revision: https://reviews.llvm.org/D152635
Kazu Hirata [Sat, 10 Jun 2023 20:51:38 +0000 (13:51 -0700)]
[Transforms] Remove unused function createSimpleLoopUnrollPass
The last use was removed by:
commit
d623b2f95fd559901f008a0588dddd0949a8db01
Author: Arthur Eubanks <aeubanks@google.com>
Date: Fri Mar 10 17:24:19 2023 -0800
Kazu Hirata [Sat, 10 Jun 2023 20:51:37 +0000 (13:51 -0700)]
[Transforms] Remove unused function createCallSiteSplittingPass
The last use was removed by:
commit
d623b2f95fd559901f008a0588dddd0949a8db01
Author: Arthur Eubanks <aeubanks@google.com>
Date: Fri Mar 10 17:24:19 2023 -0800
Kazu Hirata [Sat, 10 Jun 2023 20:51:35 +0000 (13:51 -0700)]
[Transforms] Remove unused function createAddDiscriminatorsPass
commit
f7ca01333214f934c580c162afdee933e7430b6c
Author: Nikita Popov <npopov@redhat.com>
Date: Tue Feb 28 16:38:45 2023 +0100
Kazu Hirata [Sat, 10 Jun 2023 20:51:34 +0000 (13:51 -0700)]
[Analysis] Remove unused function createAAResultsWrapperPass
The last use was removed by:
commit
934c82d31801e65aa3bbe99a0e64f903621c2e04
Author: Florian Hahn <flo@fhahn.com>
Date: Fri Feb 24 13:39:32 2023 +0100
Florian Hahn [Sat, 10 Jun 2023 20:43:05 +0000 (21:43 +0100)]
[ConstraintElim] Add additional monotonic phi tests.
Add extra test coverage with cases that showed mis-compiles in earlier
versions of an upcoming patch. Also add tests for integer phis
Kazu Hirata [Sat, 10 Jun 2023 20:34:30 +0000 (13:34 -0700)]
Revert "[MCParser] Modernize CppHashInfoTy (NFC)"
This reverts commit
c0f9d7b0e6199ca3bde5a6d0036a8ada0bb6253b.
A build error has been reported with gcc-7.
This patch fixes:
https://github.com/llvm/llvm-project/issues/63240
Noah Goldstein [Sat, 10 Jun 2023 18:17:55 +0000 (13:17 -0500)]
[X86] Make constant `mul` -> `shl` + `add`/`sub` work for vector types
Something like:
`%r = mul %x, <33, 33, 33, ...>`
Is best lowered as:
`%tmp = %shl x, <5, 5, 5>; %r = add %tmp, %x`
As well, since vectors have non-destructive shifts, we can also do
cases where the multiply constant is `Pow2A +/- Pow2B` for arbitrary A
and B, unlike in the scalar case where the extra `mov` instructions
make it not worth it.
Reviewed By: pengfei
Differential Revision: https://reviews.llvm.org/D150324
Noah Goldstein [Sat, 10 Jun 2023 18:16:53 +0000 (13:16 -0500)]
[InstCombine] Canonicalize (icmp eq/ne X, rotate(X)) to always use rotate-left
We canonicalize rotate-right -> rotate-left in other places. Makes
sense to do so here as well.
Proof: https://alive2.llvm.org/ce/z/HL3TpK
Reviewed By: nikic
Differential Revision: https://reviews.llvm.org/D152349
Noah Goldstein [Wed, 7 Jun 2023 17:42:22 +0000 (12:42 -0500)]
[InstCombine] Transform (icmp eq/ne rotate(X,AX),rotate(Y,AY)) -> (icmp eq/ne rotate(Y,AX-AY))
Only do so if we don't create more instructions, so either both
rotates have one use or one of the rotates has one use and both `AX`
and `AY` are constant.
Proof: https://alive2.llvm.org/ce/z/rVmJgz
Differential Revision: https://reviews.llvm.org/D152348
Noah Goldstein [Wed, 7 Jun 2023 17:41:16 +0000 (12:41 -0500)]
[InstCombine] Add tests for equality `icmp` with rotates; NFC
Differential Revision: https://reviews.llvm.org/D152347
Hristo Hristov [Sat, 18 Mar 2023 17:58:26 +0000 (19:58 +0200)]
[libc++][spaceship][NFC] Updates `SpaceshipProjects.csv` with full details from `P1614R2`
Adds the remaining sections from [[ https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2019/p1614r2.html | P1614R2 ]]
Some entries were reordered for easier tracking.
The items in the table match [[ https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2019/p1614r2.html | P1614R2 ]]'s sections strictly.
Reviewed By: Mordante, #libc
Differential Revision: https://reviews.llvm.org/D152297
Kazu Hirata [Sat, 10 Jun 2023 18:57:48 +0000 (11:57 -0700)]
[Transforms] Fix an unused variable warning
This patch fixes:
llvm/lib/Transforms/Utils/AMDGPUEmitPrintf.cpp:415:18: error: unused
variable 'StBuff' [-Werror,-Wunused-variable]
Stanislav Mekhanoshin [Sat, 10 Jun 2023 10:18:06 +0000 (03:18 -0700)]
[AMDGPU] Stop hardcoding v_mov_b32 in VOPD. NFCI.
There is no single possible reason to to it.
Differential Revision: https://reviews.llvm.org/D152616
Sam James [Sat, 10 Jun 2023 18:20:47 +0000 (19:20 +0100)]
[CMake] Add missing CheckCSourceCompiles include
Fails with cmake-3.27_rc1 otherwise:
```
CMake Error at /var/tmp/portage/sys-libs/libcxxabi-17.0.0_pre20230609/work/llvm/cmake/modules/HandleLLVMOptions.cmake:821 (CHECK_C_SOURCE_COMPILES):
Unknown CMake command "CHECK_C_SOURCE_COMPILES".
Call Stack (most recent call first):
CMakeLists.txt:156 (include)
```
Needed for CHECK_C_SOURCE_COMPILES.
Bug: https://bugs.gentoo.org/908233
Reviewed By: mgorny
Differential Revision: https://reviews.llvm.org/D152622
Kazu Hirata [Sat, 10 Jun 2023 17:40:43 +0000 (10:40 -0700)]
[CodeGen] Remove mentions of OLDPM
We stopped testing with -check-prefix=SAMPLEPGO-OLDPM and
-check-prefix=THINLTO-OLDPM as of:
commit
8a7a28075b7fa70d56b131c10a4d1add777d5830
Author: Thomas Preud'homme <thomasp@graphcore.ai>
Date: Fri Sep 17 10:23:40 2021 +0100
Kazu Hirata [Sat, 10 Jun 2023 17:40:41 +0000 (10:40 -0700)]
[Transforms] Remove unused declaration createAssumeSimplifyPass
The corresponding function definition was removed by:
commit
7be8341f19bfd9baf979ecadef22d1bcaa47b54e
Author: Arthur Eubanks <aeubanks@google.com>
Date: Tue Apr 25 14:34:24 2023 -0700
Vikram [Sat, 10 Jun 2023 17:27:48 +0000 (13:27 -0400)]
Fix CodeGen HIP test case failing on some targets
rikhuijzer [Sat, 10 Jun 2023 17:10:34 +0000 (19:10 +0200)]
[MLIR][doc] Make summary appear different than discription
This patch aims to clarify which part of the docs is the summary and which
part is the description.
I did a preview of the output and think the suggested bold and italic style
is much clearer and looks reasonably nice.
I've considered also to enforce capitalization of the first letter of the
summary and ending with a dot (as discussed in
https://reviews.llvm.org/D151649), but it seems to me that the tradeoff in
extra test running time is not worth it. Currently, `emitOpDoc` is not
triggered for every `summary` during `check-mlir`.
Reviewed By: jpienaar
Differential Revision: https://reviews.llvm.org/D152621
Matt Arsenault [Sat, 10 Jun 2023 15:58:09 +0000 (11:58 -0400)]
LowerMemIntrinsics: Skip memmove with different address spaces
This is a quick fix for an assert when the source and dest have
different address spaces. The pointer compare needs to have matching
types, but we can't generically introduce addrspacecast and we don't
know if the address spaces alias.
Ben Shi [Wed, 7 Jun 2023 09:59:02 +0000 (17:59 +0800)]
[AVR] Fix incorrect expansion of pseudo instruction ROLBRd
Since ROLBRd needs an implicit R1 (on AVR) or an implicit R17 (on AVRTiny),
we split ROLBRd to ROLBRdR1 (on AVR) and ROLBRdR17 (on AVRTiny).
Reviewed By: aykevl, Patryk27
Differential Revision: https://reviews.llvm.org/D152248
Ben Shi [Sat, 10 Jun 2023 03:22:33 +0000 (11:22 +0800)]
[AVR] Enable sub register liveness
Reviewed By: Patryk27
Differential Revision: https://reviews.llvm.org/D152606
Ben Shi [Sat, 10 Jun 2023 03:25:53 +0000 (11:25 +0800)]
[AVR][NFC] Improve CodeGen tests
Reviewed By: Patryk27
Differential Revision: https://reviews.llvm.org/D152605
Kazu Hirata [Sat, 10 Jun 2023 16:02:26 +0000 (09:02 -0700)]
[MCParser] Modernize CppHashInfoTy (NFC)
Kazu Hirata [Sat, 10 Jun 2023 16:02:25 +0000 (09:02 -0700)]
[llvm] Use DenseMapBase::lookup (NFC)
Kazu Hirata [Sat, 10 Jun 2023 16:02:23 +0000 (09:02 -0700)]
[Transforms] Remove unused declarations
The corresponding function definitions were removed by:
commit
4153f989bab0f2f300fa8d3001ebeef7b6d9672c
Author: Arthur Eubanks <aeubanks@google.com>
Date: Sun Oct 2 13:20:21 2022 -0700
Kazu Hirata [Sat, 10 Jun 2023 16:02:21 +0000 (09:02 -0700)]
[Transforms] Remove unused declarations
The corresponding function definitions were removed by:
commit
ef37504879eecab1af98c70888bee0be403b9c60
Author: Arthur Eubanks <aeubanks@google.com>
Date: Mon Oct 24 09:26:16 2022 -0700
Kazu Hirata [Sat, 10 Jun 2023 16:02:20 +0000 (09:02 -0700)]
[TableGen] Remove unused declaration TimeRegions
The corresponding definition was removed by:
commit
54f9ee334114e9b494fc80978357d58295a48bd1
Author: Paul C. Anagnostopoulos <paul@windfall.com>
Date: Thu Oct 22 02:58:49 2020 -0400
Matt Arsenault [Wed, 27 Jan 2016 21:45:37 +0000 (13:45 -0800)]
AMDGPU: Implement known bits functions for min3/max3/med3
Matt Arsenault [Sat, 10 Jun 2023 12:25:03 +0000 (08:25 -0400)]
AMDGPU: Add baseline tests for known bits handling of med3
Tom Eccles [Tue, 6 Jun 2023 15:15:25 +0000 (15:15 +0000)]
[flang][hlfir] allow recursive intrinsic lowering
We need to allow recursive application of intrinsic lowering patterns,
otherwise we cannot lower nested calls of the same intrinsic e.g.
matmul(matmul(a, b), c).
matmul(matmul(a, b), matmul(c, d)) requires hlfir.associate of hlfir
expr with more than one use (TODO).
Differential Revision: https://reviews.llvm.org/D152284
Vikram [Thu, 11 May 2023 09:00:17 +0000 (05:00 -0400)]
[AMDGPU] Non hostcall printf support for HIP
This is an alternative to currently existing hostcall implementation and uses printf buffer similar to OpenCL,
The data stored in the buffer (i.e the data frame) for each printf call are as follows,
1. Control DWord - contains info regarding stream, format string constness and size of data frame
2. Hash of the format string (if constant) else the format string itself
3. Printf arguments (each aligned to 8 byte boundary)
The format string Hash is generated using LLVM's MD5 Message-Digest Algorithm implementation and only low 64 bits are used.
The implementation still uses amdhsa metadata and hash is stored as part of format string itself to ensure
minimal changes in runtime.
Differential Revision: https://reviews.llvm.org/D150427
Paulo Matos [Sat, 10 Jun 2023 13:51:05 +0000 (15:51 +0200)]
[clang][WebAssembly] Implement support for table types and builtins
This commit implements support for WebAssembly table types and
respective builtins. Table tables are WebAssembly objects to store
reference types. They have a large amount of semantic restrictions
including, but not limited to, only being allowed to be declared
at the top-level as static arrays of zero-length. Not being arguments
or result of functions, not being stored ot memory, etc.
This commit introduces the __attribute__((wasm_table)) to attach to
arrays of WebAssembly reference types. And the following builtins to
manage tables:
* ref __builtin_wasm_table_get(table, idx)
* void __builtin_wasm_table_set(table, idx, ref)
* uint __builtin_wasm_table_size(table)
* uint __builtin_wasm_table_grow(table, ref, uint)
* void __builtin_wasm_table_fill(table, idx, ref, uint)
* void __builtin_wasm_table_copy(table, table, uint, uint, uint)
This commit also enables reference-types feature at bleeding-edge.
This is joint work with Alex Bradbury (@asb).
Reviewed By: aaron.ballman
Differential Revision: https://reviews.llvm.org/D139010
Matt Arsenault [Thu, 8 Jun 2023 01:17:25 +0000 (21:17 -0400)]
AMDGPU: Move LICM after AMDGPUCodeGenPrepare
The commit that added the run says it's to hoist uniform parts of
integer division expansion. That expansion is performed later, so this
didn't do anything in that case. Move this later so the original test
shows the improvement.
This also saves a run of "Canonicalize natural loops". Not sure why
this appears to be still getting a separate loop PM run. Also feels a
bit heavy to run this just for divide. Is there a way to specifically
hoist the divide sequence when it expands?
Piotr Zegar [Sat, 10 Jun 2023 07:44:18 +0000 (07:44 +0000)]
[clang-tidy] Optimize misc-confusable-identifiers
This is final optimization for this check. Main
improvements comes from changing a logic order
in mayShadow function, to first validate result
of mayShadowImpl, then search primary context in
a vectors. Secondary improvement comes from excluding
all implicit code by using TK_IgnoreUnlessSpelledInSource.
All other changes are just cosmetic improvements.
Tested on Cataclysm-DDA open source project, result in
check execution time reduction from 3682 seconds to
100 seconds (~0.25s per TU). That's 97.2% reduction for
this change alone. Resulting in cumulative improvement for
this check around -99.6%, finally bringing this check
into a cheap category.
Reviewed By: serge-sans-paille
Differential Revision: https://reviews.llvm.org/D151594
Nuno Lopes [Sat, 10 Jun 2023 10:19:03 +0000 (11:19 +0100)]
PromoteMem2Reg: use poison instead of undef as placeholder in phi entries from unreachable predecessors [NFC]
luxufan [Sat, 10 Jun 2023 07:48:46 +0000 (15:48 +0800)]
[SCCP] Skip computing intrinsics if one of its args is unknownOrUndef
For constant range supported intrinsics, we got consantrange from args
no matter if they are unknown or undef. And the constant range computed
from unknown or undef value state is full range.
I think compute with full constant range is harmful since although we
can do mergeIn after these args value state are changed, the merge
operation of two constant ranges is union.
Reviewed By: nikic
Differential Revision: https://reviews.llvm.org/D152499
luxufan [Sat, 10 Jun 2023 07:36:06 +0000 (15:36 +0800)]
[SCCP][NFC] Precommit test
Dhruv Chawla [Thu, 8 Jun 2023 14:51:39 +0000 (20:21 +0530)]
[NFC][SetVector] Update some usages of SetVector to SmallSetVector
This patch is a continuation of D152497. It updates usages of SetVector
that were found in llvm/ and clang/ which were originally specifying either
SmallPtrSet or SmallVector to just using SmallSetVector, as the overhead
of SetVector is reduced with D152497.
This also helps clean up the code a fair bit, and gives a decent speed
boost at -O0 (~0.2%):
https://llvm-compile-time-tracker.com/compare.php?from=
9ffdabecabcddde298ff313f5353f9e06590af62&to=
97f1c0cde42ba85eaa67cbe89bec8fe45b801f21&stat=instructions%3Au
Differential Revision: https://reviews.llvm.org/D152522
Dhruv Chawla [Wed, 7 Jun 2023 07:16:52 +0000 (12:46 +0530)]
[SetVector] Improve performance for small sizes
SmallSetVector has an inefficiency where it does set insertions
regardless of the number of elements present within it. This contrasts
with other "Small-" containers where they use linear scan up to a
certain size "N", after which they switch to another strategy.
This patch implements this functionality in SetVector, adding a template
parameter "N" which specifies the number of elements upto which the
SetVector follows the "small" strategy. Due to the use of "if
constexpr", there is no "small" code emitted when N is 0 which makes
this a zero overhead change for users using the default behaviour.
This change also allows having SmallSetVector use DenseSet instead of
SmallDenseSet by default, which helps a little with performance.
The reason for implementing this functionality in SetVector instead of
SmallSetVector is that it allows reusing all the code that is already
there and it is just augmented with the "isSmall" checks.
This change gives a good speedup (0.4%):
https://llvm-compile-time-tracker.com/compare.php?from=
086601eac266ec253bf313c746390ff3e5656132&to=
acd0a72a4d3ee840f7b455d1b35d82b11ffdb3c0&stat=instructions%3Au
Differential Revision: https://reviews.llvm.org/D152497
Guillaume Chatelet [Fri, 9 Jun 2023 13:23:27 +0000 (13:23 +0000)]
[libc][NFC] Introduce a Location object for consistent failure logging
This is just an implementation detail.
Reviewed By: sivachandra
Differential Revision: https://reviews.llvm.org/D152532
Guillaume Chatelet [Fri, 9 Jun 2023 13:37:01 +0000 (13:37 +0000)]
[libc][NFC] Clean up matchers namespace
This is a follow up to https://reviews.llvm.org/D152503
Reviewed By: sivachandra
Differential Revision: https://reviews.llvm.org/D152533
Tue Ly [Sat, 10 Jun 2023 03:48:49 +0000 (23:48 -0400)]
[libc][math] Move str method from FPBits class to testing utils.
str method of FPBits class is only used for pretty printing its objects
in tests. It brings cpp::string dependency to FPBits class, which is not ideal
for embedded use case. We move str method to a free function in test utils and
remove this dependency of FPBits class.
Reviewed By: sivachandra
Differential Revision: https://reviews.llvm.org/D152607
khei4 [Wed, 7 Jun 2023 03:26:33 +0000 (12:26 +0900)]
[MemCpyOpt] Use memcpy source directly if dest is known to be immutable from attributes
Differential Revision: https://reviews.llvm.org/D150970
khei4 [Wed, 7 Jun 2023 03:23:00 +0000 (12:23 +0900)]
[MemCpyOpt] precommit test for memcpy removal for immutable arguments from attributes (NFC)
Differential Revision: https://reviews.llvm.org/D150967
Timm Bäder [Thu, 18 May 2023 05:26:42 +0000 (07:26 +0200)]
[clang][NFC] Refactor printableTextForNextCharacter
Differential Revision: https://reviews.llvm.org/D150843