- Feb 04, 2021
-
-
Jessica Paquette authored
When we have a zeroext parameter coming in on the stack, build ``` %x = G_LOAD ... %x_assert_zext = G_ASSERT_ZEXT %x, narrow_size %trunc = G_TRUNC %x_assert_zext ``` Rather than just loading into the truncated type. This allows us to optimize cases like this: https://godbolt.org/z/vfjhW8 Differential Revision: https://reviews.llvm.org/D95805
-
Arthur O'Dwyer authored
This completes libc++'s implementation of P0879 "Constexpr for swap and swap related functions." http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2018/p0879r0.html For the feature-macro adjustment, see https://cplusplus.github.io/LWG/issue3256 Differential Revision: https://reviews.llvm.org/D93661
-
Amy Huang authored
Adding this, since there's currently no documentation about this. Differential Revision: https://reviews.llvm.org/D95911
-
Stephen Kelly authored
Use mapAnyOf() and matchers based on it. Use of binaryOperation() means that modernize-loop-convert and readability-container-size-empty can now be used with rewritten binary operators. Differential Revision: https://reviews.llvm.org/D94131
-
Richard Smith authored
when rewriting 'a < b' as '(a <=> b) < 0'. It's pretty common for comparison category types to use a pointer or pointer-to-member type as their '0' parameter.
-
Florian Hahn authored
This reverts commit 6a59f056, because it is causing failures on green dragon.
-
Florian Hahn authored
This reverts commit 7a6a2cc8 because it is causing failures on green dragon.
-
Florian Hahn authored
This reverts commit 0d487cf8 because it is causing failures on green dragon.
-
Arthur Eubanks authored
This turns on the new pass manager by default for the optimization pipeline in Clang and ThinLTO in various LLD backends. This also makes uses of `opt -instcombine` use the new pass manager (unless specifically opted out). This does not affect the backend target-dependent codegen pipeline. If this causes regressions, you can opt out of the new pass manager either via the -DENABLE_EXPERIMENTAL_NEW_PASS_MANAGER=OFF CMake flag while building LLVM, or via various compiler flags, e.g. -flegacy-pass-manager for Clang or -Wl,--lto-legacy-pass-manager for ELF LLD. Please file bugs for any regressions. Major differences: * The inliner works slightly differently * -O1 does some amount of inlining * LCSSA and LoopSimplify are run before all loop passes * Loop unswitching is implemented slightly differently * A new SpeculateAroundPHIs pass is added to the pipeline https://lists.llvm.org/pipermail/llvm-dev/2021-January/148098.html Reviewed By: asbirlea, ychen, MaskRay, echr...
-
Richard Smith authored
This is a corner of the differences between C99 designators and C++20 designators that we'd previously overlooked. As with other such cases, this continues to be permitted as an extension and allowed by default, behind the -Wc99-designators warning flag, except in cases where it leads to a conformance difference (such as in overload resolution and in a SFINAE context).
-
Amara Emerson authored
This is the G_SEXT counterpart to the existing G_ZEXT/G_ANYEXT combines. Differential Revision: https://reviews.llvm.org/D95729
-
Jonas Devlieghere authored
-
Jonas Devlieghere authored
Honor the CPU type (and subtype) when launching the inferior on macOS. Part of this functionality was thought to be no longer needed and removed in 85bd4369, however it's still needed, for example to launch binaries under Rosetta 2 on Apple Silicon. This patch will use posix_spawnattr_setarchpref_np if available and fallback to posix_spawnattr_setbinpref_np if not. Differential revision: https://reviews.llvm.org/D95922
-
Zequan Wu authored
Clang usually propagates counter mapping region for conditions of `if`, `while`, `for`, etc from parent counter. We should do the same for condition of conditional operator. Differential Revision: https://reviews.llvm.org/D95918
-
Arthur O'Dwyer authored
- Implement C++20's changes to `reverse_iterator`, so that it won't be accidentally counted as a contiguous iterator in C++20 mode. - Implement C++20's changes to `move_iterator` as well. - `move_iterator` should not be contiguous. This fixes a bug where we optimized `std::copy`-of-move-iterators in an observable way. Add a regression test for that bugfix. - Add libcxx tests for `__is_cpp17_contiguous_iterator` of all relevant standard iterator types. Particularly check that vector::iterator is still considered contiguous in all C++ modes, even C++03. After this patch, there continues to be no supported way to write your own iterator type in C++17-and-earlier such that libc++ will consider it "contiguous"; however, we now fully support the C++20 approach (in C++20 mode only). If you want user-defined contiguous iterators in C++17-and-earlier, libc++'s position is "please upgrade to C++20." Differential Revision: https://reviews.llvm.org/D94807 -
George authored
This just exposes a missing API Differential Revision: https://reviews.llvm.org/D95968
-
Jez Ng authored
-
Arthur Eubanks authored
To prevent creating a new component, which creates a new library. Reviewed By: ychen Differential Revision: https://reviews.llvm.org/D95907
-
Vitaly Buka authored
AsanThread::Destroy implementation expected to be called on child thread. I missed authors concern regarding this reviewing D95184. Reviewed By: delcypher Differential Revision: https://reviews.llvm.org/D95731
-
Richard Smith authored
-
Christian Sigg authored
Reviewed By: herhut Differential Revision: https://reviews.llvm.org/D94421
-
Krzysztof Parzyszek authored
-
Félix Cloutier authored
rdar://73742471 Differential Revision: https://reviews.llvm.org/D95695
-
Rong Xu authored
This patch detaches SampleProfileLoader from class SampleCoverageTracker. We plan to move SampleProfileLoader to a template class. This would remain SampleCoverageTracker as a class. Also make callsiteIsHot() as a file static function. Differential Revision: https://reviews.llvm.org/D95823
-
Yaxun (Sam) Liu authored
Extract registering device variable to CUDA runtime codegen function since it will be called in multiple places. Reviewed by: Artem Belevich Differential Revision: https://reviews.llvm.org/D95558
-
Christian Sigg authored
Differential Revision: https://reviews.llvm.org/D95857
-
Justin Bogner authored
These two cases have identical implementations other than an unreachable part of `G_ADD` that checks if the scalar we're narrowing is a vector. Combining them to avoid unnecessary divergence.
-
Christian Sigg authored
Differential Revision: https://reviews.llvm.org/D95856
-
Matt Arsenault authored
This was only adding undef to the use if the copy itself had a subregister index. It did not consider the subrange liveness if the use had a subreg index to begin with.
-
Peter Steinfeld authored
Constant folding for calls to LBOUND() was not working when the lower bound of a constant array was not 1. I fixed this and re-enabled the test in Evaluate/folding16.f90 that previously was silently failing. I slightly changed the test to parenthesize the first argument to exercise all of the new code. Differential Revision: https://reviews.llvm.org/D95894
-
Jianzhou Zhao authored
Reviewed-by: morehouse Differential Revision: https://reviews.llvm.org/D95923
-
Jianzhou Zhao authored
Reviewed-by: morehouse Differential Revision: https://reviews.llvm.org/D95957
-
Siva Chandra authored
This expands the pattern suggest in https://reviews.llvm.org/D95850 to all math functions.
-
Roland McGrath authored
Fuchsia is migrating to a variable page size. Reviewed By: phosek, charco Differential Revision: https://reviews.llvm.org/D95919
-
Jez Ng authored
Per https://reviews.llvm.org/D94938#inline-896740.
-
Jez Ng authored
Per https://reviews.llvm.org/D95121#inline-897943.
-
Jez Ng authored
This extends {D92539} to work even when we are loading archive members via `-force_load`. I uncovered this issue while trying to force-load archives containing bitcode -- we were segfaulting. In addition to fixing the `-force_load` case, this diff also addresses the behavior of `-ObjC` when LTO bitcode is involved -- we need to force-load those archive members if they contain ObjC categories. Reviewed By: #lld-macho, smeenai Differential Revision: https://reviews.llvm.org/D95265 -
Jez Ng authored
This makes our error messages more informative. But the bigger motivation is for LTO symbol resolution, which will be in an upcoming diff. The changes in this one are largely mechanical. Reviewed By: #lld-macho, smeenai Differential Revision: https://reviews.llvm.org/D94316
-
Matt Arsenault authored
If we had a pair of copies inside a loop which introduced new liveness to a subregister which was undef before the loop, we would have a dummy phi-only segment remaining across the loop body. Later, this false segment would confuse RenameIndependentSubregs causing it to introduce IMPLICIT_DEFs with broken value numbering. It seems always adding the lanes to ShrinkMask is OK, so any conditions should be purely a compile time filter.
-
Jonas Devlieghere authored
-