summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* AMDGPU/SI: Don't crash on anonymous GlobalValuesTom Stellard2016-09-264-7/+32
| | | | | | | | | | | | | | Summary: We need to call AsmPrinter::getNameWithPrefix() in order to handle anonymous GlobalValues (e.g. @0, @1). Reviewers: arsenm, b-sumner Subscribers: arsenm, kzhuravl, wdng, nhaehnle, yaxunl, tony-tye, llvm-commits Differential Revision: https://reviews.llvm.org/D24865 llvm-svn: 282420
* Remove pruning of phi nodes in MemorySSA - it makes updating harderDaniel Berlin2016-09-263-95/+6
| | | | | | | | | | Reviewers: george.burgess.iv Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D24923 llvm-svn: 282419
* [LV] Scalarize instructions marked scalar after vectorizationMatthew Simpson2016-09-266-7/+92
| | | | | | | | | This patch ensures that we actually scalarize instructions marked scalar after vectorization. Previously, such instructions may have been vectorized instead. Differential Revision: https://reviews.llvm.org/D23889 llvm-svn: 282418
* Complete support for the cxxCtorInitializer() AST matcher so that it can be ↵Aaron Ballman2016-09-264-0/+47
| | | | | | used as a top-level matcher. llvm-svn: 282417
* [ASTMatcher] Add isStaticStorageClass matcher for varDecl and functionDecl.Haojian Wu2016-09-263-1/+55
| | | | | | | | | | Reviewers: klimek Subscribers: cfe-commits, klimek Differential Revision: https://reviews.llvm.org/D24821 llvm-svn: 282415
* [Coroutines] Part14: Handle coroutines with no suspend points.Gor Nishanov2016-09-263-0/+309
| | | | | | | | | | | | | | | Summary: If coroutine has no suspend points, remove heap allocation and turn a coroutine into a normal function. Also, if a pattern is detected that coroutine resumes or destroys itself prior to coro.suspend call, turn the suspend point into a simple jump to resume or cleanup label. This pattern occurs when coroutines are used to propagate errors in functions that return expected<T>. Reviewers: majnemer Subscribers: mehdi_amini, llvm-commits Differential Revision: https://reviews.llvm.org/D24408 llvm-svn: 282414
* [AArch64] Improve add/sub/cmp isel of uxtw forms.Geoff Berry2016-09-264-14/+124
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Don't match the UXTW extended reg forms of ADD/ADDS/SUB/SUBS if the 32-bit to 64-bit zero-extend can be done for free by taking advantage of the 32-bit defining instruction zeroing the upper 32-bits of the X register destination. This enables better instruction selection in a few cases, such as: sub x0, xzr, x8 instead of: mov x8, xzr sub x0, x8, w9, uxtw madd x0, x1, x1, x8 instead of: mul x9, x1, x1 add x0, x9, w8, uxtw cmp x2, x8 instead of: sub x8, x2, w8, uxtw cmp x8, #0 add x0, x8, x1, lsl #3 instead of: lsl x9, x1, #3 add x0, x9, w8, uxtw Reviewers: t.p.northover, jmolloy Subscribers: mcrosier, aemerson, llvm-commits, rengolin Differential Revision: https://reviews.llvm.org/D24747 llvm-svn: 282413
* Add support to optionally limit the size of jump tables.Evandro Menezes2016-09-267-18/+154
| | | | | | | | | | | | | | | | | | | Many high-performance processors have a dedicated branch predictor for indirect branches, commonly used with jump tables. As sophisticated as such branch predictors are, they tend to have well defined limits beyond which their effectiveness is hampered or even nullified. One such limit is the number of possible destinations for a given indirect branches that such branch predictors can handle. This patch considers a limit that a target may set to the number of destination addresses in a jump table. Patch by: Evandro Menezes <e.menezes@samsung.com>, Aditya Kumar <aditya.k7@samsung.com>, Sebastian Pop <s.pop@samsung.com>. Differential revision: https://reviews.llvm.org/D21940 llvm-svn: 282412
* [analyzer] Improve CastToStruct checker so it can also detect widening casts ↵Daniel Marjamaki2016-09-263-23/+133
| | | | | | | | | | | | | | | | | | | | | | | | | | of struct data Example: struct AB { int A; int B; }; struct ABC { int A; int B; int C; }; void f() { struct AB Data; struct ABC *P = (struct ABC *)&Data; } Differential Revision: https://reviews.llvm.org/D23508 llvm-svn: 282411
* clang-format: Only special-case top-level */& in multivar-declstmts.Daniel Jasper2016-09-262-1/+2
| | | | | | | | | | Before (even with PointerAlignment: Left): vector<int *> a, b; After: vector<int*> a, b; llvm-svn: 282410
* Silence a false positive with the cert-err58-cpp check; now allows objects ↵Aaron Ballman2016-09-262-14/+78
| | | | | | | | with static or thread storage duration at function block scope. Patch by Malcolm Parsons llvm-svn: 282409
* Remove ancient icc decoratorsPavel Labath2016-09-264-12/+0
| | | | | | | Nobody is running the test suite with icc, so we have no idea if they pass. But the bug they link to has definitely been fixed. llvm-svn: 282408
* tsan: relaxed check in CheckShadowMappingDmitry Vyukov2016-09-261-2/+1
| | | | | | | | | | | | Some platforms use strange addresses in shadow mapping. E.g. aarch64/42vma: static const uptr kHiAppMemEnd = 0x3ffffffffffull; instead of 0x40000000000ull (the range is half-open). This caused bot failures after r282405: http://lab.llvm.org:8011/builders/clang-cmake-aarch64-42vma/builds/12242/steps/ninja%20check%201/logs/FAIL%3A%20SanitizerCommon-tsan-aarch64-Linux%3A%3Aclock_gettime.c Relaxed the new check in CheckShadowMapping to not expect round addresses. llvm-svn: 282407
* Remove an ancient XFAIL from TestBuiltinTrapPavel Labath2016-09-261-6/+0
| | | | | | | in refers to gcc-4.6. Hopefully noone is using that anymore, and I think there is a good chance it was fixed anyway. llvm-svn: 282406
* tsan: make shadow mapping linear within a single user regionDmitry Vyukov2016-09-262-19/+31
| | | | | | | | | | | | | | | | | | | This is a follow up to r282152. A more extensive testing on real apps revealed a subtle bug in r282152. The revision made shadow mapping non-linear even within a single user region. But there are lots of code in runtime that processes memory ranges and assumes that mapping is linear. For example, region memory access handling simply increments shadow address to advance to the next shadow cell group. Similarly, DontNeedShadowFor, java memory mover, search of heap memory block header, etc make similar assumptions. To trigger the bug user range would need to cross 0x008000000000 boundary. This was observed for a module data section. Make shadow mapping linear within a single user range again. Add a startup CHECK for linearity. llvm-svn: 282405
* tsan: remove kMidShadowOff mapping parameterDmitry Vyukov2016-09-261-6/+2
| | | | | | | kMidShadowOff is trivially computable from other parameters. Remove it. llvm-svn: 282404
* tsan: simplify meta mappingDmitry Vyukov2016-09-261-3/+2
| | | | | | | | | | | Don't xor user address with kAppMemXor in meta mapping. The only purpose of kAppMemXor is to raise shadow for ~0 user addresses, so that they don't map to ~0 (which would cause overlap between user memory and shadow). For meta mapping we explicitly add kMetaShadowBeg offset, so we don't need to additionally raise meta shadow. llvm-svn: 282403
* In the get started page, also explain how to start the testsuiteSylvestre Ledru2016-09-261-0/+5
| | | | llvm-svn: 282402
* [InstCombine] Fixed bug introduced in r282237Alexey Bataev2016-09-262-6/+17
| | | | | | | | The index of the new insertelement instruction was evaluated in the wrong way, it was considered as the index of the inserted value instead of index of the position, where the value should be inserted. llvm-svn: 282401
* update the link to the code coverageSylvestre Ledru2016-09-261-1/+1
| | | | llvm-svn: 282400
* Fix typo in comment, NFCKrzysztof Parzyszek2016-09-261-2/+3
| | | | llvm-svn: 282399
* [InstCombine] Teach the udiv folding logic how to handle constant expressions.Andrea Di Biagio2016-09-262-11/+29
| | | | | | | | | | | | | | | | | | | This patch fixes PR30366. Function foldUDivShl() worked under the assumption that one of the values in input to the function was always an instance of llvm::Instruction. However, function visitUDivOperand() (the only user of foldUDivShl) was clearly violating that precondition; internally, visitUDivOperand() uses pattern matches to check the operands of a udiv. Pattern matchers for binary operators know how to handle both Instruction and ConstantExpr values. This patch fixes the problem in foldUDivShl(). Now we use pattern matchers instead of explicit casts to Instruction. The reduced test case from PR30366 has been added to test file InstCombine/udiv-simplify.ll. Differential Revision: https://reviews.llvm.org/D24565 llvm-svn: 282398
* [AVR] Add AVRMCExprDylan McKay2016-09-264-0/+427
| | | | | | | | | | | | Summary: This adds the AVRMCExpr headers and implementation. Reviewers: arsenm, ruiu, grosbach, kparzysz Subscribers: wdng, beanz, mgorny, kparzysz, jtbandes, llvm-commits Differential Revision: https://reviews.llvm.org/D20503 llvm-svn: 282397
* Revert "[AMDGPU] Disassembler: print label names in branch instructions"Sam Kolton2016-09-265-171/+69
| | | | | | This reverts commit 6c6dbe625263ec9fcf8de0df27263cf147cde550. llvm-svn: 282396
* [ELF] - Format. NFC.George Rimar2016-09-261-3/+1
| | | | llvm-svn: 282395
* [AMDGPU] Disassembler: print label names in branch instructionsSam Kolton2016-09-265-69/+171
| | | | | | | | | | | | Summary: Add AMDGPUSymbolizer for finding names for labels from ELF symbol table. Reviewers: vpykhtin, artem.tamazov, tstellarAMD Subscribers: arsenm, kzhuravl, wdng, nhaehnle, yaxunl, tony-tye Differential Revision: https://reviews.llvm.org/D24802 llvm-svn: 282394
* Linkerscript: don't crash when GC .debug_lineEugene Leviant2016-09-263-8/+24
| | | | | | Differential revision: https://reviews.llvm.org/D24870 llvm-svn: 282393
* Linkerscript: do not GC non-allocated sectionsEugene Leviant2016-09-262-3/+17
| | | | | | Differential revision: https://reviews.llvm.org/D24733 llvm-svn: 282391
* [msan] Fix second parameter in MsanReallocate from previous commit.Maxim Ostapenko2016-09-261-1/+1
| | | | | | | It's wrong to pass to MsanReallocate a pointer that MSan allocator doesn't own. Use nullptr instead of ptr to prevent possible (still unlikely) failure. llvm-svn: 282390
* [asan, msan] Fix reallocation logic when IsInDlsymAllocPool(ptr) is true.Maxim Ostapenko2016-09-262-4/+12
| | | | llvm-svn: 282389
* [clang-rename] Use checktime when reloading vim buffer after applying ↵Kirill Bobyrev2016-09-261-1/+1
| | | | | | | | | | | | | | | | | | | | clang-rename After applying `clang-rename` to a vim buffer (using `clang-rename.py` as part of the vim integration) the buffer gets reloaded using `bufdo`. This solution is suboptimal, since syntax highlighting is turned off for performance reasons and never turned on, after all changes to the source file have been applied. A better solution to this is using `checktime`. It is exactly designed for this kind of task and doesn't have the syntax highlighting issue. Patch by Kai Wolf! Reviewers: omtcyfz Differential Revision: https://reviews.llvm.org/D24791 llvm-svn: 282388
* [ARM] Promote small global constants to constant poolsJames Molloy2016-09-2611-9/+470
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If a constant is unamed_addr and is only used within one function, we can save on the code size and runtime cost of an indirection by changing the global's storage to inside the constant pool. For example, instead of: ldr r0, .CPI0 bl printf bx lr .CPI0: &format_string format_string: .asciz "hello, world!\n" We can emit: adr r0, .CPI0 bl printf bx lr .CPI0: .asciz "hello, world!\n" This can cause significant code size savings when many small strings are used in one function (4 bytes per string). This recommit contains fixes for a nasty bug related to fast-isel fallback - because fast-isel doesn't know about this optimization, if it runs and emits references to a string that we inline (because fast-isel fell back to SDAG) we will end up with an inlined string and also an out-of-line string, and we won't emit the out-of-line string, causing backend failures. It also contains fixes for emitting .text relocations which made the sanitizer bots unhappy. llvm-svn: 282387
* [clang-tidy] make readability-redundant-smartptr-get report get() usage in ↵Kirill Bobyrev2016-09-262-14/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | conditions This patch extends clang-tidy's readability-redundant-smartptr-get to produce warnings for previously unsupported cases: ``` std::unique_ptr<void> ptr; if (ptr.get()) if (ptr.get() == NULL) if (ptr.get() != NULL) ``` This is intended to fix https://llvm.org/bugs/show_bug.cgi?id=25804, a bug report opened by @Eugene.Zelenko. However, there still are cases not detected by the check. They can be found in `void Negative()` function defined in test/clang-tidy/readability-redundant-smartptr-get.cpp. Reviewers: alexfh Differential Revision: https://reviews.llvm.org/D24893 llvm-svn: 282386
* [X86] Optimization for replacing LEA with MOV at frame index elimination timeZvi Rackover2016-09-2618-38/+83
| | | | | | | | | | | | | | | Summary: Replace a LEA instruction of the form 'lea (%esp), %ebx' --> 'mov %esp, %ebx' MOV is preferable over LEA because usually there are more issue-slots available to execute MOVs than LEAs. Latest processors also support zero-latency MOVs. Fixes pr29022. Reviewers: hfinkel, delena, igorb, myatsina, mkuper Differential Revision: https://reviews.llvm.org/D24705 llvm-svn: 282385
* Revert r282382; it had no reference to Revision.Kirill Bobyrev2016-09-262-50/+14
| | | | llvm-svn: 282384
* [PM] Refactor this unittest a bit to remove duplicated code. This wasChandler Carruth2016-09-261-65/+45
| | | | | | | suggested at one point during code review and I deferred it to a follow-up commit. llvm-svn: 282383
* [clang-tidy] make readability-redundant-smartptr-get report get() usage in ↵Kirill Bobyrev2016-09-262-14/+50
| | | | | | | | | | | | | | | | | | | | | | | conditions This patch extends clang-tidy's readability-redundant-smartptr-get to produce warnings for previously unsupported cases: ``` std::unique_ptr<void> ptr; if (ptr.get()) if (ptr.get() == NULL) if (ptr.get() != NULL) ``` This is intended to fix https://llvm.org/bugs/show_bug.cgi?id=25804, a bug report opened by @Eugene.Zelenko. However, there still are cases not detected by the check. They can be found in `void Negative()` function defined in test/clang-tidy/readability-redundant-smartptr-get.cpp. llvm-svn: 282382
* [X86][avx512] Fix bug in masked compress store.Ayman Musa2016-09-267-22/+78
| | | | | | Differential Revision: https://reviews.llvm.org/D23984 llvm-svn: 282381
* [SCEV] Fix the order of members in the initializer list.Chandler Carruth2016-09-261-1/+1
| | | | | | | Noticed due to the warning on this line. Sanjoy is on a less-than-awesome internet connection, so committing on his behalf. llvm-svn: 282380
* Driver: avoid failing in the backendSaleem Abdulrasool2016-09-265-3/+10
| | | | | | | | Avoid failing in the backend when the rewrite map does not exist. Rather check that the map exists in the frontend before handing it off to the backend. Add the missing rewrite maps that the tests were referencing. llvm-svn: 282379
* [PM] Add a unittest covering the invalidation of a Module analysis fromChandler Carruth2016-09-261-0/+95
| | | | | | | | | a function pass nested inside of a CGSCC pass manager. This is very similar to the previous unittest but makes sure the invalidation logic works across all the layers here. llvm-svn: 282378
* [PM] Add a unittest for invalidating module analyses with an SCC pass.Chandler Carruth2016-09-261-0/+89
| | | | | | | | | | | | | This reinstates r280447. Original commit log: This wasn't really well explicitly tested with a nice unittest before. It seems good to have reasonably broken out unittests for this kind of functionality as I'm workin go other invalidation features to make sure none of the existing ones regress. This still has too much duplicated code, I plan to factor that out in a subsequent commit to use common helpers for repeated parts of this. llvm-svn: 282377
* [SCEV] Assign LoopPropertiesCache in the move constructorSanjoy Das2016-09-261-0/+1
| | | | | | | | | | | In a previous change I collapsed two different caches into one. When doing that I noticed that ScalarEvolution's move constructor was not moving those caches. To keep the previous change simple, I've moved that bugfix into this separate change. llvm-svn: 282376
* [SCEV] Combine two predicates into one; NFCSanjoy Das2016-09-262-47/+50
| | | | | | | | | Both `loopHasNoSideEffects` and `loopHasNoAbnormalExits` involve walking the loop and maintaining similar sorts of caches. This commit changes SCEV to compute both the predicates via a single walk, and maintain a single cache instead of two. llvm-svn: 282375
* [SCEV] Make it obvious BackedgeTakenInfo's constructor steals storageSanjoy Das2016-09-262-3/+5
| | | | | | | Specifically, it moves SCEVUnionPredicates from its input into its own storage. Make this obvious at the type level. llvm-svn: 282374
* [SCEV] Further isolate incidental data structure; NFCSanjoy Das2016-09-262-6/+9
| | | | llvm-svn: 282373
* [SCEV] Simplify BackedgeTakenInfo::getMax; NFCSanjoy Das2016-09-261-7/+7
| | | | llvm-svn: 282372
* [AMDGPU] Expose flat work group size, register and wave control attributesKonstantin Zhuravlyov2016-09-2611-208/+610
| | | | | | | | | __attribute__((amdgpu_flat_work_group_size(<min>, <max>))) - request minimum and maximum flat work group size __attribute__((amdgpu_waves_per_eu(<min>[, <max>]))) - request minimum and/or maximum waves per execution unit Differential Revision: https://reviews.llvm.org/D24513 llvm-svn: 282371
* Appease MSVCSanjoy Das2016-09-261-4/+24
| | | | | | | ... by not default move constructors and operator= s. Defaulting these works in clang, but not in MSVC. llvm-svn: 282370
* Attempt to appease MSVCSanjoy Das2016-09-261-0/+9
| | | | | | ... by explicitly deleting the copy constructor. llvm-svn: 282369
OpenPOWER on IntegriCloud