summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Fixup files added in r362636 to build with gcc 5.4. NFCIDouglas Yung2019-06-062-13/+13
| | | | llvm-svn: 362682
* [AArch64][GlobalISel] Add manual selection support for G_ZEXTLOADs to s64.Amara Emerson2019-06-062-5/+157
| | | | | | | | | | | We already get support for G_ZEXTLOAD to s32 from the importer, but it can't deal with the SUBREG_TO_REG in the pattern. Tweaking the existing manual selection code for G_LOAD to handle an additional SUBREG_TO_REG when dealing with G_ZEXTLOAD isn't much work. Also add tests to check the imported pattern selections to s32 work. llvm-svn: 362681
* Revert "Speedup to_string and to_wstring for integers using stack buffer and ↵Vlad Tsyrklevich2019-06-061-37/+103
| | | | | | | | | | SSO." This reverts commit 7ce7110e6d964778141c0866488e154b1ce73d69, it was causing sanitizer bot failures due to changing behavior of std::to_string(). See https://reviews.llvm.org/D59178#1532023 llvm-svn: 362680
* [clang-tidy] Fix make-unique tests on C++2a.Haojian Wu2019-06-063-70/+114
| | | | | | | | | | | | | | | | Summary: These test cases are illgal in C++2a ("new Foo{}" needs to see the default constructor), so move them to the C++14-only tests. Reviewers: gribozavr Subscribers: xazax.hun, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D62845 llvm-svn: 362679
* [pstl] The optimized parallel versions of sort, stable_sort algorithms, TBB ↵Mikhail Dvorskiy2019-06-063-156/+573
| | | | | | | | | | | | | | parallel backend. Summary: A modification of the parallel sorting algorithm, additionally optimized for a partially sorted array. Reviewers: rodgert ldionne Differential Revision: https://reviews.llvm.org/D59925 llvm-svn: 362678
* [AArch64][GlobalISel] Add the new changes to fix PR42129 that were supposed ↵Amara Emerson2019-06-062-0/+37
| | | | | | | | to go into r362666. The changes weren't staged so ended up just re-commiting the unmodified reverted change. llvm-svn: 362677
* [Profile]: Add runtime interface to specify file handle for profile data.Xinliang David Li2019-06-064-13/+94
| | | | | | | | Author: Sajjad Mirza Differential Revision: http://reviews.llvm.org/D62541 llvm-svn: 362676
* [X86] Don't turn avx masked.load with constant mask into masked.load+vselect ↵Craig Topper2019-06-062-2/+3
| | | | | | | | | | when passthru value is all zeroes. This is intended to enable the use of an immediate blend or more optimal instruction. But if the passthru is zero we don't need any additional instructions. llvm-svn: 362675
* [X86] Add test case for masked load with constant mask and all zeros passthru.Craig Topper2019-06-061-4/+53
| | | | | | | | | | avx/avx2 masked loads only support all zeros for passthru in hardware. So we have to emit a blend for all other values. We have an optimization that tries to optimize this blend if the mask is constant. But we don't need to perform this optimization if the passthru value is zero which doesn't need the blend at all. llvm-svn: 362674
* android: add a close-on-exec check on pipe()George Burgess IV2019-06-068-0/+127
| | | | | | | | | | | On Android, pipe() is better to be replaced by pipe2() with O_CLOEXEC flag to avoid file descriptor leakage. Patch by Jian Cai! Differential Revision: https://reviews.llvm.org/D61967 llvm-svn: 362673
* android: add a close-on-exec check on pipe2()George Burgess IV2019-06-068-0/+165
| | | | | | | | | | | On Android, pipe2() is better to set O_CLOEXEC flag to avoid file descriptor leakage. Patch by Jian Cai! Differential Revision: https://reviews.llvm.org/D62049 llvm-svn: 362672
* [WebAssembly] Support Leak Sanitizer on EmscriptenThomas Lively2019-06-061-1/+1
| | | | | | | | | | | | | | | | | | | | | Summary: LSan is currently being ported to Emscripten and mostly works. Enabling the support in upstream would simplify testing. Patch by Guanzhong Chen. Reviewers: tlively, aheejin Reviewed By: aheejin Subscribers: dschuff, sbc100, jgravelle-google, sunfish, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D62830 llvm-svn: 362667
* Revert "Revert "[AArch64][GlobalISel] Optimize G_FCMP + G_SELECT pairs when ↵Amara Emerson2019-06-052-8/+447
| | | | | | | | | | | | G_SELECT is fp"" When looking through copies, make sure to not try to find the vreg def of a physreg. Normally getVRegDef will return nullptr in this case, but if there happens to be multiple defs then it will assert. This fixes PR42129. llvm-svn: 362666
* AMDGPU: Don't fix emergency stack slot at offset 0Matt Arsenault2019-06-0519-442/+496
| | | | | | | | | | | | | | | | | | | | | This forced the caller to be aware of this, which is an ugly ABI feature. Partially reverts r295877. The original reasons for doing this are mostly fixed. Alloca is now in a non-0 address space, so it should be OK to have 0 as a valid pointer. Since we treat the absolute address as the pointer value, this part only really needed to apply to kernels. Since r357093, we avoid the need to increment/decrement the offset register in more cases, and since r354816 the scavenger can fail without spilling, so it's less critical that we try to avoid an offset that fits in the MUBUF offset. Restrict to callable functions for now to split this into 2 steps to limit thte number of test updates and in case anything breaks. llvm-svn: 362665
* [MSAN] Add unary FNeg visitor to the MemorySanitizerCameron McInally2019-06-052-0/+18
| | | | | | Differential Revision: https://reviews.llvm.org/D62909 llvm-svn: 362664
* Allow target to handle STRICT floating-point nodesUlrich Weigand2019-06-0582-372/+5788
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The ISD::STRICT_ nodes used to implement the constrained floating-point intrinsics are currently never passed to the target back-end, which makes it impossible to handle them correctly (e.g. mark instructions are depending on a floating-point status and control register, or mark instructions as possibly trapping). This patch allows the target to use setOperationAction to switch the action on ISD::STRICT_ nodes to Legal. If this is done, the SelectionDAG common code will stop converting the STRICT nodes to regular floating-point nodes, but instead pass the STRICT nodes to the target using normal SelectionDAG matching rules. To avoid having the back-end duplicate all the floating-point instruction patterns to handle both strict and non-strict variants, we make the MI codegen explicitly aware of the floating-point exceptions by introducing two new concepts: - A new MCID flag "mayRaiseFPException" that the target should set on any instruction that possibly can raise FP exception according to the architecture definition. - A new MI flag FPExcept that CodeGen/SelectionDAG will set on any MI instruction resulting from expansion of any constrained FP intrinsic. Any MI instruction that is *both* marked as mayRaiseFPException *and* FPExcept then needs to be considered as raising exceptions by MI-level codegen (e.g. scheduling). Setting those two new flags is straightforward. The mayRaiseFPException flag is simply set via TableGen by marking all relevant instruction patterns in the .td files. The FPExcept flag is set in SDNodeFlags when creating the STRICT_ nodes in the SelectionDAG, and gets inherited in the MachineSDNode nodes created from it during instruction selection. The flag is then transfered to an MIFlag when creating the MI from the MachineSDNode. This is handled just like fast-math flags like no-nans are handled today. This patch includes both common code changes required to implement the new features, and the SystemZ implementation. Reviewed By: andrew.w.kaylor Differential Revision: https://reviews.llvm.org/D55506 llvm-svn: 362663
* Revert "[AArch64][GlobalISel] Optimize G_FCMP + G_SELECT pairs when G_SELECT ↵Petr Hosek2019-06-052-447/+8
| | | | | | | | is fp" This reverts commit r362435 as this triggers ICE, see PR42129 for details. llvm-svn: 362662
* AMDGPU: Invert frame index offset interpretationMatt Arsenault2019-06-0530-494/+594
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since the beginning, the offset of a frame index has been consistently interpreted backwards. It was treating it as an offset from the scratch wave offset register as a frame register. The correct interpretation is the offset from the SP on entry to the function, before the prolog. Frame index elimination then should select either SP or another register as an FP. Treat the scratch wave offset on kernel entry as the pre-incremented SP. Rely more heavily on the standard hasFP and frame pointer elimination logic, and clean up the private reservation code. This saves a copy in most callee functions. The kernel prolog emission code is still kind of a mess relying on checking the uses of physical registers, which I would prefer to eliminate. Currently selection directly emits MUBUF instructions, which require using a reference to some register. Use the register chosen for SP, and then ignore this later. This should probably be cleaned up to use pseudos that don't refer to any specific base register until frame index elimination. Add a workaround for shaders using large numbers of SGPRs. I'm not sure these cases were ever working correctly, since as far as I can tell the logic for figuring out which SGPR is the scratch wave offset doesn't match up with the shader input initialization in the shader programming guide. llvm-svn: 362661
* [libcxx][test] Include test_workarounds.h where neededLouis Dionne2019-06-052-0/+2
| | | | | | | | | | | Some tests require `TEST_WORKAROUND_CONSTEXPR_IMPLIES_NOEXCEPT`, but they did not include the header that defines that macro. Thanks to Michael Park for the patch. Differential Revision: https://reviews.llvm.org/D62920 llvm-svn: 362660
* Update issue statuses. Reviewed as https://reviews.llvm.org/D62932Marshall Clow2019-06-052-4/+4
| | | | llvm-svn: 362659
* [EarlyCSE] Add tests for negated min/max/abs [NFC]Joseph Tremoulet2019-06-051-0/+102
| | | | | | | | | | | | | | | | | | Summary: I'm planning to update the hashing logic to recognize their equivalence in a subsequent change (D62644). Reviewers: spatel Reviewed By: spatel Subscribers: llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D62918 llvm-svn: 362657
* [CallSite removal] Refactoring llvm::InlineFunction APIsMircea Trofin2019-06-052-12/+3
| | | | | | | | | | | | | | | | | | | | Summary: This change only unifies the API previous API pair accepting CallInst and InvokeInst, thus making it easier to refactor inliner pass ode to CallBase. The implementation of the unified API still relies on the CallSite implementation. Reviewers: eraman, chandlerc, jdoerfert Reviewed By: jdoerfert Subscribers: jdoerfert, hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D62283 llvm-svn: 362656
* [InstCombine] simplify code for bitcast of insertelement; NFCSanjay Patel2019-06-051-5/+4
| | | | llvm-svn: 362655
* NewGVN: Handle addrspacecastMatt Arsenault2019-06-052-2/+111
| | | | | | | | | | The AllConstant check needs to be moved out of the if/else if chain to avoid a test regression. The "there is no SimplifyZExt" comment puzzles me, since there is SimplifyCastInst. Additionally, the Simplify* calls seem to not see the operand as constant, so this needs to be tried if the simplify failed. llvm-svn: 362653
* LLVM IR: Generate new-style byval-with-Type from ClangTim Northover2019-06-0549-266/+266
| | | | | | | | | | | LLVM IR recently added a Type parameter to the byval Attribute, so that when pointers become opaque and no longer have an element type the information will still be present in IR. For now the Type parameter is optional (which is why Clang didn't need this change at the time), but it will become mandatory soon. llvm-svn: 362652
* Fix FileCheck prefixes in test case.Akira Hatanaka2019-06-051-7/+7
| | | | llvm-svn: 362651
* [WebAssembly] Improve lto/comdat.ll test. NFC.Sam Clegg2019-06-051-3/+5
| | | | | | | | | | | | | | | We were not previously testing the comdat exclusion in bitcode objects because we were linking two copies of the .bc file and the `linkonce_odr` linkage type was removing the duplicate `_start` at the LTO stage. Now we link an bitcode and non-bitcode version both of which contains a copy of _start. We link them in both orders, which means this test will fail if comdat exclusion is not working correctly in bitcode parsing. Differential Revision: https://reviews.llvm.org/D62923 llvm-svn: 362650
* Speedup to_string and to_wstring for integers using stack buffer and SSO. ↵Marshall Clow2019-06-051-103/+37
| | | | | | Reviewed as https://reviews.llvm.org/D59178 Thanks to ivafanas for all his work on this patch. llvm-svn: 362649
* [X86] Fix mistake that marked ↵Craig Topper2019-06-051-1/+1
| | | | | | | | | | | | | | | VADDSSrrb_Int/VADDSDrrb_Int/VMULSSrrb_Int/VMULSDrrb_Int as commutable. One of the sources controls the pass through value for the upper bits of the result so we can't really commute it. In practice this problem isn't a functional issue because we would only try to commute this instruction in order to fold a load. But we can't do embedded rounding and fold a load at the same time. So the load fold would never succeed so I don't think we would ever commute or at least keep the version after commuting. llvm-svn: 362647
* [clang-format][NFC] Fix BS_Allman style example in the header docs are ↵Jan Korous2019-06-052-12/+30
| | | | | | | | generated from Differential Revision: https://reviews.llvm.org/D61729 llvm-svn: 362646
* [WebAssembly] Use Emscripten triples in PIC tests.Dan Gohman2019-06-052-2/+2
| | | | | | | | With r362638, llc doesn't support -relocation-model=pic with non-Emscripten triples. Update these tests in lld which use -relocation-model=pic to also use Emscripten triples. llvm-svn: 362645
* [LOOPINFO] Extend Loop object to add utilities to get the loop bounds,Whitney Tsang2019-06-053-0/+1275
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | step, and loop induction variable. Summary: This PR extends the loop object with more utilities to get loop bounds, step, and loop induction variable. There already exists passes which try to obtain the loop induction variable in their own pass, e.g. loop interchange. It would be useful to have a common area to get these information. /// Example: /// for (int i = lb; i < ub; i+=step) /// <loop body> /// --- pseudo LLVMIR --- /// beforeloop: /// guardcmp = (lb < ub) /// if (guardcmp) goto preheader; else goto afterloop /// preheader: /// loop: /// i1 = phi[{lb, preheader}, {i2, latch}] /// <loop body> /// i2 = i1 + step /// latch: /// cmp = (i2 < ub) /// if (cmp) goto loop /// exit: /// afterloop: /// /// getBounds /// getInitialIVValue --> lb /// getStepInst --> i2 = i1 + step /// getStepValue --> step /// getFinalIVValue --> ub /// getCanonicalPredicate --> '<' /// getDirection --> Increasing /// getInductionVariable --> i1 /// getAuxiliaryInductionVariable --> {i1} /// isCanonical --> false Reviewers: kbarton, hfinkel, dmgreen, Meinersbur, jdoerfert, syzaara, fhahn Reviewed By: kbarton Subscribers: tvvikram, bmahjour, etiotto, fhahn, jsji, hiraditya, llvm-commits Tag: LLVM Differential Revision: https://reviews.llvm.org/D60565 llvm-svn: 362644
* InstCombine: correctly change byval type attribute alongside call args.Tim Northover2019-06-052-4/+44
| | | | | | | | When the byval attribute has a type, it must match the pointee type of any parameter; but InstCombine was not updating the attribute when folding casts of various kinds away. llvm-svn: 362643
* IR: make getParamByValType Just Work. NFC.Tim Northover2019-06-058-9/+24
| | | | | | | | | | | Most parts of LLVM don't care whether the byval type is derived from an explicit Attribute or from the parameter's pointee type, so it makes sense for the main access function to just return the right value. The very few users who do care (only BitcodeReader so far) can find out how it's specified by accessing the Attribute directly. llvm-svn: 362642
* AMDGPU: Remove amdgpu-max-work-group-size attributeMatt Arsenault2019-06-054-14/+3
| | | | | | | This has been deprecated for a long time, and mesa recently switched to amdgpu-flat-work-group-size. llvm-svn: 362641
* AMDGPU: Fix using 2 different enums for same operand flagsMatt Arsenault2019-06-053-11/+8
| | | | | | | These enums are really for the same namespace of flags set on arbitrary MachineOperands, so merge them to avoid value collisions. llvm-svn: 362640
* [NativeProcessDarwin] Remove dead code. NFCI.Davide Italiano2019-06-051-8/+0
| | | | llvm-svn: 362639
* [WebAssembly] Limit PIC support to the Emscripten targetDan Gohman2019-06-054-5/+14
| | | | | | | | | | | The current PIC support currently only works with Emscripten, so disable it for other targets. This is the PIC portion of https://reviews.llvm.org/D62542. Reviewed By: dschuff, sbc100 llvm-svn: 362638
* [cmake] Remove duplicate TestingSupport library for linkingPengxuan Zheng2019-06-051-1/+0
| | | | | | | | | | | | Summary: This patch cleans up a duplicate use of TestingSupport library. Subscribers: mgorny, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D62924 llvm-svn: 362637
* [GWP-ASan] Core Guarded Pool Allocator [4].Mitch Phillips2019-06-0511-3/+1111
| | | | | | | | | | | | | | | | | | | | | Summary: See D60593 for further information. This patch introduces the core of GWP-ASan, being the guarded pool allocator. This class contains the logic for creating and maintaining allocations in the guarded pool. Its public interface is to be utilised by supporting allocators in order to provide sampled guarded allocation behaviour. This patch also contains basic functionality tests of the allocator as unittests. The error-catching behaviour will be tested in upcoming patches that use Scudo as an implementing allocator. Reviewers: vlad.tsyrklevich, eugenis, jfb Reviewed By: vlad.tsyrklevich Subscribers: dexonsmith, kubamracek, mgorny, cryptoad, jfb, #sanitizers, llvm-commits, morehouse Tags: #sanitizers, #llvm Differential Revision: https://reviews.llvm.org/D62872 llvm-svn: 362636
* [X86][SSE] Add vector tests to cover more ↵Simon Pilgrim2019-06-053-1/+61
| | | | | | | | isNegatibleForFree/GetNegatedExpression cases (PR42105) Some already combine correctly, but vector constant analysis is weak. llvm-svn: 362633
* [analyzer] PathDiagnosticPopUpPiece: working with CharSourceRangeCsaba Dabis2019-06-051-3/+3
| | | | | Summary: Sometimes we are at character boundaries so past the token-range. llvm-svn: 362632
* [NFC][Reassociate] Fix mistake in 468b2adCameron McInally2019-06-051-10/+8
| | | | | | Missed 2 'fast fsub(0.0,X) -> fneg(X)' changes. llvm-svn: 362631
* [NFC][Reassociate] Add unary fneg tests to fast-basictest.llCameron McInally2019-06-051-0/+69
| | | | llvm-svn: 362630
* [X86] Add the vector integer min/max instructions to ↵Craig Topper2019-06-0514-982/+1066
| | | | | | | | | | | | | | | | | isAssociativeAndCommutative. As far as I know these should be freely reassociatable just like the floating point MAXC/MINC instructions. The *reduce* test changes are largely regressions and caused by the "generic" CPU we default to not having a scheduler model. The machine-combiner-int-vec.ll test shows the positive benefits of this change. Differential Revision: https://reviews.llvm.org/D62787 llvm-svn: 362629
* [Tests] Add poison inference tests for indvars showing both existing ↵Philip Reames2019-06-051-0/+369
| | | | | | transforms, and some room for improvement llvm-svn: 362628
* [NFC][Reassociate] Regenerate CHECKs for fast-basictest.llCameron McInally2019-06-051-15/+15
| | | | llvm-svn: 362627
* [WebAssembly] Handle object parsing more like the ELF backendSam Clegg2019-06-053-16/+27
| | | | | | Differential Revision: https://reviews.llvm.org/D62886 llvm-svn: 362626
* [lld] Explicitly ignore comdat groups when parsing LTO object(s)Sam Clegg2019-06-054-39/+23
| | | | | | | | | | | | | Any symbols defined in the LTO object are by definition the ones we want in the final output so we skip the comdat group checking in those cases. This change makes the ELF code more explicit about this and means that wasm and ELF do this in the same way. Differential Revision: https://reviews.llvm.org/D62884 llvm-svn: 362625
* Use LTO capable linkerChris Bieneman2019-06-052-2/+7
| | | | | | | | | | | | | | | | | | | | Summary: In DistributionExample.cmake be sure we use a LTO capable linker, the easiest to choose is lld. Reviewers: beanz Reviewed By: beanz Patch By: winksaville Subscribers: mgorny, mehdi_amini, inglorion, dexonsmith, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D62279 llvm-svn: 362624
OpenPOWER on IntegriCloud