summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* MemorySSA: Move to Analysis, from Transforms/Utils. It's used asDaniel Berlin2017-04-1138-24/+24
| | | | | | | | Analysis, it has Analysis passes, and once NewGVN is made an Analysis, this removes the cross dependency from Analysis to Transform/Utils. NFC. llvm-svn: 299980
* Implement standalone lsan interceptors for OS XFrancis Ricci2017-04-118-32/+131
| | | | | | | | | | | | | | Summary: Mimicks the existing tsan and asan implementations of Darwin interception. Reviewers: kubamracek, kcc, glider Subscribers: llvm-commits, mgorny Differential Revision: https://reviews.llvm.org/D31889 llvm-svn: 299979
* Don't delete lsan thread-local data until it's no longer requiredFrancis Ricci2017-04-112-2/+17
| | | | | | | | | | | | | | | | | | | | | | | Summary: The routines for thread destruction in the thread registry require the lsan thread index, which is stored in pthread tls on OS X. This means that we need to make sure that the lsan tls isn't destroyed until after the thread registry tls. This change ensures that we don't delete the lsan tls until we've finished destroying the thread in the registry, ensuring that the destructor for the lsan tls runs after the destructor for the thread registry tls. This patch also adds a check to ensure that the thread ID is valid before returning it in GetThreadID(), to ensure that the above behavior is working correctly. Reviewers: dvyukov, kubamracek, kcc Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D31884 llvm-svn: 299978
* [ExternalASTMerger] Fix the MSVC buildSean Callanan2017-04-111-3/+3
| | | | llvm-svn: 299977
* [clang-import-test] Lookup inside contextsSean Callanan2017-04-1121-52/+331
| | | | | | | | | | | | | | | | | | | clang-import-test has until now been only able to report top-level Decls. This is clearly insufficient; we should be able to look inside structs and namespaces also. This patch adds new test cases for a variety of lookups inside existing ASTContexts, and adds the functionality necessar to make most of these testcases work. (One testcase is known to fail because of ASTImporter limitations when importing templates; I'll look into that separately.) This patch also separates the core functionality out into ExternalASTMerger, an interface that allows clients like LLDB to make use of it. clang-import-test now only has the machinery necessary to set up the tests. Differential revision: https://reviews.llvm.org/D30435 llvm-svn: 299976
* MIR: Allow parsing of empty machine functionsJustin Bogner2017-04-1110-46/+21
| | | | | | | | | | | | If you run llc -stop-after=codegenprepare and feed the resulting MIR to llc -start-after=codegenprepare, you'll have an empty machine function since we haven't run any isel yet. Of course, this only works if the MIRParser believes you that this is okay. This is essentially a revert of r241862 with a fix for the problem it was papering over. llvm-svn: 299975
* [AArch64] Simplify MacroFusionEvandro Menezes2017-04-111-79/+89
| | | | | | | | | | | | This patch assumes that the dependents to be scanned for the ExitSU are its predecessors; otherwise, the successors of the instr are scanned. Furthermore, sometimes the ExitSU was being fused twice, since it may be fused once when scanning the successors from the beginning of the BB and then again when scanning the predecessors of ExitSU. Thus, when scanning the successors of an instr, skip the ExitSU. llvm-svn: 299974
* [X86] Create the correct ADC/SBB SDNode when lowering add.Davide Italiano2017-04-112-2/+31
| | | | | | Differential Revision: https://reviews.llvm.org/D31911 llvm-svn: 299973
* [AddDiscriminators] Assign discriminators to MemIntrinsic calls.Andrea Di Biagio2017-04-112-1/+119
| | | | | | | | | | | | | | | | | | | | | | | Before this patch, pass AddDiscriminators always avoided to assign discriminators to intrinsic calls. This was done mainly for two reasons: 1) We wanted to minimize the number of based discriminators used. 2) We wanted to avoid non-deterministic discriminator assignment for different debug levels. Unfortunately, that approach was problematic for MemIntrinsic calls. MemIntrinsic calls can be split by SROA into loads and stores, and each new load/store instruction would obtain the debug location from the original intrinsic call. If we don't assign a discriminator to MemIntrinsic calls, then we cannot correctly set the discriminator for the newly created loads and stores. This may have a negative impact on the basic block weight computation performed by the SampleLoader. This patch fixes the issue by letting MemIntrinsic calls have a discriminator. Differential Revision: https://reviews.llvm.org/D31900 llvm-svn: 299972
* [InstCombine] Add testcases for (B&A)^A -> ~B & A and (B|A)^A -> B & ~ACraig Topper2017-04-111-0/+88
| | | | llvm-svn: 299971
* Fix spelling compliment->complement. Mostly refering to 2s complement. NFCCraig Topper2017-04-115-7/+7
| | | | llvm-svn: 299970
* [LV] Move first order recurrence test to common folder. NFCAnna Thomas2017-04-111-0/+0
| | | | llvm-svn: 299969
* [libFuzzer] fix type in signal name.Vitaly Buka2017-04-111-1/+1
| | | | | | | | Fixes PR32576. Patch by Jakub Zawadzki. llvm-svn: 299968
* llvm-lto2: Move the LTO::run() action behind a subcommand.Peter Collingbourne2017-04-1136-86/+107
| | | | | | | | | | | | | Move LTO::run() to a "run" subcommand so that we can introduce new subcommands for testing different parts of the LTO implementation. This doesn't use llvm::cl subcommands because it doesn't appear to be currently possible to pass an argument not associated with a subcommand to a subcommand (e.g. -lto-use-new-pm, -mcpu=yonah). Differential Revision: https://reviews.llvm.org/D31410 llvm-svn: 299967
* [InstCombine] Use ConstantExpr::getBinOpIdentity to implement getIdentityValue.Craig Topper2017-04-111-7/+2
| | | | | | This removes a TODO in getIdentityValue and may allow some transforms to occur earlier. But I was unable to find any transforms we didn't already handle. llvm-svn: 299966
* [OpenCL] Map default address space to alloca address spaceYaxun Liu2017-04-1117-49/+178
| | | | | | | | | | | | | | For OpenCL, the private address space qualifier is 0 in AST. Before this change, 0 address space qualifier is always mapped to target address space 0. As now target private address space is specified by alloca address space in data layout, address space qualifier 0 needs to be mapped to alloca addr space specified by the data layout. This change has no impact on targets whose alloca addr space is 0. With contributions from Matt Arsenault, Tony Tye and Wen-Heng (Jack) Chung Differential Revision: https://reviews.llvm.org/D31404 llvm-svn: 299965
* [AMDGPU] Add A5 to data layout for amdgiz environmentYaxun Liu2017-04-113-3/+3
| | | | | | Differential Revision: https://reviews.llvm.org/D31589 llvm-svn: 299964
* Implement LWG#2873: 'Add noexcept to several shared_ptr related functions' ↵Marshall Clow2017-04-117-41/+76
| | | | | | This issue missed a couple, so I added those as well (see LWG#2942) llvm-svn: 299963
* [ASTPrinter] Print nested name specifiers for out-of-line functionsAlex Lorenz2017-04-115-7/+70
| | | | | | rdar://31501863 llvm-svn: 299962
* Add the definition of P in the clang tidy exampleSylvestre Ledru2017-04-111-0/+2
| | | | llvm-svn: 299961
* Revert 299954 : test failure needs to be fixedXinliang David Li2017-04-111-14/+0
| | | | llvm-svn: 299960
* Revert 299953 : test failure needs to be fixedXinliang David Li2017-04-111-14/+0
| | | | llvm-svn: 299959
* [PDB] Emit index/offset pairs for TPI and IPI streamsReid Kleckner2017-04-115-21/+129
| | | | | | | | | | | | | | | | | | | Summary: This lets PDB readers lookup type record data by type index in O(log n) time. It also enables makes `cvdump -t` work on PDBs produced by LLD. cvdump will not dump a PDB that doesn't have an index-to-offset table. The table is sorted by type index, and has an entry every 8KB. Looking up a type record by index is a binary search of this table, followed by a scan of at most 8KB. Reviewers: ruiu, zturner, inglorion Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D31636 llvm-svn: 299958
* [lsan] Fix typo in test/lsan/lit.common.cfgMaxim Ostapenko2017-04-111-1/+1
| | | | llvm-svn: 299957
* Revert temporarily D29877 "Warn about unused static file scope function ↵Vassil Vassilev2017-04-113-32/+7
| | | | | | | | | | | | | template declarations." We need to address cases (breaking libc++) such as template <class _Up> static int __test(...); template<typename _Tp> auto v = __test<_Tp>(0); llvm-svn: 299956
* revert r299851 - [InstCombine] fix matching of or-of-icmps constants (PR32524)Sanjay Patel2017-04-112-19/+16
| | | | | | This is a candidate culprit for multiple bot fails, so reverting pending investigation. llvm-svn: 299955
* [Profile] PE binary coverage bug fixXinliang David Li2017-04-111-0/+14
| | | | | | | | PR/32584 Differential Revision: https://reviews.llvm.org/D31939 llvm-svn: 299954
* [Profile] PE binary coverage bug fixXinliang David Li2017-04-111-0/+14
| | | | | | | | PR/32584 Differential Revision: https://reviews.llvm.org/D31939 llvm-svn: 299953
* [clang-format] Recognize Java logical shift assignment operator Nico Weber2017-04-112-0/+25
| | | | | | | | | | | | | | | | | | | | | | At present, clang-format mangles Java containing logical right shift operators ('>>>=' or '>>>'), splitting them in two, resulting in invalid code: public class Minimal { public void func(String args) { int i = 42; - i >>>= 1; + i >> >= 1; return i; } } This adds both forms of logical right shift to the FormatTokenLexer, so clang-format won't attempt to split them and insert bogus whitespace. https://reviews.llvm.org/D31652 Patch from Richard Bradfield <bradfier@fstab.me>! llvm-svn: 299952
* Fix PR13910: Don't warn that __builtin_unreachable() is unreachableAlex Lorenz2017-04-112-2/+46
| | | | | | Differential Revision: https://reviews.llvm.org/D25321 llvm-svn: 299951
* [Parser][ObjC++] Improve diagnostics and recovery when C++ keywords are usedAlex Lorenz2017-04-118-53/+150
| | | | | | | | | | | | | | | | as identifiers in Objective-C++ This commit improves the 'expected identifier' errors that are presented when a C++ keyword is used as an identifier in Objective-C++ by mentioning that this is a C++ keyword in the diagnostic message. It also improves the error recovery: the parser will now treat the C++ keywords as identifiers to prevent unrelated parsing errors. rdar://20626062 Differential Revision: https://reviews.llvm.org/D26503 llvm-svn: 299950
* Module::getOrInsertFunction is using C-style vararg instead of variadic ↵Serge Guelton2017-04-1130-200/+171
| | | | | | | | | | | templates. From a user prospective, it forces the use of an annoying nullptr to mark the end of the vararg, and there's not type checking on the arguments. The variadic template is an obvious solution to both issues. Differential Revision: https://reviews.llvm.org/D31070 llvm-svn: 299949
* Reapply "Enable LSan for arm Linux"Maxim Ostapenko2017-04-1118-25/+160
| | | | | | This patch reapplies r299923 with typo fixed in BLX macros. llvm-svn: 299948
* Remove unused functions. Remove static qualifier from functions in header ↵Vassil Vassilev2017-04-119-65/+9
| | | | | | files. NFC. llvm-svn: 299947
* [AVR] Migrate to new MCAsmBackend applyFixupJonathan Roelofs2017-04-112-2/+2
| | | | | | | | https://reviews.llvm.org/D31875 Patch by Leslie Zhai! llvm-svn: 299946
* [ARM] Refactor Thumb2 sat instructionsSam Parker2017-04-111-48/+30
| | | | | | | | | Refactor the USAT, SSAT, USAT16 and SSAT16 instruction descriptions for Thumb2. Differential Revision: https://reviews.llvm.org/D31933 llvm-svn: 299945
* [GVNHoist] Re-enable GVNHoist by defaultGeoff Berry2017-04-112-3/+4
| | | | | | Turn GVNHoist back on by default now that PR32153 has been fixed. llvm-svn: 299944
* Revert r299923, it doesn't build in bootstrap builds.Nico Weber2017-04-1118-159/+24
| | | | | | | | | | | | | | | FAILED: lib/sanitizer_common/CMakeFiles/RTSanitizerCommon.arm.dir/sanitizer_linux.cc.o lib/sanitizer_common/sanitizer_linux.cc:1340:24: error: invalid instruction BLX(ip) ^ lib/sanitizer_common/sanitizer_linux.cc:1313:19: note: expanded from macro 'BLX' # define BLX(R) "mov lr, pc; bx" #R "\n" ^ <inline asm>:6:13: note: instantiated into assembly here mov lr, pc; bxip ^~~~ llvm-svn: 299943
* [libc++] Fix unknown pragma warning on MSVCBen Craig2017-04-111-1/+1
| | | | llvm-svn: 299942
* Mark P0599 as complete. It was implemented in r298573Marshall Clow2017-04-111-2/+2
| | | | llvm-svn: 299941
* This patch causes the installation of headers for the sanitizer and/or xray ↵Catherine Moore2017-04-111-15/+19
| | | | | | | | | | | | to be disabled when COMPILER_RT_BUILD_SANITIZERS=OFF and/or COMPILER_RT_BUILD_XRAY=OFF. Reviewer: dberris Subscribers: dberris, mgorny, llvm-commits, clm Differential Revision: https://reviews.llvm.org/D31864 llvm-svn: 299940
* [SDAG] Factor CandidateMatch check into lambda. NFC.Nirav Dave2017-04-111-28/+29
| | | | llvm-svn: 299939
* [SDAG] Factor ChainMerge into helper function NFCI.Nirav Dave2017-04-111-20/+27
| | | | llvm-svn: 299938
* [SDAG] Reorder expensive StoreMerge Check after cheaper one. NFCNirav Dave2017-04-111-8/+9
| | | | llvm-svn: 299937
* [StripDeadDebug/DIFinder] Track inlined SPsKeno Fischer2017-04-114-7/+50
| | | | | | | | | | | | | | | | | | | | Summary: In rL299692 I improved strip-dead-debug-info's ability to drop CUs that are not referenced from the current module. However, in doing so I neglected to realize that some SPs could be referenced entirely from inlined functions. It appears I was not the only one to make this mistake, because DebugInfoFinder, doesn't find those SPs either. Fix this in DebugInfoFinder and then use that to make sure not to drop those CUs in strip-dead-debug-info. Reviewers: aprantl Reviewed By: aprantl Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D31904 llvm-svn: 299936
* [clangd] Implement item kind for completion resultsKrasimir Georgiev2017-04-113-5/+50
| | | | | | | | | | | | | | | Summary: The patch implements the conversion method from CXCursorKind to clangd::CompletionItemKind. Contributed by stanionascu! Reviewers: cfe-commits, bkramer, krasimir Reviewed By: krasimir Tags: #clang-tools-extra Differential Revision: https://reviews.llvm.org/D31853 llvm-svn: 299935
* Add missing annotation to TestDataFormatterUnorderedPavel Labath2017-04-111-0/+1
| | | | llvm-svn: 299934
* Remove Plugins/Process/POSIX from include_directoriesPavel Labath2017-04-116-46/+8
| | | | | | | | | | | | | | | | Summary: The files there can always be referred to using their full path, which is what most of the code has been doing already, so this makes the situation more consistent. Also fix the the code in the FreeBSD plugin to use the new paths. Reviewers: eugene, emaste Subscribers: lldb-commits, kettenis, mgorny, krytarowski Differential Revision: https://reviews.llvm.org/D31877 llvm-svn: 299933
* Add MachineRegionInfoPassID to Passes.h.Jan Sjodin2017-04-112-1/+4
| | | | | | Differential Revision: https://reviews.llvm.org/D31899 llvm-svn: 299932
* GlobalISel: Allow legalizing G_FADD to a libcallDiana Picus2017-04-114-6/+119
| | | | | | | | | Use the same handling in the generic legalizer code as for the other libcalls (G_FREM, G_FPOW). Enable it on ARM for float and double so we can test it. llvm-svn: 299931
OpenPOWER on IntegriCloud