summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* [AVR] Set the program address space in the data layoutDylan McKay2018-02-191-1/+1
| | | | | | This is accompanied by r325481 in LLVM. llvm-svn: 325483
* [clangd] Try to fix build bot failure caused by r325343: escape regex string.Eric Liu2018-02-191-1/+2
| | | | llvm-svn: 325482
* [AVR] Set the program address space in the data layoutDylan McKay2018-02-191-1/+1
| | | | | | | | | | | | This adds the program memory address space setting to the AVR data layout. This setting was very recently added under r325479. At the moment, there are no uses of this setting. In the future, things such as switch lookup tables should reside there. llvm-svn: 325481
* [clangd] Tracing: name worker threads, and enforce naming scheduled async tasksSam McCall2018-02-199-74/+116
| | | | | | | | | | | | | | | | | | | Summary: This has a bit of a blast radius, but I think there's enough value in "forcing" us to give names to these async tasks for debugging. Guessing about what multithreaded code is doing is so unfun... The "file" param attached to the tasks may seem to be redundant with the thread names, but note that thread names are truncated to 15 chars on linux! We'll be lucky to get the whole basename... Reviewers: ilya-biryukov Subscribers: klimek, jkorous-apple, ioeric, cfe-commits Differential Revision: https://reviews.llvm.org/D43388 llvm-svn: 325480
* Add default address space for functions to the data layout (1/3)Dylan McKay2018-02-196-5/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This adds initial support for letting targets specify which address spaces their functions should reside in by default. If a function is created by a frontend, it will get the default address space specified in the DataLayout, unless the frontend explicitly uses a more general `llvm::Function` constructor. Function address spaces will become a part of the bitcode and textual IR forms, as we do not have access to a data layout whilst parsing LL. It will be possible to write IR that explicitly has `addrspace(n)` on a function. In this case, the function will reside in the specified space, ignoring the default in the DL. This is the first step towards placing functions into the correct address space for Harvard architectures. Full patchset * Add program address space to data layout D37052 * Require address space to be specified when creating functions D37054 * [clang] Require address space to be specified when creating functions D37057 Reviewers: pcc, arsenm, kparzysz, hfinkel, theraven Reviewed By: theraven Subscribers: arichardson, simoncook, rengolin, wdng, uabelho, bjope, asb, llvm-commits Differential Revision: https://reviews.llvm.org/D37052 llvm-svn: 325479
* [CodeGen] Initialize large arrays by copying from a globalIvan A. Kosarev2018-02-192-11/+48
| | | | | | | | | | | | | | Currently, clang compiles explicit initializers for array elements into series of store instructions. For large arrays of built-in types this results in bloated output code and significant amount of time spent on the instruction selection phase. This patch fixes the issue by initializing such arrays with global constants that store the binary image of the initializer. Differential Revision: https://reviews.llvm.org/D43181 llvm-svn: 325478
* [clangd] Add "clangd.trace" VSCode setting to enable tracing.Sam McCall2018-02-192-5/+14
| | | | | | | | | | | | | | Summary: Setting the CLANGD_TRACE environment variable directly is awkward with VSCode's "reload from the command palette" workflow. Reviewers: ilya-biryukov Subscribers: klimek, jkorous-apple, ioeric, cfe-commits Differential Revision: https://reviews.llvm.org/D43385 llvm-svn: 325477
* [clangd] Fix use-after-free in SymbolYAML: strings are owned by yaml::Input!Sam McCall2018-02-194-12/+13
| | | | | | | | | | | | | | | | | | Summary: There are a few implementation options here - alternatives are either both awkward and inefficient, or really inefficient. This is at least potentially a hot path when used as a reducer for common symbols. (Also fix an unused-var that sneaked in) Reviewers: ioeric Subscribers: klimek, ilya-biryukov, jkorous-apple, cfe-commits Differential Revision: https://reviews.llvm.org/D43381 llvm-svn: 325476
* [cxx_dr_status] Tests for CWG issues 641-687.Richard Smith2018-02-192-41/+708
| | | | llvm-svn: 325475
* [AVR] Fix a lowering bug in AVRISelLowering.cppDylan McKay2018-02-191-4/+6
| | | | | | | | | | | | | | The parseFunctionArgs() method was directly reading the arguments from a Function object, but is should have used the arguments supplied by the SelectionDAGBuilder. This was causing the lowering code to only lower one argument, not two in some cases. Thanks to @brainlag on GitHub for coming up with the working fix! Patch-by: @brainlag on GitHub llvm-svn: 325474
* Add LanaiMCTargetDesc.h to LanaiInstrInfo.h to make it self containedEric Christopher2018-02-191-0/+1
| | | | | | with instruction enum definitions. llvm-svn: 325473
* [X86] Correct a typo I made in combineToExtendCMOV recently.Craig Topper2018-02-181-1/+1
| | | | | | | | We're accidentally checking that the same node is a constant twice instead of checking the other node. This isn't a functional problem since we didn't do anything below that explicitly requires constants. It just means we may have introduced a sign_extend or zero_extend that won't fold out. llvm-svn: 325469
* [Analyzer] Move UnexploredFirstStack into an anonymous namespace.Benjamin Kramer2018-02-181-0/+2
| | | | | | No functionality change intended. llvm-svn: 325468
* [tidy] Move private ast matchers into anonymous namespaces to avoid ODR ↵Benjamin Kramer2018-02-1814-17/+39
| | | | | | | | conflicts. No functionality change intended. llvm-svn: 325467
* [PatternMatch, InstSimplify] enhance m_AllOnes() to ignore undef elements in ↵Sanjay Patel2018-02-184-26/+17
| | | | | | | | | | | | | | | | | | | vectors Loosening the matcher definition reveals a subtle bug in InstSimplify (we should not assume that because an operand constant matches that it's safe to return it as a result). So I'm making that change here too (that diff could be independent, but I'm not sure how to reveal it before the matcher change). This also seems like a good reason to *not* include matchers that capture the value. We don't want to encourage the potential misstep of propagating undef values when it's not allowed/intended. I didn't include the capture variant option here or in the related rL325437 (m_One), but it already exists for other constant matchers. llvm-svn: 325466
* [InstSimplify] add tests with vector undef elts; NFCSanjay Patel2018-02-182-7/+18
| | | | llvm-svn: 325465
* Fix unused assertion variable warning.Amara Emerson2018-02-181-0/+1
| | | | llvm-svn: 325464
* [AArch64][GlobalISel] Fix an assert fail/miscompile when fp16 types are copiedAmara Emerson2018-02-182-0/+94
| | | | | | | | | | | | to gpr register banks. PR36345. rdar://36478867 Differential Revision: https://reviews.llvm.org/D43310 llvm-svn: 325463
* [AArch64][GlobalISel] Support G_INSERT/G_EXTRACT of types < s32 bits.Amara Emerson2018-02-182-16/+88
| | | | | | These are needed for operations on fp16 types in a later patch. llvm-svn: 325462
* [PatternMatch] reformatting and comment clean-ups; NFCSanjay Patel2018-02-181-98/+127
| | | | llvm-svn: 325461
* [Support] Replace hand-written scope_exit with make_scope_exit.Benjamin Kramer2018-02-181-23/+3
| | | | | | No functionality change intended. llvm-svn: 325460
* [AArch64] Coalesce Copy Zero during instruction selectionHaicheng Wu2018-02-185-3/+79
| | | | | | | | Add special case for copy of zero to avoid a double copy. Differential Revision: https://reviews.llvm.org/D36104 llvm-svn: 325459
* [clangd] Fix link failures for Preprocessor::addCommentHandlerHeejin Ahn2018-02-182-0/+2
| | | | | | | | | | | | | | | | | Summary: D42640 adds calls to `Preprocessor::addCommentHandler` in `unittests/clangd/SymbolCollectorTests.cpp` and `clangd/global-symbol-builder/GlobalSymbolBuilderMain.cpp` but does not link `clangLex` library. This causes undefined reference errors when built with `-DBUILD_SHARED_LIBS=ON`. Reviewers: ioeric Subscribers: klimek, mgorny, ilya-biryukov, jkorous-apple, cfe-commits Differential Revision: https://reviews.llvm.org/D43437 llvm-svn: 325458
* [BPF] Return true in enableMultipleCopyHints().Jonas Paulsson2018-02-1810-50/+52
| | | | | | | | | | Enable multiple COPY hints to eliminate more COPYs during register allocation. Note that this is something all targets should do, see https://reviews.llvm.org/D38128. Review: Yonghong Song llvm-svn: 325457
* [X86] Make masked pcmpeq commutable during isel so we can fold loads in ↵Craig Topper2018-02-183-5/+7
| | | | | | | | | | other operand to the shorter encoding. Previously we used the immediate encoding if the load was in operand 0 and the short encoding if the load was in operand 1. This added an insane number of bytes to the size of the isel table. I'm wondering if we should always use the immediate form during isel and change to the short form during emission. This would remove the need to pattern match every combination for both the immediate form and the short form during isel. We could do the same with vpcmpgt llvm-svn: 325456
* [X86] Add -show-mc-encoding to the avx512-vec-cmp.ll test and add test case ↵Craig Topper2018-02-181-372/+467
| | | | | | | | to show that we're failing to use the shorter pcmpeq encoding when the memory arguemnt is the first argument. This can't be spotted without showing the encodings since they have the same mnemonic. llvm-svn: 325455
* Revert: [llvm] r325448 - [ThinLTO] Add GraphTraits for FunctionSummaries Simon Pilgrim2018-02-185-239/+2
| | | | | | | | | | Add GraphTraits definitions to the FunctionSummary and ModuleSummaryIndex classes. These GraphTraits will be used to construct find SCC's in ThinLTO analysis passes. Second attempt, since last patch caused stage2 build to fail (now using function_ref rather than std::function). Reverted due to buildbot failures llvm-svn: 325454
* Simplify.Rui Ueyama2018-02-171-5/+4
| | | | llvm-svn: 325453
* Add DEBUGSERVER_PATH to the cache so it'll be available for tests.Don Hinton2018-02-171-2/+2
| | | | | | | | This fixed a problem caused by r325442. Differential Revision: https://reviews.llvm.org/D43432 llvm-svn: 325452
* Fix Wparentheses warning. NFCISimon Pilgrim2018-02-171-1/+1
| | | | llvm-svn: 325451
* [SelectionDAG] ComputeNumSignBits - add support for SMIN+SMAX clamp patternsSimon Pilgrim2018-02-174-1801/+1418
| | | | | | | | | | If we have a clamp pattern, SMIN(SMAX(X, LO),HI) or SMAX(SMIN(X, HI),LO) then we can deduce that the number of signbits will be at least the minimum of the LO and HI constants. I haven't bothered with the UMIN/UMAX equivalent as (1) we don't have any current use cases and (2) I wonder if we'd be better off immediately falling back for ComputeKnownBits for UMIN/UMAX which already has optimization patterns useful for unsigned cases. Differential Revision: https://reviews.llvm.org/D43338 llvm-svn: 325450
* [SelectionDAG] SimplifyDemandedVectorElts - add support for VECTOR_INSERT_ELTSimon Pilgrim2018-02-174-12/+38
| | | | | | Differential Revision: https://reviews.llvm.org/D43431 llvm-svn: 325449
* [ThinLTO] Add GraphTraits for FunctionSummariesCharles Saternos2018-02-175-2/+239
| | | | | | | | Add GraphTraits definitions to the FunctionSummary and ModuleSummaryIndex classes. These GraphTraits will be used to construct find SCC's in ThinLTO analysis passes. Second attempt, since last patch caused stage2 build to fail (now using function_ref rather than std::function). llvm-svn: 325448
* [MIPS][MSA] Convert vector integer min/max opcodes to use generic implementationSimon Pilgrim2018-02-174-98/+45
| | | | | | | | | | Found while investigating D43338 Simon^3 - the LLVM project needs more Simons. Differential Revision: https://reviews.llvm.org/D43433 llvm-svn: 325447
* [X86] Add 'sahf' CPU feature to frontendDimitry Andric2018-02-174-2/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Make clang accept `-msahf` (and `-mno-sahf`) flags to activate the `+sahf` feature for the backend, for bug 36028 (Incorrect use of pushf/popf enables/disables interrupts on amd64 kernels). This was originally submitted in bug 36037 by Jonathan Looney <jonlooney@gmail.com>. As described there, GCC also uses `-msahf` for this feature, and the backend already recognizes the `+sahf` feature. All that is needed is to teach clang to pass this on to the backend. The mapping of feature support onto CPUs may not be complete; rather, it was chosen to match LLVM's idea of which CPUs support this feature (see lib/Target/X86/X86.td). I also updated the affected test case (CodeGen/attr-target-x86.c) to match the emitted output. Reviewers: craig.topper, coby, efriedma, rsmith Reviewed By: craig.topper Subscribers: emaste, cfe-commits Differential Revision: https://reviews.llvm.org/D43394 llvm-svn: 325446
* Remove an unused accessor and simplify the logic a bit. NFC.Rui Ueyama2018-02-174-13/+15
| | | | llvm-svn: 325445
* Factor out common code from applySecRel functions.Rui Ueyama2018-02-171-24/+29
| | | | | | Differential Revision: https://reviews.llvm.org/D43412 llvm-svn: 325444
* [ARM] Add LLVM tests for the vcvtr builtinsSjoerd Meijer2018-02-171-0/+35
| | | | | | | | | Follow up of Clang commit r325351; this adds the LLVM tests, which were also missing. Differential Revision: https://reviews.llvm.org/D43395 llvm-svn: 325443
* [cmake] Fix LLDB_CODESIGN_IDENTITY logic.Don Hinton2018-02-172-18/+17
| | | | | | | | | | | | | | | | | | | | | | Summary: Consolidate LLDB_CODESIGN_IDENTITY logic in one place and use SKIP_DEBUGSERVER, which can be set independently, to control codesigning targets. Currently, running cmake the first time in a clean directory, without passing -DLLDB_CODESIGN_IDENTITY='', fails. However, subsequent runs succeed. That's because LLDB_CODESIGN_IDENTITY gets added to the CACHE after the initial test. To fix that, the default value must be set before it's tested. Here's the error produced on the first run: CMake Error at tools/lldb/tools/debugserver/source/CMakeLists.txt:215 (add_custom_command): No TARGET 'debugserver' has been created in this directory. Differential Revision: https://reviews.llvm.org/D43432 llvm-svn: 325442
* [RISCV] Revert r324172 now r323991 was revertedAlex Bradbury2018-02-172-4/+4
| | | | | | This fixes the build, now that r325421 was commited to revert r323991. llvm-svn: 325441
* Made test dbg_value_fastisel.ll specific to AArch64 fast-isel.Sander de Smalen2018-02-171-6/+1
| | | | | | | | Some buildbots failed on this test (rL325438) because they don't build all targets. I set the triple to aarch64 and moved the test to test/CodeGen/AArch64/fast-isel-dbg-value.ll. llvm-svn: 325440
* [X86] Add 'sahf' to getHostCPUFeatures so -march=native will pick it up ↵Craig Topper2018-02-171-0/+1
| | | | | | | | | | | | | | | | correctly. Summary: We probably mostly get this right due to family/model/stepping mapping to CPU names. But we should detect it explicitly. Reviewers: RKSimon, echristo, dim, spatel Reviewed By: dim Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D43418 llvm-svn: 325439
* [DebugInfo][FastISel] Fix dropping dbg.value()Sander de Smalen2018-02-173-8/+66
| | | | | | | | | | | | | | | | | | | | | | | Summary: https://llvm.org/PR36263 shows that when compiling at -O0 a dbg.value() instruction (that remains from an original dbg.declare()) is dropped by FastISel. Since FastISel selects instructions by iterating a basic block backwards, it drops the dbg.value if one of its operands is not yet instantiated by a previously selected instruction. Instead of calling 'lookUpRegForValue()' we can call 'getRegForValue()' instead that will insert a placeholder for the operand to be filled in when continuing the instruction selection. Reviewers: aprantl, dblaikie, probinson Reviewed By: aprantl Subscribers: llvm-commits, dstenb, JDevlieghere Differential Revision: https://reviews.llvm.org/D43386 llvm-svn: 325438
* [PatternMatch] enhance m_One() to ignore undef elements in vectorsSanjay Patel2018-02-174-22/+16
| | | | llvm-svn: 325437
* [InstSimplify, InstCombine] add tests with vector undef elts; NFCSanjay Patel2018-02-172-6/+43
| | | | | | These would fold if the m_One pattern matcher accounted for undef elts. llvm-svn: 325436
* [X86][3DNow!] Add PFRCP reg-reg disassembler test case (PR21168)Simon Pilgrim2018-02-171-0/+3
| | | | llvm-svn: 325435
* [InstSimplify] move select undef cond fold with other constant cond folds; NFCISanjay Patel2018-02-171-20/+21
| | | | llvm-svn: 325434
* [AArch64] Implement dynamic stack probing for windowsMartin Storsjo2018-02-178-4/+114
| | | | | | | | | This makes sure that alloca() function calls properly probe the stack as needed. Differential Revision: https://reviews.llvm.org/D42356 llvm-svn: 325433
* Fix unused variable warning. NFCI.Simon Pilgrim2018-02-171-3/+2
| | | | | | We were casting to AArch64InstrInfo but only using it for static methods which some compilers complain about. llvm-svn: 325432
* Recognize all NetBSD architectures in UBSanKamil Rytarowski2018-02-172-18/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Use uniform accessors for Program Pointer, Stack Pointer and Frame Pointer. Remove CPU check in UBSan supported platforms and rely only on the OS type. This adds NetBSD support in GetPcSpBp() for: - ARM - ARM64 - HPPA - PowerPC/PowerPC64 - SPARC/SPARC64 - MIPS - DEC Alpha AXP - DEC VAX - M68K and M68010 - SH3 - IA64 - OR1K - RISCV Sponsored by <The NetBSD Foundation> Reviewers: joerg, vitalybuka, ro Reviewed By: vitalybuka Subscribers: aemerson, jyknight, sdardis, kubamracek, arichardson, llvm-commits, kristof.beyls, fedor.sergeev, #sanitizers Tags: #sanitizers Differential Revision: https://reviews.llvm.org/D43021 llvm-svn: 325431
OpenPOWER on IntegriCloud