summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* [MetadataLoader] Remove unused Vector. NFCI.Davide Italiano2017-05-161-1/+1
| | | | llvm-svn: 303196
* builtins: one more case of a missing headerSaleem Abdulrasool2017-05-161-0/+2
| | | | llvm-svn: 303195
* [libcxxabi] Fix the test case committed in r303175.Akira Hatanaka2017-05-161-0/+1
| | | | | | | | | | Free the __cxa_exception object allocated with __cxa_allocate_exception. This is an attempt to fix this asan bot: http://lab.llvm.org:8011/builders/libcxx-libcxxabi-x86_64-linux-ubuntu-asan/builds/560 llvm-svn: 303194
* Revert "[ARM] Mark LEApcrel instructions as isAsCheapAsAMove"Renato Golin2017-05-166-65/+5
| | | | | | | | | | | | | | | | | Revert "[ARM] Mark LEApcrel as not having side effects" This reverts commit r303054 and r303053, as they broke the ARM self-hosting buildbots: http://lab.llvm.org:8011/builders/clang-cmake-thumbv7-a15-full-sh/builds/1550 http://lab.llvm.org:8011/builders/clang-cmake-armv7-a15-selfhost-neon/builds/1349 http://lab.llvm.org:8011/builders/clang-cmake-armv7-a15-selfhost/builds/1845 Offline investigation on course. llvm-svn: 303193
* [index] Avoid another crash that happens when looking up a dependent nameAlex Lorenz2017-05-162-0/+12
| | | | | | | | in a record that has a base without a definition rdar://32224197 llvm-svn: 303192
* [clang-tidy] Speed up performance-unnecessary-value-param checkAlexander Kornienko2017-05-161-5/+4
| | | | | | | | Moved slower matchers closer to the end. The total speed up on a large file I was interested in is not huge, just about 10%, since the check seems to be doing a lot in the check() method. llvm-svn: 303191
* builtins: add missing includesSaleem Abdulrasool2017-05-162-0/+2
| | | | | | | | This inclusion is needed to fix the ARM build. The int_lib.h include is slightly ugly, but allows us to use the `AEABI_RTABI` macro to decorate the CC for the functions. llvm-svn: 303190
* [ScopInfo] Remove unused MemoryAccess::BaseName. NFC.Michael Kruse2017-05-161-5/+0
| | | | llvm-svn: 303189
* builtins: expand out the AEABI function stubsSaleem Abdulrasool2017-05-1645-90/+300
| | | | | | | | | | | | | These actually may change calling conventions. We cannot simply provide function aliases as the aliased function may have a different calling convention. Provide a forwarding function instead to permit the compiler to synthesize the calling convention adjustment thunk. Remove the `ARM_EABI_FNALIAS` macro as that is not safe to use. Resolves PR33030! llvm-svn: 303188
* [clang-tidy] Optimize readability-implicit-bool-cast, NFCAlexander Kornienko2017-05-161-10/+10
| | | | | | | Rearrange matchers to put the most expensive ones closer to the end. Speed up another 3-5x on some files. llvm-svn: 303187
* [AMDGPU] Use GCNRPTracker dumper methods in schedulerStanislav Mekhanoshin2017-05-163-18/+21
| | | | | | Differential Revision: https://reviews.llvm.org/D33244 llvm-svn: 303186
* [InstCombine] add motivational comment for tests; NFCSanjay Patel2017-05-161-0/+5
| | | | | | | | | | | | | | | | | | | The referenced tests are derived from: https://bugs.llvm.org/show_bug.cgi?id=32791 and: https://reviews.llvm.org/D33172 The motivation for including negative tests may not be clear, so I'm adding an explanatory comment here. In the post-commit thread for r303133: http://lists.llvm.org/pipermail/llvm-commits/Week-of-Mon-20170515/453793.html ...it was mentioned that we don't want to add redundant tests. This is a valid point. But in this case, we have a patch under review (D33172) that demonstrates that no existing regression tests are affected by a proposed code change, but these are. Therefore, I think these tests have value not visible in any existing regression tests regardless of whether they show a transform. Differential Revision: https://reviews.llvm.org/D33242 llvm-svn: 303185
* [AMDGPU] Cache live-ins and register pressure in schedulerStanislav Mekhanoshin2017-05-162-75/+154
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Using LIS can be quite expensive, so caching of calculated region live-ins and pressure is implemented. It does two things: 1. Caches the info for the second stage when we schedule with decreased target occupancy. 2. Tracks the basic block from top to bottom thus eliminating the need to scan whole register file liveness at every region split in the middle of the block. The scheduling is now done in 3 stages instead of two, with the first one being really a no-op and only used to collect scheduling regions as sent by the scheduler driver. There is no functional change to the current behavior, only compilation speed is affected. In general computeBlockPressure() could be simplified if we switch to backward RP tracker, because scheduler sends regions within a block starting from the last upward. We could use a natural order of upward tracker to seamlessly change between regions of the same block, since live reg set of a previous tracked region would become a live-out of the next region. That however requires fixing upward tracker to properly account defs and uses of the same instruction as both are contributing to the current pressure. When we converge on the produced pressure we should be able to switch between them back and forth. In addition, backward tracker is less expensive as it uses LIS in recede less often than forward uses it in advance. At the moment the worst known case compilation time has improved from 26 minutes to 8.5. Differential Revision: https://reviews.llvm.org/D33117 llvm-svn: 303184
* [X86] Replace slow LEA instructions in X86Lama Saba2017-05-166-43/+1786
| | | | | | | | | | | | | | | According to Intel's Optimization Reference Manual for SNB+: " For LEA instructions with three source operands and some specific situations, instruction latency has increased to 3 cycles, and must dispatch via port 1: - LEA that has all three source operands: base, index, and offset - LEA that uses base and index registers where the base is EBP, RBP,or R13 - LEA that uses RIP relative addressing mode - LEA that uses 16-bit addressing mode " This patch currently handles the first 2 cases only. Differential Revision: https://reviews.llvm.org/D32277 llvm-svn: 303183
* Revert 303174, 303176, and 303178Matthew Simpson2017-05-162-37/+2
| | | | | | These commits are breaking the bots. Reverting to investigate. llvm-svn: 303182
* [DAG] Prune deleted nodes in TokenFactorNirav Dave2017-05-161-8/+3
| | | | | | Fix visitTokenFactor to correctly remove deleted nodes. NFC. llvm-svn: 303181
* [clang-tidy] Optimize matchers in readability-implicit-bool-cast. NFCAlexander Kornienko2017-05-161-8/+10
| | | | | | | Don't repeat `isInTemplateInstantiation()` and `hasAncestor()` unnecessarily. This speeds up the check by a factor of up to 3 on some large files. llvm-svn: 303180
* [AMDGPU] Turn register pressure estimation into forward trackerStanislav Mekhanoshin2017-05-164-135/+196
| | | | | | | | | | This factors register pressure estimation mechanism from the GCNSchedStrategy into the forward tracker to unify interface with other strategies and expose it to other interested phases. Differential Revision: https://reviews.llvm.org/D33105 llvm-svn: 303179
* Make test target-specificMatthew Simpson2017-05-161-0/+4
| | | | llvm-svn: 303178
* Added missing includes in clangd to fix the build.Ilya Biryukov2017-05-162-0/+3
| | | | | | This commit should fix buildbot failures. llvm-svn: 303177
* Fix test case to unbreak botsMatthew Simpson2017-05-161-3/+1
| | | | llvm-svn: 303176
* [libcxxabi] Align unwindHeader on a double-word boundary.Akira Hatanaka2017-05-162-0/+53
| | | | | | | | | | | | | | | | | | | | | | | r276215 made a change to annotate _Unwind_Exception with attribute "aligned" so that an exception object following field __cxa_exception is sufficiently aligned. This fix hasn't been incorporated to unwind.h on Darwin since it is an ABI breaking change. Instead of annotating struct _Unwind_Exception with the attribute, this commit annotates field unwindHeader of __cxa_exception. This ensures the exception object is sufficiently aligned without breaking the ABI. This recommits r302978 and r302981, which were reverted in r303016 because a libcxx test was failing on an AArch64 bot. I also modified the libcxxabi test case to check the alignment of the pointer returned by __cxa_allocate_exception rather than compiling the test with -O1 and checking whether it segfaults. rdar://problem/25364625 Differential Revision: https://reviews.llvm.org/D33030 llvm-svn: 303175
* [LV] Avoid potentential division by zero when selecting ICMatthew Simpson2017-05-162-2/+35
| | | | llvm-svn: 303174
* [clangd] Refactor ProtocolHandlers to decouple them from ClangdLSPServerIlya Biryukov2017-05-169-407/+549
| | | | | | | | | | | | | | | | | | | | | | | | Summary: A refactoring to decouple ProtocolHandlers and Language Server input parsing loop from the ClangdLSPServer. The input parsing was extracted from `main` to a function(runLanguageServerLoop). ProtocolHandlers now provide an interface to handle various LSP methods, this interface is used by ClangdLSPServer. Methods for code formatting were moved from ProtocolHandlers to ClangdServer. ClangdLSPServer now provides a cleaner interface that only runs Language Server input loop. Reviewers: bkramer, krasimir Reviewed By: krasimir Subscribers: cfe-commits, klimek Tags: #clang-tools-extra Differential Revision: https://reviews.llvm.org/D33201 llvm-svn: 303173
* [coroutines] Handle unwind edge splittingGor Nishanov2017-05-162-4/+314
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: RewritePHIs algorithm used in building of CoroFrame inserts a placeholder ``` %placeholder = phi [%val] ``` on every edge leading to a block starting with PHI node with multiple incoming edges, so that if one of the incoming values was spilled and need to be reloaded, we have a place to insert a reload. We use SplitEdge helper function to split the incoming edge. SplitEdge function does not deal with unwind edges comping into a block with an EHPad. This patch adds an ehAwareSplitEdge function that can correctly split the unwind edge. For landing pads, we clone the landing pad into every edge block and replace the original landing pad with a PHI collection the values from all incoming landing pads. For WinEH pads, we keep the original EHPad in place and insert cleanuppad/cleapret in the edge blocks. Reviewers: majnemer, rnk Reviewed By: majnemer Subscribers: EricWF, llvm-commits Differential Revision: https://reviews.llvm.org/D31845 llvm-svn: 303172
* [DWARF] - Add RelocAddrEntry for cleanup. NFCi.George Rimar2017-05-163-10/+13
| | | | | | Was mentioned as possible cleanup during review of D33184. llvm-svn: 303171
* [Sema] Avoid duplicate -Wunguarded-availability warnings in nested functionsAlex Lorenz2017-05-162-1/+25
| | | | | | rdar://31862310 llvm-svn: 303170
* [GlobalISel][X86] Split memop test file. NFCIgor Breger2017-05-166-199/+184
| | | | llvm-svn: 303169
* Fix an improperly placed curly bracket. NFC.Chad Rosier2017-05-161-1/+1
| | | | llvm-svn: 303165
* [ELF] - Update for LLVM's r303163 change. NFCi.George Rimar2017-05-161-4/+4
| | | | llvm-svn: 303164
* [DWARF] - Use DWARFAddressRange struct instead of uint64_t pair for ↵George Rimar2017-05-165-20/+24
| | | | | | | | | | | DWARFAddressRangesVector. Recommit of r303159 "[DWARF] - Use DWARFAddressRange struct instead of uint64_t pair for DWARFAddressRangesVector" All places were shitched to use DWARFAddressRange now. Suggested during review of D33184. llvm-svn: 303163
* Revert r303159 "[DWARF] - Use DWARFAddressRange struct instead of uint64_t ↵George Rimar2017-05-163-14/+11
| | | | | | | | | pair for DWARFAddressRangesVector." Something went wrong, it broke BB. http://green.lab.llvm.org/green//job/clang-stage1-cmake-RA-incremental_build/38477/consoleFull#-200034420049ba4694-19c4-4d7e-bec5-911270d8a58c llvm-svn: 303162
* Skip TestWatchedVarHitWhenInScope on android arm because it triggers a ↵Pavel Labath2017-05-162-1/+4
| | | | | | kernel bug llvm-svn: 303160
* [DWARF] - Use DWARFAddressRange struct instead of uint64_t pair for ↵George Rimar2017-05-163-11/+14
| | | | | | | | DWARFAddressRangesVector. Suggested during review of D33184. llvm-svn: 303159
* [StaticAnalyzer] Move inline counter increaser to inlineCall functionPeter Szecsi2017-05-161-2/+1
| | | | | | | | | | | Even though the shouldInlineCall function returns true, it can happen that the function is not going to be inlined (as it can be seen at line 913 and below). Moved the bumpNumTimesInlined(D) (the counter increaser) call to the inlineCall function where it logically belongs. Differential Revision: https://reviews.llvm.org/D32179 llvm-svn: 303158
* [clang-tidy] Add "emplace_back" detection in inefficient-vector-operation.Haojian Wu2017-05-163-103/+119
| | | | | | | | | | | | | | Reviewers: alexfh, aaron.ballman Reviewed By: alexfh Subscribers: cfe-commits, Prazek, malcolm.parsons, xazax.hun Tags: #clang-tools-extra Differential Revision: https://reviews.llvm.org/D33209 llvm-svn: 303157
* Fix PR 10758: Infinite recursion when dealing with copy-initializationAlex Lorenz2017-05-163-0/+61
| | | | | | | | | | | | | | | | | | This commit fixes a bug that's tracked by PR 10758 and duplicates like PR 30343. The bug causes clang to crash with a stack overflow while recursing infinitely trying to perform copy-initialization on a type without a copy constructor but with a constructor that accepts another type that can be constructed using the original type. The commit fixes this bug by detecting the recursive behavior and failing correctly with an appropriate error message. It also tries to provide a meaningful diagnostic note about the constructor which leads to this behavior. rdar://28483944 Differential Revision: https://reviews.llvm.org/D25051 llvm-svn: 303156
* [ELF] - Detemplate elf::addSyntheticLocal(). NFC.George Rimar2017-05-164-28/+14
| | | | llvm-svn: 303155
* Fixing compilation failures on buildbots.Ilya Biryukov2017-05-163-0/+3
| | | | llvm-svn: 303154
* [ELF] - Detemplate access to SymTab, DynSymTab, GnuHashTab. NFC.George Rimar2017-05-164-61/+45
| | | | | | Follow up for r303150. llvm-svn: 303153
* [LTO] Print time-passes information at conclusion of LTO codegenJames Henderson2017-05-164-0/+18
| | | | | | | | | | | | | | | | | | | The information collected when requested by -time-passes is only printed when llvm_shutdown is called at the moment. This means that when linking against the LTO library dynamically and using the C interface, it is not possible to see the timing information, because llvm_shutdown cannot be called. This change modifies the LTO code generation functions for both regular LTO and thin LTO to explicitly print and reset the timing information. I have tested that this works with our proprietary linker. However, as this relies on a specific method of building and linking against the LTO library, I'm not sure how or if this can be tested in the LLVM testsuite. Reviewed by: mehdi_amini Differential Revision: https://reviews.llvm.org/D32803 llvm-svn: 303152
* Restored r303067 and fixed failing test.Ilya Biryukov2017-05-1621-738/+1203
| | | | | | | | | | | | | | | | | | | | | Summary: This commit restores r303067(reverted by r303094) and fixes the 'formatting.test' failure. The failure is due to destructors of `ClangdLSPServer`'s fields(`FixItsMap` and `FixItsMutex`) being called before destructor of `Server`. It led to the worker thread calling `consumeDiagnostics` after `FixItsMutex` and `FixItsMap` destructors were called. Also, clangd is now run with '-run-synchronously' flag in 'formatting.test'. Reviewers: bkramer, krasimir Reviewed By: krasimir Subscribers: mgorny, cfe-commits, klimek Differential Revision: https://reviews.llvm.org/D33233 llvm-svn: 303151
* [ELF] - Detemplate GnuHashTableSection and SymbolTableSection sections.George Rimar2017-05-163-47/+43
| | | | | | | | | | SymbolTableBaseSection was introduced. Detemplation of SymbolTableSection should allow to detemplate more things. Differential revision: https://reviews.llvm.org/D33124 llvm-svn: 303150
* [ELF] - Use llvm::to_integer() instead of StringRef::getAsInteger().George Rimar2017-05-164-13/+13
| | | | | | | | | | | Switch to llvm::to_integer() everywhere in LLD instead of StringRef::getAsInteger() because API of latter is confusing. It returns true on error and false otherwise what makes reading the code incomfortable. Differential revision: https://reviews.llvm.org/D33187 llvm-svn: 303149
* [SCEV] Fix sorting order for AddRecExprsMax Kazantsev2017-05-162-16/+485
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The existing sorting order in defined CompareSCEVComplexity sorts AddRecExprs by loop depth, but does not pay attention to dominance of loops. This can lead us to the following buggy situation: for (...) { // loop1 op1 = {A,+,B} } for (...) { // loop2 op2 = {A,+,B} S = add op1, op2 } In this case there is no guarantee that in operand list of S the op2 comes before op1 (loop depth is the same, so they will be sorted just lexicographically), so we can incorrectly treat S as a recurrence of loop1, which is wrong. This patch changes the sorting logic so that it places the dominated recs before the dominating recs. This ensures that when we pick the first recurrency in the operands order, it will be the bottom-most in terms of domination tree. The attached test set includes some tests that produce incorrect SCEV estimations and crashes with oldlogic. Reviewers: sanjoy, reames, apilipenko, anna Reviewed By: sanjoy Subscribers: llvm-commits, mzolotukhin Differential Revision: https://reviews.llvm.org/D33121 llvm-svn: 303148
* [CorrelatedValuePropagation] Don't use -> to call a static method of ↵Craig Topper2017-05-161-6/+4
| | | | | | ConstantRange. NFC llvm-svn: 303147
* [clang-tidy] modernize-use-emplace: Remove unnecessary make_tuple callsJakub Kuderski2017-05-165-29/+207
| | | | | | | | | | | | | | | | | | | | | | | | | Summary: This patch makes modernize-use-emplace remove unnecessary make_ calls from push_back calls and turn them into emplace_back -- the same way make_pair calls are handled. Custom make_ calls can be removed for custom tuple-like types -- two new options that control that are `TupleTypes` and `TupleMakeFunctions`. By default, the check removes calls to `std::make_pair` and `std::make_tuple`. Eq. ``` std::vector<std::tuple<int, char, bool>> v; v.push_back(std::make_tuple(1, 'A', true)); // --> v.emplace_back(1, 'A', true); ``` Reviewers: alexfh, aaron.ballman, Prazek, hokein Reviewed By: Prazek Subscribers: JDevlieghere, xazax.hun, JonasToth, cfe-commits Tags: #clang-tools-extra Differential Revision: https://reviews.llvm.org/D32690 llvm-svn: 303145
* NewGVN: Use StoreExpression StoredValue instead of looking it up again, ↵Daniel Berlin2017-05-161-6/+5
| | | | | | since it was already looked up when it was created llvm-svn: 303144
* NewGVN: Formatting fixesDaniel Berlin2017-05-161-2/+3
| | | | llvm-svn: 303143
* Revert "[NewGVN] Replace predicate info leftovers."Davide Italiano2017-05-162-28/+0
| | | | | | It's breaking the bots. llvm-svn: 303142
OpenPOWER on IntegriCloud