- Sep 22, 2021
-
-
Chen Zheng authored
This is a follow-up of D105872. Now we are able to prepare for update form with non-const increment. Reviewed By: jsji Differential Revision: https://reviews.llvm.org/D106032
-
Joe Loser authored
Two tests in span.cons/deduct.pass.cpp accidentally check whether the iterator range from member begin and member end are equivalent to the ones from free begin and free end. This is obviously true and not intended. Correct the intent by comparing the size/data from the span with the source input. While in the neighborhood, add test for const int arr[N], remove extraneous type aliases, unused <type_traits> header, and the disable_missing_braces_warning.h include. Reviewed By: Quuxplusone, ldionne, #libc Differential Revision: https://reviews.llvm.org/D109668
-
Matt Arsenault authored
This combination of amdgpu-waves-per-eu and amdgpu-flat-work-group-size cannot be satisfied at the same time, so this was using the default.
-
David Blaikie authored
-
David Blaikie authored
-
Shao-Ce SUN authored
-
Shao-Ce SUN authored
-
Teresa Johnson authored
Change the mutex type to one that initializes on construction and hopefully avoid what appear to be deadlock failures in the new test on a couple bots, e.g.: https://green.lab.llvm.org/green/job/clang-stage1-RA/24140/testReport/SanitizerCommon-Unit/__Sanitizer-x86_64-Test/SanitizerCommon_ReportFile/
-
Chris Lattner authored
DialectAsmParser has a `parseAttribute` member that takes a contextual type, but DialectAsmPrinter doesn't have the corresponding member to take advantage of it. As such, custom attribute implementations can't really use it. This adds the obvious missing method which fills this hole. Differential Revision: https://reviews.llvm.org/D110211
-
David Tenty authored
These routines were add years ago during initial porting attempts to AIX and are mostly build hacks for routines which we're missing at the time, but are available now on recent AIX OS levels. Thus builds on modern AIX OS levels no longer need these and they cause problems if you try to build the library with a generic triple (i.e. powerpc-ibm-aix) as we'll pull them in and encounter duplicate definitions from the OS. Reviewed By: #libc, ldionne Differential Revision: https://reviews.llvm.org/D110183
-
Wenlei He authored
Add a new LLVM switch `-profile-sample-block-accurate` to trust zero block counts for branches. Currently we leave out such zero counts when annotating branch weight metadata, which would lead to weights being considered as unknown. Differential Revision: https://reviews.llvm.org/D110117
-
Louis Dionne authored
The file was a duplicate of atomic_support.h in libc++. Since we now require the libc++ sources in order to build libc++abi, it's OK to remove this duplication. Thanks to @chandlerc for noticing this. Differential Revision: https://reviews.llvm.org/D110103
-
Teresa Johnson authored
When setting the report path, recursively create the directory as needed. This brings the profile path support for memprof on par with normal PGO. The code was largely cloned from __llvm_profile_recursive_mkdir in compiler-rt/lib/profile/InstrProfilingUtil.c. Differential Revision: https://reviews.llvm.org/D109794
-
Toshihito Kikuchi authored
To intercept the functions in Win11's ntdll.dll, we need to use the trampoline technique because there are bytes other than 0x90 or 0xcc in the gaps between exported functions. This patch adds more patterns that appear in ntdll's functions. Bug: https://bugs.llvm.org/show_bug.cgi?id=51721 Reviewed By: rnk Differential Revision: https://reviews.llvm.org/D109941
-
Usman Nadeem authored
Differential Revision: https://reviews.llvm.org/D109665 Change-Id: I9d2928688b80b804a16f52928e2057749ec2c0b2
-
Yuanfang Chen authored
The idiom helps with parameter unpacking so the return value is not important. Make it explicit.
-
Arthur Eubanks authored
And always print it. This makes some LLVM diagnostics match up better with Clang's diagnostics. Updated some AMDGPU uses of DiagnosticInfoResourceLimit and now we print better diagnostics for those. Reviewed By: dblaikie Differential Revision: https://reviews.llvm.org/D110204
-
Kirill Stoimenov authored
[asan] Fixed a bug causing a crash when redzone optimization kicked in on X86 with -asan-optimize-callbacks flag on. This change adds the ASan intrinsic to the list whihc are setting hasCopyImplyingStackAdjustment. Reviewed By: eugenis Differential Revision: https://reviews.llvm.org/D110012
-
Alex Zinenko authored
Previously, the translation to LLVM IR would emit IR that directly uses a scope metadata node in case only one scope was in use in alias.scopes or noalias metadata. It should always be a list of scopes. The verifier change in 8700f2bd enforced this and broke the test. Fix the translation to always create a list of scopes using a new metadata node, update and reenable the respective test. Fixes PR51919. Reviewed By: mehdi_amini Differential Revision: https://reviews.llvm.org/D110140
-
Craig Topper authored
This time with the right bug number. When we rewrite the setcc we replace set old setcc output register with the new CondReg. But since CondReg can be shared by other replacements, we don't know if the kill flags for the old register are valid for CondReg. So be conservative and remove them. The test case has a SETCCr and a SETCCm on the same condition so they end up sharing the same CondReg. The SETCCr had one use with a kill flag. This kill flag isn't valid after the replacement because CondReg needs a live range extending to the later SETCCm replacment. Fixes PR51903.
-
Xu Mingjie authored
Currently, the dead functions information getting from optimizations remarks does not contain debug location, but knowing where these dead functions locate could be useful for debugging or for detecting dead code. Cause in `LTO::addRegularLTO()` we use `BitcodeModule::getLazyModule()` to read the bitcode module, when we pass Function F to `ore::NV()`, F is not materialized, so `F->getSubprogram()` returns nullptr, and there is no debug location information of dead functions in optimizations remarks. This patch call `F->materialize()` before we pass Function F to `ore::NV()`, then debug location information will be emitted for dead functions in optimization remarks. Reviewed By: tejohnson Differential Revision: https://reviews.llvm.org/D109737
-
Joseph Huber authored
The new device runtime library currently lacks the `kmpc_get_hardware_thread_id_in_block` function which is currently used when doing the SPMDzation optimization. This call would be introduced through the optimization and then cause a linking error because it was not present. This patch adds support for this runtime call. Reviewed By: tianshilei1992 Differential Revision: https://reviews.llvm.org/D110195
-
Arthur Eubanks authored
Previously with -Rpass (and friends) we'd have remarks "enabled", but without an actual regex. As seen in the test change to line numbers, this can give us better diagnostics by properly enabling NeedLocTracking with -Rpass. Reviewed By: dblaikie Differential Revision: https://reviews.llvm.org/D110201
-
Craig Topper authored
This reverts commit 7550f146. I botched the bug number.
-
Craig Topper authored
When we rewrite the setcc we replace set old setcc output register with the new CondReg. But since CondReg can be shared by other replacements, we don't know if the kill flags for the old register are valid for CondReg. So be conservative and remove them. The test case has a SETCCr and a SETCCm on the same condition so they end up sharing the same CondReg. The SETCCr had one use with a kill flag. This kill flag isn't valid after the replacement because CondReg needs a live range extending to the later SETCCm replacment. Fixes PR51908. Reviewed By: RKSimon Differential Revision: https://reviews.llvm.org/D110046
-
Albion Fung authored
This patch implements support for the type vector bool int128 for arguments on vector comparison builtins listed below, which would otherwise crash due to ambiguity. The following builtins are added: vec_all_eq (vector bool __int128, vector bool __int128) vec_all_ne (vector bool __int128, vector bool __int128) vec_any_eq (vector bool __int128, vector bool __int128) vec_any_ne (vector bool __int128, vector bool __int128) vec_cmpne(vector bool __int128 a, vector bool __int128 b) vec_cmpeq(vector bool __int128 a, vector bool __int128 b) Differential revision: https://reviews.llvm.org/D110084
-
Sanjay Patel authored
This broke with 2f6b0731 because it wrongly runs the entire LLVM optimizer.
-
George Burgess IV authored
This comment references behavior that was removed in ccae43a2, which is a commit from 5 years ago. It seems safe to assume that that behavior won't be coming back soon. If it does, we can readd this part of the comment :)
-
Giorgis Georgakoudis authored
This reverts commit 1d66649a. Revert to fix AMG GPU issue.
-
Arthur O'Dwyer authored
Neither the current C++2b draft, nor any revision of [p1135], nor libstdc++, claims that `counting_semaphore` should be default-constructible. I think this was just a copy-paste issue somehow. Also, `explicit` was missing from the constructor. Also, `constexpr` remains missing; but that's probably more of a technical limitation, since apparently there are some platforms where we don't (can't??) use the atomic implementation and have to rely on pthreads, which obviously isn't constexpr. Differential Revision: https://reviews.llvm.org/D110042
-
Sanjay Patel authored
(masked) trunc (lshr X, C) --> (masked) lshr (trunc X), C Narrowing the shift should be better for analysis and can lead to follow-on transforms as shown. Attempt at a general proof in Alive2: https://alive2.llvm.org/ce/z/tRnnSF Here are a couple of the specific tests: https://alive2.llvm.org/ce/z/bCnTp- https://alive2.llvm.org/ce/z/TfaHnb Differential Revision: https://reviews.llvm.org/D110170
-
Antonio Frighetto authored
A logic incompleteness may lead MemorySSA to be too conservative in its results. Specifically, when dealing with a call of kind `call i32 bitcast (i1 (i1)* @test to i32 (i32)*)(i32 %1)`, where the function `test` is declared with readonly attribute, the bitcast is not looked through, obscuring function attributes. Hence, some methods of CallBase (e.g., doesNotReadMemory) could provide suboptimal results. Differential Revision: https://reviews.llvm.org/D109888
-
Usman Nadeem authored
Differential Revision: https://reviews.llvm.org/D110120 Change-Id: I9d39dacfab5b7fbab37ee4b4d960d51e0892b24d
-
Nikita Popov authored
-
Matheus Izvekov authored
See PR51862. The consumers of the Elidable flag in CXXConstructExpr assume that an elidable construction just goes through a single copy/move construction, so that the source object is immediately passed as an argument and is the same type as the parameter itself. With the implementation of P2266 and after some adjustments to the implementation of P1825, we started (correctly, as per standard) allowing more cases where the copy initialization goes through user defined conversions. With this patch we stop using this flag in NRVO contexts, to preserve code that relies on that assumption. This causes no known functional changes, we just stop firing some asserts in a cople of included test cases. Reviewed By: rsmith Differential Revision: https://reviews.llvm.org/D109800
-
Dan F-M authored
In attempting to build JAX on Apple Silicon, we discovered an issue with the bazel configuration in llvm-project-overlay. This patch fixes the logic, at least when building JAX. More context is included on the following GitHub issue: https://github.com/google/jax/issues/5501 Differential Revision: https://reviews.llvm.org/D109839
-
Nikita Popov authored
MergeICmps will currently sort (by offset) all comparisons in a chain, including those that do not get merged. This is problematic in two ways: * We may end up moving the original first block into the middle of the chain, in which case the "extra work" instructions will also be in the middle of the chain, resulting in invalid IR (reported in https://reviews.llvm.org/D108782#3005583). * Reordering branches is generally not legal, because it may introduce branch on poison, which is UB (PR51845). The merging done by MergeICmps is legal as long as we assume that memcmp() works on frozen memory, but the reordering of unmerged comparisons is definitely incorrect (without inserting freeze instructions), so we should avoid it. There are easier ways to fix the first issue, but I figured it was worthwhile to do this properly to also fix the second one. What we now do is to restore the original relative order of (potentially merged) comparisons. I took the liberty of dropping the MERGEICMPS_DOT_ON functionality, because it would be more awkward to implement now (as the before and after representation is different) and it doesn't seem terribly useful nowadays. Differential Revision: https://reviews.llvm.org/D110024
-
David Blaikie authored
-
Christian Sigg authored
Add a PointerProxy similar to the existing iterator_facade_base::ReferenceProxy and return it from the arrow operator. This prevents iterator facades with a reference type that is not a true reference to take the address of a temporary. Forward the reference type of the mapped_iterator to the iterator adaptor which in turn forwards it to the iterator facade. This fixes mlir::op_iterator::operator->() to take the address of a temporary. Make some polishing changes to op_iterator and op_filter_iterator. Reviewed By: rriddle Differential Revision: https://reviews.llvm.org/D109490
-
David Blaikie authored
Now that Clang's been changed to render nullptr types/template parameters as 'std::nullptr_t' do the same thing down here. (Clang commit: 131e8786 )
-