- Apr 08, 2020
-
-
River Riddle authored
Summary: Diagnostics may be cached in the parallel diagnostic handler to preserve proper ordering. Storing the Operation as a DiagnosticArgument is problematic as the operation may be erased or changed before it finally gets printed. Differential Revision: https://reviews.llvm.org/D77675
-
Alexey Bataev authored
-
Davide Italiano authored
Discussed on lldb-dev with Pavel Labath. This doesn't work for background processes [causes Python to be stuck forever], and it's unclear whether it's needed. There's no test, also. If this turns out to be useful, it can be recommitted with a functional implementation and a test.
-
Johannes Doerfert authored
This reverts commit 97aa593a as it causes problems (PR45453) https://reviews.llvm.org/D77574#1966321. This additionally adds an explicit reference to FrontendOpenMP to clang-tidy where ASTMatchers is used. This is hopefully just a temporary solution. The dependence on `FrontendOpenMP` from `ASTMatchers` should be handled by CMake implicitly, not us explicitly. Reviewed By: aheejin Differential Revision: https://reviews.llvm.org/D77666
-
Alexey Bataev authored
Implemented codegen for the iterator expression in the depend clauses. Iterator construct is emitted the following way: iterator(cnt1, cnt2, ...), in : <dep> <TotalNumDeps> = <cnt1_size> * <cnt2_size> * ...; kmp_depend_t deps[<TotalNumDeps>]; deps_counter = 0; for (cnt1) { for (cnt2) { ... deps[deps_counter].base_addr = &<dep>; deps[deps_counter].size = sizeof(<dep>); deps[deps_counter].flags = in; deps_counter += 1; ... } } For depobj construct the codegen is very similar, but the memory is allocated dynamically and added extra first item reserved for internal use. -
Wei Mi authored
The common profile usage is to collect profile from a target and then use the profile to guide the optimized build for the same target. There are some cases that no profile can be collected for a target. In those cases, although no full profile is available, it is possible to have some partial profile collected from other targets to optimize common libraries and utilities. A flag is needed to tell the partial profile from the full profile apart, so compiler can use different strategy for them. Differential Revision: https://reviews.llvm.org/D77426
-
Nemanja Ivanovic authored
There are a few patterns where we use a superclass for inputs to this instruction rather than the correct class. This can sometimes lead to unncessary copies.
-
Nathan James authored
Summary: Change all checks that take enums as configuration to use enum specific methods in `ClangTidyCheck::OptionsView`. Reviewers: aaron.ballman, alexfh Reviewed By: aaron.ballman Subscribers: wuzish, nemanjai, kbarton, arphaman, xazax.hun, cfe-commits Tags: #clang, #clang-tools-extra Differential Revision: https://reviews.llvm.org/D76606
-
Shilei Tian authored
[OpenMP] Optimized stream selection by scheduling data mapping for the same target region into a same stream Summary: This patch introduces two things for offloading: 1. Asynchronous data transferring: those functions are suffix with `_async`. They have one more argument compared with their synchronous counterparts: `__tgt_async_info*`, which is a new struct that only has one field, `void *Identifier`. This struct is for information exchange between different asynchronous operations. It can be used for stream selection, like in this case, or operation synchronization, which is also used. We may expect more usages in the future. 2. Optimization of stream selection for data mapping. Previous implementation was using asynchronous device memory transfer but synchronizing after each memory transfer. Actually, if we say kernel A needs four memory copy to device and two memory copy back to host, then we can schedule these seven operations (four H2D, two D2H, and one kernel launch) into a same stream and just nee...
-
Nathan James authored
Summary: Adds support for `ClangTidyCheck::OptionsView` to deteremine: - If an option is found in the configuration. - If an integer option read from configuration is parsable to an integer. - Parse and Serialize enum configuration options directly using a mapping from `llvm::StringRef` to `EnumType`. - If an integer or enum option isn't parseable but there is a default value it will issue a warning to stderr that the config value hasn't been used. - If an enum option isn't parsable it can provide a hint if the value was a typo. Reviewers: aaron.ballman, alexfh, gribozavr2 Reviewed By: aaron.ballman Subscribers: xazax.hun, cfe-commits Tags: #clang, #clang-tools-extra Differential Revision: https://reviews.llvm.org/D77085
-
Sid Manning authored
Update the sysroot expectation to match other targets and breakout linux/musl toolchain tests into a new file. Differential Revision: https://reviews.llvm.org/D77440
-
Aaron Ballman authored
WG14 has adopted N2480 (http://www.open-std.org/jtc1/sc22/wg14/www/docs/n2480.pdf) into C2x at the meetings last week, allowing parameter names of a function definition to be elided. This patch relaxes the error so that C++ and C2x do not diagnose this situation, and modes before C2x will allow it as an extension. This also adds the same feature to ObjC blocks under the assumption that ObjC wishes to follow the C standard in this regard.
-
Louis Dionne authored
This allows both the old and the new testing formats to handle these tests with modules enabled. We also include the modules flags in the %{flags} substitution, which means that .sh.cpp tests in the old format and all tests in the new format will use modules flags when enabled. -
Graham Sellers authored
This patch extends existing constant folding in logical operations to handle S_XNOR, S_NAND, S_NOR, S_ANDN2, S_ORN2, V_LSHL_ADD_U32 and V_AND_OR_B32. Also added a couple of tests for existing folds.
-
Craig Topper authored
This removes a call to getScalarType from a bunch of call sites. It also makes the behavior consistent with SIGN_EXTEND_INREG. Differential Revision: https://reviews.llvm.org/D77631
-
LLVM GN Syncbot authored
-
Alexey Lapshin authored
For implementing "remove obsolete debug info in lld", it is neccesary to have DWARF generation code implementation. dsymutil uses DwarfStreamer for that purpose. DwarfStreamer uses AsmPrinter. It is considered OK to use AsmPrinter based code in lld(D74169). This patch moves DwarfStreamer implementation into DWARFLinker, so that it could be reused from lld. Generally, a better place for such a common DWARF generation code would be not DWARFLinker but an additional separate library. Such a library could contain a single version of DWARF generation routines and could also be independent of AsmPrinter. At the current moment, DwarfStreamer does not pretend to be such a general implementation of DWARF generation. So I decided to put it into DWARFLinker since it is the only user of DwarfStreamer. Testing: it passes "check-all" lit testing. MD5 checksum for clang .dSYM bundle matches for the dsymutil with/without that patch. Reviewed By: JDevlieghere Differential revision: https://reviews.llvm.org/D77169
-
Matt Arsenault authored
-
Artem Dergachev authored
This reverts commit 21efb06f. Changes since last attempt to land this patch: - Sort files before deduplicating. This hopefully avoids some buildbot failures. - Fix use of uninitialized variable when running without --use-analyzer. - Remove the "REQUIRES: windows" item.
-
Eli Friedman authored
7aecf232 fixed the bug where we would miscompile, but we still generate a crazy amount of code. Turn off the expansion until someone implements an appropriate heuristic. Differential Revision: https://reviews.llvm.org/D77599
-
Matt Arsenault authored
-
Julian Lettner authored
-
Sam Clegg authored
Summary: Fixes: https://bugs.llvm.org/show_bug.cgi?id=45452 Subscribers: dschuff, jgravelle-google, hiraditya, aheejin, sunfish, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D77627
-
Stanislav Mekhanoshin authored
We can only collapse adjacent SI_END_CF if outer statement belongs to a simple SI_IF, otherwise correct mask is not in the register we expect, but is an argument of an S_XOR instruction. Even if SI_IF is simple it might be lowered using S_XOR because lowering is dependent on a basic block layout. It is not considered simple if instruction consuming its output is not an SI_END_CF. Since that SI_END_CF might have already been lowered to an S_OR isSimpleIf() check may return false. This situation is an opportunity for a further optimization of SI_IF lowering, but that is a separate optimization. In the meanwhile move SI_END_CF post the lowering when we already know how the rest of the CFG was lowered since a non-simple SI_IF case still needs to be handled. Differential Revision: https://reviews.llvm.org/D77610
-
Fangrui Song authored
This is an alternative design to D77512. D45195 added --warn-backrefs to detect * A. certain input orders which GNU ld either errors ("undefined reference") or has different resolution semantics * B. (byproduct) some latent multiple definition problems (-ldef1 -lref -ldef2) which I call "linking sandwich problems". def2 may or may not be the same as def1. When an archive appears more than once (-ldef -lref -ldef), lld and GNU ld may have the same resolution but --warn-backrefs may warn. This is not uncommon. For example, currently lld itself has such a problem: ``` liblldCommon.a liblldCOFF.a ... liblldCommon.a _ZN3lld10DWARFCache13getDILineInfoEmm in liblldCOFF.a refers to liblldCommon.a(DWARF.cpp.o) libLLVMSupport.a also appears twice and has a similar warning ``` glibc has such problems. It is somewhat destined because of its separate libc/libpthread/... and arbitrary grouping. The situation is getting improved over time but I have seen: ``` -lc __isnanl references -lm -lc _IO_funlockfile references -lpthread ``` There are also various issues in interaction with other runtime libraries such as libgcc_eh and libunwind: ``` -lc __gcc_personality_v0 references -lgcc_eh -lpthread __gcc_personality_v0 references -lgcc_eh -lpthread _Unwind_GetCFA references -lunwind ``` These problems are actually benign. We want --warn-backrefs to focus on its main task A and defer task B (which is also useful) to a more specific future feature (see gold --detect-odr-violations and https://bugs.llvm.org/show_bug.cgi?id=43110). Instead of warning immediately, we store the message and only report it if no subsequent lazy definition exists. The use of the static variable `backrefDiags` is similar to `undefs` in Relocations.cpp Reviewed By: grimar Differential Revision: https://reviews.llvm.org/D77522 -
Fangrui Song authored
SymbolAssignment::addr stores the location counter. The type should be uint64_t instead of unsigned. The upper half of the address space is commonly used by operating system kernels. Similarly, SymbolAssignment::size should be an uint64_t. A kernel linker script can move the location counter from 0 to the upper half of the address space. Reviewed By: grimar Differential Revision: https://reviews.llvm.org/D77445
-
Aaron Ballman authored
-
Simon Pilgrim authored
-
Lei Zhang authored
If we have two back-to-back loops with block arguments, the OpPhi instructions generated for the second loop's block arguments should have use the merge block of the first SPIR-V loop structure as their incoming parent block. Differential Revision: https://reviews.llvm.org/D77543
-
Matt Arsenault authored
These should not be assuming address space 0. Calling getPointerTy is generally the wrong thing to do, since you should already know the type from the incoming IR.
-
Amy Huang authored
The change in bcf6604 added a debug info flag, which caused some tests to fail; I removed some commas so that the test matching still works.
-
Amy Huang authored
Summary: This change adds DIFlagNonTrivial to forward declarations of DICompositeType. It adds the flag to nontrivial types and types with unknown triviality. It fixes adding the "CxxReturnUdt" flag to functions inconsistently, since it is added based on whether the return type is marked NonTrivial, and that changes if the return type was a forward declaration. continues the discussion at https://reviews.llvm.org/D75215 Bug: https://bugs.llvm.org/show_bug.cgi?id=44785 Reviewers: rnk, dblaikie, aprantl Subscribers: cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D77436
- Apr 07, 2020
-
-
Nikita Popov authored
RDA sometimes needs to visit blocks twice, to take into account reaching defs coming in along loop back edges. Currently it handles repeated visitation the same way as usual, which means that it will scan through all instructions and their reg unit defs again. Not only is this very inefficient, it also means that all reaching defs in loops are going to be inserted twice. We can do much better than this. The only thing we need to handle is a new reaching def from a predecessor, which either needs to be prepended to the reaching definitions (if there was no reaching def from a predecessor), or needs to replace an existing predecessor reaching def, if it is more recent. Since D77508 we only store the most recent predecessor reaching def, so that's the only one that may need updating. This also has the nice side-effect that reaching definitions are now automatically sorted and unique, so drop the llvm::sort() call in favor of an assertion. Differential Revision: https://reviews.llvm.org/D77511
-
Nikita Popov authored
Only pass the MachineBasicBlock itself down to helper methods, they don't need to know about traversal. Move the debug print into the main method.
-
Nikita Popov authored
An instruction may define the same reg unit multiple times, avoid inserting the same reaching def multiple times in that case. Also print the reg unit, rather than the super-register, in the debug code.
-
David Tenty authored
Summary: - Remove the no longer used Darwin CalleeSavedRegs - Combine the SVR464 callee saved regs and AIX64 since the two are (and should be) identical into PPC64 - Update tests for 64-bit CSR change Reviewers: sfertile, ZarkoCA, cebowleratibm, jasonliu, #powerpc Reviewed By: sfertile Subscribers: wuzish, nemanjai, hiraditya, kbarton, shchenz, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D77235
-
diggerlin authored
SUMMARY: refactor readobj/XCOFFDumper.cpp with helper function getAlignmentLog2() , getSymbolType(), isLabel(). Reviewers: Hubert Tong, James Henderson Subscribers: rupprecht, seiyai,hiradityu Differential Revision: https://reviews.llvm.org/D77562
-
Dmitry Vyukov authored
PPC now requires ReExec due to ASLR. Pull in more functions for Go build. Suggested-by: Keith Randall (khr)
-