- Oct 30, 2021
-
-
Richard Smith authored
After rGa9db0a80, we correctly determined the end for pointer types like `id` that are spelled without a `*`, but incorrectly determined the end for pointer types spelled with a `*`.
-
Arthur O'Dwyer authored
The original bug doesn't reproduce on Clang, allegedly because of https://bugs.llvm.org/show_bug.cgi?id=44484 We already test STL's exact test case, in "span.cons/deduct.pass.cpp", which I'm touching just for the heck of it. Differential Revision: https://reviews.llvm.org/D111838
-
Arthur O'Dwyer authored
This was done in D108054.
-
Guillaume Chatelet authored
We may want to restrict the detected platforms to only `x86_64` and `aarch64`. There are still custom detection in api.td but I don't think we can handle these: - config/linux/api.td:205 - config/linux/api.td:199 Differential Revision: https://reviews.llvm.org/D112818
-
Nick Desaulniers authored
These compiler-rt-only symbols aren't available in libgcc. Similar to D108842, D108844, and D108926. Fixes: pr/52043 Reviewed By: craig.topper, rengolin Differential Revision: https://reviews.llvm.org/D112750
-
Miguel Raz Guzmán Macedo authored
Simple typo fix. Reviewed By: aeubanks Differential Revision: https://reviews.llvm.org/D112780
-
wren romano authored
Reviewed By: aartbik Differential Revision: https://reviews.llvm.org/D112771
-
Sanjay Patel authored
The tests are based on the example from: https://llvm.org/PR52032 I suspect that it looks worse than it actually is. :) That is, llvm-mca says there's no uop/timing difference with the load folding and pcmpeq vs. broadcast on Haswell (and probably other targets). The load-folding definitely makes the code smaller, so it's good for that at least. So this requires carving a narrow hole in the transform to get just this case without changing others that look good as-is (in other words, the transform still seems good for most examples). Differential Revision: https://reviews.llvm.org/D112464
-
Sanjay Patel authored
The first function is needed for D112464, but we might as well keep these together in case the others can be used someday.
-
Sanjay Patel authored
-
Guillaume Chatelet authored
Differential Revision: https://reviews.llvm.org/D112823
-
Michał Górny authored
Fix regression in processing generic regnums that was introduced in fa456505 ("[lldb] [gdb-remote] Refactor getting remote regs to use local vector"). Since then, the "generic" field was wrongly interpreted as integer rather than string constant. Thanks to Ted Woodward for noticing and providing the correct code.
-
modimo authored
Adds the following switches: 1. --sample-profile-inline-replay-fallback/--cgscc-inline-replay-fallback: controls what the replay advisor does for inline sites that are not present in the replay. Options are: 1. Original: defers to original advisor 2. AlwaysInline: inline all sites not in replay 3. NeverInline: inline no sites not in replay 2. --sample-profile-inline-replay-format/--cgscc-inline-replay-format: controls what format should be generated to match against the replay remarks. Options are: 1. Line 2. LineColumn 3. LineDiscriminator 4. LineColumnDiscriminator Adds support for negative inlining decisions. These are denoted by "will not be inlined into" as compared to the positive "inlined into" in the remarks. All of these together with the previous `--sample-profile-inline-replay-scope/--cgscc-inline-replay-scope` allow tweaking in how to apply replay. In my testing, I'm using: 1. --sample-profile-inline-replay-scope/--cgscc-inline-replay-scope = Function to only replay on a function 2. --sample-profile-inline-replay-fallback/--cgscc-inline-replay-fallback = NeverInline since I'm feeding in only positive remarks to the replay system 3. --sample-profile-inline-replay-format/--cgscc-inline-replay-format = Line since I'm generating the remarks from DWARF information from GCC which can conflict quite heavily in column number compared to Clang An alternative configuration could be to do Function, AlwaysInline, Line fallback with negative remarks which closer matches the final call-sites. Note that this can lead to unbounded inlining if a negative remark doesn't match/exist for one reason or another. Updated various tests to cover the new switches and negative remarks Testing: ninja check-all Reviewed By: wenlei, mtrofin Differential Revision: https://reviews.llvm.org/D112040
-
Duncan P. N. Exon Smith authored
Use the new sys::path::is_style_posix() and is_style_windows() in a few places that need to detect the system's native path style. In llvm/lib/Support/Path.cpp, this patch removes most uses of the private `real_style()`, where is_style_posix() and is_style_windows() are just a little tidier. Elsewhere, this removes `_WIN32` macro checks. Added a FIXME to a FileManagerTest that seemed fishy, but maintained the existing behaviour. Differential Revision: https://reviews.llvm.org/D112289
-
modimo authored
Replay in sample profiling needs to be asked on candidates that may not have counts or below the threshold. If replay is in effect for a function make sure these are captured and also imported during thinLTO. Testing: ninja check-all Reviewed By: wenlei Differential Revision: https://reviews.llvm.org/D112033
-
Roman Lebedev authored
Those don't contribute to the number of deleted loops.
-
Joseph Huber authored
Add documentation for the debugging features in the OpenMP device runtime library. Reviewed By: tianshilei1992 Differential Revision: https://reviews.llvm.org/D112010
-
Joseph Huber authored
A common problem is the device running out of global heap memory and crashing due to a nullptr dereference when using the data sharing stack. This explicitly checks that a nullptr was not returned by malloc when debugging field 1 is enabled. Reviewed By: jdoerfert Differential Revision: https://reviews.llvm.org/D112005
-
Joseph Huber authored
This patch adds support for using function tracing features to track the executino of runtime functions in the device runtime library. This is enabled by first compiling the new runtime with `-fopenmp-target-debug=3` and running with `LIBOMPTARGET_DEVICE_RTL_DEBUG=3`. The output only tracks team 0 and thread 0 so there isn't much output when using a generic region. Reviewed By: jdoerfert Differential Revision: https://reviews.llvm.org/D112002
-
Amara Emerson authored
rdar://84674985
-
Duncan P. N. Exon Smith authored
Expose three helpers in namespace llvm::sys::path to detect the path rules followed by sys::path::Style. - is_style_posix() - is_style_windows() - is_style_native() This are constexpr functions that that will allow a bunch of path-related code to stop checking `_WIN32`. Originally I looked at adding system_style(), analogous to sys::endian::system_endianness(), but future patches (from others) will add more Windows style variants for slash preferences. These helpers should be resilient to that change, allowing callers to detect basic path rules. Differential Revision: https://reviews.llvm.org/D112288
-
Sanjay Patel authored
These transforms are also likely missing a one-use check, but that's another patch.
-
Sanjay Patel authored
-
Roman Lebedev authored
Test thanks to Michael Kuklinski from #llvm, originally inspired by Daniel Lemire's https://lemire.me/blog/2021/10/26/in-c-is-empty-faster-than-comparing-the-size-with-zero/
-
peter klausler authored
The tests for folding these intrinsics neglected to name the logical scalars with a leading "test_", so test failures caused by recent work to implement a combined constant folding facility for these intrinsics wasn't catching some bugs. This patch fixes the tests and the bugs. Differential Revision: https://reviews.llvm.org/D112741
-
Stanislav Mekhanoshin authored
``` ---------------------------------------- define i4 @src(i4 %a, i4 %b, i4 %c) { %or1 = or i4 %b, %a %not1 = xor i4 %or1, -1 %or2 = or i4 %a, %c %not2 = xor i4 %or2, -1 %and = and i4 %not2, %b %or3 = or i4 %and, %not1 ret i4 %or3 } define i4 @tgt(i4 %a, i4 %b, i4 %c) { %and = and i4 %c, %b %or = or i4 %and, %a %or3 = xor i4 %or, -1 ret i4 %or3 } Transformation seems to be correct! ``` Differential Revision: https://reviews.llvm.org/D112338 -
peter klausler authored
An erroneous entry in the intrinsics table causes semantics to crash on a call to system_clock if the optional "count_max=" argument appears and "count=" does not. Differential Revision: https://reviews.llvm.org/D112738
-
Michael Jones authored
Add the fast path first described by Clinger [1] with additions by Gay [2]. This speeds up conversion by about 10% by handling numbers with fewer digits more efficiently. [1] Clinger WD. How to Read Floating Point Numbers Accurately. SIGPLAN Not 1990 Jun;25(6):92–101. https://doi.org/10.1145/93548.93557. [2] Gay DM, Correctly rounded binary-decimal and decimal-binary conversions; 1990. AT&T Bell Laboratories Numerical Analysis Manuscript 90-10. Reviewed By: sivachandra Differential Revision: https://reviews.llvm.org/D112580
-
Sam Clegg authored
In the shared memory case we can always assume that TLS addresses are relative to __tls_base. In the non-shared memory case TLS variables are absolute, just like normal data addresses. This simplifies the code in calcNewValue so that TLS relocations no longer need special handling. Differential Revision: https://reviews.llvm.org/D112831
-
Matt Morehouse authored
`classifyLocalReference(nullptr)` is called to get the appropriate relocation type for jump tables. We should not use @GOTPCREL for this case. The new test cases trigger assertions without this patch. Reviewed By: eugenis Differential Revision: https://reviews.llvm.org/D112832
-
wlei authored
Like probe-based profile, the total samples is the sum of all its body samples. This patch fix it by a post-processing update for the line-number based profile. Tested it on our internal services, results showed no performance change. Reviewed By: hoy, wenlei Differential Revision: https://reviews.llvm.org/D112672
-
Fraser Cormack authored
This patch removes an internal failure found in FindMemType and "bubbles it up" to the users of that method: GenWidenVectorLoads and GenWidenVectorStores. FindMemType -- renamed findMemType -- now returns an optional value, returning None if no such type is found. Each of the aforementioned users now pre-calculates the list of types it will use to widen the memory access. If the type breakdown is not possible they will signal a failure, at which point the compiler will crash as it does currently. This patch is preparing the ground for alternative legalization strategies for vector loads and stores, such as using vector-predication versions of loads or stores. Reviewed By: RKSimon Differential Revision: https://reviews.llvm.org/D112000
-
Kazu Hirata authored
This patch fixes: llvm/tools/llvm-profgen/ProfiledBinary.cpp:357:12: error: variable 'EndOffset' set but not used [-Werror,-Wunused-but-set-variable] The last use of the variable was removed on Oct 26 in commit 40ca4112.
-
Zarko Todorovski authored
Reviewed By: vitalybuka Differential Revision: https://reviews.llvm.org/D112627
-
Keith Smiley authored
Previously if you passed a `-Wl,-foo` _before_ the source filename, the first `InputInfos`, which is used for the base input name would be an `InputArg` kind, which would never have a base input name. Now we use that by default, but pick the first `InputInfo` that is of kind `Filename` to get the name from if there is one. Differential Revision: https://reviews.llvm.org/D112767
-
Dwight Guth authored
The extractBasicBlocksFromModule, extractInstrFromModule, and other similar functions previously performed very poorly when the number of such elements in the program to reduce was very high. Previously, we were creating the set which caches elements to keep by looping through all elements in the module and adding them to the set. However, since std::set is an ordered set, this introduces a massive amount of rebalancing if the order of elements in the program and the order of their pointers in memory are not the same. The solution is straightforward: first put all the elements to be kept in a vector, then use the constructor for std::set which takes a pair of iterators over a collection. This constructor is optimized to avoid doing unnecessary work when initializing large sets. Also in this change, we pass BBsToKeep set to functions replaceBranchTerminator and removeUninterestingBBsFromSwitch as a const reference rather than passing it by value. This ought to prevent the need to copy the collection each time these functions are called, which is expensive if the collection is large. Reviewed By: aeubanks Differential Revision: https://reviews.llvm.org/D112757
-
Nikita Popov authored
Add missing inbounds to tests that are not correct without it due to possibility of offset overflow. inbounds: https://alive2.llvm.org/ce/z/LC8G9_ w/o inbounds: https://alive2.llvm.org/ce/z/ErrJVW
-
wlei authored
Previous implementation of populating profile symbol list is wrong, it only included the profiled symbols. Actually it should use all symbols, here this switches to use the symbols from debug info. Also turned the flag off by default. Reviewed By: wenlei, hoy Differential Revision: https://reviews.llvm.org/D111824
-
wlei authored
It happened a bug that some callsite name in the profile is not a real function, it turned out that there're some non-function symbol from the ELF text section, e.g. the global accessible branch label and also recalled that we can have one function being split into multiple ranges. We shouldn't count samples for those are not the entry of the real function. So this change tried to fix this issue by switching to use the name or ranges from DWARF-based debug info, the range of which assure it's the real function start. For the split functions, we assume that the real entry function's DWARF name should always match the symbol table name. The switching is also consistent with the body samples' symbol which is from DWARF. Reviewed By: hoy, wenlei Differential Revision: https://reviews.llvm.org/D112282
-
Craig Topper authored
If the VL operand of a mask register instruction comes from an explicit vsetvli with a different VTYPE, we can still avoid needing a vsetvli as long as the SEW/LMUL ratio is the same and policy bits match. Differential Revision: https://reviews.llvm.org/D112762
-