summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* AMDGPU/GlobalISel: Fix G_IMPLICIT_DEF for pointersMatt Arsenault2018-06-252-8/+86
| | | | llvm-svn: 335485
* [SampleFDO] Add an option to turn on/off warning about samples unused.Wei Mi2018-06-251-0/+8
| | | | | | | | | | | | | | | | | | If a function has sample to use, but cannot use them because of no debug information, currently a warning will be issued to inform the missing opportunity. This warning assumes the binary generating the profile and the binary using the profile are similar enough. It is not always the case. Sometimes even if the binaries are not quite similar, we may still get some benefit by using sampleFDO. In those cases, we may still want to apply sampleFDO but not want to see a lot of such warnings pop up. The patch adds an option for the warning. Differential Revision: https://reviews.llvm.org/D48510 llvm-svn: 335484
* [OPENMP] Do not consider address constant vars as possiblyAlexey Bataev2018-06-252-1/+31
| | | | | | | | | threadprivate. Do not delay emission of the address constant variables in OpenMP mode as they cannot be defined as threadprivate. llvm-svn: 335483
* [ELF] - ICF: add one more test case #3.George Rimar2018-06-251-0/+23
| | | | | | | | | | | | ICF is able to merge sections which relocations referring regular input sections or mergeable sections, so it handles InputSection and MergeInputSection cases. The following "return false" line which is executed in case of another type of the sections is uncovered by our test cases: https://github.com/llvm-mirror/lld/blob/master/ELF/ICF.cpp#L285 Patch fixes code coverage for this place. llvm-svn: 335482
* [DA] Delinearise AddRecs if we can prove they don't wrapDavid Green2018-06-253-3/+61
| | | | | | | | | | | We can prove that some delinearized subscripts do not wrap around to become negative by the fact that they are from inbound geps of load/store locations. This helps improve the delinearisation in cases where we can't prove that they are non-negative from SCEV alone. Differential Revision: https://reviews.llvm.org/D48481 llvm-svn: 335481
* [ASTImporter] Import the whole redecl chain of functionsGabor Marton2018-06-255-111/+787
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: With this patch when any `FunctionDecl` of a redeclaration chain is imported then we bring in the whole declaration chain. This involves functions and function template specializations. Also friend functions are affected. The chain is imported as it is in the "from" tu, the order of the redeclarations are kept. I also changed the lookup logic in order to find friends, but first making them visible in their declaration context. We may have long redeclaration chains if all TU contains the same prototype, but our measurements shows no degradation in time of CTU analysis (Tmux, Xerces, Bitcoin, Protobuf). Also, as further work we could squash redundant prototypes, but first ensure that functionality is working properly; then should we optimize. This may seem like a huge patch, sorry about that. But, most of the changes are new tests, changes in the production code is not that much. I also tried to create a smaller patch which does not affect specializations, but that patch failed to pass some of the `clang-import-test`s because there we import function specializations. Also very importantly, we can't just change the import of `FunctionDecl`s without changing the import of function template specializations because they are handled as `FunctionDecl`s. Reviewers: a.sidorin, r.stahl, xazax.hun, balazske Subscribers: rnkovacs, dkrupp, cfe-commits Differential Revision: https://reviews.llvm.org/D47532 llvm-svn: 335480
* [ELF] - Rewrote comment. NFC.George Rimar2018-06-251-2/+2
| | | | llvm-svn: 335479
* AMDGPU: Respect align argument parameterMatt Arsenault2018-06-253-11/+133
| | | | | | | | | | This should avoid relying on the pointee type to get the alignment, particularly since pointee types are supposed to be removed at some point. Also fixes not getting the alignment for unsized types. llvm-svn: 335478
* [ELF] - ICF: add one more test case #2.George Rimar2018-06-251-0/+23
| | | | | | | | | | Check that ICF does not merge sections which relocations have equal addends, but different target values. This covers the following line, which was uncovered: https://github.com/llvm-mirror/lld/blob/master/ELF/ICF.cpp#L278 llvm-svn: 335477
* Fix TestThreadExit for gcc&libc++ comboPavel Labath2018-06-251-1/+2
| | | | | | | | | | | | | | | | pseudo_barrier_wait() begins by decrementing an atomic variable. Since these are always_inline in libc++, there is no line table anchor to break on before we decrement it. This meant that on gcc we stopped after the variable has been decremented, which meant that thread2 could have exited, violating the test setup. On clang this wasn't a problem because it generated some line table entries for the do{}while(0) loop in the macro, so we still ended up stopping, before we touched the variable. I fix this by adding a dummy statement before the pseudo_barrier_wait() command and setting the breakpoint there. llvm-svn: 335476
* [ELF] - ICF: add one more test case.George Rimar2018-06-251-0/+26
| | | | | | | | | | | This test case check that ICF does not merge 2 sections which relocations efer to symbols that live in sections of the different types (regular input section and mergeable input sections in this case). It covers the following line of code, which was uncovered previously: https://github.com/llvm-mirror/lld/blob/master/ELF/ICF.cpp#L271 llvm-svn: 335475
* SafepointIRVerifier should ignore dead blocks and dead edgesArtur Pilipenko2018-06-251-28/+189
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Not only should SafepointIRVerifier ignore unreachable blocks (as suggested in https://reviews.llvm.org/D47011) but it also has to ignore dead blocks. In @test2 (see the new tests): br i1 true, label %right, label %left left: ... right: ... merge: %val = phi i8 addrspace(1)* [ ..., %left ], [ ..., %right ] use %val both left and right branches are reachable. If they collide then SafepointIRVerifier reports an error. Because of the foldable branch condition GVN finds the left branch dead and removes the phi node entry that merges values from right and left. Then the use comes from the right branch. This results in no collision. So, SafepointIRVerifier ends up in different results depending on either GVN is run or not. To solve this issue this patch adds Dead Block detection to SafepointIRVerifier which can ignore dead blocks while validating IR. The Dead Block detection algorithm is taken from GVN but modified to not split critical edges. That is needed to keep CFG unchanged by SafepointIRVerifier. Patch by Yevgeny Rouban. Reviewed By: anna, apilipenko, DaniilSuchkov Differential Revision: https://reviews.llvm.org/D47441 llvm-svn: 335473
* Improve handling of COPY instructions with identical value numbersKrzysztof Parzyszek2018-06-258-28/+1131
| | | | | | | | Testcases provided by Tim Renouf. Differential Revision: https://reviews.llvm.org/D48102 llvm-svn: 335472
* Revert r335460 "[ELF] - ICF: Remove dead code. NFC."George Rimar2018-06-251-0/+3
| | | | | | My mistake, it was not NFC. llvm-svn: 335471
* [llvm-exegesis][NFC] Remove unnecessary member variables.Clement Courbet2018-06-255-13/+10
| | | | llvm-svn: 335470
* [OPENMP, NVPTX] Fixes for NVPTX RTLAlexey Bataev2018-06-253-32/+36
| | | | | | | | | | | | | | | | | | Summary: Patch fixes several problems in the implementation of NVPTX RTL. 1. Detection of the last iteration for loops with static scheduling, no chunks. 2. Fixes reductions for the serialized parallel constructs. 3. Fixes handling of the barriers. Reviewers: grokos Reviewed By: grokos Subscribers: Hahnfeld, guansong, openmp-commits Differential Revision: https://reviews.llvm.org/D48480 llvm-svn: 335469
* [IR] avoid -Wdocumentation spew about HTML tagsSanjay Patel2018-06-251-8/+8
| | | | | | | | There's probably a better solution, but adding spaces in the IR vector examples sidesteps the problem without uglifying the plain text. llvm-svn: 335468
* [llvm-exegesis] Fix warning in r22752: Initialize IsSnippetSetupComplete.Clement Courbet2018-06-251-1/+1
| | | | llvm-svn: 335467
* [clang-cl] Don't emit dllexport inline functions etc. from pch files (PR37801)Hans Wennborg2018-06-2517-13/+168
| | | | | | | | | | | | | | | | | | | | | | | With MSVC, PCH files are created along with an object file that needs to be linked into the final library or executable. That object file contains the code generated when building the headers. In particular, it will include definitions of inline dllexport functions, and because they are emitted in this object file, other files using the PCH do not need to emit them. See the bug for an example. This patch makes clang-cl match MSVC's behaviour in this regard, causing significant compile-time savings when building dlls using precompiled headers. For example, in a 64-bit optimized shared library build of Chromium with PCH, it reduces the binary size and compile time of stroke_opacity_custom.obj from 9315564 bytes to 3659629 bytes and 14.6 to 6.63 s. The wall-clock time of building blink_core.dll goes from 38m41s to 22m33s. ("user" time goes from 1979m to 1142m). Differential Revision: https://reviews.llvm.org/D48426 llvm-svn: 335466
* [llvm-exegesis] Generate snippet setup code.Clement Courbet2018-06-2513-31/+324
| | | | | | | | | | | | | | | Summary: This ensures that the snippet always sees the same values for registers, making measurements reproducible. This will also allow exploring different values. Reviewers: gchatelet Subscribers: tschuett, llvm-commits Differential Revision: https://reviews.llvm.org/D48542 llvm-svn: 335465
* [ASTImporter] Add ms compatibility to tests which use the TestBaseGabor Marton2018-06-253-296/+283
| | | | | | | | | | | | | | | | | | Summary: In order to avoid build failures on MS, we use -fms-compatibility too in the tests which use the TestBase. Moved the family of `testImport` functions under a test fixture class, so we can use parameterized tests. Refactored `testImport` and `testImportSequence`, because `for` loops over the different compiler options is no longer needed, that is handeld by the test framework via parameters from now on. Reviewers: a.sidorin, r.stahl, xazax.hun Subscribers: rnkovacs, dkrupp, cfe-commits Differential Revision: https://reviews.llvm.org/D47367 llvm-svn: 335464
* Revert change 335077 "[InlineSpiller] Fix a crash due to lack of forward ↵Artur Pilipenko2018-06-252-97/+0
| | | | | | | | | | progress from remat specifically for STATEPOINT" This change caused widespread assertion failures in our downstream testing: lib/CodeGen/LiveInterval.cpp:409: bool llvm::LiveRange::overlapsFrom(const llvm::LiveRange&, llvm::LiveRange::const_iterator) const: Assertion `!empty() && "empty range"' failed. llvm-svn: 335462
* Revert change 335091. Artur Pilipenko2018-06-251-55/+0
| | | | | | It adds extra test for the change 335077, which is also to be reverted as it causes test failures in downstream testing. llvm-svn: 335461
* [ELF] - ICF: Remove dead code. NFC.George Rimar2018-06-251-3/+0
| | | | | | | | | | | | Code is dead. We use only InputSections when building the list of sections elegible for the ICF: https://github.com/llvm-mirror/lld/blob/master/ELF/ICF.cpp#L439 And 'isEligible' filters out SyntheticSections as well for us. That way the only Kind we have in the Sections vector is SectionBase::Regular, so we do not need to check sections kind at all, it is always the same. llvm-svn: 335460
* [clang-format] Keep @message together in text protosKrasimir Georgiev2018-06-253-3/+39
| | | | | | | | | | | | Summary: In C++ code snippets of the form `@field` are common. This makes clang-format keep them together in text protos, whereas before it would break them. Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D48543 llvm-svn: 335459
* [clangd] Always remove dots before converting paths to URIs in symbol collector.Eric Liu2018-06-251-1/+2
| | | | llvm-svn: 335458
* Use APInt[] bit access to avoid "32-bit shift implicitly converted to 64 ↵Simon Pilgrim2018-06-251-1/+1
| | | | | | bits" MSVC warning (again). NFCI. llvm-svn: 335457
* [llvm-exegesis][NFC] Simplify BenchmarkRunner ctor.Clement Courbet2018-06-251-2/+1
| | | | llvm-svn: 335456
* [ASTImporter] Add new tests about templated-described swingGabor Marton2018-06-251-0/+60
| | | | | | | | | | | | | | | Summary: Add a new test about importing a partial specialization (of a class). Also, this patch adds new tests about the templated-described swing, some of these fail ATM, but subsequent patches will fix them. Reviewers: a.sidorin, r.stahl, xazax.hun Subscribers: rnkovacs, dkrupp, cfe-commits Differential Revision: https://reviews.llvm.org/D47534 llvm-svn: 335455
* Use APInt[] bit access to avoid "32-bit shift implicitly converted to 64 ↵Simon Pilgrim2018-06-251-1/+1
| | | | | | bits" MSVC warning. NFCI. llvm-svn: 335454
* [ELF] - ICF: test we do not merge sectinons which relocations points to ↵George Rimar2018-06-251-0/+20
| | | | | | | | | | | symbols of the different types. This test case covers the following line of code: https://github.com/llvm-mirror/lld/blob/master/ELF/ICF.cpp#L261 Previously it was uncovered. llvm-svn: 335453
* [llvm-exegesis][NFC] clang-formatClement Courbet2018-06-256-20/+19
| | | | llvm-svn: 335452
* Fix -Wparentheses gcc warning. NFCI.Simon Pilgrim2018-06-251-1/+1
| | | | llvm-svn: 335451
* [llvm-exegesis][NFC] Fix `Operand` class comments.Clement Courbet2018-06-251-2/+2
| | | | llvm-svn: 335450
* [clang-format] Fix end-of-file comments text proto formattingKrasimir Georgiev2018-06-252-0/+29
| | | | | | | | | | | | | | | | | | | | Summary: The case of end-of-file comments was formatted badly: ``` key: value # end-of-file comment ``` This patch fixes that formatting: ``` key: value # end-of-file comment ``` Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D48539 llvm-svn: 335449
* Revert "[FileSpec] Always normalize"Jonas Devlieghere2018-06-251-6/+104
| | | | | | | | This reverts r335432 because remove_dots() is expensive and measuring its impact showed an observable performance regression (https://reviews.llvm.org/D45977#1078510). llvm-svn: 335448
* [ELF] - Replace llvm::find_if with the loop. NFC.George Rimar2018-06-251-4/+3
| | | | | | Requested during post commit review. llvm-svn: 335447
* [X86] Block commuting operand 1 of FMA*_Int instructions in ↵Craig Topper2018-06-252-88/+47
| | | | | | | | | | | | findThreeSrcCommutedOpIndices. Remove uncommutable returns from getThreeSrcCommuteCase/getFMA3OpcodeToCommuteOperands. We should be blocking the operand while we are in the routine that tries to find commutable operand indices. Doing it later means we might have missed out on another valid set of operands we could have commuted. The intrinsic case was the only case that could really prevent commuting in getFMA3OpcodeToCommuteOperands. All the other cases in getThreeSrcCommuteCase were not reachable conditions as they were protected by findThreeSrcCommutedOpIndices. With that abort case pushed earlier, we can remove all the abort checks and replace with asserts. llvm-svn: 335446
* [CodeGen] Provide source locations for UBSan type checks when emitting ↵Igor Kudrin2018-06-253-8/+36
| | | | | | | | constructor calls. Differential Revision: https://reviews.llvm.org/D48531 llvm-svn: 335445
* [MSSA] Add domination number verifier; NFCGeorge Burgess IV2018-06-252-0/+40
| | | | | | | | | | | It's easy for domination numbers to get out-of-date, and this is no more costly than any of the other verifiers we already have, so it seems nice to have. A stage3 build with this Works On My Machine, so this hasn't caught any bugs... yet. :) llvm-svn: 335444
* One more build fix for non MSVC compilers.Zachary Turner2018-06-251-6/+6
| | | | llvm-svn: 335443
* Try to fix build error on non MSVC compilers.Zachary Turner2018-06-251-3/+5
| | | | llvm-svn: 335442
* Fix CRLF line endings.Zachary Turner2018-06-251-2/+2
| | | | llvm-svn: 335441
* Add a TaskQueue that can serialize work on a ThreadPool.Zachary Turner2018-06-253-0/+243
| | | | | | | | | | | | We have ThreadPool, which can execute work asynchronously on N background threads, but sometimes you need to make sure the work is executed asynchronously but also serially. That is, if task B is enqueued after task A, then task B should not begin until task A has completed. This patch adds such a class. Differential Revision: https://reviews.llvm.org/D48240 llvm-svn: 335440
* [WebAssembly] Add WebAssemblyException information analysisHeejin Ahn2018-06-258-2/+939
| | | | | | | | | | | | | | | | | Summary: A WebAssemblyException object contains BBs that belong to a 'catch' part of the try-catch-end structure. Because CFGSort requires all the BBs within a catch part to be sorted together as it does for loops, this pass calculates the nesting structure of catch part of exceptions in a function. Now this assumes the use of Windows EH instructions. Reviewers: dschuff, majnemer Subscribers: jfb, mgorny, sbc100, jgravelle-google, sunfish, llvm-commits Differential Revision: https://reviews.llvm.org/D44134 llvm-svn: 335439
* [WebAssembly] Add WebAssemblyLateEHPrepare passHeejin Ahn2018-06-256-98/+462
| | | | | | | | | | | | | | | | Summary: Add WebAssemblyLateEHPrepare pass that does several small jobs for exception handling. This runs before CFGSort, and is different from WasmEHPrepare pass that runs before ISel, even though the names are similar. Reviewers: dschuff, majnemer Subscribers: sbc100, jgravelle-google, sunfish, mgorny, llvm-commits Differential Revision: https://reviews.llvm.org/D46803 llvm-svn: 335438
* [X86] Simplify some code by using isOneConstant. NFCCraig Topper2018-06-251-2/+1
| | | | llvm-svn: 335437
* [X86] Remove the changes to combineScalarToVector made in r335037.Craig Topper2018-06-252-27/+6
| | | | | | They appear to be untested other than the test case for p37879.ll and I believe we should be using SimplifyDemandedElts here to handle these cases. llvm-svn: 335436
* [X86] Reduce the number of patterns needed for masked scalar ceil/floor isel.Craig Topper2018-06-251-35/+10
| | | | | | The scalar to vector on the mask register should not be part of the patterns. llvm-svn: 335435
* [mips][ias] Enable IAS by default for OpenBSD / FreeBSD mips64/mips64el.Brad Smith2018-06-241-0/+5
| | | | | | | | Reviewers: atanasyan Differential Review: https://reviews.llvm.org/D31557 llvm-svn: 335434
OpenPOWER on IntegriCloud