summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Fixup r303240: Use llvm::to_string instead of std::to_stringDiana Picus2017-05-171-3/+3
| | | | | | | It turns out some of the buildbots don't have std::to_string around, even in this day and age... llvm-svn: 303243
* Revert "[include-fixer] Don't throw exception when parsing unknown arguments ↵Benjamin Kramer2017-05-171-1/+1
| | | | | | | | | in vim script." This reverts commit r302934. It's wrong, edits the wrong file and was committed without review. llvm-svn: 303242
* [DebugInfo/DWARF] - Make comments to be in doxygen style. NFCi.George Rimar2017-05-179-78/+78
| | | | | | | This changes "//" to "///" in llvm/DebugInfo/DWARF folder where appropriate and also removes few trailing whitespaces. llvm-svn: 303241
* [GlobalISel][TableGen] Fix handling of default operandsDiana Picus2017-05-172-48/+85
| | | | | | | | | | | | | | | | | | | | | | | | | | | When looping through a destination pattern's operands to decide how many default operands we need to introduce, we used to count the "expanded" number of operands. So if one default operand would be rendered as 2 values, we'd count it as 2 operands, when in fact it needs to count as only 1 operand regardless of how many values it expands to. This turns out to be a problem only in some very specific cases, e.g. when we have one operand with multiple default values followed by more operands with default values (see the new test). In such a situation we'd stop looping before looking at all the operands, and then error out assuming that we don't have enough default operands to make up the shortfall. At the moment this only affects ARM. The patch removes the loop counting default operands entirely and assumes that we'll have to introduce values for any default operand that we find (i.e. we're assuming it cannot be given as a child at all). It also extracts the code for adding renderers for default operands into a helper method. Differential Revision: https://reviews.llvm.org/D33031 llvm-svn: 303240
* [RuntimeDyld] Fix debug section relocation (pr20457)Pavel Labath2017-05-172-3/+27
| | | | | | | | | | | | | | | | | | Summary: Debug info sections, (or non-SHF_ALLOC sections in general) should be linked as if their load address was zero to emulate the behavior of the static linker. This bug was discovered because it was breaking lldb expression evaluation on linux. Reviewers: lhames Subscribers: aprantl, eugene, clayborg, lldb-commits, llvm-commits Differential Revision: https://reviews.llvm.org/D32899 llvm-svn: 303239
* Make sure -optimize-regalloc=false is used correctly by user.Jonas Paulsson2017-05-171-10/+14
| | | | | | | | | | | Don't allow -optimize-regalloc=false with -regalloc given for anything other than 'fast'. The other register allocators depend on the supporting passes added by addOptimizedRegAlloc(). Reviewers: Quentin Colombet, Matthias Braun https://reviews.llvm.org/D33181 llvm-svn: 303238
* [ELF] - Detemplate Thunk creation.George Rimar2017-05-175-96/+68
| | | | | | | | | Nothing special here, just detemplates code that became possible to detemplate after recent commits in a straghtforward way. Differential revision: https://reviews.llvm.org/D33234 llvm-svn: 303237
* [APInt] Use getWord to shorten some code. NFCCraig Topper2017-05-171-3/+1
| | | | llvm-svn: 303236
* [SCEV] Always sort AddRecExprs from different loops by dominanceMax Kazantsev2017-05-171-7/+7
| | | | | | | | | | | | | | Sorting of AddRecExprs by loop nesting does not make sense since we only invoke the CompareSCEVComplexity for AddRecExprs that are used by one SCEV. This guarantees that there is always a dominance relationship between them. This patch removes the sorting by nesting which is a dead code in current usage of this function. Reviewed By: sanjoy Differential Revision: https://reviews.llvm.org/D33228 llvm-svn: 303235
* [SCEV][NFC] Replace redundant dyn_cast with cast in getAddExprMax Kazantsev2017-05-171-14/+15
| | | | | | | | Replace dyn_cast which is ensured by isa just one line above with cast. Differential Revision: https://reviews.llvm.org/D33231 llvm-svn: 303234
* [ODRHash] Support NestedNameSpecifierRichard Trieu2017-05-173-30/+190
| | | | llvm-svn: 303233
* [coroutines] Handle spills before catchswitchGor Nishanov2017-05-172-2/+114
| | | | | | | | | | | | | | | | | | | | | | | | | | | If we need to spill the result of the PHI instruction, we insert the spill after all of the PHIs and EHPads, however, in a catchswitch block there is no room to insert the spill. Make room by splitting away catchswitch into a separate block. Before the fix: catch.dispatch: %val = phi i32 [ 1, %if.then ], [ 2, %if.else ] %switch = catchswitch within none [label %catch] unwind label %cleanuppad After: catch.dispatch: %val = phi i32 [ 1, %if.then ], [ 2, %if.else ] %tok = cleanuppad within none [] ; spill goes here cleanupret from %tok unwind label %catch.dispatch.switch catch.dispatch.switch: %switch = catchswitch within none [label %catch] unwind label %cleanuppad https://reviews.llvm.org/D31846 llvm-svn: 303232
* [ODRHash] Support more types in the ODR checker.Richard Trieu2017-05-172-0/+122
| | | | | | Added support for TagType, TypeWithKeyword, and all children types. llvm-svn: 303231
* [clang-tidy] Optimize misc-unused-parameters. NFCIAlexander Kornienko2017-05-172-17/+72
| | | | | | | | | Don't traverse AST each time we need to find references to a certain function. Traverse the AST once using RAV and cache the index of function references. The speed up on a particular large file was about 1000x. llvm-svn: 303230
* Added LLVM_DUMP_METHOD attributes for MatchableInfo::dump(). Defined it only ↵Galina Kistanova2017-05-171-1/+3
| | | | | | if dump is enabled. llvm-svn: 303229
* (1) Fixed mismatch in intrinsics names in declarations and in doxygen comments.Ekaterina Romanova2017-05-171-16/+9
| | | | | | | | | (2) Removed uncessary anymore \c commands, since the same effect will be achived by <c> ... </c> sequence. I got an OK from Eric Christopher to commit doxygen comments without prior code review upstream. llvm-svn: 303228
* BitVector: add iterators for set bitsFrancis Visoiu Mistrih2017-05-1718-50/+135
| | | | | | Differential revision: https://reviews.llvm.org/D32060 llvm-svn: 303227
* Fix Windows buildbots.Rui Ueyama2017-05-171-2/+2
| | | | llvm-svn: 303226
* Garbage collect dllimported symbols.Rui Ueyama2017-05-177-19/+129
| | | | | | | | | | | | | | | | | | | | | | Summary: Previously, the garbage collector (enabled by default or by explicitly passing /opt:ref) did not kill dllimported symbols. As a result, dllimported symbols could be added to resulting executables' dllimport list even if no one was actually using them. This patch implements dllexported symbol garbage collection. Just like COMDAT sections, dllimported symbols now have Live bits to manage their liveness, and MarkLive marks reachable dllimported symbols. Fixes https://bugs.llvm.org/show_bug.cgi?id=32950 Reviewers: pcc Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D33264 llvm-svn: 303225
* [modules] When creating a declaration, cache its owning module immediatelyRichard Smith2017-05-1713-85/+73
| | | | | | | | | | | | | | | rather than waiting until it's queried. Currently this is only applied to local submodule visibility mode, as we don't yet allocate storage for the owning module in non-local-visibility modules compilations. This reinstates r302965, reverted in r303037, with a fix for the reported crash, which occurred when reparenting a local declaration to be a child of a hidden imported declaration (specifically during template instantiation). llvm-svn: 303224
* [Expression parser] Look up module symbols before hunting globallySean Callanan2017-05-1615-118/+353
| | | | | | | | | | | | | | | | | | | When it resolves symbol-only variables, the expression parser currently looks only in the global module list. It should prefer the current module. I've fixed that behavior by making it search the current module first, and only search globally if it finds nothing. I've also added a test case. After review, I moved the core of the lookup algorithm into SymbolContext for use by other code that needs it. Thanks to Greg Clayton and Pavel Labath for their help. Differential Revision: https://reviews.llvm.org/D33083 llvm-svn: 303223
* Fix scope of namespaced DISubprograms when the function definition is ↵Adrian Prantl2017-05-162-1/+7
| | | | | | | | | | | | | | out-of-line. This fixes a regression introduced in r302915. Using the lexical decl context is not necessary here for what r302915 wast trying to achieve. Not canonicalizing the NamespaceDecl in getOrCreateNamespace is suficient. rdar://problem/29339538 llvm-svn: 303222
* [ADT] Fix some Clang-tidy modernize-use-using warnings; other minor fixes (NFC).Eugene Zelenko2017-05-1617-219/+251
| | | | llvm-svn: 303221
* Fix for compilers with older CRT header libraries.Zachary Turner2017-05-161-1/+6
| | | | llvm-svn: 303220
* [Support] Ignore OutputDebugString exceptions in our crash recovery.Zachary Turner2017-05-161-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since we use AddVectoredExceptionHandler, we get notified of every exception that gets raised by a program. Sometimes these are not necessarily errors though, and this can be especially true when linking against a library that we have no control over, and may raise an exception internally which it intends to catch. In particular, the Windows API OutputDebugString does exactly this. It raises an exception inside of a __try / __except, giving the debugger a chance to handle the exception to print the message to the debug console. But this doesn't interoperate nicely with our vectored exception handler, which just sees another exception and decides that we need to terminate the program. Add a special case for this so that we ignore ODS exceptions and continue normally. Note that a better fix is to simply not use vectored exception handlers and use SEH instead, but given that MinGW doesn't support SEH, this is the only solution for MinGW. Differential Revision: https://reviews.llvm.org/D33260 llvm-svn: 303219
* [IR] Prefer use_empty() to !hasNUsesOrMore(1) for clarity.Davide Italiano2017-05-162-2/+2
| | | | llvm-svn: 303218
* [NewGVN] Re-enable test now that the nondeterminism has been fixed.Davide Italiano2017-05-161-1/+0
| | | | llvm-svn: 303217
* llvm/test/Transforms/InstCombine/debuginfo-skip.ll REQUIRES +asserts.NAKAMURA Takumi2017-05-161-0/+1
| | | | llvm-svn: 303216
* Add test for FixedStreamArrayIterator::operator->Adrian McCarthy2017-05-161-2/+27
| | | | | | | | | | | The operator-> implementation comes from iterator_facade_base, so it should just work given that the iterator has a tested operator*. But r302257 showed that required careful handling of for the const qualifier. This patch ensures the fix in r302257 doesn't regress. Differential Revision: https://reviews.llvm.org/D33249 llvm-svn: 303215
* Update doxygen description of a method. NFCPaul Robinson2017-05-161-1/+4
| | | | llvm-svn: 303214
* [InstSimplify] add folds for constant mask of value shifted by constantSanjay Patel2017-05-162-8/+22
| | | | | | | | | | | | | | | | | We would eventually catch these via demanded bits and computing known bits in InstCombine, but I think it's better to handle the simple cases as soon as possible as a matter of efficiency. This fold allows further simplifications based on distributed ops transforms. eg: %a = lshr i8 %x, 7 %b = or i8 %a, 2 %c = and i8 %b, 1 InstSimplify can directly fold this now: %a = lshr i8 %x, 7 Differential Revision: https://reviews.llvm.org/D33221 llvm-svn: 303213
* The patch exclude a case from zero check skip inEvgeny Stupachenko2017-05-161-7/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | CTLZ idiom recognition (r303102). Summary: The following case: i = 1; if(n) while (n >>= 1) i++; use(i); Was converted to: i = 1; if(n) i += builtin_ctlz(n >> 1, false); use(i); Which is not correct. The patch make it: i = 1; if(n) i += builtin_ctlz(n >> 1, true); use(i); From: Evgeny Stupachenko <evstupac@gmail.com> llvm-svn: 303212
* Re-commit r302678, fixing PR33053.Amara Emerson2017-05-1610-750/+271
| | | | | | | The issue was that the AArch64 TTI hook allowed unpacked integer cmp reductions which didn't have a lowering. llvm-svn: 303211
* [Inliner] Do not mix callsite and callee hotness based updates.Easwaran Raman2017-05-162-20/+32
| | | | | | | | | | Update threshold based on callee's hotness only when BFI is not available. Otherwise use only callsite's hotness. This makes it easier to reason about hotness related threshold updates. Differential revision: https://reviews.llvm.org/D33157 llvm-svn: 303210
* [PPC] Add -ppc-asm-full-reg-names to atomic-2.ll. NFC.Tim Shen2017-05-161-6/+6
| | | | | | Differential Revisions: https://reviews.llvm.org/D32763 llvm-svn: 303209
* Test for r303197Matthias Braun2017-05-161-0/+1
| | | | llvm-svn: 303208
* builtins: fix guard __AEABI__ -> __ARM_EABI__Saleem Abdulrasool2017-05-161-1/+1
| | | | llvm-svn: 303207
* [libunwind] Fix executable stack directive on Linux.Manoj Gupta2017-05-161-2/+2
| | | | | | | | | | | | | | | | Summary: Disable executable stack on Linux. Also remove redundant Android check as it is covered by Android. Reviewers: phosek, compnerd, rs, rmaprath, EricWF, krytarowski Reviewed By: krytarowski Subscribers: srhines, llvm-commits, krytarowski Differential Revision: https://reviews.llvm.org/D33217 llvm-svn: 303206
* [PPC] Lower load acquire/seq_cst trailing fence to cmp + bne + isync.Tim Shen2017-05-1610-26/+149
| | | | | | | | | | | | | | | | | Summary: This fixes pr32392. The lowering pipeline is: llvm.ppc.cfence in IR -> PPC::CFENCE8 in isel -> Actual instructions in expandPostRAPseudo. The reason why expandPostRAPseudo is chosen is because previous passes are likely eliminating instructions like cmpw 3, 3 (early CSE) and bne- 7, .+4 (some branch pass(s)). Differential Revision: https://reviews.llvm.org/D32763 llvm-svn: 303205
* Add hasProfileSummary and has{Sample|Instrumentation}Profile methodsEaswaran Raman2017-05-163-1/+24
| | | | | | | | ProfileSummaryInfo already checks whether the module has sample profile in determining profile counts. This will also be useful in inliner to clean up threshold updates. llvm-svn: 303204
* [InstCombine] auto-generate better checks; NFCSanjay Patel2017-05-161-40/+55
| | | | llvm-svn: 303203
* In debug builds non-trivial amount of time is spent in InstCombine processingDmitry Mikulin2017-05-162-1/+47
| | | | | | @llvm.dbg.* calls in visitCallInst(). They can be safely ignored. llvm-svn: 303202
* NewGVN: Only do something in verifyStoreExpressions if assertions are ↵Daniel Berlin2017-05-161-0/+2
| | | | | | enabled, to avoid unused code warnings. llvm-svn: 303201
* NewGVN: Fix PR 33051 by making sure we remove old store expressionsDaniel Berlin2017-05-161-27/+36
| | | | | | from the ExpressionToClass mapping. llvm-svn: 303200
* Revert "[X86] Replace slow LEA instructions in X86"Reid Kleckner2017-05-166-1786/+43
| | | | | | | This reverts commit r303183, it broke various buildbots and introduced sanitizer errors. llvm-svn: 303199
* Elide stores which are overwritten without being observed.Nirav Dave2017-05-1623-150/+135
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: In SelectionDAG, when a store is immediately chained to another store to the same address, elide the first store as it has no observable effects. This is causes small improvements dealing with intrinsics lowered to stores. Test notes: * Many testcases overwrite store addresses multiple times and needed minor changes, mainly making stores volatile to prevent the optimization from optimizing the test away. * Many X86 test cases optimized out instructions associated with associated with va_start. * Note that test_splat in CodeGen/AArch64/misched-stp.ll no longer has dependencies to check and can probably be removed and potentially replaced with another test. Reviewers: rnk, john.brawn Subscribers: aemerson, rengolin, qcolombet, jyknight, nemanjai, nhaehnle, javed.absar, llvm-commits Differential Revision: https://reviews.llvm.org/D33206 llvm-svn: 303198
* ShrinkWrap: Add skipFunction() callMatthias Braun2017-05-161-1/+1
| | | | | | | ShrinkWrapping is a performance optimization that can safely be skipped, so we can add `if (!skipFunction()) return;` llvm-svn: 303197
* [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
OpenPOWER on IntegriCloud