summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* [X86] Tests for unsigned saturation downconvert detection.Artur Gainullin2018-04-141-4/+32
| | | | | | One more test for smax(smin(x, C2), C1) pattern. llvm-svn: 330090
* [InstCombine] Enable Add/Sub simplifications with only 'reassoc' FMFWarren Ristow2018-04-145-30/+545
| | | | | | | | These simplifications were previously enabled only with isFast(), but that is more restrictive than required. Since r317488, FMF has 'reassoc' to control these cases at a finer level. llvm-svn: 330089
* [X86] Tests for unsigned saturation downconvert detection.Artur Gainullin2018-04-141-0/+310
| | | | llvm-svn: 330088
* [clangd] Fix label and snippet for funcs in the indexIlya Biryukov2018-04-142-12/+7
| | | | | | | This is a follow-up to r330004 to fix functions with required template args, e.g. std::make_shared. llvm-svn: 330087
* [InstCombine] add shift+logic tests (PR37098); NFCSanjay Patel2018-04-141-10/+234
| | | | | | | | | | | | | | It debateable whether instcombine should be in the business of reassociation, but it is currently. These tests and PR37098 demonstrate a missing ability to do a simple reassociation that allows eliminating shifts. If we decide that functionality belongs somewhere else, then we should still have some tests to show that we've intentionally limited instcombine to *not* include this ability. llvm-svn: 330086
* [X86][MMX] Set PAVG/PHADD/PMIN/PMAX/PSIGN instructions to use same scheduler ↵Simon Pilgrim2018-04-142-90/+90
| | | | | | classes as SSE/AVX llvm-svn: 330085
* Reapply "Cleanup DWARFCompileUnit and DWARFUnit in preparation for adding ↵Jan Kratochvil2018-04-148-828/+569
| | | | | | | | | | | | | | DWARFTypeUnit". This patch by Greg Clayton drops the virtualization for DWARFPartialUnit. The virtualization of DWARFUnit now matches more its LLVM counterpart. DWZ patchset is going to be implementable without DWARFPartialUnit remapping. https://reviews.llvm.org/D40474 This reverts commit 329423. This reapplies commit r329305. llvm-svn: 330084
* [NFC] fix trivial typos in document and commentsHiroshi Inoue2018-04-144-4/+4
| | | | | | "not not" -> "not" etc llvm-svn: 330083
* [AMDGPU] Add gfx902 product namesTony Tye2018-04-141-5/+2
| | | | | | Differential Revision: https://reviews.llvm.org/D45609 llvm-svn: 330081
* Revert "[Serialization] Fix some Clang-tidy modernize and Include What You ↵Vedant Kumar2018-04-141-265/+317
| | | | | | | | | | | | | Use warnings; other minor fixes (NFC)." This reverts commit r330068. It breaks the lldb bots due to assertion failures (more details on cfe-commits). http://lab.llvm.org:8080/green/view/LLDB/job/lldb-cmake/ http://lab.llvm.org:8080/green/view/LLDB/job/lldb-cmake/6341/ stderr: Assertion failed: (M && "imported decl from no module file"), function loadPendingDeclChain, file /Users/vsk/src/llvm.org-lldbsan/llvm/tools/clang/lib/Serialization/ASTReaderDecl.cpp, line 3861. llvm-svn: 330080
* [WebAssembly] Fix a bug in MachineBasicBlock::findDebugLoc() callHeejin Ahn2018-04-141-3/+4
| | | | | | | | | | | | | | Summary: InsertPos is within the bacic block `Header`, so `findDebugLoc()` should be called on not `MBB` but `Header` instead. Reviewers: yurydelendik Subscribers: jfb, dschuff, aprantl, sbc100, jgravelle-google, sunfish, JDevlieghere, llvm-commits Differential Revision: https://reviews.llvm.org/D45648 llvm-svn: 330079
* [X86] Add the bizarro movsww and movzww mnemonics for the disassembler.Craig Topper2018-04-132-0/+38
| | | | | | | | The destination size of the movzx/movsx instruction is controlled by the normal operand size mechanisms. Only the input type is fixed. This means that a 0x66 prefix on the encoding for zext/sext 16->32 should really produce a 16->16 instruction. Functionally this is equivalent to a GR16->GR16 move since bits 16 and above will be preserved. So nothing is actually extended. llvm-svn: 330078
* [Driver] Export profiling symbols for -exported_symbols_listVedant Kumar2018-04-132-0/+4
| | | | | | | | | When profiling is enabled and -exported_symbols_list is specified for the Darwin linker, export the requisite set of profiling symbols. rdar://39427167 llvm-svn: 330077
* [Fuzzer] Avoid C++ compiler checks for fuzzer C++ libraryPetr Hosek2018-04-131-1/+2
| | | | | | | | | | | When bulding libFuzzer as part of the toolchain, C++ library may not have been fully built yet so the C++ compiler checks will fail, but we don't care since we don't need C++ library anyway as we're building our own. Differential Revision: https://reviews.llvm.org/D45638 llvm-svn: 330075
* [ODRHash] Support pointer and reference types.Richard Trieu2018-04-132-0/+139
| | | | | | | Recommit r328404 which was reverted in rL328404. r329869 fixed the issue that caused the revert. llvm-svn: 330074
* MachO: trap unreachable instructionsTim Northover2018-04-1314-12/+47
| | | | | | | Debugability is more important than saving 4 bytes to let us to fall through to nonense. llvm-svn: 330073
* [InstCombine][NFC] masked-merge: add 'and' tests, too.Roman Lebedev2018-04-134-656/+1038
| | | | | | | | | | | | | | (and plain 'or', for completeness sake.) After submitting D45631, i have realized that it will *already* affect 'and' pattern, and it was obvious that there were no good test patterns to show that. Since the masked-merge.ll is getting kinda big, unify naming schemes a bit, and split into 'xor'/'and'/'or' testfiles, with the only difference being the last operation. llvm-svn: 330072
* Revert "[debugserver] Remove dead function call. NFCI."Davide Italiano2018-04-131-0/+3
| | | | | | | This reverts commit r330066 as it was wrong and the call was not dead. Thanks to Fred for pointing this out. llvm-svn: 330071
* [DebugInfo][OPT] NFC follow-up on "Fixing a couple of DI duplication bugs of ↵Roman Tereshin2018-04-134-89/+55
| | | | | | CloneModule" llvm-svn: 330070
* [DebugInfo][OPT] Fixing a couple of DI duplication bugs of CloneModuleRoman Tereshin2018-04-137-13/+199
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As demonstrated by the regression tests added in this patch, the following cases are valid cases: 1. A Function with no DISubprogram attached, but various debug info related to its instructions, coming, for instance, from an inlined function, also defined somewhere else in the same module; 2. ... or coming exclusively from the functions inlined and eliminated from the module entirely. The ValueMap shared between CloneFunctionInto calls within CloneModule needs to contain identity mappings for all of the DISubprogram's to prevent them from being duplicated by MapMetadata / RemapInstruction calls, this is achieved via DebugInfoFinder collecting all the DISubprogram's. However, CloneFunctionInto was missing calls into DebugInfoFinder for functions w/o DISubprogram's attached, but still referring DISubprogram's from within (case 1). This patch fixes that. The fix above, however, exposes another issue: if a module contains a DISubprogram referenced only indirectly from other debug info metadata, but not attached to any Function defined within the module (case 2), cloning such a module causes a DICompileUnit duplication: it will be moved in indirecty via a DISubprogram by DebugInfoFinder first (because of the first bug fix described above), without being self-mapped within the shared ValueMap, and then will be copied during named metadata cloning. So this patch makes sure DebugInfoFinder visits DICompileUnit's referenced from DISubprogram's as it goes w/o re-processing llvm.dbg.cu list over and over again for every function cloned, and makes sure that CloneFunctionInto self-maps DICompileUnit's referenced from the entire function, not just its own DISubprogram attached that may also be missing. The most convenient way of tesing CloneModule I found is to rely on CloneModule call from `opt -run-twice`, instead of writing tedious unit tests. That feature has a couple of properties that makes it hard to use for this purpose though: 1. CloneModule doesn't copy source filename, making `opt -run-twice` report it as a difference. 2. `opt -run-twice` does the second run on the original module, not its clone, making the result of cloning completely invisible in opt's actual output with and without `-run-twice` both, which directly contradicts `opt -run-twice`s own error message. This patch fixes this as well. Reviewed By: aprantl Reviewers: loladiro, GorNishanov, espindola, echristo, dexonsmith Subscribers: vsk, debug-info, JDevlieghere, llvm-commits Differential Revision: https://reviews.llvm.org/D45593 llvm-svn: 330069
* [Serialization] Fix some Clang-tidy modernize and Include What You Use ↵Eugene Zelenko2018-04-131-317/+265
| | | | | | warnings; other minor fixes (NFC). llvm-svn: 330068
* Use InitLLVM in clang as well.Rui Ueyama2018-04-132-26/+7
| | | | | | Differential Revision: https://reviews.llvm.org/D45634 llvm-svn: 330067
* [debugserver] Remove dead function call. NFCI.Davide Italiano2018-04-131-3/+0
| | | | llvm-svn: 330066
* [Hexagon] Initial instruction cost model for auto-vectorizationKrzysztof Parzyszek2018-04-132-98/+195
| | | | llvm-svn: 330065
* [Analyzer] Fix for SValBuilder expressions rearrangementAdam Balogh2018-04-132-0/+7
| | | | | | | | Expression rearrangement in SValBuilder (see rL329780) crashes with an assert if the type of the integer is different from the type of the symbol. This fix adds a check that prevents rearrangement in such cases. Differential Revision: https://reviews.llvm.org/D45557 llvm-svn: 330064
* Revert r329956, "AArch64: Introduce a DAG combine for folding offsets into ↵Peter Collingbourne2018-04-138-240/+83
| | | | | | | | | | addresses." Caused a hang and eventually an assertion failure in LTO builds of 7zip-benchmark on aarch64 iOS targets. http://green.lab.llvm.org/green/job/lnt-ctmark-aarch64-O3-flto/2024/ llvm-svn: 330063
* [LV] Introduce TTI::getMinimumVFKrzysztof Parzyszek2018-04-138-0/+202
| | | | | | | | | | | The function getMinimumVF(ElemWidth) will return the minimum VF for a vector with elements of size ElemWidth bits. This value will only apply to targets for which TTI::shouldMaximizeVectorBandwidth returns true. The value of 0 indicates that there is no minimum VF. Differential Revision: https://reviews.llvm.org/D45271 llvm-svn: 330062
* [DebugInfo] Change std::sort to llvm::sort in response to r327219Mandeep Singh Grang2018-04-131-1/+1
| | | | | | | | | | | | | | | r327219 added wrappers to std::sort which randomly shuffle the container before sorting. This will help in uncovering non-determinism caused due to undefined sorting order of objects having the same key. To make use of that infrastructure we need to invoke llvm::sort instead of std::sort. Note: This patch is one of a series of patches to replace *all* std::sort to llvm::sort. Refer the comments section in D44363 for a list of all the required patches. llvm-svn: 330061
* [Power9] Add the TLS store instructions to the Power 9 modelStefan Pintilie2018-04-132-2/+2
| | | | | | | | | | | The Power 9 scheduler model should now include the TLS instructions. We can now, once again, mark the model as complete. From now on, if instructions are added to Power 9 but are not added to the model the build should produce an error. Hopefully that will alert the developer who is adding new instructions that they should also be added to the scheulder model. llvm-svn: 330060
* [Transforms] Change std::sort to llvm::sort in response to r327219Mandeep Singh Grang2018-04-1323-84/+89
| | | | | | | | | | | | | | | | | | | | | | Summary: r327219 added wrappers to std::sort which randomly shuffle the container before sorting. This will help in uncovering non-determinism caused due to undefined sorting order of objects having the same key. To make use of that infrastructure we need to invoke llvm::sort instead of std::sort. Note: This patch is one of a series of patches to replace *all* std::sort to llvm::sort. Refer the comments section in D44363 for a list of all the required patches. Reviewers: kcc, pcc, danielcdh, jmolloy, sanjoy, dberlin, ruiu Reviewed By: ruiu Subscribers: ruiu, llvm-commits Differential Revision: https://reviews.llvm.org/D45142 llvm-svn: 330059
* [MC] Change std::sort to llvm::sort in response to r327219Mandeep Singh Grang2018-04-132-6/+6
| | | | | | | | | | | | | | | | | | | | | | Summary: r327219 added wrappers to std::sort which randomly shuffle the container before sorting. This will help in uncovering non-determinism caused due to undefined sorting order of objects having the same key. To make use of that infrastructure we need to invoke llvm::sort instead of std::sort. Note: This patch is one of a series of patches to replace *all* std::sort to llvm::sort. Refer the comments section in D44363 for a list of all the required patches. Reviewers: grosbach, void, ruiu Reviewed By: ruiu Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D45138 llvm-svn: 330058
* [ProfileData] Change std::sort to llvm::sort in response to r327219Mandeep Singh Grang2018-04-133-6/+6
| | | | | | | | | | | | | | | | | | | | | | Summary: r327219 added wrappers to std::sort which randomly shuffle the container before sorting. This will help in uncovering non-determinism caused due to undefined sorting order of objects having the same key. To make use of that infrastructure we need to invoke llvm::sort instead of std::sort. Note: This patch is one of a series of patches to replace *all* std::sort to llvm::sort. Refer the comments section in D44363 for a list of all the required patches. Reviewers: bogner, vsk, eraman, ruiu Reviewed By: ruiu Subscribers: ruiu, llvm-commits Differential Revision: https://reviews.llvm.org/D45139 llvm-svn: 330057
* [CostModel][X86] Add some specific cpu targets to the cost modelsSimon Pilgrim2018-04-1315-313/+371
| | | | | | We're mostly testing with generic isa attributes, but PR36550 will require testing of specific target's scheduler models as well. llvm-svn: 330056
* [sanitizer] Allow for the allocator "names" to be set by the toolsKostya Kortchinsky2018-04-137-9/+20
| | | | | | | | | | | | | | | | | | | Summary: In the same spirit of SanitizerToolName, allow the Primary & Secondary allocators to have names that can be set by the tools via PrimaryAllocatorName and SecondaryAllocatorName. Additionally, set a non-default name for Scudo. Reviewers: alekseyshl, vitalybuka Reviewed By: alekseyshl, vitalybuka Subscribers: kubamracek, delcypher, #sanitizers, llvm-commits Differential Revision: https://reviews.llvm.org/D45600 llvm-svn: 330055
* [CostModel][X86] Split fma arith costs tests from other fp testsSimon Pilgrim2018-04-132-10/+73
| | | | | | Was proving cumbersome to test with/without fma llvm-svn: 330054
* [LTO] Change std::sort to llvm::sort in response to r327219Mandeep Singh Grang2018-04-131-6/+6
| | | | | | | | | | | | | | | | | | | | | | Summary: r327219 added wrappers to std::sort which randomly shuffle the container before sorting. This will help in uncovering non-determinism caused due to undefined sorting order of objects having the same key. To make use of that infrastructure we need to invoke llvm::sort instead of std::sort. Note: This patch is one of a series of patches to replace *all* std::sort to llvm::sort. Refer D44363 for a list of all the required patches. Reviewers: pcc, mehdi_amini, ruiu Reviewed By: ruiu Subscribers: ruiu, inglorion, eraman, llvm-commits Differential Revision: https://reviews.llvm.org/D45137 llvm-svn: 330053
* [CostModel][X86] Regenerate latency/codesize cost testsSimon Pilgrim2018-04-131-33/+27
| | | | llvm-svn: 330052
* [CostModel][X86] Regenerate cast conversion cost testsSimon Pilgrim2018-04-131-146/+378
| | | | llvm-svn: 330051
* [CostModel][X86] Regenerate masked intrinsic cost testsSimon Pilgrim2018-04-131-160/+429
| | | | llvm-svn: 330050
* [sanitizer] Fix __sanitizer::Vector::Resize vectorVitaly Buka2018-04-132-0/+13
| | | | | | | | | | | | | | | | Implemented downsizing Patch by Oleg Doronin Reviewers: kcc, vitalybuka Reviewed By: kcc, vitalybuka Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D45605 llvm-svn: 330049
* [sanitizer] Replace cast with unsigned literals in testsVitaly Buka2018-04-131-4/+4
| | | | llvm-svn: 330048
* [Command] Simplify the code and make it less error prone. NFCI.Davide Italiano2018-04-132-7/+2
| | | | | | Pointed out by Jim. llvm-svn: 330047
* Define InitLLVM to do common initialization all at once.Rui Ueyama2018-04-1341-275/+187
| | | | | | | | | | | We have a few functions that virtually all command wants to run on process startup/shutdown. This patch adds InitLLVM class to do that all at once, so that we don't need to copy-n-paste boilerplate code to each llvm command's main() function. Differential Revision: https://reviews.llvm.org/D45602 llvm-svn: 330046
* support: add missing locale stubs for android L, MSaleem Abdulrasool2018-04-132-5/+38
| | | | | | | | | The strto* family was introduced in android O (API Level 26). However, the support headers were adjusted to indicate that all locale aware functions were added in L. Provide stubs for the locale aware strto* family until O. llvm-svn: 330045
* hwasan: add -fsanitize=kernel-hwaddress flagAndrey Konovalov2018-04-1319-45/+157
| | | | | | | | | This patch adds -fsanitize=kernel-hwaddress flag, that essentially enables -hwasan-kernel=1 -hwasan-recover=1 -hwasan-match-all-tag=0xff. Differential Revision: https://reviews.llvm.org/D45046 llvm-svn: 330044
* [Command] Implement `statistics` command.Davide Italiano2018-04-1311-24/+196
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This allows us to collect useful metrics about lldb debugging sessions. I thought that an example would be better than a thousand words: Process 19705 stopped * thread #1, queue = 'com.apple.main-thread', stop reason = step in frame #0: 0x0000000100000fb4 blah`main at blah.c:3 1 int main(void) { 2 int a = 6; -> 3 return 0; 4 } (lldb) statistics enable (lldb) frame var a (int) a = 6 (lldb) expr a (int) $1 = 6 (lldb) statistics disable (lldb) statistics dump Number of expr evaluation successes : 1 Number of expr evaluation failures : 0 Number of frame var successes : 1 Number of frame var failures : 0 Future improvements might include: 1. Passing a file, or implementing categories. The way this patch has been implemented is generic enough to allow this to be extended easily without breaking the grammar. 2. Adding an SBAPI and Python API for use in scripts. Thanks to Jim Ingham for discussing the design with me. <rdar://problem/36555975> Differential Revision: https://reviews.llvm.org/D45547 llvm-svn: 330043
* [OPENMP] Replace push_back by emplace_back, NFC.Alexey Bataev2018-04-133-13/+13
| | | | llvm-svn: 330042
* Fix evaluation of `__has_include_next` during -frewrite-includes.Volodymyr Sapsai2018-04-134-18/+52
| | | | | | | | | | | | | | | | | | | | | | | `__has_include_next` requires correct DirectoryLookup for being evaluated correctly. We were using Preprocessor::GetCurDirLookup() but we were calling it after the preprocessor finished its work. And in this case CurDirLookup is always nullptr which makes `__has_include_next` behave as `__has_include`. Fix by storing and using CurDirLookup when preprocessor enters a file, not when we rewrite the includes. rdar://problem/36305026 Reviewers: bkramer Reviewed By: bkramer Subscribers: jkorous-apple, cfe-commits Differential Revision: https://reviews.llvm.org/D45603 llvm-svn: 330041
* [OPENMP] Code cleanup + formatting, NFC.Alexey Bataev2018-04-132-477/+492
| | | | llvm-svn: 330040
* [InstCombine][NFC] masked-merge: commutativity tests: ensure the ordering.Roman Lebedev2018-04-131-16/+37
| | | | | | | | | | | | This was intended since initially, but i did not really think about it, and did not know how to force that. Now that the xor->or fold is working (patch upcoming), this came up to improve the test coverage. A followup for rL330003, rL330007 https://bugs.llvm.org/show_bug.cgi?id=6773 llvm-svn: 330039
OpenPOWER on IntegriCloud