summaryrefslogtreecommitdiffstats
path: root/llvm
Commit message (Collapse)AuthorAgeFilesLines
* [GlobalsAA] Partially back out r248576James Molloy2016-01-072-72/+0
| | | | | | | | | | | | | | | | | | | See PR25822 for a more full summary, but we were conflating the concepts of "capture" and "escape". We were proving nocapture and using that proof to infer noescape, which is not true. Escaped-ness is a function-local property - as soon as a value is used in a call argument it escapes. Capturedness is a related but distinct property. It implies a *temporally limited* escape. Consider: static int a; int b; int g(int * nocapture arg); int f() { a = 2; // Even though a escapes to g, it is not captured so can be treated as non-escaping here. g(&a); // But here it must be treated as escaping. g(&b); // Now that g(&a) has returned we know it was not captured so we can treat it as non-escaping again. } The original commit did not sufficiently understand this nuance and so caused PR25822 and PR26046. r248576 included both a performance improvement (which has been backed out) and a related conformance fix (which has been kept along with its testcase). llvm-svn: 257058
* [AVX512] add PSHUFHW and PSHUFLW Intrinsic Michael Zuckerman2016-01-074-0/+174
| | | | | | Differential Revision: http://reviews.llvm.org/D15925 llvm-svn: 257056
* [X86][AVX] Match broadcast loads through a bitcastSimon Pilgrim2016-01-073-13/+10
| | | | | | | | AVX1 v8i32/v4i64 shuffles are bitcasted to v8f32/v4f64, this patch peeks through bitcasts to check for a load node to allow broadcasts to occur. Follow up to D15310 llvm-svn: 257055
* Added AVRTargetObjectFile class and AVR.hDylan McKay2016-01-074-0/+130
| | | | llvm-svn: 257049
* Mark arm as the 32bit variant of aarch64 in TripleTamas Berghammer2016-01-071-28/+28
| | | | | | | | | | Change Triple::get32BitArchVariant to return arm/armeb as the 32bit variant of aarch64/aarch64_be and do the same change for the oppoiste direction in Triple::get64BitArchVariant. Differential revision: http://reviews.llvm.org/D15529 llvm-svn: 257048
* Remove extra whitespace. NFC.Junmo Park2016-01-071-1/+1
| | | | llvm-svn: 257047
* [X86][SSE} Add INSERTPS as a target shuffleSimon Pilgrim2016-01-072-3/+50
| | | | | | Follow up to D15378, added INSERTPS to the list of decodable target shuffles and enabled XFormVExtractWithShuffleIntoLoad to handle target shuffles with SentinelZero and tested this with INSERTPS. llvm-svn: 257046
* [AVX512] add PSHUFD IntrinsicMichael Zuckerman2016-01-074-0/+87
| | | | | | Differential Revision: http://reviews.llvm.org/D15934 llvm-svn: 257044
* ARM: support TLS accesses on Darwin platformsTim Northover2016-01-0711-8/+297
| | | | | | | | Darwin TLS accesses most closely resemble ELF's general-dynamic situation, since they have to be able to handle all possible situations. The descriptors and so on are obviously slightly different though. llvm-svn: 257039
* Modernize to range-based loopMichael Liao2016-01-071-4/+2
| | | | llvm-svn: 257037
* [SystemZ] Add hasSideEffects flag on Serialize instruction.Jonas Paulsson2016-01-071-0/+3
| | | | | | | | | | Serialize will perform a hardware serialization operation, and is acting as a memory barrier. Therefore it must have the hasSideEffects flag set so it will be treated as a global memory object. Reviewed by Ulrich Weigand llvm-svn: 257036
* [X86] Remove superfluous mayLoad flag. The pattern already implies it.Craig Topper2016-01-071-3/+1
| | | | llvm-svn: 257035
* [X86] Had hasSideEffects=0 to VBROADCASTI128.Craig Topper2016-01-071-1/+1
| | | | llvm-svn: 257034
* [X86] Add OpSize32 to MOVSX32_NOREX instructions to match their other versions.Craig Topper2016-01-071-4/+4
| | | | llvm-svn: 257033
* [X86] Add hasSideEffects=0 and mayLoad=1 to MOVZX64* instructions. While ↵Craig Topper2016-01-072-14/+18
| | | | | | there remove a superfluous _Q from the instruction names. llvm-svn: 257032
* llvm/test/CodeGen/X86/statepoint-vector.ll REQUIRES asserts due to a debug ↵NAKAMURA Takumi2016-01-071-0/+1
| | | | | | option. llvm-svn: 257031
* [X86] STOSQ without a rep prefix doesn't read or write RCX.Craig Topper2016-01-071-1/+1
| | | | llvm-svn: 257030
* Undo spurious change made in r256965David Majnemer2016-01-071-2/+1
| | | | llvm-svn: 257028
* One more attempt at stablizing a test on all platforms.Philip Reames2016-01-071-1/+1
| | | | llvm-svn: 257026
* [Statepoints] Add test cases around vectors and stablize testPhilip Reames2016-01-072-1/+34
| | | | | | | | | | Unlike my comment in 257022 said, it turns out we do handle constant vectors in the statepoint lowering, but only because SelectionDAG doesn't actually produce constants for them. Add a couple of tests which show this working. Also, add a triple to the same test file to hopefully fix a failing bot. It turns out we do han llvm-svn: 257025
* [AArch64 MachineCombine] Enhance/Add support for general reassociation to ↵Haicheng Wu2016-01-073-11/+308
| | | | | | | | reduce the critical path Allow fadd/fmul to be reassociated in aarch64. llvm-svn: 257024
* [Statepoints] Initial support for relocating vectors of pointersPhilip Reames2016-01-075-19/+154
| | | | | | | | | | | | Currently, we try to split vectors of pointers back into their component pointer elements during rewrite-statepoints-for-gc. This is less than ideal since presumably the vectorizer chose to vectorize for a reason. :) It's also been a source of bugs - in particular, the relocation logic as currently implemented was recently discovered to be wrong. The alternate approach is to allow gc.relocates of vector-of-pointer type and update the backend to handle them. That's what this patch tries to do. This won't actually enable vector-of-pointers in practice - there are some RS4GC changes needed - but the lowering is standalone and testable so it makes sense to separate. Note that there are some known cases around vector constants which this patch does not handle. Once this is in, I'll send another patch with individual fixes and test cases. Differential Revision: http://reviews.llvm.org/D15632 llvm-svn: 257022
* [WebAssembly] Add -m:e to the target triple.Dan Gohman2016-01-0747-51/+52
| | | | | | | This enables ELF-style name mangling, which primarily means using ".L" for private symbols. llvm-svn: 257020
* [Linker] Also treat a DIImportedEntity scope DISubprogram as needed.Ahmed Bougacha2016-01-072-15/+25
| | | | | | | | | Follow-up to r257000: DIImportedEntity can reach a DISubprogram via its entity, but also via its scope. Handle the latter case as well. PR26037. llvm-svn: 257019
* [RS4GC] Add an option to suppress vector splittingPhilip Reames2016-01-071-9/+20
| | | | | | At the moment, this is essentially a diangostic option so that I can start collecting failing test cases, but we will eventually migrate to removing the vector splitting code entirely. llvm-svn: 257015
* [libFuzzer] add a position hint to the dictionary-based mutatorKostya Serebryany2016-01-076-33/+100
| | | | llvm-svn: 257013
* [ShrinkWrapping] Give up on irreducible CFGs.Quentin Colombet2016-01-072-0/+108
| | | | | | | | | | | We need to know whether or not a given basic block is in a loop for the analysis to be correct. Loop information may be incomplete on irreducible CFGs, therefore we may generate incorrect code if we use it in those situations. This fixes PR25988. llvm-svn: 257012
* tools/llvm-config: improve shared library supportAndrew Wilkins2016-01-076-50/+103
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: r252532 added support for reporting the monolithic library when LLVM_BUILD_LLVM_DYLIB is used. This would only be done if the individual components were not found, and the dynamic library is found. This diff extends this as follows: - If LLVM_LINK_LLVM_DYLIB is set, then prefer the shared library, even if all component libraries exist. - Two flags, --link-shared and --link-static are introduced to provide explicit guidance. If --link-shared is passed and the shared library does not exist, an error results. Additionally, changed the expected shared library names from (e.g.) LLVM-3.8.0 to LLVM-3.8. The former exists only in an installation (and then only in CMake builds I think?), and not in the build tree; this breaks usage of llvm-config during builds, e.g. by llvm-go. Reviewers: DiamondLovesYou, beanz Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D15033 llvm-svn: 257003
* Always treat DISubprogram reached by DIImportedEntity as needed.Teresa Johnson2016-01-073-1/+64
| | | | | | | | | | It is illegal to have a null entity in a DIImportedEntity, so we must link in a DISubprogram metadata node referenced by one, even if the associated function is not linked in or inlined anywhere. Fixes PR26037. llvm-svn: 257000
* Fix PR26051: Memcpy optimization should introduce a call to memcpy before ↵Mehdi Amini2016-01-062-2/+18
| | | | | | | | | | the store destination position This is a conservative fix, I expect Amaury to relax this. Follow-up for r256923 From: Mehdi Amini <mehdi.amini@apple.com> llvm-svn: 256999
* rangify; NFCISanjay Patel2016-01-061-56/+31
| | | | llvm-svn: 256998
* [X86] Determine if target shuffle can contain zero elementsSimon Pilgrim2016-01-061-15/+17
| | | | | | | | | | | | | | getTargetShuffleMask may return shuffle masks with SM_SentinelZero (-2) values (currently just for PSHUFB but VPERM2X128 as well with this patch). Although some calling functions can make use of this (mainly for shuffle combining), others can not and their inclusion makes shuffle mask comparisons more difficult. This patch adds a flag to getTargetShuffleMask to indicate if the calling function can't handle SM_SentinelZero; getTargetShuffleMask will then return false if it occurs to make handling much easier. I've tidied up some uses of getTargetShuffleMask to better indicate what is going on - more could be done but at present I don't have test cases to demonstrate it. Some upcoming patches will make use of this to both support more uses where SM_SentinelZero is not permitted (e.g. combineShuffleToAddSub), and also will allow us to add INSERTPS support to getTargetShuffleMask as part of better zero handling discussed in D14261. Differential Revision: http://reviews.llvm.org/D15378 llvm-svn: 256992
* [Bitcode] Remove superflous compatibility testsVedant Kumar2016-01-061-4/+0
| | | | | | | | With r256990, bogner introduced comprehensive tests for constant arrays and vectors. We no longer need the existing ones because they are redundant. llvm-svn: 256991
* Bitcode: Move these tests into compatibility.llJustin Bogner2016-01-062-32/+30
| | | | | | | | I added a couple of tests in r256982, but vedantk suggested that they fit better into compatibility.ll, since they could catch format breaks later on there. llvm-svn: 256990
* Recommit r256952 "Filtering IR printing for print-after-all/print-before-all"Weiming Zhao2016-01-067-8/+51
| | | | | | | | Fix lit test fail due to outputting an extra line. Differential Revision: http://reviews.llvm.org/D15776 llvm-svn: 256987
* Bitcode: Fix reading and writing of ConstantDataVectors of halfsJustin Bogner2016-01-063-23/+47
| | | | | | | | | | | | In r254991 I allowed ConstantDataVectors to contain elements of HalfTy, but I missed updating the bitcode reader and writer to handle this, so now we crash if we try to emit bitcode on programs that have constant vectors of half. This fixes the issue and adds test coverage for reading and writing constant sequences in bitcode. llvm-svn: 256982
* AMDGPU/SI: Fix crash when inline assembly is used in a graphics shaderNicolai Haehnle2016-01-062-0/+14
| | | | | | | | | | | | | | | Summary: This is admittedly something that you could only run into by manually playing around with shader assembly because the SITypeWriter pass is skipped for compute. Reviewers: arsenm, tstellarAMD Subscribers: arsenm, llvm-commits Differential Revision: http://reviews.llvm.org/D15902 llvm-svn: 256980
* [LibCallSimplifier] less indenting; NFCISanjay Patel2016-01-061-52/+51
| | | | llvm-svn: 256973
* [SplitLandingPadPredecessors] Create a PHINode for the original landingpad ↵Chen Li2016-01-062-5/+44
| | | | | | | | | | | | | | only if it has some uses Summary: This patch adds a check in SplitLandingPadPredecessors to see if the original landingpad instruction has any uses. If not, we don't need to create a PHINode for it in the joint block since it's gonna be a dead code anyway. The motivation for this patch is that we found a bug that SplitLandingPadPredecessors created a PHINode of token type landingpad, which failed the verifier since PHINode can not be token type. However, the created PHINode will never be used in our code pattern. This patch will workaround this bug, and we might add supports in SplitLandingPadPredecessors to handle token type landingpad with uses in the future. Reviewers: reames Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D15835 llvm-svn: 256972
* Promote aggregate store to memset when possibleAmaury Sechet2016-01-062-5/+33
| | | | | | | | | | | | Summary: As per title. This will allow the optimizer to pick up on it. Reviewers: craig.topper, spatel, dexonsmith, Prazek, chandlerc, joker.eph, majnemer Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D15923 llvm-svn: 256969
* Remove useless DEBUGAmaury Sechet2016-01-061-1/+0
| | | | llvm-svn: 256968
* Consolidate MemRefs handling from BranchFolding and correct latent bugPhilip Reames2016-01-062-18/+35
| | | | | | | | | | | | Move the logic from BranchFolding to use the shared infrastructure for merging MMOs introduced in 256909. This has the effect of making BranchFolding more capable. In the process, fix a latent bug. The existing handling for merging didn't handle the case where one of the instructions being merged had overflowed and dropped MemRefs. This was a latent bug in the places the code was commoned from, but potentially reachable in BranchFolding. Once this is in, we're left with a single place to consider implementing MMO unique-ing as proposed in http://reviews.llvm.org/D15230. Differential Revision: http://reviews.llvm.org/D15913 llvm-svn: 256966
* [WinEH] Remove calculateCatchReturnSuccessorColorsDavid Majnemer2016-01-064-28/+9
| | | | | | | | | | | | | | The functionality that calculateCatchReturnSuccessorColors provides was once non-trivial: it was a computation layered on top of funclet coloring. These days, LLVM IR directly encodes what calculateCatchReturnSuccessorColors computed, obsoleting the need for it. No functionality change is intended. llvm-svn: 256965
* [LibCallSimplifier] use instruction-level fast-math-flags for tan/atan transformSanjay Patel2016-01-062-12/+14
| | | | llvm-svn: 256964
* [X86] Correctly model TLS calls w.r.t. frame requirements.Quentin Colombet2016-01-063-1/+53
| | | | | | | | | TLS calls need the stack frame to be properly set up and this implies that such calls need ADJUSTSTACK_xxx markers. Fixes PR25820. llvm-svn: 256959
* Make WinCOFFObjectWriter.cpp's timestamp writing not use ENABLE_TIMESTAMPSNico Weber2016-01-065-13/+31
| | | | | | | | | | | | | | | | | | | | | LLVM_ENABLE_TIMESTAMPS controls if timestamps are embedded into llvm's binaries. Turning it off is useful for deterministic builds. r246905 made it so that the define suddenly also controls if the binaries that the llvm binaries _create_ embed timestamps or not – but this shouldn't be a configure-time option. r256203/r256204 added a driver option to toggle this on and off, so this patch now passes this driver option in LLVM_ENABLE_TIMESTAMPS builds so that if LLVM_ENABLE_TIMESTAMPS is set, the build of LLVM is deterministic – but the built clang can still write timestamps into other executables when requested. This also allows removing some of the test machinery added in r292012 to work around this problem. See PR24740 for background. http://reviews.llvm.org/D15783 llvm-svn: 256958
* refactor divrem8 lowering; NFCISanjay Patel2016-01-061-26/+30
| | | | | | | The code duplication contributed to PR25754: https://llvm.org/bugs/show_bug.cgi?id=25754 llvm-svn: 256957
* [ShrinkWrap] Fix FindIDom to only have one kind of failure.Michael Kuperstein2016-01-062-6/+36
| | | | | | | | | | | | | FindIDom() can fail in two different ways - it can either return nullptr or the block itself, depending on the circumstances. Some users of FindIDom() check one error condition, while others check the other. Change it to always return nullptr on failure. This fixes PR26004. Differential Revision: http://reviews.llvm.org/D15847 llvm-svn: 256955
* Revert r256952 due to lit test fails.Weiming Zhao2016-01-067-52/+9
| | | | llvm-svn: 256954
* [WebAssembly] Don't use range-based loop for a list that's being modifiedDan Gohman2016-01-062-3/+6
| | | | | | | | The first instruction in a block is what the rend() iterator points to, so if it moves, we need to re-evaluate rend() so that we continue to iterate through the rest of the instructions. llvm-svn: 256953
OpenPOWER on IntegriCloud