summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Address review feedback by adding comments about ${:uid}Reid Kleckner2016-12-071-3/+5
| | | | llvm-svn: 288868
* IR: Reduce the amount of boilerplate required for a metadata kind. NFCI.Peter Collingbourne2016-12-061-107/+29
| | | | llvm-svn: 288867
* [c++17] P0135R1: Guaranteed copy elision.Richard Smith2016-12-0618-68/+428
| | | | | | | | When an object of class type is initialized from a prvalue of the same type (ignoring cv qualifications), use the prvalue to initialize the object directly instead of inserting a redundant elidable call to a copy constructor. llvm-svn: 288866
* AMDGPU: Add llvm.amdgcn.interp.mov intrinsicTom Stellard2016-12-063-1/+19
| | | | | | | | | | Reviewers: arsenm, nhaehnle Subscribers: kzhuravl, wdng, yaxunl, tony-tye, llvm-commits Differential Revision: https://reviews.llvm.org/D26725 llvm-svn: 288865
* [llc] Fix -stop-after=consthoist initializing the pass.Davide Italiano2016-12-061-0/+1
| | | | llvm-svn: 288864
* [OpenMP] Fix typo in the run command in the test case. NFC.Kelvin Li2016-12-061-2/+2
| | | | llvm-svn: 288862
* AMDGPU: Fix crash on i16 constant expressionMatt Arsenault2016-12-062-2/+31
| | | | llvm-svn: 288861
* [XRay][compiler-rt] Explicitly add dependency to pthreadDean Michael Berris2016-12-061-0/+1
| | | | | | | | This should fix the sanitizer bootstrap builds. Follow-up to D26232. llvm-svn: 288860
* LowerTypeTests: Improve performance by optimising type metadata queries.Peter Collingbourne2016-12-061-88/+129
| | | | | | | | | | | | | | | | | | | | | | Requesting metadata for a global is a relatively expensive operation as it involves a map lookup, but it's one that we need to do relatively frequently in this pass to collect the list of type metadata nodes associated with a global. This change improves the performance of type metadata queries by prebuilding data structures that keep the global together with its list of type metadata, and changing the pass to use that data structure wherever we were previously passing global references around. This change also eliminates some O(N^2) behavior by collecting the list of globals associated with each type identifier during the first pass over the list of globals rather than visiting each global to compute that list every time we add a new type identifier. Reduces pass runtime on a module containing Chrome's vtables from over 60s to 0.9s. Differential Revision: https://reviews.llvm.org/D27484 llvm-svn: 288859
* [X86][XOP] Add test case for PR31296Simon Pilgrim2016-12-061-0/+20
| | | | llvm-svn: 288858
* [CodeGen] Fix result type for SMULO/UMULO legalizationEli Friedman2016-12-062-0/+41
| | | | | | | | | | | | | | | On some platforms (like MSP430) the second element of the result structure for SMULO/UMULO may have a shorter type than the one returned by SetCC. We need to truncate it to the right type, or else some incorrect code may be generated later on. This fixes issue https://github.com/rust-lang/rust/issues/37829 Patch by Vadzim Dambrouski! Differential Revision: https://reviews.llvm.org/D27154 llvm-svn: 288857
* AMDGPU: Fix operand name for v_interp_*Matt Arsenault2016-12-062-17/+17
| | | | | | Other VOP instructions call the output vdst llvm-svn: 288856
* [InstSimplify] fixed (?) to not mutate icmpsSanjay Patel2016-12-063-10/+56
| | | | | | | | | | | | | | As Eli noted in the post-commit thread for r288833, the use of swapOperands() may not be allowed in InstSimplify, so I'm removing those calls here pending further review. The swap mutates the icmp, and there doesn't appear to be precedent for instruction mutation in InstSimplify. I didn't actually have any tests for those cases, so I'm adding a few here. llvm-svn: 288855
* Replace "|&" with "2>&1 |" to support bash pre-4Evgeniy Stepanov2016-12-065-6/+6
| | | | | | | | | | | | | | Summary: Old bash release (3.2) on SLES11 chokes on new redirection shortcut. Patch by Brian Cain. Reviewers: eugenis Subscribers: llvm-commits, kubabrecka Differential Revision: https://reviews.llvm.org/D27443 llvm-svn: 288854
* [IR] Fix some Clang-tidy modernize-use-equals-delete and Include What You ↵Eugene Zelenko2016-12-0614-160/+249
| | | | | | Use warnings; other minor fixes (NFC). llvm-svn: 288853
* AMDGPU/SI: Set correct value for amd_kernel_code_t::kernarg_segment_alignmentTom Stellard2016-12-063-0/+37
| | | | | | | | | | Reviewers: arsenm Subscribers: kzhuravl, wdng, nhaehnle, yaxunl, llvm-commits, tony-tye Differential Revision: https://reviews.llvm.org/D27416 llvm-svn: 288852
* [BDCE/DebugInfo] Preserve llvm.dbg.value's argument.Davide Italiano2016-12-062-0/+51
| | | | | | | | | | | | | | | | | | | | | | | | BDCE has two phases: 1. It asks SimplifyDemandedBits if all the bits of an instruction are dead, and if so, replaces all its uses with the constant zero. 2. Then, it asks SimplifyDemandedBits again if the instruction is really dead (no side effects etc..) and if so, eliminates it. Now, in 1) if all the bits of an instruction are dead, we may end up replacing a dbg use: %call = tail call i32 (...) @g() #4, !dbg !15 tail call void @llvm.dbg.value(metadata i32 %call, i64 0, metadata !8, metadata !16), !dbg !17 -> %call = tail call i32 (...) @g() #4, !dbg !15 tail call void @llvm.dbg.value(metadata i32 0, i64 0, metadata !8, metadata !16), !dbg !17 but not eliminating the call because it may have arbitrary side effects. In other words, we lose some debug informations. This patch fixes the problem making sure that BDCE does nothing with the instruction if it has side effects and no non-dbg uses. Differential Revision: https://reviews.llvm.org/D27471 llvm-svn: 288851
* Disable -Wweak-vtables when there are no key functionsReid Kleckner2016-12-062-14/+21
| | | | | | | | | | | | Our -Wweak-vtables diagnostic is powered by our key function calculation, which checks if key functions are enabled. We won't find any key functions in C++ ABIs that lack key functions, so -Wweak-vtables was warning on every dynamic class before this change. So, turn off this warning in ABIs without key functions. Addresses PR31220 llvm-svn: 288850
* AMDGPU/SI: Don't move copies of immediates to the VALUTom Stellard2016-12-062-1/+68
| | | | | | | | | | | | | | | Summary: If we write an immediate to a VGPR and then copy the VGPR to an SGPR, we can replace the copy with a S_MOV_B32 sgpr, imm, rather than moving the copy to the SALU. Reviewers: arsenm Subscribers: kzhuravl, wdng, nhaehnle, yaxunl, llvm-commits, tony-tye Differential Revision: https://reviews.llvm.org/D27272 llvm-svn: 288849
* GlobalISel: correctly handle small args via memory.Tim Northover2016-12-062-1/+10
| | | | | | | We were rounding size in bits down rather than up, leading to 0-sized slots for i1 (assert!) and bugs for other types not byte-aligned. llvm-svn: 288848
* [X86] Prefer reduced width multiplication over pmulld on SilvermontZvi Rackover2016-12-065-3/+93
| | | | | | | | | | | | | | | | | | | | Summary: Prefer expansions such as: pmullw,pmulhw,unpacklwd,unpackhwd over pmulld. On Silvermont [source: Optimization Reference Manual]: PMULLD has a throughput of 1/11 [instruction/cycles]. PMULHUW/PMULHW/PMULLW have a throughput of 1/2 [instruction/cycles]. Fixes pr31202. Analysis of this issue was done by Fahana Aleen. Reviewers: wmi, delena, mkuper Subscribers: RKSimon, llvm-commits Differential Revision: https://reviews.llvm.org/D27203 llvm-svn: 288844
* [llgo] Remove support for LLVM attributesMeador Inge2016-12-061-32/+0
| | | | | | | | | | llgo supports the application of LLVM attributes to global objects and functions. This "feature" is undocumented and untested. As discusses in D27442, it should be removed. Differential Revision: https://reviews.llvm.org/D27474 llvm-svn: 288843
* [DAGCombine] Add (sext_in_reg (zext x)) -> (sext x) combineSimon Pilgrim2016-12-062-12/+9
| | | | | | | | Handle the case where a sign extension has ended up being split into separate stages (typically to get around vector legal ops) and a zext + sext_in_reg gets inserted. Differential Revision: https://reviews.llvm.org/D27461 llvm-svn: 288842
* [InstSimplify] add folds for and-of-icmps with same operandsSanjay Patel2016-12-062-197/+91
| | | | | | | | | | | All of these (and a few more) are already handled by InstCombine, but we shouldn't have to wait until then to simplify these because they're cheap to deal with here in InstSimplify. This is the 'and' sibling of the earlier 'or' patch: https://reviews.llvm.org/rL288833 llvm-svn: 288841
* GlobalISel: fall back gracefully when we hit unhandled legalizer default.Tim Northover2016-12-062-1/+11
| | | | llvm-svn: 288840
* [SelectionDAG] We can ignore knownbits from an undef shuffle vector index if ↵Simon Pilgrim2016-12-062-5/+26
| | | | | | we don't actually demand that element llvm-svn: 288839
* [OpenMP] Fix typo in the test case. NFC.Kelvin Li2016-12-061-2/+1
| | | | llvm-svn: 288838
* [InstSimplify] add tests for and-of-icmps; NFCSanjay Patel2016-12-061-0/+1352
| | | | llvm-svn: 288837
* GlobalISel: handle G_SEQUENCE fallbacks gracefully.Tim Northover2016-12-063-0/+16
| | | | | | | | | | There were two problems: + AArch64 was reusing random data from its binary op tables, which is complete nonsense for G_SEQUENCE. + Even when AArch64 gave up and said it couldn't handle G_SEQUENCE, the generic code asserted. llvm-svn: 288836
* GlobalISel: allow G_SELECT instructions for pointers.Tim Northover2016-12-063-5/+17
| | | | llvm-svn: 288835
* GlobalISel: stop the legalizer from trying to handle oddly-sized types.Tim Northover2016-12-062-0/+13
| | | | | | | | It'll almost immediately fail because it always tries to half/double the size until it finds a legal one. Unfortunately, this triggers an assertion preventing the DAG fallback from being possible. llvm-svn: 288834
* [InstSimplify] add folds for or-of-icmps with same operandsSanjay Patel2016-12-062-200/+93
| | | | | | | | All of these (and a few more) are already handled by InstCombine, but we shouldn't have to wait until then to simplify these because they're cheap to deal with here in InstSimplify. llvm-svn: 288833
* [ELF] - Teach LLD to recognize PT_OPENBSD_BOOTDATAGeorge Rimar2016-12-062-0/+8
| | | | | | | | | | | Minor patch to fix PR31288 OpenBSD commit: https://github.com/openbsd/src/commit/d39116912b9536bd77326260dc5c6e593fd4ee24 Differential revision: https://reviews.llvm.org/D27458 llvm-svn: 288832
* [llvm-readobj] - Teach readobj to print PT_OPENBSD_BOOTDATA headerGeorge Rimar2016-12-063-1/+16
| | | | | | | | | | | | | These are OpenBSD specific program headers. OpenBSD commit: https://github.com/openbsd/src/commit/d39116912b9536bd77326260dc5c6e593fd4ee24 It is required for fixing PR31288. Differential revision: https://reviews.llvm.org/D27456 llvm-svn: 288831
* [InstSimplify] add tests for or-of-icmps; NFCSanjay Patel2016-12-061-0/+1352
| | | | llvm-svn: 288830
* [CMake] Fixing clang standalone buildChris Bieneman2016-12-062-2/+4
| | | | | | I broke this in r288770. llvm-svn: 288829
* Fix FileCheck pattern.Joerg Sonnenberger2016-12-061-2/+2
| | | | llvm-svn: 288828
* Allow additional output since e.g. OSX appends flags likeJoerg Sonnenberger2016-12-061-2/+2
| | | | | | | | "-mlinker-version=264.3.102" automatically. Wiring down a target on the other hand is problematic as this actually needs to run codegen and doesn't work with -###. llvm-svn: 288827
* [MS ABI] Implement more of the Itanium mangling rulesDavid Majnemer2016-12-062-21/+77
| | | | | | | | | | | | We didn't implement handle corner cases like: - lambdas used to initialize a field - lambdas in default argument initializers This fixes PR31197. Differential Revision: https://reviews.llvm.org/D27226 llvm-svn: 288826
* [X86][SSE] Add knownbits test demonstrating demandedelts not ignoring undef ↵Simon Pilgrim2016-12-061-0/+21
| | | | | | shuffle elements llvm-svn: 288825
* Make test case slightly more robust by explicitly passing --sysroot.Joerg Sonnenberger2016-12-061-3/+3
| | | | | | Otherwise it would change when DEFAULT_SYSROOT is provided. llvm-svn: 288823
* If clang was configured for a DEFAULT_SYSROOT and no --sysroot argumentJoerg Sonnenberger2016-12-061-0/+5
| | | | | | is seen, record one with the implicit default. llvm-svn: 288822
* Allow clang to write compilation database records.Joerg Sonnenberger2016-12-065-1/+81
| | | | | | | | | | | | | | | | | | | | When integrating compilation database output into existing build systems, two approaches dominate so far. Ad-hoc implementation of the JSON output rules or using compiler wrappers. This patch adds a new option "-MJ foo.json" which gives a slightly cleaned up compilation record. The output is a fragment, i.e. you still need to add the array markers, but it allows multiple files to be easy merged. This way the only change in a build system is adding the option with potentially a per-target output file and merging the files with something like (echo '['; cat *.o.json; echo ']' > compilation_database.json or some additional filtering to remove the trailing comma for strict JSON compliance. Differential Revision: https://reviews.llvm.org/D27140 llvm-svn: 288821
* [X86][SSE] Added vector sext_in_reg combine testsSimon Pilgrim2016-12-061-0/+58
| | | | llvm-svn: 288819
* Fix doc string typo: s/@__yes/@__objc_yes/Jonathan Roelofs2016-12-061-1/+1
| | | | llvm-svn: 288818
* Removed trailing whitespaces. NFC.George Rimar2016-12-061-1/+1
| | | | llvm-svn: 288817
* [Support/ELF] - Add OpenBSD PT_OPENBSD_BOOTDATA constant.George Rimar2016-12-061-1/+2
| | | | | | | OpenBSD commit for reference: https://github.com/openbsd/src/commit/d39116912b9536bd77326260dc5c6e593fd4ee24 llvm-svn: 288816
* [X86] Improve UMAX/UMIN knownbits testSimon Pilgrim2016-12-061-36/+8
| | | | | | Test the sequential effect of each op llvm-svn: 288815
* Avoid repeated calls to Op.getOpcode(). NFCI.Simon Pilgrim2016-12-061-3/+4
| | | | llvm-svn: 288814
* Fix two clang-tidy misc-move-forwarding-reference warningsMalcolm Parsons2016-12-062-2/+2
| | | | | | Patch by Michael Sharpe. llvm-svn: 288813
OpenPOWER on IntegriCloud