- Feb 04, 2021
-
-
wlei authored
This change compresses the context string by removing cycles due to recursive function for CS profile generation. Removing recursion cycles is a way to normalize the calling context which will be better for the sample aggregation and also make the context promoting deterministic. Specifically for implementation, we recognize adjacent repeated frames as cycles and deduplicated them through multiple round of iteration. For example: Considering a input context string stack: [“a”, “a”, “b”, “c”, “a”, “b”, “c”, “b”, “c”, “d”] For first iteration,, it removed all adjacent repeated frames of size 1: [“a”, “b”, “c”, “a”, “b”, “c”, “b”, “c”, “d”] For second iteration, it removed all adjacent repeated frames of size 2: [“a”, “b”, “c”, “a”, “b”, “c”, “d”] So in the end, we get compressed output: [“a”, “b”, “c”, “d”] Compression will be called in two place: one for sample's context key right after unwinding, one is for the eventual context string id in the ProfileGenerator. Added a switch `compress-recursion` to control the size of duplicated frames, default -1 means no size limit. Added unit tests and regression test for this. Differential Revision: https://reviews.llvm.org/D93556
-
Isuru Fernando authored
Reviewed By: mehdi_amini Differential Revision: https://reviews.llvm.org/D95978
-
Mehdi Amini authored
We could extend this with an interface to allow dialect to perform a type conversion, but that would make the folder creating operation which isn't the case at the moment, and isn't necessarily always desirable. Reviewed By: rriddle Differential Revision: https://reviews.llvm.org/D95991
-
Shilei Tian authored
OpenMP device compiler (similar to other SPMD compilers) assumes that functions are convergent by default to avoid invalid transformations, such as the bug (https://bugs.llvm.org/show_bug.cgi?id=49021). Reviewed By: jdoerfert Differential Revision: https://reviews.llvm.org/D95971
-
Michael Kruse authored
The collapseLoops method implements a transformations facilitating the implementation of the collapse-clause. It takes a list of loops from a loop nest and reduces it to a single loop that can be used by other methods that are implemented on just a single loop, such as createStaticWorkshareLoop. This patch shares some changes with D92974 (such as adding some getters to CanonicalLoopNest), used by both patches. Reviewed By: jdoerfert Differential Revision: https://reviews.llvm.org/D93268
-
Jonas Devlieghere authored
I switched the watch simulator test from i386 to using x86_64, but apparently that's not supported on the bots. Rollback to using i386 and solve the original issue by passing the target, similar to what I did in TestSimulatorPlatform.py.
-
wlei authored
This change implements profile generation infra for pseudo probe in llvm-profgen. During virtual unwinding, the raw profile is extracted into range counter and branch counter and aggregated to sample counter map indexed by the call stack context. This change introduces the last step and produces the eventual profile. Specifically, the body of function sample is recorded by going through each probe among the range and callsite target sample is recorded by extracting the callsite probe from branch's source. Please refer https://groups.google.com/g/llvm-dev/c/1p1rdYbL93s and https://reviews.llvm.org/D89707 for more context about CSSPGO and llvm-profgen. **Implementation** - Extended `PseudoProbeProfileGenerator` for pseudo probe based profile generation. - `populateBodySamplesWithProbes` reading range counter is responsible for recording function body samples and inferring caller's body samples. - `populateBoundarySamplesWithProbes` reading branch counter is responsible for recording call site target samples. - Each sample is recorded with its calling context(named `ContextId`). Remind that the probe based context key doesn't include the leaf frame probe info, so the `ContextId` string is created from two part: one from the probe stack strings' concatenation and other one from the leaf frame probe. - Added regression test Test Plan: ninja & ninja check-llvm Differential Revision: https://reviews.llvm.org/D92998
-
Jessica Paquette authored
Similar to the G_PTR_ADD + G_LOAD twiddling we do in `preISelLower`. The imported patterns expect scalars only, so they can't handle things like ``` G_STORE %ptr1, %ptr2 ``` To get around this, use s64 instead. (This probably makes a good portion of the manual selection code for G_STORE dead.) This is a 0.2% geomean code size improvement on CTMark at -Os. (Best is consumer-typeset @ -0.7%) Differential Revision: https://reviews.llvm.org/D95908
-
Nico Weber authored
This reverts commit 97ba5cde. Still breaks tests: https://reviews.llvm.org/D76802#2540647
-
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, echristo Differential Revision: https://reviews.llvm.org/D95380
-
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
-