summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* Revert "[MS] Emit S_HEAPALLOCSITE debug info" because of ToTWin64(db)Amy Huang2019-04-237-116/+1
| | | | | | | | | buildbot failure. This reverts commit d07d6d617713bececf57f3547434dd52f0f13f9e and c774f687b6880484a126ed3e3d737e74c926f0ae. llvm-svn: 359034
* [AArch64][GlobalISel] Legalize G_INTRINSIC_ROUNDJessica Paquette2019-04-234-3/+276
| | | | | | | Add it to the same rule as G_FCEIL etc. Add a legalizer test, and add a missing switch case to AArch64LegalizerInfo.cpp. llvm-svn: 359033
* [MemorySSA] LCSSA preserves MemorySSA.Alina Sbirlea2019-04-235-9/+12
| | | | | | | | | | | | | | | | | | | | | Summary: Enabling MemorySSA in the old pass manager leads to MemorySSA being run twice due to the fact that LCSSA and LoopSimplify do not preserve MemorySSA. This is the first step to address that: target LCSSA. LCSSA does not make any changes that invalidate MemorySSA, so it preserves it by design. It must preserve AA as well, for this to hold. After this patch, MemorySSA is still run twice in the old pass manager. Step two follows: target LoopSimplify. Subscribers: mehdi_amini, jlebar, Prazek, llvm-commits, george.burgess.iv, chandlerc Tags: #llvm Differential Revision: https://reviews.llvm.org/D60832 llvm-svn: 359032
* [X86] Autogenerate complete checks. NFCCraig Topper2019-04-231-11/+44
| | | | | | Prep for D60993 llvm-svn: 359031
* [AArch64][GlobalISel] Actually select G_INTRINSIC_TRUNCJessica Paquette2019-04-232-1/+256
| | | | | | | | | | | | | | Apparently FileCheck wasn't actually matching the fallback check lines in arm64-vfloatintrinsics.ll properly. So, there were selection fallbacks for G_INTRINSIC_TRUNC there. Actually hook it up into AArch64InstructionSelector.cpp and write a proper selection test. I guess I'll figure out the FileCheck magic to make the fallback checks work properly in arm64-vfloatintrinsics.ll. llvm-svn: 359030
* [clang-format] Fix bug in reflow of block comments containing CR/LFOwen Pan2019-04-235-5/+14
| | | | | | | | Fix PR36119 Differential Revision: https://reviews.llvm.org/D60996 llvm-svn: 359029
* Lock accesses to OptionValueFileSpecList objectsFrederic Riss2019-04-2313-30/+56
| | | | | | | | | | | | | | | | | | | | | | | | Before a Debugger gets a Target, target settings are routed to a global set of settings. Even without this, some part of the LLDB which exist independently of the Debugger object (the Module cache, the Symbol vendors, ...) access directly the global default store for those settings. Of course, if you modify one of those global settings while they are being read, bad things happen. We see this quite a bit with FileSpecList settings. In particular, we see many cases where one debug session changes target.exec-search-paths while another session starts up and it crashes when one of those accesses invalid FileSpecs. This patch addresses the specific FileSpecList issue by adding locking to OptionValueFileSpecList and never returning by reference. Reviewers: clayborg Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D60468 llvm-svn: 359028
* [ObjC][ARC] Check the basic block size before callingAkira Hatanaka2019-04-232-1/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | DominatorTree::dominate. ARC contract pass has an optimization that replaces the uses of the argument of an ObjC runtime function call with the call result. For example: ; Before optimization %1 = tail call i8* @foo1() %2 = tail call i8* @llvm.objc.retainAutoreleasedReturnValue(i8* %1) store i8* %1, i8** @g0, align 8 ; After optimization %1 = tail call i8* @foo1() %2 = tail call i8* @llvm.objc.retainAutoreleasedReturnValue(i8* %1) store i8* %2, i8** @g0, align 8 // %1 is replaced with %2 Before replacing the argument use, DominatorTree::dominate is called to determine whether the user instruction is dominated by the ObjC runtime function call instruction. The call to DominatorTree::dominate can be expensive if the two instructions belong to the same basic block and the size of the basic block is large. This patch checks the basic block size and just bails out if the size exceeds the limit set by command line option "arc-contract-max-bb-size". rdar://problem/49477063 Differential Revision: https://reviews.llvm.org/D60900 llvm-svn: 359027
* Reapply: "DebugInfo: Emit only one kind of accelerated access/name table""David Blaikie2019-04-235-6/+96
| | | | | | | | | | | | | | | | | | | | | | | | | Originally committed in r358931 Reverted in r358997 Seems this change made Apple accelerator tables miss names (because names started respecting the CU NameTableKind GNU & assuming that shouldn't produce accelerated names too), which is never correct (apple accelerator tables don't have separators or CU lists - if present, they must describe all names in all CUs). Original Description: Currently to opt in to debug_names in DWARFv5, the IR must contain 'nameTableKind: Default' which also enables debug_pubnames. Instead, only allow one of {debug_names, apple_names, debug_pubnames, debug_gnu_pubnames}. nameTableKind: Default gives debug_names in DWARFv5 and greater, debug_pubnames in v4 and earlier - and apple_names when tuning for lldb on MachO. nameTableKind: GNU always gives gnu_pubnames llvm-svn: 359026
* [ThinLTO] Pass down opt level to LTO backend and handle -O0 LTO in new PMTeresa Johnson2019-04-235-9/+45
| | | | | | | | | | | | | | | | | | | | | | | Summary: The opt level was not being passed down to the ThinLTO backend when invoked via clang (for distributed ThinLTO). This exposed an issue where the new PM was asserting if the Thin or regular LTO backend pipelines were invoked with -O0 (not a new issue, could be provoked by invoking in-process *LTO backends via linker using new PM and -O0). Fix this similar to the old PM where -O0 only does the necessary lowering of type metadata (WPD and LowerTypeTest passes) and then quits, rather than asserting. Reviewers: xur Subscribers: mehdi_amini, inglorion, eraman, hiraditya, steven_wu, dexonsmith, cfe-commits, llvm-commits, pcc Tags: #clang, #llvm Differential Revision: https://reviews.llvm.org/D61022 llvm-svn: 359025
* llvm-cvtres: Split addChild(ID) into two functionsNico Weber2019-04-232-17/+27
| | | | | | | | | | | Before, there was an IsData parameter. Now, there are two different functions for data nodes and ID nodes. No behavior change, needed for a follow-up change to make two data nodes (but not two ID nodes) with the same ID an error. For consistency, rename another addChild() overload to addNameChild(). llvm-svn: 359024
* Fix namespace name conflict with GCCEric Fiselier2019-04-236-55/+55
| | | | llvm-svn: 359023
* [AArch64][GlobalISel] Teach regbankselect about G_INTRINSIC_TRUNCJessica Paquette2019-04-233-0/+74
| | | | | | | | Add it to isPreISelGenericFloatingPointOpcode, and add a regbankselect test. Update arm64-vfloatintrinsics.ll now that we can select it. llvm-svn: 359022
* [AArch64][GlobalISel] Legalize G_INTRINSIC_TRUNCJessica Paquette2019-04-234-2/+206
| | | | | | | | | Same patch as G_FCEIL etc. Add the missing switch case in widenScalar, add G_INTRINSIC_TRUNC to the correct rule in AArch64LegalizerInfo.cpp, and add a test. llvm-svn: 359021
* Fix implementation of ::abs and std::abs LWG 2192.Eric Fiselier2019-04-237-52/+242
| | | | | | | | | | | | | | | | | | | Summary: All overloads of `::abs` and `std::abs` must be present in both `<cmath>` and `<cstdlib>`. This is problematic to implement because C defines `fabs` in `math.h` and `labs` in `stdlib.h`. This introduces a circular dependency between the two headers. This patch implements that requirement by moving `abs` into `math.h` and making `stdlib.h` include `math.h`. In order to get the underlying C declarations from the "real" `stdlib.h` inside our `math.h` we need some trickery. Specifically we need to make `stdlib.h` include next itself. Suggestions for a cleaner implementation are welcome. Reviewers: mclow.lists, ldionne Reviewed By: ldionne Subscribers: krytarowski, fedor.sergeev, dexonsmith, jdoerfert, jsji, libcxx-commits Differential Revision: https://reviews.llvm.org/D60097 llvm-svn: 359020
* [ConstantRange] Add urem supportNikita Popov2019-04-233-8/+74
| | | | | | | | | | | | | Add urem support to ConstantRange, so we can handle in in LVI. This is an approximate implementation that tries to capture the most useful conditions: If the LHS is always strictly smaller than the RHS, then the urem is a no-op and the result is the same as the LHS range. Otherwise the lower bound is zero and the upper bound is min(LHSMax, RHSMax - 1). Differential Revision: https://reviews.llvm.org/D60952 llvm-svn: 359019
* [ConstantRangeTest] Move helper methods; NFCNikita Popov2019-04-231-54/+54
| | | | | | | Move Test(Unsigned|Signed)BinOpExhaustive() towards the top of the file, so they're easier to reuse. llvm-svn: 359018
* [AMDGPU] Fixed addReg() in SIOptimizeExecMaskingPreRA.cppStanislav Mekhanoshin2019-04-232-1/+23
| | | | | | | | The second argument is flags, not subreg. Differential Revision: https://reviews.llvm.org/D61031 llvm-svn: 359017
* [Reproducers] Limit logging to calls that cross the API boundary.Jonas Devlieghere2019-04-232-101/+93
| | | | | | | | | | | | | | | | | | | | We recently moved API logging into the instrumentation macros. This made that logging is now consistent and abstracted behind a macro for every API functions, independent of the reproducers. It also means we have a lot more output. While this is a good thing, it also meant a lot more noise in the log, from things that aren't always equally interesting, such as the copy constructor for example. To improve usability, we should increase the signal-to-noise ratio. I propose to achieve this by only logging API functions that cross the API boundary. This is a divergence of what we had before, where a select number of functions were logged, irregardless of the API boundary, a concept that was introduced for the reproducers. However, I believe this is in line with the purpose of the API log. Differential revision: https://reviews.llvm.org/D60984 llvm-svn: 359016
* [AArch64][GlobalISel] Legalize G_FMA for more vector typesJessica Paquette2019-04-234-3/+261
| | | | | | | | | Same as G_FCEIL, G_FABS, etc. Just move it into that rule. Add a legalizer test for G_FMA, which we didn't have before and update arm64-vfloatintrinsics.ll. llvm-svn: 359015
* [AliasAnalysis] AAResults preserves AAManager.Alina Sbirlea2019-04-235-13/+13
| | | | | | | | | | | | | | | | Summary: AAResults should not invalidate AAManager. Update tests. Reviewers: chandlerc Subscribers: mehdi_amini, jlebar, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D60914 llvm-svn: 359014
* [AArch64][GlobalISel] Add G_FMA to isPreISelGenericFloatingPointOpcodeJessica Paquette2019-04-232-0/+58
| | | | | | | | Noticed an unnecessary fallback in arm64-vmul caused by this. Also add a regbankselect test for G_FMA. llvm-svn: 359013
* [APSInt][OpenMP] Fix isNegative, etc. for unsigned typesJoel E. Denny2019-04-2364-124/+359
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Without this patch, APSInt inherits APInt::isNegative, which merely checks the sign bit without regard to whether the type is actually signed. isNonNegative and isStrictlyPositive call isNegative and so are also affected. This patch adjusts APSInt to override isNegative, isNonNegative, and isStrictlyPositive with implementations that consider whether the type is signed. A large set of Clang OpenMP tests are affected. Without this patch, these tests assume that `true` is not a valid argument for clauses like `collapse`. Indeed, `true` fails APInt::isStrictlyPositive but not APSInt::isStrictlyPositive. This patch adjusts those tests to assume `true` should be accepted. This patch also adds tests revealing various other similar fixes due to APSInt::isNegative calls in Clang's ExprConstant.cpp and SemaExpr.cpp: `++` and `--` overflow in `constexpr`, evaluated object size based on `alloc_size`, `<<` and `>>` shift count validation, and OpenMP array section validation. Reviewed By: lebedev.ri, ABataev, hfinkel Differential Revision: https://reviews.llvm.org/D59712 llvm-svn: 359012
* Revert "[EditLineTest] Not always TERM is available, e.g. on some bots."Davide Italiano2019-04-231-13/+3
| | | | | | | This was a speculative fix trying to placate some bots, but it's ultimately just a bot configuration problem and not a code problem. llvm-svn: 359011
* [dsymutil] Put Swift interface files into a per-arch subdirectory.Adrian Prantl2019-04-232-2/+2
| | | | | | | | | This was meant to be part of the original commit r358921, but somehow got lost. <rdar://problem/49751748> llvm-svn: 359010
* MS ABI: Support mangling op<=> now that MSVC 2019 has a manglingNico Weber2019-04-232-11/+8
| | | | llvm-svn: 359009
* [x86] fix test checks for fdiv combine; NFCSanjay Patel2019-04-231-5/+9
| | | | | | Must have picked up some transient code changes when originally generating this. llvm-svn: 359008
* llvm-undname: Support demangling the spaceship operatorNico Weber2019-04-234-7/+16
| | | | | | Also add a test for demanling the co_await operator. llvm-svn: 359007
* [x86] add tests for vector fdiv with splat divisor; NFCSanjay Patel2019-04-231-0/+101
| | | | llvm-svn: 359006
* [Docs] Add missing leading slashJonas Devlieghere2019-04-231-5/+5
| | | | llvm-svn: 359005
* [Docs] Add 301 redirects for old URLsJonas Devlieghere2019-04-232-0/+8
| | | | llvm-svn: 359004
* [dsymutil] Fix use-after-free when sys::path::append grows the buffer.Adrian Prantl2019-04-231-2/+2
| | | | | | <rdar://problem/50117620> llvm-svn: 359003
* Revert "[dsymutil] Fix use-after-free when sys::path::append grows the buffer."Adrian Prantl2019-04-231-1/+1
| | | | llvm-svn: 359002
* [dsymutil] Fix use-after-free when sys::path::append grows the buffer.Adrian Prantl2019-04-231-1/+1
| | | | | | <rdar://problem/50117620> llvm-svn: 359001
* [InstCombine] Convert a masked.load of a dereferenceable address to an ↵Philip Reames2019-04-232-6/+17
| | | | | | | | | | unconditional load If we have a masked.load from a location we know to be dereferenceable, we can simply issue a speculative unconditional load against that address. The key advantage is that it produces IR which is well understood by the optimizer. The select (cnd, load, passthrough) form produced should be pattern matchable back to hardware predication if profitable. Differential Revision: https://reviews.llvm.org/D59703 llvm-svn: 359000
* [x86] use psubus for more vsetcc lowering (PR39859)Sanjay Patel2019-04-232-13/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Circling back to a leftover bit from PR39859: https://bugs.llvm.org/show_bug.cgi?id=39859#c1 ...we have this counter-intuitive (based on the test diffs) opportunity to use 'psubus'. This appears to be the better perf option for both Haswell and Jaguar based on llvm-mca. We already do this transform for the SETULT predicate, so this makes the code more symmetrical too. If we have pminub/pminuw, we prefer those, so this should not affect anything but pre-SSE4.1 subtargets. $ cat before.s movdqa -16(%rip), %xmm2 ## xmm2 = [32768,32768,32768,32768,32768,32768,32768,32768] pxor %xmm0, %xmm2 pcmpgtw -32(%rip), %xmm2 ## xmm2 = [255,255,255,255,255,255,255,255] pand %xmm2, %xmm0 pandn %xmm1, %xmm2 por %xmm2, %xmm0 $ cat after.s movdqa -16(%rip), %xmm2 ## xmm2 = [256,256,256,256,256,256,256,256] psubusw %xmm0, %xmm2 pxor %xmm3, %xmm3 pcmpeqw %xmm2, %xmm3 pand %xmm3, %xmm0 pandn %xmm1, %xmm3 por %xmm3, %xmm0 $ llvm-mca before.s -mcpu=haswell Iterations: 100 Instructions: 600 Total Cycles: 909 Total uOps: 700 Dispatch Width: 4 uOps Per Cycle: 0.77 IPC: 0.66 Block RThroughput: 1.8 $ llvm-mca after.s -mcpu=haswell Iterations: 100 Instructions: 700 Total Cycles: 409 Total uOps: 700 Dispatch Width: 4 uOps Per Cycle: 1.71 IPC: 1.71 Block RThroughput: 1.8 Differential Revision: https://reviews.llvm.org/D60838 llvm-svn: 358999
* [SPARC] Use the correct register set for the "r" asm constraint.Joerg Sonnenberger2019-04-232-0/+12
| | | | | | | | 64bit mode must use 64bit registers, otherwise assumptions about the top half of the registers are made. Problem found by Takeshi Nakayama in NetBSD. llvm-svn: 358998
* Revert "DebugInfo: Emit only one kind of accelerated access/name table"David Blaikie2019-04-235-94/+5
| | | | | | | | Regresses some apple_names situations - still investigating. This reverts commit r358931. llvm-svn: 358997
* Use llvm::stable_sortFangrui Song2019-04-2346-186/+146
| | | | | | While touching the code, simplify if feasible. llvm-svn: 358996
* [WebAssembly] Fix typo in relocation checkingSam Clegg2019-04-232-1/+56
| | | | | | | | | | | Runtime relocation are generated for relocations of type R_WASM_MEMORY_ADDR_I32 when in PIC mode (either -shared or -pie). Followup on https://reviews.llvm.org/D60882. Differential Revision: https://reviews.llvm.org/D60992 llvm-svn: 358995
* [RISCV] Support assembling %tls_{ie,gd}_pcrel_hi modifiersLewis Revill2019-04-2310-10/+86
| | | | | | | | | This patch adds support for parsing and assembling the %tls_ie_pcrel_hi and %tls_gd_pcrel_hi modifiers. Differential Revision: https://reviews.llvm.org/D55342 llvm-svn: 358994
* gn build: Merge r358944Nico Weber2019-04-231-0/+1
| | | | llvm-svn: 358993
* [AMDGPU] Fix hidden argument metadata duplication for V3Scott Linder2019-04-235-178/+461
| | | | | | | | | | Essentially complete a proper rebase of the V3 metadata change over https://reviews.llvm.org/D49096. Minimize the diff between the V2 and V3 variants of the relevant lit tests, and clean up some trailing whitespace. llvm-svn: 358992
* gn build: Merge r358949Nico Weber2019-04-232-0/+2
| | | | llvm-svn: 358991
* [LLD][ELF] - Remove dynamic-section-sh_size.elf binary, convert test to ↵George Rimar2019-04-233-4/+36
| | | | | | | | | | | | | yaml. NFCI. dynamic-section-sh_size.elf was introduced in D25090. Now it is possible to use yaml2obj instead. That is what this patch does. Also I added one more case of a possibly broken .dynamic section just in case. llvm-svn: 358990
* [X86] Pull out collectConcatOps helper. NFCI.Simon Pilgrim2019-04-231-21/+51
| | | | | | Create collectConcatOps helper that returns all the subvector ops for CONCAT_VECTORS or a INSERT_SUBVECTOR series. llvm-svn: 358989
* [libc++] Remove redundant conditionals for Apple platformsLouis Dionne2019-04-233-8/+6
| | | | | | | | | | | | | | | | | | | Summary: In a bunch of places, we used to check whether LIBCXX_BUILDING_LIBCXXABI is defined OR we're building for an Apple platform. This used to be necessary in a time when Apple's build script did NOT define LIBCXX_BUILDING_LIBCXXABI. However this is not relevant anymore since Apple's build does define LIBCXX_BUILDING_LIBCXXABI. Reviewers: EricWF Subscribers: christof, jkorous, dexonsmith, libcxx-commits Tags: #libc Differential Revision: https://reviews.llvm.org/D60842 llvm-svn: 358988
* ARM: disallow add/sub to sp unless Rn is also sp.Tim Northover2019-04-234-1/+78
| | | | | | | | The manual says that Thumb2 add/sub instructions are only allowed to modify sp if the first source is also sp. This is slightly different from the usual rGPR restriction since it's context-sensitive, so implement it in C++. llvm-svn: 358987
* [Docs] ReleaseNotes: fixup markup in memcmp()->bcmp() entryRoman Lebedev2019-04-231-4/+4
| | | | llvm-svn: 358986
* [LLD][ELF] - Remove file-class.a binary from inputs and improve the test case.George Rimar2019-04-233-4/+19
| | | | | | | | | | | | | file-class.a was used to diagnose the "corrupted ELF file: invalid file class" error when the object was fetched from the archive. file-class.a contained an object of 16 bytes size. I replaced it with an echo call (because it is impossible to use yaml2obj for that, and I am not sure it is worth to support), and also increased its size to 18 bytes. That allowed to also test a case when such object is a regular input and not an archive member (we have a bit different logic for these cases). llvm-svn: 358985
OpenPOWER on IntegriCloud