summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* [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
* [SCEV] Reserve space in SmallVector; NFCSanjoy Das2016-09-251-0/+1
| | | | llvm-svn: 282368
* [SCEV] Document a gotcha; NFCSanjoy Das2016-09-251-0/+3
| | | | | | | We should re-consider the design decision that led to this gotcah, but for now just document it. llvm-svn: 282367
* [SCEV] Have ExitNotTakenInfo keep a pointer to its predicate; NFCSanjoy Das2016-09-252-13/+23
| | | | | | | SCEVUnionPredicate is a "heavyweight" structure, so it is beneficial to store the (optional) data out of line. llvm-svn: 282366
* [SCEV] Simplify tracking ExitNotTakenInfo instances; NFCSanjoy Das2016-09-252-193/+46
| | | | | | | | | | This change simplifies a data structure optimization in the `BackedgeTakenInfo` class for loops with exactly one computable exit. I've sanity checked that this does not regress compile time performance, using sqlite3's amalgamated build. llvm-svn: 282365
* [SCEV] Rename a couple of fields; NFCSanjoy Das2016-09-252-58/+68
| | | | llvm-svn: 282364
* [SCEV] Remove incidental data structure; NFCSanjoy Das2016-09-252-32/+21
| | | | llvm-svn: 282363
* [SCEV] Clang format most of the SCEV header; NFCSanjoy Das2016-09-251-1652/+1631
| | | | | | | The indentation for the declared classes was not as per LLVM coding style. llvm-svn: 282362
* [X86] Remove what appears to be leftover MMX code involving (v1i64 ↵Craig Topper2016-09-251-4/+0
| | | | | | scalar_to_vector). llvm-svn: 282361
OpenPOWER on IntegriCloud