- Jul 18, 2020
-
-
peter klausler authored
Accept name=value as part of a !DIR$ compiler directive. These are currently ignored in semantics, but we should recognize more directive forms to facilitate testing. In due course, these placeholding directive parsers will be replaced. Reviewed By: sscalpone Differential Revision: https://reviews.llvm.org/D84077
-
Arthur Eubanks authored
This reverts commit 30c382a7. See https://crbug.com/1106813.
-
Michele Scandale authored
The `intrinsics_gen` target exists in the CMake exports since r309389 (see LLVMConfig.cmake.in), hence projects can depend on `intrinsics_gen` even it they are built separately from LLVM. Reviewed By: MaskRay, JDevlieghere Differential Revision: https://reviews.llvm.org/D83454
-
Aditya Nandakumar authored
https://reviews.llvm.org/D84072 Add G_EXTRACT to CSEConfigFull and add unit test as well.
-
Leonard Chan authored
This reverts commit d76e62fd. Reverting since this can lead to linker errors: ``` ld.lld: error: undefined hidden symbol: __start_asan_globals ``` when using --gc-sections. The linker can discard __start_asan_globals once there are no more `asan_globals` sections left, which can lead to this error if we have external linkages to them.
-
peter klausler authored
Old-style C /*comments*/ are omitted from preprocessor directive token sequences by the prescanner, but line-ending C++ and Fortran free-form comments are not since their handling might depend on the directive. Add code to skip these line-ending comments as appropriate in place of existing code that just skipped blanks. Reviewed By: sscalpone Differential Revision: https://reviews.llvm.org/D84061
-
AndreyChurbanov authored
hwloc documentation guarantees the only object that is always present in the topology is PU. We can check the presence of other objects in the topology, just in case. Differential Revision: https://reviews.llvm.org/D84065
-
Michael Spencer authored
In clang <3.9 the `unique_ptr` constructor that is supposed to allow for Derived to Base conversion does not work. Remove this if we drop support for such configurations. This is the same fix as in fda901a9, and it updates the comments to better reflect the actual issue. The same thing reproduces with libc++ with older clangs.
-
Eric Christopher authored
as it's causing a few unused variable warnings via the macro instantiation: sources/llvm-project/llvm/include/llvm/Frontend/OpenMP/OMPKinds.def:649:17: error: unused variable 'InaccessibleOnlyAttrs' [-Werror,-Wunused-variable] __OMP_ATTRS_SET(InaccessibleOnlyAttrs, ^ This reverts commit 09fe0c5a. -
Eric Christopher authored
Temporarily Revert "[InlineAdvisor] New inliner advisor to replay inlining from optimization remarks" as it is failing the inline-replay.ll test as well as sanitizers/Werror from returning a stack local variable. This reverts commit 029946b1.
-
Joseph Huber authored
Summary: This patch adds more function attribute information to the runtime function definitions in OMPKinds.def. The goal is to provide sufficient information about OpenMP runtime functions to perform more optimizations on OpenMP code. Reviewers: jdoerfert Subscribers: aaron.ballman cfe-commits yaxunl guansong sstefan1 llvm-commits Tags: #OpenMP #clang #llvm Differential Revision: https://reviews.llvm.org/D81031
-
Teresa Johnson authored
Fix build failure in Fuchsia build from refactoring in 5d2be1a1 Guard the moved versions of ReserveShadowMemoryRange and ProtectGap the same way they were in the asan code originally (not for Fuchsia or RTEMS). Otherwise we end up with unsats as they invoke functions not defined there.
-
peter klausler authored
Anonymous Fortran unit files (e.g., "./fort.7") need to be created O_RDWR so that they can be written, rewound, and read. Other files opened with no ACTION= specifier need to set read/write permissions based on the file, if it exists. Reviewed By: sscalpone Differential Revision: https://reviews.llvm.org/D84063
-
Sjoerd Meijer authored
-
Wenlei He authored
Summary: This change added a new inline advisor that takes optimization remarks for previous inlining as input, and provide the decision as advice so current inlining can replay inline decision of a different compilation. Dwarf inline stack with line and discriminator is used as anchor for call sites. The change can be useful for Inliner tuning. A switch -sample-profile-inline-replay=<inline_remarks_file> is added to hook up the new inliner advisor with SampleProfileLoader's inline decision for replay. The new inline advisor can also be used by regular CGSCC inliner later if needed. Reviewers: davidxl, mtrofin, wmi, hoy Subscribers: aprantl, hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D83743
-
Xiangling Liao authored
On AIX, the semantic of global_dtors contains __sterm functions associated with C++ cleanup actions and user-declared __attribute__((destructor)) functions. We should never merely register __sterm with atexit(), so currently -fregister_global_dtors_with_atexit does not work well on AIX: It would cause finalization actions to not occur when unloading shared libraries. We need to figure out a way to handle that when we start supporting user-declared __attribute__((destructor)) functions. Currently we report_fatal_error on this option temporarily. Differential Revision: https://reviews.llvm.org/D83974
-
Mitch Phillips authored
Summary: Splits the unwinder into a non-segv (for allocation/deallocation traces) and a segv unwinder. This ensures that implementations can select an accurate, slower unwinder in the segv handler (if they choose to use the GWP-ASan provided one). This is important as fast frame-pointer unwinders (like the sanitizer unwinder) don't like unwinding through signal handlers. Reviewers: morehouse, cryptoad Reviewed By: morehouse, cryptoad Subscribers: cryptoad, mgorny, eugenis, pcc, #sanitizers Tags: #sanitizers Differential Revision: https://reviews.llvm.org/D83994
-
Xinan Jiang authored
Reviewers: fhahn Reviewed By: fhahn Differential Revision: https://reviews.llvm.org/D83951
-
Roman Lebedev authored
This is the one i'm seeing as missed optimization, although there are likely other possibilities, as usual. There are 4 variants of a general sdiv->udiv fold: https://rise4fun.com/Alive/VS6 Name: v0 Pre: C0 >= 0 && C1 >= 0 %r = sdiv i8 C0, C1 => %r = udiv i8 C0, C1 Name: v1 Pre: C0 <= 0 && C1 >= 0 %r = sdiv i8 C0, C1 => %t0 = udiv i8 -C0, C1 %r = sub i8 0, %t0 Name: v2 Pre: C0 >= 0 && C1 <= 0 %r = sdiv i8 C0, C1 => %t0 = udiv i8 C0, -C1 %r = sub i8 0, %t0 Name: v3 Pre: C0 <= 0 && C1 <= 0 %r = sdiv i8 C0, C1 => %r = udiv i8 -C0, -C1 If we really don't like sdiv (more than udiv that is), and are okay with increasing instruction count (2 new negations), and we ensure that we don't undo the fold, then we could just implement these..
-
Roman Lebedev authored
-
peter klausler authored
BeginInternalListInput and BeginInternalListOutput were missing from the I/O API implementation; add them. Reviewed By: PeteSteinfeld Differential Revision: https://reviews.llvm.org/D84066
-
Michael Spencer authored
This is a workaround for a bug in older versions of Clang when. The constructor that is supposed to allow for Derived to Base conversion does not work. Remove this if we drop support for such configurations.
-
Siva Chandra Reddy authored
Added IsSameV as a convenience variable and used it where convenient. Reviewers: abrachet, lntue Differential Revision: https://reviews.llvm.org/D83980
-
Stella Laurenzo authored
Summary: * This test was failing in our builds that configure compiler-rt as the configure-time rtlib. * Opted for this test fix instead of a rollback, and hopefully TI can fix forward if this weakens the tests beyond expectations. * Suspected this failure introduced in D81676. Subscribers: cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D84058
-
David Blaikie authored
Matches C++20 API addition. Differential Revision: https://reviews.llvm.org/D83449
-
David Blaikie authored
Matches C++20 API addition. Differential Revision: https://reviews.llvm.org/D83449
-
David Blaikie authored
Matches C++20 API addition. Differential Revision: https://reviews.llvm.org/D83449
-
David Blaikie authored
Matches C++20 API addition. Differential Revision: https://reviews.llvm.org/D83449
-
David Blaikie authored
Matches C++20 API addition. Differential Revision: https://reviews.llvm.org/D83449
-
David Blaikie authored
Matches C++20 API addition. Differential Revision: https://reviews.llvm.org/D83449
-
AndreyChurbanov authored
Add barrier/region notification for parallel inside teams construct when number of teams is 1, as VTune only shows outer level regions for simplicity. Differential Revision: https://reviews.llvm.org/D84024
-
Stanislav Mekhanoshin authored
I've got the report clang11 issues signed/unsigned mismatch warning here. For some reason only clang11 seems to issue this warning. Differential Revision: https://reviews.llvm.org/D83916
-
Jonas Devlieghere authored
Reduce sleep and time outs in GDB remote testcases to one default value for each. Stop passing these values around and always use the default instead. Differential revision: https://reviews.llvm.org/D83904
-
George Rokos authored
-
Nicolas Vasilache authored
Summary: The logic was conservative but inverted: cases that should remain unmasked became 1-D masked. Differential Revision: https://reviews.llvm.org/D84051
-
Dmitry Preobrazhensky authored
These opcodes are not intended for public use. Reviewers: arsenm, rampitec Differential Revision: https://reviews.llvm.org/D81659
-
Aleksandr Platonov authored
[clang][Tooling] Try to avoid file system access if there is no record for the file in compile_commads.json Summary: If there is no record in compile_commands.json, we try to find suitable record with `MatchTrie.findEquivalent()` call. This is very expensive operation with a lot of `llvm::sys::fs::equivalent()` calls in some cases. This patch disables file symlinks for performance reasons. Example scenario without this patch: - compile_commands.json generated at clangd build (contains ~3000 files). - it tooks more than 1 second to get compile command for newly created file in the root folder of LLVM project. - we wait for 1 second every time when clangd requests compile command for this file (at file change). Reviewers: sammccall, kadircet, hokein Reviewed By: sammccall Subscribers: chandlerc, djasper, klimek, ilya-biryukov, kadircet, usaxena95, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D83621
-
Yonghong Song authored
Currently, BTF datasec type for .rodata is generated only if there are user-defined readonly global variables which have debuginfo generated. Certain readonly global variables may be generated from initialized local variables. For example, void foo(const void *); int test() { const struct { unsigned a[4]; char b; } val = { .a = {2, 3, 4, 5}, .b = 6 }; foo(&val); return 0; } The clang will create a private linkage const global to store the initialized value: @__const.test.val = private unnamed_addr constant %struct.anon { [4 x i32] [i32 2, i32 3, i32 4, i32 5], i8 6 }, align 4 This global variable eventually is put in .rodata ELF section. If there is .rodata ELF section, libbpf expects a BTF .rodata datasec as well even though it may be empty meaning there are no global readonly variables with proper debuginfo. Martin reported a bug where without this empty BTF .rodata datasec, the bpftool gen will exit with an error. This patch fixed the issue by generating .rodata BTF datasec if there exists local var intial data which will result in .rodata ELF section. Differential Revision: https://reviews.llvm.org/D84002 -
Adrian McCarthy authored
MSVC, by default, limits the number of sections generated by a single translation unit to 2^16. In a debug build, each function or method can require 4 sections, so it's not uncommon to hit it. I saw the problem when building tests for LLDB (but, interestingly, not for LLDB itself). Differential Revision: https://reviews.llvm.org/D83991
-
Fangrui Song authored
POSIX.1-2017 12.2 Utility Syntax Guidelines, Guideline 5 says: > One or more options without option-arguments, followed by at most one option that takes an option-argument, should be accepted when grouped behind one '-' delimiter. i.e. -abc represents -a -b -c. The grouped short options are very common. Many utilities extend the syntax by allowing (an option with an argument) following a sequence of short options. This patch adds the support to OptTable, similar to cl::Group for CommandLine (D58711). llvm-symbolizer will use the feature (D83530). CommandLine is exotic in some aspects. OptTable is preferred if the user wants to get rid of the behaviors. * `cl::opt<bool> i(...)` can be disabled via -i=false or -i=0, which is different from conventional --no-i. * Handling --foo & --no-foo requires a comparison of argument positions, which is a bit clumsy in user code. OptTable::parseOneArg (non-const reference InputArgList) is added along with ParseOneArg (const ArgList &). The duplicate does not look great at first glance. However, The implementation can be simpler if ArgList is mutable. (ParseOneArg is used by clang-cl (FlagsToInclude/FlagsToExclude) and lld COFF (case-insensitive). Adding grouped short options can make the function even more complex.) The implementation allows a long option following a group of short options. We probably should refine the code to disallow this in the future. Allowing this seems benign for now. Reviewed By: grimar, jhenderson Differential Revision: https://reviews.llvm.org/D83639
-