summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* math.h: Set HAVE_HW_FMA32 based on compiler provided macroJan Vesely2018-01-291-0/+5
| | | | | | | | | Fixes sin/cos piglits on non-FMA capable asics. Bugzilla: https://bugs.llvm.org/show_bug.cgi?id=35983 Reviewer: Tom Stellard Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu> llvm-svn: 323677
* [MachineVerifier] Add check that renamable operands aren't reserved registers.Geoff Berry2018-01-291-6/+8
| | | | | | | | | | | | Summary: Reviewers: qcolombet, MatzeB Subscribers: arsenm, sdardis, nhaehnle, mcrosier, llvm-commits Differential Revision: https://reviews.llvm.org/D42449 llvm-svn: 323676
* [AMDGPU][X86][Mips] Make sure renamable bit not set for reserved regsGeoff Berry2018-01-296-6/+29
| | | | | | | | | Summary: Fix a few places that were modifying code after register allocation to set the renamable bit correctly to avoid failing the validation added in D42449. llvm-svn: 323675
* Move getPlatformFlags to ELFObjectFileBase and simplify.Rafael Espindola2018-01-294-22/+13
| | | | | | | This removes a few std::error_code results that were ignored on every call. llvm-svn: 323674
* [Host] Respect LLVM_LIBDIR_SUFFIX when looking for LLDB plugins on LinuxMichal Gorny2018-01-292-1/+4
| | | | | | | | | | | Fix the Linux plugin lookup path to include appropriate libdir suffix for the system. To accomplish this, store the value of LLVM_LIBDIR_SUFFIX in lldb/Host/Config.h as LLDB_LIBDIR_SUFFIX, and use this variable when defining the plugin path. Differential Revision: https://reviews.llvm.org/D42317 llvm-svn: 323673
* [X86] Don't create SHRUNKBLEND when the condition is used by the true or ↵Craig Topper2018-01-292-34/+38
| | | | | | | | | | false operand of the vselect. Fixes PR34592. Differential Revision: https://reviews.llvm.org/D42628 llvm-svn: 323672
* [X86] Add test case for pr34592Craig Topper2018-01-291-0/+68
| | | | llvm-svn: 323671
* [DWARF] Recommitting a test reverted in r323560. Moved to x86 directory with ↵Wolfgang Pieb2018-01-291-0/+157
| | | | | | | | explicit triple. ELF support is required for type units. llvm-svn: 323670
* [globalisel] Make LegalizerInfo::LegalizeAction available outside of ↵Daniel Sanders2018-01-299-198/+206
| | | | | | | | | | | | LegalizerInfo. NFC Summary: The improvements to the LegalizerInfo discussed in D42244 require that LegalizerInfo::LegalizeAction be available for use in other classes. As such, it needs to be moved out of LegalizerInfo. This has been done separately to the next patch to minimize the noise in that patch. llvm-svn: 323669
* [clang-format] Fix bug where -dump-config failed on ObjC headerBen Hamilton2018-01-294-3/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: `clang-format -dump-config path/to/file.h` never passed anything for the Code parameter to clang::format::getStyle(). This meant the logic to guess Objective-C from the contents of a .h file never worked, because LibFormat didn't have the code to work with. With this fix, we now correctly read in the contents of the file if possible with -dump-config. I had to update the lit config for test/Format/ because the default config ignores .h files. Test Plan: make -j12 check-clang Reviewers: jolesiak, krasimir Reviewed By: jolesiak, krasimir Subscribers: Wizard, klimek, cfe-commits, djasper Differential Revision: https://reviews.llvm.org/D42395 llvm-svn: 323668
* [AccelTable] Workaround for MSVC bugJonas Devlieghere2018-01-292-10/+85
| | | | | | | | Microsoft Visual Studio rejects the static constexpr static list of atoms even though it's valid C++. This provides a workaround to unbreak the bots. llvm-svn: 323667
* Add myself to CREDITS.txtTony Jiang2018-01-291-0/+5
| | | | llvm-svn: 323666
* [scan-build] Add an option to skip overriding CC and CXX make varsJonathan Roelofs2018-01-292-5/+21
| | | | | | | | | | | | | | Autoconf and some other systems tend to add essential compilation options to CC (e.g. -std=gnu99). When running such an auto-generated makefile, scan-build does not need to change CC and CXX as they are already set to use ccc-analyzer by a configure script. Implement a new option --keep-cc as was proposed in this discussion: http://lists.llvm.org/pipermail/cfe-dev/2013-September/031832.html Patch by Paul Fertser! llvm-svn: 323665
* [analyzer] Fix -x language argument for C preprocessed sourcesJonathan Roelofs2018-01-291-2/+2
| | | | | | | | | | | | | clang's -x option doesn't accept c-cpp-output as a language (even though 463eb6ab was merged, the driver still doesn't handle that). This bug prevents testing C language projects when ccache is used. Fixes #25851. Investigation and patch by Dave Rigby. llvm-svn: 323664
* Add test case for truncated and promotion to test. NFCAmaury Sechet2018-01-291-0/+49
| | | | llvm-svn: 323663
* [SLP] Fix for PR32086: Count InsertElementInstr of the same elements as shuffle.Alexey Bataev2018-01-294-164/+413
| | | | | | | | | | | | | | | | | Summary: If the same value is going to be vectorized several times in the same tree entry, this entry is considered to be a gather entry and cost of this gather is counter as cost of InsertElementInstrs for each gathered value. But we can consider these elements as ShuffleInstr with SK_PermuteSingle shuffle kind. Reviewers: spatel, RKSimon, mkuper, hfinkel Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D38697 llvm-svn: 323662
* [SLP] Add a test with extract for PR32086, NFC.Alexey Bataev2018-01-291-0/+33
| | | | llvm-svn: 323661
* [clangd] Use new URI with scheme support in place of the existing LSP URIEric Liu2018-01-299-134/+108
| | | | | | | | | | | | | | | | | | Summary: o Replace the existing clangd::URI with a wrapper of FileURI which also carries a resolved file path. o s/FileURI/URI/ o Get rid of the URI hack in vscode extension. Reviewers: sammccall Reviewed By: sammccall Subscribers: klimek, ilya-biryukov, jkorous-apple, cfe-commits Differential Revision: https://reviews.llvm.org/D42419 llvm-svn: 323660
* [AccelTable] Try making MSVC happyJonas Devlieghere2018-01-292-8/+8
| | | | | | | | MSVC complains that the constexpr "expression did not evaluate to a constant". Trying to make it happy by adding a `const` specifier as suggested in https://stackoverflow.com/questions/37574343. llvm-svn: 323659
* [clangd] Add a fallback directory for collected symbols with relative paths.Eric Liu2018-01-294-37/+72
| | | | | | | | | | Reviewers: hokein, sammccall Subscribers: klimek, ilya-biryukov, jkorous-apple, cfe-commits Differential Revision: https://reviews.llvm.org/D42638 llvm-svn: 323658
* tsan: deflake a testDmitry Vyukov2018-01-292-7/+12
| | | | | | | | | | | | | | | | | | There was a failure on a bot: http://lab.llvm.org:8011/builders/clang-cmake-mipsel/builds/1283 strerror test is indeed flaky. We protect all races by a barrier in other tests to eliminate flakiness. Do the same here. No idea why tls_race2.cc failed. Add output at the end of the test as we do in other tests. Sometimes test process crashes somewhere in the middle (e.g. during race reporting) and it looks like empty output. Output at the end of test allows to understand if the process has crashed, or it has finished but produced no race reports. Reviewed in https://reviews.llvm.org/D42633 llvm-svn: 323657
* [AccelTable] Fix undefined referenceJonas Devlieghere2018-01-291-1/+1
| | | | | | | Fixes the missing reference in AppleAccelTableData by making the method pure virtual as intended. llvm-svn: 323656
* [dsymutil] Generate Apple accelerator tablesJonas Devlieghere2018-01-298-50/+642
| | | | | | | | | | | This patch adds support for generating accelerator tables in dsymutil. This feature was already present in our internal repository but not yet upstreamed because it requires changes to the Apple accelerator table implementation. Differential revision: https://reviews.llvm.org/D42501 llvm-svn: 323655
* [NFC] Rename DwarfAccelTable and move header.Jonas Devlieghere2018-01-295-39/+65
| | | | | | | | | | This patch renames DwarfAccelTable.{h,cpp} to AccelTable.{h,cpp} and moves the header to the include dir so it is accessible by the dsymutil implementation. Differential revision: https://reviews.llvm.org/D42529 llvm-svn: 323654
* [NFC] Refactor Apple Accelerator TablesJonas Devlieghere2018-01-294-318/+360
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch refactors the way data is stored in the accelerator table and makes them truly generic. There have been several attempts to do this in the past: - D8215 & D8216: Using a union and partial hardcoding. - D11805: Using inheritance. - D42246: Using a callback. In the end I didn't like either of them, because for some reason or another parts of it felt hacky or decreased runtime performance. I didn't want to completely rewrite them as I was hoping that we could reuse parts for the successor in the DWARF standard. However, it seems less and less likely that there will be a lot of opportunities for sharing code and/or an interface. Originally I choose to template the whole class, because it introduces no performance overhead compared to the original implementation. We ended up settling on a hybrid between a templated method and a virtual call to emit the data. The motivation is that we don't want to increase code size for a feature that should soon be superseded by the DWARFv5 accelerator tables. While the code will continue to be used for compatibility, it won't be on the hot path. Furthermore this does not regress performance compared to Apple's internal implementation that already uses virtual calls for this. A quick summary for why these changes are necessary: dsymutil likes to reuse the current implementation of the Apple accelerator tables. However, LLDB expects a slightly different interface than what is currently emitted. Additionally, in dsymutil we only have offsets and no actual DIEs. Although the patch suggests a lot of code has changed, this change is pretty straightforward: - We created an abstract class `AppleAccelTableData` to serve as an interface for the different data classes. - We created two implementations of this class, one for type tables and one for everything else. There will be a third one for dsymutil that takes just the offset. - We use the supplied class to deduct the atoms for the header which makes the structure of the table fully self contained, although not enforced by the interface as was the case for the fully templated approach. - We renamed the prefix from DWARF- to Apple- to make space for the future implementation of .debug_names. This change is NFC and relies on the existing tests. Differential revision: https://reviews.llvm.org/D42334 llvm-svn: 323653
* [clangd] Fixed null deference on invalid compile commands.Ilya Biryukov2018-01-291-0/+2
| | | | | | | Code building the AST expected that construction of CompilerInstance always succeeds. This is not the case. llvm-svn: 323652
* [AMDGPU][MC] Corrected parsing of image opcode modifiers r128 and d16Dmitry Preobrazhensky2018-01-294-2/+40
| | | | | | | | | | | See bugs 36092, 36093: https://bugs.llvm.org/show_bug.cgi?id=36092 https://bugs.llvm.org/show_bug.cgi?id=36093 Differential Revision: https://reviews.llvm.org/D42583 Reviewers: vpykhtin, artem.tamazov, arsenm llvm-svn: 323651
* [ELF][MIPS] Rename function to be consistent with other names. NFCSimon Atanasyan2018-01-291-16/+16
| | | | llvm-svn: 323650
* [OpenMP] Initial implementation of OpenMP offloading library - libomptarget ↵George Rokos2018-01-2927-1/+5897
| | | | | | | | | | | | device RTLs. This patch implements the device runtime library whose interface is used in the code generation for OpenMP offloading devices. Currently there is a single device RTL written in CUDA meant to CUDA enabled GPUs. The interface is a variation of the kmpc interface that includes some extra calls to do thread and storage management that only make sense for a GPU target. Differential revision: https://reviews.llvm.org/D14254 llvm-svn: 323649
* Fix windows test failure caused by r323638Pavel Labath2018-01-292-4/+8
| | | | | | | | | | | | | | The test was failing because of an incorrect sizeof check in the name index parsing code. This code was meant to check that we have enough input to parse the fixed-size part of the dwarf header, which it did by comparing the input to sizeof(Header). Originally struct Header only contained the fixed-size part, but during review, we've moved additional members into it, which rendered the sizeof check invalid. I resolve this by moving the fixed-size part to a separate struct and updating the sizeof-expression to use that. llvm-svn: 323648
* [Lexer] Support adding working directory to relative search dir for #include ↵Eric Liu2018-01-294-12/+129
| | | | | | | | | | | | shortening in HeaderSearch. Reviewers: bkramer Subscribers: mgorny, hintonda, cfe-commits Differential Revision: https://reviews.llvm.org/D42577 llvm-svn: 323647
* [AArch64][AsmParser] NFC: Generalize LogicalImm[Not](32|64) codeSander de Smalen2018-01-295-72/+38
| | | | | | | | | | | | | | | | Summary: All variants of isLogicalImm[Not](32|64) can be combined into a single templated function, same for printLogicalImm(32|64). By making it use a template instead, further SVE patches can use it for other data types as well (e.g. 8, 16 bits). Reviewers: fhahn, rengolin, aadg, echristo, kristof.beyls, samparker Reviewed By: samparker Subscribers: aemerson, javed.absar, llvm-commits Differential Revision: https://reviews.llvm.org/D42294 llvm-svn: 323646
* [lldb] Silence signed <-> unsigned integer comparison warningKirill Bobyrev2018-01-291-1/+1
| | | | | | | | | | | | | | | | | | `num_args` is unsigned integer, declared as below: ``` uint32_t num_args = arg_enum->getChildCount(); ``` Comparison with the signed `arg_idx` produces a warning when compiled with -Wsign-compare flag, this patch addresses this simple issue without affecting any functionality. Reviewers: davide, asmith Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D42620 llvm-svn: 323645
* [DebugInfo] Fix fragment offset emission order for symbol locationsMikael Holmen2018-01-292-3/+66
| | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: When emitting the location for a global variable with fragmented debug expressions, make sure that the offset pieces, which represent optimized-out parts of the variable, are emitted before their succeeding fragments' expressions. Previously, if the succeeding fragment's location was a symbol, the offset piece was emitted after, rather than before, that symbol's expression. This effectively meant that the symbols were associated with the wrong parts of the variable. This fixes PR36085. Patch by: David Stenberg Reviewers: aprantl, probinson, dblaikie Reviewed By: aprantl Subscribers: JDevlieghere, llvm-commits Tags: #debug-info Differential Revision: https://reviews.llvm.org/D42527 llvm-svn: 323644
* [Sparc] Account for bias in stack readjustmentJonas Devlieghere2018-01-292-10/+35
| | | | | | | | | | | | | | | | | | | Summary: This was broken long ago in D12208, which failed to account for the fact that 64-bit SPARC uses a stack bias of 2047, and it is the *unbiased* value which should be aligned, not the biased one. This was seen to be an issue with Rust. Patch by: jrtc27 (James Clarke) Reviewers: jyknight, venkatra Reviewed By: jyknight Subscribers: jacob_hansen, JDevlieghere, fhahn, fedor.sergeev, llvm-commits Differential Revision: https://reviews.llvm.org/D39425 llvm-svn: 323643
* Fix build broken by r323641Pavel Labath2018-01-291-1/+1
| | | | | | | | The call to ScopedPrinter::printNumber with size_t argument was ambiguous (I think) on 32-bit builds. Explicitly cast to a 64-bit int to avoid this. llvm-svn: 323642
* Refactor dwarfdump -apple-names outputPavel Labath2018-01-295-109/+142
| | | | | | | | | | | | | | | | | | Summary: This modifies the dwarfdump output to align it with the new .debug_names dump. It also renames two header fields to match similar fields in the dwarf5 header. A couple of tests needed to be updated to match new output. The changes were fairly straight-forward, although not really automatable. Reviewers: JDevlieghere, aprantl Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D42415 llvm-svn: 323641
* [ARM] FP16Pat and FullFP16Pat patterns. NFC.Sjoerd Meijer2018-01-292-10/+16
| | | | | | | | | Create and use FP16Pat FullFP16Pat helper patterns to make the difference explicit. Differential Revision: https://reviews.llvm.org/D42634 llvm-svn: 323640
* Fix NetBsd build broken by r323637Pavel Labath2018-01-291-1/+1
| | | | llvm-svn: 323639
* [DebugInfo] Basic .debug_names dumping supportPavel Labath2018-01-297-26/+847
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This commit renames DWARFAcceleratorTable to AppleAcceleratorTable to free up the first name as an interface for the different accelerator tables. Then I add a DWARFDebugNames class for the dwarf5 table. Presently, the only common functionality of the two classes is the dump() method, because this is the only method that was necessary to implement dwarfdump -debug-names; and because the rest of the AppleAcceleratorTable interface does not directly transfer to the dwarf5 tables (the main reason for that is that the present interface assumes the tables are homogeneous, but the dwarf5 tables can have different keys associated with each entry). I expect to make the common interface richer as I add more functionality to the new class (and invent a way to represent it in generic way). In terms of sharing the implementation, I found the format of the two tables sufficiently different to frustrate any attempts to have common parsing or dumping code, so presently the implementations share just low level code for formatting dwarf constants. Reviewers: vleschuk, JDevlieghere, clayborg, aprantl, probinson, echristo, dblaikie Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D42297 llvm-svn: 323638
* Remove ObjectFile usage from HostLinux::GetProcessInfoPavel Labath2018-01-299-77/+62
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: The ObjectFile class was used to determine the architecture of a running process by inspecting it's main executable. There were two issues with this: - it's in the wrong layer - the call can be very expensive (it can end up computing the crc of the whole file). Since the process is running on the host, ideally we would be able to just query the data straight from the OS like darwin does, but there doesn't seem to be a reasonable way to do that. So, this fixes the layering issue by using the llvm object library to inspect the file. Since we know the process is already running on the host, we just need to peek at a few bytes of the elf header to determine whether it's 32- or 64-bit (which should make this faster as well). Pretty much the same logic was implemented in NativeProcessProtocol::ResolveProcessArchitecture, so I delete this logic and replace calls with GetProcessInfo. Reviewers: eugene, krytarowski Subscribers: mgorny, hintonda, lldb-commits Differential Revision: https://reviews.llvm.org/D42488 llvm-svn: 323637
* [lldb] Generic base for testing gdb-remote behaviorPavel Labath2018-01-295-4/+522
| | | | | | | | | | | | | | | | | | | | | | | | | Summary: Adds new utilities that make it easier to write test cases for lldb acting as a client over a gdb-remote connection. - A GDBRemoteTestBase class that starts a mock GDB server and provides an easy way to check client packets - A MockGDBServer that, via MockGDBServerResponder, can be made to issue server responses that test client behavior. - Utility functions for handling common data encoding/decoding - Utility functions for creating dummy targets from YAML files ---- Split from the review at https://reviews.llvm.org/D42145, which was a new feature that necessitated the new testing capabilities. Reviewers: clayborg, labath Reviewed By: clayborg, labath Subscribers: hintonda, davide, jingham, krytarowski, mgorny, lldb-commits Differential Revision: https://reviews.llvm.org/D42195 Patch by Owen Shaw <llvm@owenpshaw.net> llvm-svn: 323636
* [X86FixupBWInsts] Fix miscompilation if sibling sub-register is live.Andrei Elovikov2018-01-292-9/+55
| | | | | | | | | | | | | | Summary: The issues was found during D40524. Reviewers: andrew.w.kaylor, craig.topper, MatzeB Reviewed By: andrew.w.kaylor Subscribers: aivchenk, llvm-commits Differential Revision: https://reviews.llvm.org/D42533 llvm-svn: 323635
* [AArch64] Generate the CASP instruction for 128-bit cmpxchgOliver Stannard2018-01-293-3/+153
| | | | | | | | | | | | | | | | The Large System Extension added an atomic compare-and-swap instruction that operates on a pair of 64-bit registers, which we can use to implement a 128-bit cmpxchg. Because i128 is not a legal type for AArch64 we have to do all of the instruction selection in C++, and the instruction requires even/odd register pairs, so we have to wrap it in REG_SEQUENCE and EXTRACT_SUBREG nodes. This is very similar to what we do for 64-bit cmpxchg in the ARM backend. Differential revision: https://reviews.llvm.org/D42104 llvm-svn: 323634
* [ThinLTO] - Stop internalizing and drop non-prevailing symbols.George Rimar2018-01-2911-35/+160
| | | | | | | | | | | Implementation marks non-prevailing symbols as not live in the summary. Then them are dropped in backends. Fixes https://bugs.llvm.org/show_bug.cgi?id=35938 Differential revision: https://reviews.llvm.org/D42107 llvm-svn: 323633
* [X86] Make foldLogicOfSetCCs work better for vectors pre legal types/operationsCraig Topper2018-01-292-4/+2
| | | | | | | | | | | | | | | | | Summary: There's a check in the code to only check getSetCCResultType after LegalOperations or if the type is MVT::i1. But the i1 check is only allowing scalar types through. I think it should check that the scalar type is MVT::i1 so that it will work for vectors. The changed test already does this combine with AVX512VL where getSetCCResultType returns vXi1. But with avx512f and no VLX getSetCCResultType returns a type matching the width of the input type. Reviewers: spatel, RKSimon Reviewed By: spatel Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D42619 llvm-svn: 323631
* [CVP] Don't Replace incoming values from unreachable blocks with undef.Davide Italiano2018-01-292-24/+5
| | | | | | | | | | This pretty much reverts r322006, except that we keep the test, because we work around the issue exposed in a different way (a recursion limit in value tracking). There's still probably some sequence that exposes this problem, and the proper way to fix that for somebody who has time is outlined in the code review. llvm-svn: 323630
* Revert: [compiler-rt] r323626 - [cmake] [compiler-rt] Remove duplicate ↵Don Hinton2018-01-291-1/+1
| | | | | | | | | CMAKE_CXX_FLAGS. Looks like it broke a bot: http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux-android/builds/7195 Reverting until I have a chance to investigate. llvm-svn: 323629
* [NFC] fix trivial typos in comments and documentsHiroshi Inoue2018-01-2923-23/+23
| | | | | | "to to" -> "to" llvm-svn: 323628
* [NFC] fix trivial typos in commentsHiroshi Inoue2018-01-293-4/+4
| | | | | | "to to" -> "to" llvm-svn: 323627
OpenPOWER on IntegriCloud