- Feb 17, 2021
-
-
Rong Xu authored
Reapply patch after fixing buildbot failure. 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
-
Sriraman Tallam authored
Basic block sections enables function sections implicitly, this is not needed and is inefficient with "=list" option. We had basic block sections enable function sections implicitly in clang. This is particularly inefficient with "=list" option as it places functions that do not have any basic block sections in separate sections. This causes unnecessary object file overhead for large applications. This patch disables this implicit behavior. It only creates function sections for those functions that require basic block sections. Further, there was an inconistent behavior with llc as llc was not turning on function sections by default. This patch makes llc and clang consistent and tests are added to check the new behavior. This is the first of two patches and this adds functionality in LLVM to create a new section for the entry block if function sections is not enabled. Differential Revision: https://reviews.llvm.org/D93876
-
Stella Laurenzo authored
Differential Revision: https://reviews.llvm.org/D96815
-
Alexey Bataev authored
OpenMP 5.0 removed a lot of restriction for overlapped mapped items comparing to OpenMP 4.5. Patch restricts the checks for overlapped data mappings only for OpenMP 4.5 and less and reorders mapping of the arguments so, that present and alloc mappings are processed first and then all others. Differential Revision: https://reviews.llvm.org/D86119
-
Peter Steinfeld authored
It's possible to define a procedure that has a procedure dummy argument which names the procedure that contains it. This was causing the compiler to fall into an infinite loop when characterizing a call to the procedure. Following a suggestion from Peter, I fixed this be maintaining a set of procedure symbols that had already been seen while characterizing a procedure. This required passing a new parameter to the functions that characterized a Procedure, a DummyArgument, and a DummyProcedure. I also added several tests that will crash the compiler without this change. Differential Revision: https://reviews.llvm.org/D96631
-
Petr Hosek authored
This change introduces support for zero flag ELF section groups to lld. lld already supports COMDAT sections, which in ELF are a special type of ELF section groups. These are generally useful to enable linker GC where you want a group of sections to always travel together, that is to be either retained or discarded as a whole, but without the COMDAT semantics. Other ELF linkers already support zero flag ELF section groups and this change helps us reach feature parity. Differential Revision: https://reviews.llvm.org/D96636
-
Yang Fan authored
Implement all of P1825R0: - implicitly movable entity can be an rvalue reference to non-volatile automatic object. - operand of throw-expression can be a function or catch-clause parameter (support for function parameter has already been implemented). - in the first overload resolution, the selected function no need to be a constructor. - in the first overload resolution, the first parameter of the selected function no need to be an rvalue reference to the object's type. This patch also removes the diagnostic `-Wreturn-std-move-in-c++11`. Differential Revision: https://reviews.llvm.org/D88220 -
Petr Hosek authored
This change introduces support for zero flag ELF section groups to LLVM. LLVM already supports COMDAT sections, which in ELF are a special type of ELF section groups. These are generally useful to enable linker GC where you want a group of sections to always travel together, that is to be either retained or discarded as a whole, but without the COMDAT semantics. Other ELF assemblers already support zero flag ELF section groups and this change helps us reach feature parity. Differential Revision: https://reviews.llvm.org/D95851
-
LLVM GN Syncbot authored
-
Mehdi Amini authored
This reverts commit 310b3530. The build is broken with -DBUILD_SHARED_LIBS=ON : lib/ProfileData/CMakeFiles/LLVMProfileData.dir/SampleProfileLoaderBaseUtil.cpp.o: In function `llvm::sampleprofutil::callsiteIsHot(llvm::sampleprof::FunctionSamples const*, llvm::ProfileSummaryInfo*, bool)': SampleProfileLoaderBaseUtil.cpp:(.text._ZN4llvm14sampleprofutil13callsiteIsHotEPKNS_10sampleprof15FunctionSamplesEPNS_18ProfileSummaryInfoEb+0x1a): undefined reference to `llvm::ProfileSummaryInfo::isColdCount(unsigned long) const' SampleProfileLoaderBaseUtil.cpp:(.text._ZN4llvm14sampleprofutil13callsiteIsHotEPKNS_10sampleprof15FunctionSamplesEPNS_18ProfileSummaryInfoEb+0x28): undefined reference to `llvm::ProfileSummaryInfo::isHotCount(unsigned long) const' ...
-
David Blaikie authored
-
MaheshRavishankar authored
Resolving the dim of outputs of a tensor_reshape op in terms of its input shape allows the op to be eliminated when its used only in its dims. The init_tensor -> tensor_reshape canonicalization can be simplified to use the dims of the output of the tensor_reshape which gets canonicalized away later making the tensor_reshape dead. Differential Revision: https://reviews.llvm.org/D96635
-
Simonas Kazlauskas authored
When the `DWOPath` is absolute, we want to use `DWOPath` as is, without prepending any other components to the path. The `sys::path::append` does not join, but rather unconditionally appends the paths, so something like `sys::path::append("/tmp", "/tmp/banana")` will result in `/tmp/tmp/banana` rather than the desired `/tmp/banana`. This then causes `llvm-dwp` to fail in a following situation: ``` $ clang -gsplit-dwarf /tmp/banana/test.c -c -o /tmp/outdir/foo.o $ clang outdir/foo.o -o outdir/hm $ llvm-dwarfdump outdir/hm | grep -C2 foo.dwo DW_AT_comp_dir ("/tmp") DW_AT_GNU_pubnames (true) DW_AT_GNU_dwo_name ("/tmp/outdir/foo.dwo") DW_AT_GNU_dwo_id (0xde4d396f3bf0e257) DW_AT_low_pc (0x0000000000401100) $ strace -o trace llvm-dwp -e outdir/hm -o outdir/hm.dwp error: No such file or directory $ cat trace | grep foo.dwo openat(AT_FDCWD, "/tmp/tmp/outdir/foo.dwo", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory) ``` Reviewed By: dblaikie Differential Revision: https://reviews.llvm.org/D96678 -
David Blaikie authored
-
Johannes Doerfert authored
As reported by Guilherme Valarini [0], we used to pass stack allocations to calls that can nowadays be asynchronous. This is arguably a problem and it will inevitably result in UB. To remedy the situation we allocate the locations as part of the AsyncInfoTy object. The lifetime of that object matches what we need for now. If the synchronization is not tied to the AsyncInfoTy object anymore we might need to have a different buffer construct in global space. This should be back-ported to LLVM 12 but needs slight modifications as it is based on refactoring patches we do not need to backport. [0] https://lists.llvm.org/pipermail/openmp-dev/2021-February/003867.html Reviewed By: JonChesterfield Differential Revision: https://reviews.llvm.org/D96667
-
Johannes Doerfert authored
This patch unifies our libomptarget API in two ways: - always pass a `__tgt_async_info` object, the Queue member decides if it is in use or not. - (almost) always synchronize in the interface layer and not in the omptarget layer. A side effect is that we now put all constructor and static initializer kernels in a stream too, if the device utilizes `__tgt_async_info`. The patch contains a TODO which can be addressed as we add support for asynchronous malloc and free in the plugin API. This is the only `synchronizeAsyncInfo` left in the omptarget layer. Site note: On a V100 system the GridMini performance for small sizes more than doubled. Reviewed By: tianshilei1992 Differential Revision: https://reviews.llvm.org/D96379 -
Johannes Doerfert authored
The AsyncInfo should be passed everywhere and it should offer a way to ensure synchronization, given a libomptarget Device. This replaces D96431. Reviewed By: tianshilei1992 Differential Revision: https://reviews.llvm.org/D96438
-
Johannes Doerfert authored
Reviewed By: tianshilei1992 Differential Revision: https://reviews.llvm.org/D96430
-
Johannes Doerfert authored
This unifies the API of `target` relative to `targetUpdateData` and such. Reviewed By: tianshilei1992, grokos Differential Revision: https://reviews.llvm.org/D96429
-
Johannes Doerfert authored
Reviewed By: tianshilei1992 Differential Revision: https://reviews.llvm.org/D96445
-
Johannes Doerfert authored
Reviewed By: tianshilei1992 Differential Revision: https://reviews.llvm.org/D96812
-
Johannes Doerfert authored
The struct and enum alignments are kept by disabling clang-format for that code region. Reviewed By: tianshilei1992, JonChesterfield, grokos Differential Revision: https://reviews.llvm.org/D96428
-
Victor Huang authored
We currently represent TOC entries by an MCSymbol. This is not enough in some situations. For example, when accessing an initialized TLS variable v on AIX using the general dynamic model, we need to generate the two following entries for v: .tc .v[TC],v@m .tc v[TC],v One is for the region handle (with the @m relocation), the other is for the variable offset. This refactoring allows storing several entries for the same symbol with different VariantKind in the TOC. If the VariantKind is not specified, we default to VK_None. The AIX TLS implementation using this refactoring to generate the two entries will be posted in a subsequent patch. Patched By: bsaleil Reviewed By: sfertile Differential Revision: https://reviews.llvm.org/D96346
-
Michał Górny authored
Ensure that the llvm::Error instances are always considered handled by replacing LLDB_LOG with LLDB_LOG_ERROR. Differential Revision: https://reviews.llvm.org/D96558
-
Kazu Hirata authored
This patch fixes a warning: llvm-project/llvm/include/llvm/ProfileData/SampleProfileLoaderBaseImpl.h:69:7: error: 'llvm::SampleProfileLoaderBaseImpl' has virtual functions but non-virtual destructor [-Werror,-Wnon-virtual-dtor] Differential Revision: https://reviews.llvm.org/D96810
-
Adam Straw authored
Separating the AffineMapAccessInterface from AffineRead/WriteOp interface so that dialects which extend Affine capabilities (e.g. PlaidML PXA = parallel extensions for Affine) can utilize relevant passes (e.g. MemRef normalization). Reviewed By: bondhugula Differential Revision: https://reviews.llvm.org/D96284
-
Sterling Augustine authored
This reverts commit 5dfba562. That commit causes an assertion failure with the following repro: typedef long b __attribute__((__vector_size__(16))); b *d; b e; b __attribute__((__always_inline__)) c(b h, b i) { return (__attribute__((__vector_size__(8 * sizeof(short)))) short)h + i; } j() { b k, l, m, n, o[6], p, q; m = d[5]; b r = m; b s = f(r, 8); q = s; l = d[1]; p = l; t(q); n = c(m, l); o[1] = c(s, f(p, 8)); k = __builtin_shufflevector(n, o[1], 0, 2); e = __builtin_ia32_psrlwi128(k, j); } ./bin/clang -cc1 -triple x86_64-grtev4-linux-gnu -emit-obj -O1 -std=c99 test.c
-
Ebrahim Byagowi authored
Now that llvm's minimum version is 3.13.4 anyway and `-S` is introduced in the same version[1], let's use this little time saving option to simplify the build instructions. [1]: https://cgold.readthedocs.io/en/latest/glossary/-S.html Authored-By:
Ebrahim Byagowi <ebrahim@gnu.org> Differential-Revision: https://reviews.llvm.org/D95049
-
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
-