summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* llvm-dwarfdump: support dumping static archives.Adrian Prantl2017-09-143-10/+42
| | | | llvm-svn: 313272
* TableGen support for parameterized register class informationKrzysztof Parzyszek2017-09-1423-1077/+2177
| | | | | | | | | | | | | | | | | | | | | | | | | This replaces TableGen's type inference to operate on parameterized types instead of MVTs, and as a consequence, some interfaces have changed: - Uses of MVTs are replaced by ValueTypeByHwMode. - EEVT::TypeSet is replaced by TypeSetByHwMode. This affects the way that types and type sets are printed, and the tests relying on that have been updated. There are certain users of the inferred types outside of TableGen itself, namely FastISel and GlobalISel. For those users, the way that the types are accessed have changed. For typical scenarios, these replacements can be used: - TreePatternNode::getType(ResNo) -> getSimpleType(ResNo) - TreePatternNode::hasTypeSet(ResNo) -> hasConcreteType(ResNo) - TypeSet::isConcrete -> TypeSetByHwMode::isValueTypeByHwMode(false) For more information, please refer to the review page. Differential Revision: https://reviews.llvm.org/D31951 llvm-svn: 313271
* [lit] Force site configs to be run before source-tree configsZachary Turner2017-09-1422-789/+183
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* [tblgen] Remove uses of std::ptr_fun, it's removed in C++17.Benjamin Kramer2017-09-141-8/+5
| | | | | | No functionality change intended. llvm-svn: 313269
* [IfConversion] More simple, correct dead/kill liveness handlingKrzysztof Parzyszek2017-09-147-64/+81
| | | | | | | | Patch by Jesper Antonsson. Differential Revision: https://reviews.llvm.org/D37611 llvm-svn: 313268
* [mips] Implement the 'dins' aliases.Simon Dardis2017-09-1410-38/+165
| | | | | | | | | | | | 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
* Fix Refactor/tool-test-support.c test on Windows by avoidingAlex Lorenz2017-09-141-6/+6
| | | | | | the STDERR redirect llvm-svn: 313266
* Remove uses of std::auto_ptr, it's going away in C++17.Benjamin Kramer2017-09-145-14/+5
| | | | | | | std::unique_ptr is pretty much a drop-in replacement here. Also remove nullptr checks that are doing nothing. llvm-svn: 313265
* [InstSimplify] fold sdiv/srem based on compare of dividend and divisorSanjay Patel2017-09-144-55/+84
| | | | | | | | | | | | | | | 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
* Add newline to end of test file. NFC.Chad Rosier2017-09-141-1/+1
| | | | llvm-svn: 313263
* Test commit.Aleksandar Beserminji2017-09-141-1/+1
| | | | llvm-svn: 313262
* [InstSimplify] clean up div/rem handling; NFCISanjay Patel2017-09-141-54/+44
| | | | | | | | | | | 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
* [refactor] Use CommonOptionsParser in clang-refactorAlex Lorenz2017-09-145-60/+27
| | | | | | | | | 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
* [X86] Regenerate test. NFCI.Simon Pilgrim2017-09-141-35/+164
| | | | llvm-svn: 313259
* Regenerate test (broadcast comment). NFCI.Simon Pilgrim2017-09-141-1/+1
| | | | llvm-svn: 313258
* [Hexagon] Make getMemAccessSize return size in bytesKrzysztof Parzyszek2017-09-147-58/+65
| | | | | | | | 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
* [X86] When applying the shuffle-to-zero-extend transformation on floating ↵Ayman Musa2017-09-142-4/+71
| | | | | | | | | | point, bitcast to integer first. Fix issue described in PR34577. Differential Revision: https://reviews.llvm.org/D37803 llvm-svn: 313256
* [dwarfdump] Add DWARF verifiers for address rangesJonas Devlieghere2017-09-145-6/+879
| | | | | | | | | | | | | | | | 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
* [mips] Pick the right variant of DINS upfront and enable target instruction ↵Simon Dardis2017-09-1436-53/+1270
| | | | | | | | | | | | | | | | | | | | | | | | | verification 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
* Revert "[dwarfdump] Add DWARF verifiers for address ranges"Jonas Devlieghere2017-09-145-879/+6
| | | | | | This reverts commit r313250. llvm-svn: 313253
* Link clang-refactor with clangFormatAlex Lorenz2017-09-141-0/+1
| | | | | | | This is an attempt to fix http://lab.llvm.org:8011/builders/clang-ppc64le-linux-multistage after r313244. llvm-svn: 313252
* [DAGCombine] (shl (or x, c1), c2) -> (or (shl x, c2), c1 << c2)Simon Pilgrim2017-09-145-22/+70
| | | | | | | | | | 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
* [dwarfdump] Add DWARF verifiers for address rangesJonas Devlieghere2017-09-145-6/+879
| | | | | | | | | | | | | | | | 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
* Link clang-refactor with clangAST and clangLexAlex Lorenz2017-09-141-0/+2
| | | | | | | This is an attempt to fix http://bb.pgr.jp/builders/clang-i686-linux-RA/ after r313244. llvm-svn: 313249
* [mips] Fix sem_init_glibc test for MIPS.Simon Dardis2017-09-141-3/+5
| | | | | | | | | | | | | | | 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
* Fix line endings. NFCI.Simon Pilgrim2017-09-141-131/+131
| | | | llvm-svn: 313247
* Fix line endings. NFCI.Simon Pilgrim2017-09-141-1678/+1678
| | | | llvm-svn: 313246
* [SelectionDAG] ComputeNumSignBits - cleanup ROTL/ROTR wrapping to match ↵Simon Pilgrim2017-09-141-3/+3
| | | | | | | | | | DAGCombine etc. 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
* [refactor] add clang-refactor tool with initial testing support andAlex Lorenz2017-09-1427-35/+1183
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* [XRay][DebugInfo] Update the test to use a specific targetDean Michael Berris2017-09-141-2/+2
| | | | | | Follow-up to D37791. llvm-svn: 313243
* [PM/CGSCC] Teach the CGSCC pass manager components to gracefully handleChandler Carruth2017-09-143-4/+74
| | | | | | | | | | | | | | | | | | | | | 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
* [sanitizer] Mark allow_user_segv as XFAIL instead of UNSUPPORTEDVitaly Buka2017-09-141-4/+4
| | | | llvm-svn: 313241
* [sanitizer] Add empty Fuchsia and Win versions of StartReportDeadlySignalVitaly Buka2017-09-142-0/+5
| | | | llvm-svn: 313240
* [lsan] Extract GetStackTraceWithPcBpAndContext similar to asan versionVitaly Buka2017-09-141-15/+25
| | | | llvm-svn: 313239
* [XRay][DebugInfo] Remove -debug-compile from test invocation of llcDean Michael Berris2017-09-141-2/+2
| | | | | | | | | 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
* [LV] Fix maximum legal VF calculationAlon Kom2017-09-144-32/+84
| | | | | | | | | | | | | | | | 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
* Recommit r313234 "[llvm-readobj] - Refactor printGroupSections methods."George Rimar2017-09-141-55/+73
| | | | | | | | | | | | | | | | 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
* Revert r313234 "[llvm-readobj] - Refactor printGroupSections methods."George Rimar2017-09-141-73/+55
| | | | | | It broke BB. llvm-svn: 313235
* [llvm-readobj] - Refactor printGroupSections methods.George Rimar2017-09-141-55/+73
| | | | | | | | | | | | | 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
* [XRay][CodeGen] Use the current function symbol as the associated symbol for ↵Dean Michael Berris2017-09-145-7/+91
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* [Headers] Fix the return type of _InterlockedCompareExchange_relMartin Storsjo2017-09-141-1/+1
| | | | | | This was a typo in SVN r282447, where it was added. llvm-svn: 313232
* [mips] Recognise the triple used by Debian for MIPS n32 ABISimon Atanasyan2017-09-143-3/+12
| | | | | | | Triples like mips64-linux-gnuabin32 are documented in this article: https://wiki.debian.org/Multiarch/Tuples llvm-svn: 313231
* Revert "Invoke GetInlineCost for legality check before inline functions in ↵Vitaly Buka2017-09-143-50/+6
| | | | | | | | | | SampleProfileLoader." Patch introduced uninitialized value. This reverts commit r313195. llvm-svn: 313230
* Reland r313157, "ThinLTO: Correctly follow aliasee references when dead ↵Peter Collingbourne2017-09-146-18/+56
| | | | | | | | | | | stripping." which was reverted in r313222. This reland includes a fix for the LowerTypeTests pass so that it looks past aliases when determining which type identifiers are live. Differential Revision: https://reviews.llvm.org/D37842 llvm-svn: 313229
* [SLPVectorizer] Prefer auto over explicit type for VL0, NFCI.Dinar Temirbulatov2017-09-141-1/+1
| | | | llvm-svn: 313228
* [sanitizer] Move IsStackOverflow into SignalContextVitaly Buka2017-09-145-9/+15
| | | | llvm-svn: 313227
* [sanitizer] Add BufferedStackTrace::Reset()Vitaly Buka2017-09-141-2/+7
| | | | llvm-svn: 313226
* [asan] Add const into ScarinessScoreBase::PrintVitaly Buka2017-09-141-1/+1
| | | | llvm-svn: 313225
* [compiler-rt] Fix Windows buildVitaly Buka2017-09-141-4/+0
| | | | llvm-svn: 313224
* [compiler-rt] Cleanup SignalContext initializationVitaly Buka2017-09-148-46/+62
| | | | | | | | | | Reviewers: eugenis, alekseyshl Subscribers: kubamracek, dberris Differential Revision: https://reviews.llvm.org/D37827 llvm-svn: 313223
OpenPOWER on IntegriCloud