- Sep 14, 2017
-
-
Zachary Turner authored
This patch simplifies LLVM's lit infrastructure by enforcing an ordering that a site config is always run before a source-tree config. A significant amount of the complexity from lit config files arises from the fact that inside of a source-tree config file, we don't yet know if the site config has been run. However it is *always* required to run a site config first, because it passes various variables down through CMake that the main config depends on. As a result, every config file has to do a bunch of magic to try to reverse-engineer the location of the site config file if they detect (heuristically) that the site config file has not yet been run. This patch solves the problem by emitting a mapping from source tree config file to binary tree site config file in llvm-lit.py. Then, during discovery when we find a config file, we check to see if we have a target mapping for it, and if so we use that instead. This mechanism is generic enough that it does not affect external users of lit. They will just not have a config mapping defined, and everything will work as normal. On the other hand, for us it allows us to make many simplifications: * We are guaranteed that a site config will be executed first * Inside of a main config, we no longer have to assume that attributes might not be present and use getattr everywhere. * We no longer have to pass parameters such as --param llvm_site_config=<path> on the command line. * It is future-proof, meaning you don't have to edit llvm-lit.in to add support for new projects. * All of the duplicated logic of trying various fallback mechanisms of finding a site config from the main config are now gone. One potentially noteworthy thing that was required to implement this change is that whereas the ninja check targets previously used the first method to spawn lit, they now use the second. In particular, you can no longer run lit.py against the source tree while specifying the various `foo_site_config=<path>` parameters. Instead, you need to run llvm-lit.py. Differential Revision: https://reviews.llvm.org/D37756 llvm-svn: 313270
-
Benjamin Kramer authored
No functionality change intended. llvm-svn: 313269
-
Krzysztof Parzyszek authored
Patch by Jesper Antonsson. Differential Revision: https://reviews.llvm.org/D37611 llvm-svn: 313268
-
Simon Dardis authored
Traditionally GAS has provided automatic selection between dins, dinsm and dinsu. Binutils also disassembles all instructions in that family as 'dins' rather than the actual instruction. Reviewers: slthakur Differential Revision: https://reviews.llvm.org/D34877 llvm-svn: 313267
-
Alex Lorenz authored
the STDERR redirect llvm-svn: 313266
-
Benjamin Kramer authored
std::unique_ptr is pretty much a drop-in replacement here. Also remove nullptr checks that are doing nothing. llvm-svn: 313265
-
Sanjay Patel authored
This should bring signed div/rem analysis up to the same level as unsigned. We use icmp simplification to determine when the divisor is known greater than the dividend. Each positive test is followed by a negative test to show that we're not overstepping the boundaries of the known bits. There are extra tests for the signed-min-value special cases. Alive proofs: http://rise4fun.com/Alive/WI5 Differential Revision: https://reviews.llvm.org/D37713 llvm-svn: 313264
-
Chad Rosier authored
llvm-svn: 313263
-
Aleksandar Beserminji authored
llvm-svn: 313262
-
Sanjay Patel authored
The idea to make an 'isDivZero' helper was suggested for the signed case in D37713: https://reviews.llvm.org/D37713 This clean-up makes it clear that D37713 is just filling the gap for signed div/rem, removes unnecessary code, and allows us to remove a bit of duplicated code from the planned improvement in D37713. llvm-svn: 313261
-
Alex Lorenz authored
This commit ensures that CommonOptionsParser works with subcommands. This allows clang-refactor to use the CommonOptionsParser. Differential Revision: https://reviews.llvm.org/D37618 llvm-svn: 313260
-
Simon Pilgrim authored
llvm-svn: 313259
-
Simon Pilgrim authored
llvm-svn: 313258
-
Krzysztof Parzyszek authored
It used to return the actual field value from the instruction descriptor. There is no reason for that, that value is not interesting in any way and the specifics of its encoding in the descriptor should not be exposed. llvm-svn: 313257
-
Ayman Musa authored
[X86] When applying the shuffle-to-zero-extend transformation on floating point, bitcast to integer first. Fix issue described in PR34577. Differential Revision: https://reviews.llvm.org/D37803 llvm-svn: 313256
-
Jonas Devlieghere authored
This patch started as an attempt to rebase Greg's differential (D32821). The result is both quite similar and different at the same time. It adds the following checks: - Verify that all address ranges in a DIE are valid. - Verify that no ranges within the DIE overlap. - Verify that no ranges overlap with the ranges of a sibling. - Verify that children are completely contained in its (direct) parent's address range. (unless both are subprograms) Differential revision: https://reviews.llvm.org/D37696 llvm-svn: 313255
-
Simon Dardis authored
This patch complements D16810 "[mips] Make isel select the correct DEXT variant up front.". Now ISel picks the right variant of DINS, so now there is no need to replace DINS with the appropriate variant during MipsMCCodeEmitter::encodeInstruction(). This patch also enables target specific instruction verification for ins, dins, dinsm, dinsu, ext, dext, dextm, dextu. These instructions have constraints that are checked when generating MipsISD::Ins and MipsISD::Ext nodes, but these constraints are not checked during instruction selection. Adding machine verification should catch outstanding cases. Finally, correct a bug that instruction verification uncovered, where the position operand of a DINSU generated during lowering was being silently and accidently corrected to the correct value. Reviewers: slthakur Differential Revision: https://reviews.llvm.org/D34809 llvm-svn: 313254
-
Jonas Devlieghere authored
This reverts commit r313250. llvm-svn: 313253
-
Alex Lorenz authored
This is an attempt to fix http://lab.llvm.org:8011/builders/clang-ppc64le-linux-multistage after r313244. llvm-svn: 313252
-
Simon Pilgrim authored
We already have a combine for this pattern when the input to shl is add, so we just need to enable the transformation when the input is or. Original patch by @tstellar Differential Revision: https://reviews.llvm.org/D19325 llvm-svn: 313251
-
Jonas Devlieghere authored
This patch started as an attempt to rebase Greg's differential (D32821). The result is both quite similar and different at the same time. It adds the following checks: - Verify that all address ranges in a DIE are valid. - Verify that no ranges within the DIE overlap. - Verify that no ranges overlap with the ranges of a sibling. - Verify that children are completely contained in its (direct) parent's address range. (unless both are subprograms) Differential revision: https://reviews.llvm.org/D37696 llvm-svn: 313250
-
Alex Lorenz authored
This is an attempt to fix http://bb.pgr.jp/builders/clang-i686-linux-RA/ after r313244. llvm-svn: 313249
-
Simon Dardis authored
glibc changed the implementation of semaphores for glibc 2.21 requiring some target specific changes for this compiler-rt test. Modify the test to cope with MIPS64 and do some future/correctness work by tying the define for MIPS64 to exactly the define of __HAVE_64B_ATOMICS in glibc. Contributions from Nitesh Jain. Reviewers: eugenis Differential Revision: https://reviews.llvm.org/D37829 llvm-svn: 313248
-
Simon Pilgrim authored
llvm-svn: 313247
-
Simon Pilgrim authored
llvm-svn: 313246
-
Simon Pilgrim authored
Use RotAmt.urem(VTBits) instead of AND(RotAmt, VTBits - 1) TBH I don't expect non-power-of-2 types to be created, but it makes the logic clearer and matches what we do in other rotation combines. llvm-svn: 313245
-
Alex Lorenz authored
local-rename action This commit introduces the clang-refactor tool alongside the local-rename action which uses the existing renaming engine used by clang-rename. The tool doesn't actually perform the source transformations yet, it just provides testing support. This commit also moves only one test from clang-rename over to test/Refactor. I will continue to move the other tests throughout development of clang-refactor. The following options are supported by clang-refactor: -v: use verbose output -selection: The source range that corresponds to the portion of the source that's selected (currently only special command test:<file> is supported). Please note that a follow-up commit will migrate clang-refactor to libTooling's common option parser, so clang-refactor will be able to use the common interface with compilation database and options like -p, -extra-arg, etc. The testing support provided by clang-refactor is described below: When -selection=test:<file> is given, clang-refactor will parse the selection commands from that file. The selection commands are grouped and the specified refactoring action invoked by the tool. Each command in a group is expected to produce an identical result. The precise syntax for the selection commands is described in a comment in TestSupport.h. Differential Revision: https://reviews.llvm.org/D36574 llvm-svn: 313244
-
Dean Michael Berris authored
Follow-up to D37791. llvm-svn: 313243
-
Chandler Carruth authored
invalidated SCCs even when we do not have an updated SCC to redirect towards. This comes up in a fairly subtle and surprising circumstance: we need to have a connected but internal node in the call graph which later becomes a disconnected island, and then gets deleted. All of this needs to happen mid-CGSCC walk. Because it is disconnected, we have no way of computing a new "current" SCC when it gets deleted. Instead, we need to explicitly check for a deleted "current" SCC and bail out of the current CGSCC step. This will bubble all the way up to the post-order walk and then resume correctly. I've included minimal tests for this bug. The specific behavior matches something we've seen in the wild with the new PM combined with ThinLTO and sample PGO, but I've not yet confirmed whether this is the only issue there. llvm-svn: 313242
-
Vitaly Buka authored
llvm-svn: 313241
-
Vitaly Buka authored
llvm-svn: 313240
-
Vitaly Buka authored
llvm-svn: 313239
-
Dean Michael Berris authored
This breaks bootstrap builds, and is actually unnecessary. Tested locally and it seems we can remove -debug-comile just fine. Follow-up to D37791. llvm-svn: 313238
-
Alon Kom authored
This patch fixes pr34283, which exposed that the computation of maximum legal width for vectorization was wrong, because it relied on MaxInterleaveFactor to obtain the maximum stride used in the loop, however not all strided accesses in the loop have an interleave-group associated with them. Instead of recording the maximum stride in the loop, which can be over conservative (e.g. if the access with the maximum stride is not involved in the dependence limitation), this patch tracks the actual maximum legal width imposed by accesses that are involved in dependencies. Differential Revision: https://reviews.llvm.org/D37507 llvm-svn: 313237
-
George Rimar authored
With fix in formatting for GNU style output. Original commit message: This refactors GNUStyle<ELFT>::printGroupSections and LLVMStyle<ELFT>::printGroupSections to split out all duplicated code. After the change these methods just prints the data provided by introduced getGroups in a corresponding LLVM/GNU format. Differential revision: https://reviews.llvm.org/D37621 llvm-svn: 313236
-
George Rimar authored
It broke BB. llvm-svn: 313235
-
George Rimar authored
This refactors GNUStyle<ELFT>::printGroupSections and LLVMStyle<ELFT>::printGroupSections to split out all duplicated code. After the change these methods just prints the data provided by introduced getGroups in a corresponding LLVM/GNU format. Differential revision: https://reviews.llvm.org/D37621 llvm-svn: 313234
-
Dean Michael Berris authored
[XRay][CodeGen] Use the current function symbol as the associated symbol for the instrumentation map Summary: XRay had been assuming that the previous section is the "text" section of the function when lowering the instrumentation map. Unfortunately this is not a safe assumption, because we may be coming from lowering debug type information for the function being lowered. This fixes an issue with combining -gsplit-dwarf, -generate-type-units, -debug-compile and -fxray-instrument for sole member functions. When the split dwarf section is stripped, we're left with references from the xray_instr_map to the debug section. The change now uses the function's symbol instead of the previous section's start symbol. We found the bug while attempting to strip the split debug sections off an XRay-instrumented object file, which had a peculiar edge-case for single-function classes where the single function is being lowered. Because XRay had assocaited the instrumentation map for a function to the debug types section instead of the function's section, the objcopy call will fail due to the misplaced reference from the xray_instr_map section. Reviewers: pcc, dblaikie, echristo Subscribers: llvm-commits, aprantl Differential Revision: https://reviews.llvm.org/D37791 llvm-svn: 313233
-
Martin Storsjö authored
This was a typo in SVN r282447, where it was added. llvm-svn: 313232
-
Simon Atanasyan authored
Triples like mips64-linux-gnuabin32 are documented in this article: https://wiki.debian.org/Multiarch/Tuples llvm-svn: 313231
-