- Apr 08, 2020
-
-
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)
-
Raphael Isemann authored
-
Sriraman Tallam authored
This is part of the Propeller framework to do post link code layout optimizations. Please see the RFC here: https://groups.google.com/forum/#!msg/llvm-dev/ef3mKzAdJ7U/1shV64BYBAAJ and the detailed RFC doc here: https://github.com/google/llvm-propeller/blob/plo-dev/Propeller_RFC.pdf This patch adds lld support for basic block sections and performs relaxations after the basic blocks have been reordered. After the linker has reordered the basic block sections according to the desired sequence, it runs a relaxation pass to optimize jump instructions. Currently, the compiler emits the long form of all jump instructions. AMD64 ISA supports variants of jump instructions with one byte offset or a four byte offset. The compiler generates jump instructions with R_X86_64 32-bit PC relative relocations. We would like to use a new relocation type for these jump instructions as it makes it easy and accurate while relaxing these instructions. The relaxation pass does two things: First, it deletes all explicit fall-through direct jump instructions between adjacent basic blocks. This is done by discarding the tail of the basic block section. Second, If there are consecutive jump instructions, it checks if the first conditional jump can be inverted to convert the second into a fall through and delete the second. The jump instructions are relaxed by using jump instruction mods, something like relocations. These are used to modify the opcode of the jump instruction. Jump instruction mods contain three values, instruction offset, jump type and size. While writing this jump instruction out to the final binary, the linker uses the jump instruction mod to determine the opcode and the size of the modified jump instruction. These mods are required because the input object files are memory-mapped without write permissions and directly modifying the object files requires copying these sections. Copying a large number of basic block sections significantly bloats memory. Differential Revision: https://reviews.llvm.org/D68065
-
Michael Liao authored
Summary: - Use `device_builtin_surface` and `device_builtin_texture` for surface/texture reference support. So far, both the host and device use the same reference type, which could be revised later when interface/implementation is stablized. Reviewers: yaxunl Subscribers: cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D77583
-
Simon Pilgrim authored
Shuffle combining can insert zero byte sized elements into the shuffle mask, which combineX86ShufflesConstants will attempt to fold without taking into account whether the byte-sized type is legal (e.g. AVX512F only targets). If we have a full-zeroable vector then we should just return a zero version of the root type, otherwise if the type isn't valid we should bail. Fixes PR45443
-
Artem Dergachev authored
This reverts commit cfd388d3.
-
Louis Dionne authored
The new format should be equivalent to the old format, and it is now the default format when running the libc++ tests. This commit changes the libc++abi tests to use the new format by default too. If unexpected failures are discovered, it should be fine to revert this commit until they are addressed. Also note that it is still possible to use the old format by passing `--param=use_old_format=True` when running Lit for the time being.
-
Louis Dionne authored
libc++abi has two of these tests.
-
Marcel Hlopko authored
Summary: Same restrictions apply as in the other direction: macro arguments are not supported yet, only full macro expansions can be mapped. Taking over from https://reviews.llvm.org/D72581. Reviewers: gribozavr2, sammccall Reviewed By: gribozavr2 Subscribers: cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D77209
-
Sam McCall authored
Summary: Our previous definition of "top-level" was too informal, and didn't allow for overlapping macros that each directly produce expanded tokens. See D77507 for previous discussion. Fixes http://bugs.llvm.org/show_bug.cgi?id=45428 Reviewers: kadircet, vabridgers Subscribers: cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D77615
-
Florian Hahn authored
Currently Clang does not respect -fno-unroll-loops during LTO. During D76916 it was suggested to respect -fno-unroll-loops on a TU basis. This patch uses the existing llvm.loop.unroll.disable metadata to disable loop unrolling explicitly for each loop in the TU if unrolling is disabled. This should ensure that loops from TUs compiled with -fno-unroll-loops are skipped by the unroller during LTO. This also means that if a loop from a TU with -fno-unroll-loops gets inlined into a TU without this option, the loop won't be unrolled. Due to the fact that some transforms might drop loop metadata, there potentially are cases in which we still unroll loops from TUs with -fno-unroll-loops. I think we should fix those issues rather than introducing a function attribute to disable loop unrolling during LTO. Improving the metadata handling will benefit other use cases, like various loop pragmas, too. And it is an improvement to clang completely ignoring -fno-unroll-loops during LTO. If that direction looks good, we can use a similar approach to also respect -fno-vectorize during LTO, at least for LoopVectorize. In the future, this might also allow us to remove the UnrollLoops option LLVM's PassManagerBuilder. Reviewers: Meinersbur, hfinkel, dexonsmith, tejohnson Reviewed By: Meinersbur, tejohnson Differential Revision: https://reviews.llvm.org/D77058
-