- Feb 16, 2021
-
-
Valentin Clement authored
Fix Flang build after addition of a new OpenMP clauses for a clang patch (D76342). Flang is using TableGen to generation the declaration of clause checks and the new clause was missing a definiton. Reviewed By: klausler Differential Revision: https://reviews.llvm.org/D96808
-
Pavel Labath authored
-
Pavel Labath authored
It's obsolete, as we use (portable) std::this_thread::sleep_for now.
-
Craig Topper authored
-
Thomas Raoux authored
When the destination of the subview has a lower rank than its source we need to fix the result type of the new subview op. Differential Revision: https://reviews.llvm.org/D96804
-
Kadir Cetinkaya authored
-
LLVM GN Syncbot authored
-
LLVM GN Syncbot authored
-
Raphael Isemann authored
real_path returns an `std::error_code` which evaluates to `true` in case an error happens and `false` if not. This code was checking the inverse, so case-insensitive file systems ended up being detected as case sensitive. Tested using an LLDB reproducer test as we anyway need a real file system and also some matching logic to detect whether the respective file system is case-sensitive (which the test is doing via some Python checks that we can't really emulate with the usual FileCheck logic). Fixes rdar://67003004 Reviewed By: JDevlieghere Differential Revision: https://reviews.llvm.org/D96795
-
Kadir Cetinkaya authored
Path{Match,Exclude} and MountPoint were checking paths case-sensitively on all platforms, as with other features, this was causing problems on windows. Since users can have capital drive letters on config files, but editors might lower-case them. This patch addresses that issue by: - Creating regexes with case-insensitive matching on those platforms. - Introducing a new pathIsAncestor helper, which performs checks in a case-correct manner where needed. Differential Revision: https://reviews.llvm.org/D96690
-
Craig Topper authored
There have been some recent changes to the type legalization for some of these intrinsics so I thought it would be good to have coverage.
-
Rong Xu authored
Refactor SampleProfile.cpp to use the core code in CodeGen. The main changes are: (1) Move SampleProfileLoaderBaseImpl class to a header file. (2) Split SampleCoverageTracker to a head file and a cpp file. (3) Move the common codes (common options and callsiteIsHot()) to the common cpp file. Differential Revision: https://reviews.llvm.org/D96455
-
Peter Collingbourne authored
Null return addresses can appear at the bottom of the stack (i.e. the frame corresponding to the entry point). Authenticating these addresses will set the error code in the address, which will lead to a segfault in the sigreturn trampoline detection code. Fix this problem by not authenticating null addresses. Differential Revision: https://reviews.llvm.org/D96560
-
Jessica Paquette authored
This reverts commit 61b4702a. We were seeing some test failures in SPECINT2006 due to this change. Reverting to investigate.
-
Zbigniew Sarbinowski authored
Let's use -nostdlib++ rather than -nodefaultlibs when building libc++/libc++abi/libunwind libraries. The default is -nostdlib++ if supported by a build compiler like it is the case with clang, otherwise -nodefaultlibs is used as before. This change is needed to avoid additional changes at the link step and not to increase the maintenance costs. If clang with -nodefaultlibs is used all the libraries which are removed but required would have to be manually added in. This set of libraries are unique and will send out. The propose change will allow to make the link step simple for other platforms as well. Reviewed By: #libc, #libc_abi, ldionne Differential Revision: https://reviews.llvm.org/D95875
-
Michael Kruse authored
The tile directive is in OpenMP's Technical Report 8 and foreseeably will be part of the upcoming OpenMP 5.1 standard. This implementation is based on an AST transformation providing a de-sugared loop nest. This makes it simple to forward the de-sugared transformation to loop associated directives taking the tiled loops. In contrast to other loop associated directives, the OMPTileDirective does not use CapturedStmts. Letting loop associated directives consume loops from different capture context would be difficult. A significant amount of code generation logic is taking place in the Sema class. Eventually, I would prefer if these would move into the CodeGen component such that we could make use of the OpenMPIRBuilder, together with flang. Only expressions converting between the language's iteration variable and the logical iteration space need to take place in the semantic analyzer: Getting the of iterations (e.g. the overload resolution of `std::distance`) and converting the logical iteration number to the iteration variable (e.g. overload resolution of `iteration + .omp.iv`). In clang, only CXXForRangeStmt is also represented by its de-sugared components. However, OpenMP loop are not defined as syntatic sugar. Starting with an AST-based approach allows us to gradually move generated AST statements into CodeGen, instead all at once. I would also like to refactor `checkOpenMPLoop` into its functionalities in a follow-up. In this patch it is used twice. Once for checking proper nesting and emitting diagnostics, and additionally for deriving the logical iteration space per-loop (instead of for the loop nest). Differential Revision: https://reviews.llvm.org/D76342
-
Alex Zinenko authored
A series of preceding patches changed the mechanism for translating MLIR to LLVM IR to use dialect interface with delayed registration. It is no longer necessary for specific dialects to derive from ModuleTranslation. Remove all virtual methods from ModuleTranslation and factor out the entry point to be a free function. Also perform some cleanups in ModuleTranslation internals. Depends On D96774 Reviewed By: nicolasvasilache Differential Revision: https://reviews.llvm.org/D96775
-
Simon Pilgrim authored
Similar to D96622, we're better off just promoting uaddsat(x,y) -> umin(add(x,y),c) instead of trying to perform a shifted uaddsat. I initially tried to just use shifted promotion in cases where we didn't have a legal/custom umin - but we don't appear to have any targets that have uaddsat but not umin, so imo we're better off always using the umin and avoid an untested shifted uaddsat code path. Differential Revision: https://reviews.llvm.org/D96767
-
Craig Topper authored
Reviewed By: frasercrmck Differential Revision: https://reviews.llvm.org/D96741
-
Craig Topper authored
[SelectionDAG][AArch64] Restrict matchUnaryPredicate to only handle SPLAT_VECTOR for scalable vectors. fde24661 added support for scalable vectors to matchUnaryPredicate by handling SPLAT_VECTOR in addition to BUILD_VECTOR. This was used to enabled UDIV/SDIV/UREM/SREM by constant expansion in BuildUDIV/BuildSDIV in TargetLowering.cpp The caller there expects to call getBuildVector from the match factors. This leads to a crash right now if there is a SPLAT_VECTOR of fixed vectors since the number of vectors won't match the number of elements. To fix this, this patch updates the callers to check the opcode instead of whether the type is fixed or scalable. This assumes that only 3 opcodes are handled by matchUnaryPredicate so I've added an assertion to the final else to check that opcode. Reviewed By: RKSimon Differential Revision: https://reviews.llvm.org/D96174
-
Alex Zinenko authored
Verification of the LLVM IR produced when translating various MLIR dialects was only active when calling the translation programmatically. This has led to several cases of invalid LLVM IR being generated that could not be caught with textual mlir-translate tests. Add verifiers for these cases and fix the tests in preparation for enforcing the validation of LLVM IR. Reviewed By: nicolasvasilache Differential Revision: https://reviews.llvm.org/D96774
-
Florian Hahn authored
ICMP & SELECT patterns extracting the sign of a value can be simplified to OR & ASR (see https://alive2.llvm.org/ce/z/Xx4iZ0). This does not save any instructions in IR, but it is profitable on AArch64, because we need at least 2 extra instructions to materialize 1 and -1 for the SELECT. The improvements result in ~5% speedups on loops of the form static int sign_of(int x) { if (x < 0) return -1; return 1; } void foo(const int *x, int *res, int cnt) { for (int i=0;i<cnt;i++) res[i] = sign_of(x[i]); } Reviewed By: dmgreen Differential Revision: https://reviews.llvm.org/D96596
-
Siva Chandra Reddy authored
Few math functions manipulate errno. They assumed that LLVM libc's errno is available. However, that might not be the case when these functions are used in a libc which does not use LLVM libc's errno. This change switches such uses of LLVM libc's errno to the normal public errno macro. This does not affect LLVM libc's build because the include order ensures we get LLVM libc's errno. Also, the header check rule ensures we are only including LLVM libc's errno.h.
-
Kazu Hirata authored
This patch fixes a warning from -Wcovered-switch-default. The switch statement in question handles all the enum values.
-
Alex Zinenko authored
Make sure they can only be attached to LLVM functions as a result of converting GPU functions to the LLVM Dialect.
-
Arnold Schwaighofer authored
[coro async] Don't promote allocas to the frame or rewrite swifterror if there are no suspend points Also don't call function to update the call graph if there are no clones. The function will fail. rdar://74277860 Differential Revision: https://reviews.llvm.org/D96620
-
clementval authored
This patch introduce the fir-opt tool. Similar to mlir-opt for FIR. It will be used in following patches to test fir opt and round-trip. Reviewed By: schweitz, mehdi_amini Differential Revision: https://reviews.llvm.org/D96535
-
David Green authored
From what I can tell, a writeback is unpredictable with LR for both loads and stores. This changes the operand from a gprnopc to a rGPR in both cases (which I believe is essentially a NFC due to the tied-def already being a rGPR.) Differential Revision: https://reviews.llvm.org/D96723
-
Matt Arsenault authored
In a future commit, soft clauses will be hinted with kill instructions rather than forced together with bundles. Look for kills that look like this, and erase them. I'm not sure if the check for specific uses is worthwhile, or if it would be better to just unconditionally erase kills. This reduces test churn in a future patch.
-
Simon Pilgrim authored
Fold shuffle(bop(shuffle(x,y),shuffle(z,w)),bop(shuffle(a,b),shuffle(c,d))) -> bop(shuffle(x,y),shuffle(z,w)),bop(shuffle(a,b),shuffle(c,d)) Attempt to fold from a shuffle of a pair of binops to a binop of shuffles, as long as one/both of the binop sources are also shuffles that can be merged with the outer shuffle. This should guarantee that we remove one binop without introducing any additional shuffles. Technically there's potential for a merged shuffle's lowering to be poorer than the original shuffle, but it could also be better, and I'm not seeing any regressions as long as we keep the 'don't merge splats' rule already present in MergeInnerShuffle. This expands and generalizes an existing X86 combine and attempts to merge either of each binop's sources (with an on-the-fly commutation of the shuffle mask) - we couldn't do that in the x86 version as it had to stay in a form that DAGCombine's MergeInnerShuffle would still recognise. Differential Revision: https://reviews.llvm.org/D96345
-
Matt Arsenault authored
This was allowing debug instructions to break the bundling, which would change scheduling behavior. Bundle debug info / kills inside the bundle. This seems to work OK, although the asm printer doesn't understand these in a bundle. This implicitly expects the memory legalizer to unbundle. It would probably be slightly nicer to move these after. Rewrite the loop to be clearer and make sure we don't end a bundle on a meta instruction, only allow them in between other valid bundle instructions.
-
serge-sans-paille authored
This takes advantage of the implicit default behavior to reduce the number of attributes, which in turns reduces compilation time. I've observed -3% in instruction count when compiling sqlite3 amalgamation with -O0 Differential Revision: https://reviews.llvm.org/D96400
-
Thomas Raoux authored
Some of the lowering of vector.contract didn't support integer case. Since reduction of integer cannot accumulate we always break up the reduction op, it should be merged by a separate canonicalization if possible. Differential Revision: https://reviews.llvm.org/D96461
-
Thomas Raoux authored
This helps bufferization passes by removing tensor_cast operations. Differential Revision: https://reviews.llvm.org/D96745
-
Lei Zhang authored
These patterns unrolls transfer read/write ops if the vector consumers/ producers are extract/insert slices op. Transfer ops can map to hardware load/store functionalities, where the vector size matters for bandwidth considerations. So these patterns should be collected separately, instead of being generic canonicalization patterns. Reviewed By: nicolasvasilache Differential Revision: https://reviews.llvm.org/D96782
-
Colin Finck authored
This allows building libc++ against winpthreads from mingw-w64 to support operating systems older than Windows 7. The remaining libc++ code already supports `WIN32` with `LIBCXX_HAS_PTHREAD_API`. Note that there is also the older "pthreads-win32". However, that support library implements `pthread_t` as a struct, which violates the libc++ assumption that `pthread_t` is always a scalar and can be compared, ordered, and set to zero. Differential Revision: https://reviews.llvm.org/D96339
-
Lei Zhang authored
Reviewed By: nicolasvasilache Differential Revision: https://reviews.llvm.org/D96781
-
Pavel Labath authored
lldb-server can use a named pipe to communicate the port number it is listening on. This windows bits of this are already implemented, but we did not have a test for that, most likely because python does not have native pipe functionality. This patch implements the windows bits necessary to test this. I'm using the ctypes package to call the native APIs directly to avoid a dependency to non-standard python packages. This introduces some amount of boilerplate, but our named pipe use case is fairly limited, so we should not end up needing to wrap large chunks of windows APIs. Surprisingly to changes to lldb-server were needed to make the test pass. Differential Revision: https://reviews.llvm.org/D96260
-
Sam McCall authored
This finally makes it possible to implement useful modules. Differential Revision: https://reviews.llvm.org/D96726
-
LLVM GN Syncbot authored
-