summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* [llvm-mca] Refactor class SourceMgr. NFCIAndrea Di Biagio2018-10-244-44/+43
| | | | | | | | Added begin()/end() methods to allow the usage of SourceMgr in foreach loops. With this change, method getMCInstFromIndex() (as well as a couple of other methods) are now redundant, and can be removed from the public interface. llvm-svn: 345147
* [FPEnv] Convert more BinaryOperator::isFNeg(...) to m_FNeg(...)Cameron McInally2018-10-243-16/+34
| | | | | | | | This work is to avoid regressions when we seperate FNeg from the FSub IR instruction. Differential Revision: https://reviews.llvm.org/D53205 llvm-svn: 345146
* Remove a pair of unused dispatch multiversion declarations.Erich Keane2018-10-241-15/+0
| | | | | | | | | These declarations somehow survived a cleanup that combined them with the target multiversioning functions. This patch removes them as they are no longer necessary or used. Change-Id: I318286401ace63bef1aa48018dabb25be0117ca0 llvm-svn: 345145
* [clangd] Ensure that we reply to each call exactly once. NFC (I think!)Sam McCall2018-10-242-31/+77
| | | | | | | | | | | | | | | | | | Summary: In debug builds, getting this wrong will trigger asserts. In production builds, it will send an error reply if none was sent, and drop redundant replies. (And log). No tests because this is always a programming error. (We did have some cases of this, but I fixed them with the new dispatcher). Reviewers: ioeric Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, jfb, kadircet, cfe-commits Differential Revision: https://reviews.llvm.org/D53399 llvm-svn: 345144
* Split a function. NFC.Rui Ueyama2018-10-241-11/+17
| | | | llvm-svn: 345143
* [DEBUGINFO, NVPTX] Try to pack bytes data into a single string.Alexey Bataev2018-10-2411-4530/+736
| | | | | | | | | | | | | | | | | | | | Summary: If the target does not support `.asciz` and `.ascii` directives, the strings are represented as bytes and each byte is placed on the new line as a separate byte directive `.b8 <data>`. NVPTX target allows to represent the vector of the data of the same type as a vector, where values are separated using `,` symbol: `.b8 <data1>,<data2>,...`. This allows to reduce the size of the final PTX file. Ptxas tool includes ptx files into the resulting binary object, so reducing the size of the PTX file is important. Reviewers: tra, jlebar, echristo Subscribers: jholewinski, llvm-commits Differential Revision: https://reviews.llvm.org/D45822 llvm-svn: 345142
* [clangd] Don't show base class versions of members as completions.Sam McCall2018-10-242-6/+9
| | | | | | | | | | | | | | Summary: These are available via qualifiers, but signal to noise level is low. Keep required quailifier machinery around though, for cross-ns completion. Reviewers: ioeric Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, kadircet, cfe-commits Differential Revision: https://reviews.llvm.org/D53571 llvm-svn: 345141
* [clangd] Downrank members from base classEric Liu2018-10-243-1/+17
| | | | | | | | | | | | Reviewers: sammccall, ilya-biryukov Reviewed By: sammccall Subscribers: MaskRay, jkorous, arphaman, kadircet, cfe-commits Differential Revision: https://reviews.llvm.org/D53638 llvm-svn: 345140
* Add parenthese around a bitand.Rui Ueyama2018-10-241-1/+1
| | | | llvm-svn: 345139
* Make a local variable scope narrower. NFC.Rui Ueyama2018-10-241-3/+3
| | | | llvm-svn: 345138
* Fix llvm-strings crash for negative char valuesJames Henderson2018-10-242-1/+4
| | | | | | | | | | | | | | | | | On Windows at least, llvm-strings was crashing if it encountered bytes that mapped to negative chars, as it was passing these into std::isgraph and std::isblank functions, resulting in undefined behaviour. On debug builds using MSVC, these functions verfiy that the value passed in is representable as an unsigned char. Since the char is promoted to an int, a value greater than 127 would turn into a negative integer value, and fail the check. Using the llvm::isPrint function is sufficient to solve the issue. Reviewed by: ruiu, mstorsjo Differential Revision: https://reviews.llvm.org/D53509 llvm-svn: 345137
* [X86][SSE] Update PMULDQ schedule tests to survive more aggressive ↵Simon Pilgrim2018-10-242-30/+52
| | | | | | SimplifyDemandedBits llvm-svn: 345136
* [CodeComplete] Expose InBaseClass signal in code completion results.Eric Liu2018-10-245-59/+73
| | | | | | | | | | | | | | | | | Summary: No new tests as the existing tests for result priority should give us coverage. Also as the new flag is trivial enough, I'm reluctant to plumb the flag to c-index-test output. Reviewers: ilya-biryukov Reviewed By: ilya-biryukov Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D53635 llvm-svn: 345135
* [clangd] Hide position line and column fields.Haojian Wu2018-10-241-2/+1
| | | | | | | | | | Reviewers: sammccall Subscribers: ilya-biryukov, ioeric, MaskRay, jkorous, arphaman, kadircet, cfe-commits Differential Revision: https://reviews.llvm.org/D53577 llvm-svn: 345134
* [autocompletion] Handle the space before pressing tabYuka Takahashi2018-10-242-0/+21
| | | | | | | | | | | Summary: Distinguish "--autocomplete=-someflag" and "--autocomplete=-someflag," because the latter indicates that the user put a space before pushing tab which should end up in a file completion. Differential Revision: https://reviews.llvm.org/D53639 llvm-svn: 345133
* Support accepting __gnu__ as a scoped attribute namespace that aliases to gnu.Aaron Ballman2018-10-249-58/+90
| | | | | | This is useful in libstdc++ to avoid clashes with identifiers in the user's namespace. llvm-svn: 345132
* [MinGW] Enable large file for mingw-w64Martin Storsjo2018-10-241-0/+4
| | | | | | | | 64-bit mingw doesn't define _FILE_OFFSET_BITS=64 by default. Differential Revision: https://reviews.llvm.org/D53569 llvm-svn: 345131
* [llvm-exegesis] Implements a cache of Instruction objects.Guillaume Chatelet2018-10-247-11/+43
| | | | llvm-svn: 345130
* [llvm-mca] [llvm-mca] Improved error handling and error reporting from class ↵Andrea Di Biagio2018-10-245-47/+84
| | | | | | | | | | | | | | | | | | | | | | | | | InstrBuilder. A new class named InstructionError has been added to Support.h in order to improve the error reporting from class InstrBuilder. The llvm-mca driver is responsible for handling InstructionError objects, and printing them out to stderr. The goal of this patch is to remove all the remaining error handling logic from the library code. In particular, this allows us to: - Simplify the logic in InstrBuilder by removing a needless dependency from MCInstrPrinter. - Centralize all the error halding logic in a new function named 'runPipeline' (see llvm-mca.cpp). This is also a first step towards generalizing class InstrBuilder, so that in future, we will be able to reuse its logic to also "lower" MachineInstr to mca::Instruction objects. Differential Revision: https://reviews.llvm.org/D53585 llvm-svn: 345129
* [clangd] Simplify auto hoverIlya Biryukov2018-10-242-27/+16
| | | | | | | | | | | | | | | | Summary: Use helper from clang. Also fixes some weird corner cases, e.g. auto (*foo)() = bar; Reviewers: kadircet, hokein Reviewed By: kadircet, hokein Subscribers: ioeric, MaskRay, jkorous, arphaman, cfe-commits Differential Revision: https://reviews.llvm.org/D53347 llvm-svn: 345128
* [LLDB] - Add support for DW_RLE_base_address and DW_RLE_offset_pair entries ↵George Rimar2018-10-247-54/+185
| | | | | | | | | | | (.debug_rnglists) The patch implements the support for DW_RLE_base_address and DW_RLE_offset_pair .debug_rnglists entries Differential revision: https://reviews.llvm.org/D53140 llvm-svn: 345127
* [clangd] Remove outdated comment-out code. NFCIlya Biryukov2018-10-241-1/+0
| | | | llvm-svn: 345126
* [clangd] Fix a link in documentation. NFCIlya Biryukov2018-10-241-1/+1
| | | | llvm-svn: 345125
* [ThinLTO] Change parameter type. NFCEugene Leviant2018-10-241-1/+1
| | | | | | Change destination module type for consistency with r345118 llvm-svn: 345124
* Revert r345114Gil Rapaport2018-10-242-60/+67
| | | | | | Investigating fails. llvm-svn: 345123
* [Sema] Do not show unused parameter warnings when body is skippedIlya Biryukov2018-10-242-2/+11
| | | | | | | | | | | | | | Summary: Without the function body, we cannot determine is parameter was used. Reviewers: ioeric, sammccall Reviewed By: sammccall Subscribers: arphaman, cfe-commits Differential Revision: https://reviews.llvm.org/D53456 llvm-svn: 345122
* [bash-autocompletion] Fix bug when a flag ends with '='Yuka Takahashi2018-10-242-1/+9
| | | | | | | | | | | | | | | | | | There was a bug that when a flag ends with '=' and no value was suggested, clang autocompletes the flag itself. For example, in bash, it looked like this: ``` $ clang -fmodule-file=[tab] -> $clang -fmodule-file=-fmodule-file ``` This is not what we expect. We expect a file autocompletion when no value was found. With this patch, pressing tab suggests files in the current directory. Reviewers: teemperor, ruiu Subscribers: cfe-commits llvm-svn: 345121
* [AMDGPU] Defined gfx909 Raven Ridge 2Tim Renouf2018-10-2413-3/+50
| | | | | | | Differential Revision: https://reviews.llvm.org/D53418 Change-Id: Ie3d054f2e956c2768988c0f4c0ffd29a47294eef llvm-svn: 345120
* [clangd] Embed fixes as CodeAction, instead of clangd_fixes. Clean up ↵Sam McCall2018-10-247-58/+65
| | | | | | | | | | | | | | | | | | | serialization. Summary: CodeAction provides us with a standard way of representing fixes inline, so use it, replacing our existing ad-hoc extension. After this, it's easy to serialize diagnostics using the structured toJSON/Protocol.h mechanism rather than assembling JSON ad-hoc. Reviewers: hokein, arphaman Subscribers: ilya-biryukov, ioeric, MaskRay, jkorous, kadircet, cfe-commits Differential Revision: https://reviews.llvm.org/D53391 llvm-svn: 345119
* [ThinLTO] Fix dot dumper for regular LTO modulesEugene Leviant2018-10-242-1/+29
| | | | | | | | | | Regular LTO module identifier is (unsigned)-1. This patch emits correct module identifier while printing edges with source summary in regular LTO module. Differential revision: https://reviews.llvm.org/D53583 llvm-svn: 345118
* [MinGW] Support for multiarch runtimes layoutMartin Storsjo2018-10-241-0/+1
| | | | | | Patch by Peiyuan Song! llvm-svn: 345117
* [ELF] Remove a superfluous semicolon, fixing warnings. NFC.Martin Storsjo2018-10-241-1/+1
| | | | llvm-svn: 345116
* [LV] Don't have fold-tail under optsize invalidate interleave-groups whenDorit Nuzman2018-10-242-1/+394
| | | | | | | | | | | | | | | | | | | | masked-interleaving is enabled Enable interleave-groups under fold-tail scenario for Opt for size compilation; D50480 added support for vectorizing loops of arbitrary trip-count without a remiander, which in turn makes everything in the loop conditional, including interleave-groups if any. It therefore invalidated all interleave-groups because we didn't have support for vectorizing predicated interleaved-groups at the time. In the meantime, D53011 introduced this support, so we don't have to invalidate interleave-groups when masked-interleaved support is enabled. Reviewers: Ayal, hsaito, dcaballe, fhahn Reviewed By: hsaito Differential Revision: https://reviews.llvm.org/D53559 llvm-svn: 345115
* [LSR] Combine unfolded offset into invariant registerGil Rapaport2018-10-242-67/+60
| | | | | | | | | | | | LSR reassociates constants as unfolded offsets when the constants fit as immediate add operands, which currently prevents such constants from being combined later with loop invariant registers. This patch modifies GenerateCombinations() to generate a second formula which includes the unfolded offset in the combined loop-invariant register. Differential Revision: https://reviews.llvm.org/D51861 llvm-svn: 345114
* [clangd] Truncate SymbolID to 16 bytes.Sam McCall2018-10-244-21/+26
| | | | | | | | | | | | | | | Summary: The goal is 8 bytes, which has a nonzero risk of collisions with huge indexes. This patch should shake out any issues with truncation at all, we can lower further later. Reviewers: ioeric Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, kadircet, cfe-commits Differential Revision: https://reviews.llvm.org/D53587 llvm-svn: 345113
* [X86] Correct a bad isel predicate. Though I don't think it can be exposed.Craig Topper2018-10-241-1/+1
| | | | | | This B/W VPTEST instructions are only available with AVX512BW. But lowering should prevent any byte or word elements from getting to isel so this can't be exposed. llvm-svn: 345112
* [Sema] Fix -Wcomma in dependent contextRichard Trieu2018-10-242-0/+16
| | | | | | | | | | When there is a dependent type inside a cast, the CastKind becomes CK_Dependent instead of CK_ToVoid. This fix will check that there is a dependent cast, the original type is dependent, and the target type is void to ignore the cast. https://bugs.llvm.org/show_bug.cgi?id=39375 llvm-svn: 345111
* [hwasan] when printing a stack-related bugs, also print stack frame ↵Kostya Serebryany2018-10-244-5/+26
| | | | | | descriptions provided by the compiler llvm-svn: 345110
* Debug Info (-gmodules): emit full types for non-anchored template ↵Adrian Prantl2018-10-247-2/+131
| | | | | | | | | | | | | | | | | specializations Before this patch, clang would emit a (module-)forward declaration for template instantiations that are not anchored by an explicit template instantiation, but still are guaranteed to be available in an imported module. Unfortunately detecting the owning module doesn't reliably work when local submodule visibility is enabled and the template is inside a cross-module namespace. This make clang debuggable again with -gmodules and LSV enabled. rdar://problem/41552377 llvm-svn: 345109
* [ARM64][Windows] Add unwind support to llvm-readobjSanjin Sijaric2018-10-2410-54/+711
| | | | | | | | | This patch adds support for dumping the unwind info from ARM64 COFF object files. Differential Revision: https://reviews.llvm.org/D53264 llvm-svn: 345108
* ARM: handle checking aliases with out-of-bounds GEPsSaleem Abdulrasool2018-10-242-3/+22
| | | | | | | | | | | | A global alias may use indices which are not considered in bounds. In such a case, accessing the base object will fail as it only peers through inbounds accesses. This pattern is used by the swift compiler to create references to preceeding members in the type metadata. This would cause the code generation to fail when targeting a platform that used ELF as the object file format. Be conservative and fail the read-only check if we run into an alias that we cannot peer through. llvm-svn: 345107
* Support nwere versions of the Segger J-Link jtag board software.Jason Molenda2018-10-235-6/+184
| | | | | | | | | | | | | | | | | | | | | | Add support in ProcessGDBRemote::GetGDBServerRegisterInfo for recognizing a generic "arm" architecture that will be used if nothing better is available so that we don't ignore the register definitions if we didn't already have an architecture set. Also in ProcessGDBRemote::DoConnectRemote don't set the target arch unless we have a valid architecture to set it to. Platform::ConnectProcess will try to get the current target's architecture, or the default architecture, when creating the target for the connection to be attempted. If lldb was started with a target binary, we want to create this target with that architecture in case the remote gdb stub doesn't supply a qHostInfo arch. Add logging to Target::MergeArchitecture. <rdar://problem/34916465> llvm-svn: 345106
* Commit missing comment edit and use correct cast to fix std::min overloadReid Kleckner2018-10-231-5/+5
| | | | llvm-svn: 345105
* [hurd] Make getMainExecutable get the real binary pathReid Kleckner2018-10-231-7/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | On GNU/Hurd, llvm-config is returning bogus value, such as: $ llvm-config-6.0 --includedir /usr/include while it should be: $ llvm-config-6.0 --includedir /usr/lib/llvm-6.0/include This is because getMainExecutable does not get the actual installation path. On GNU/Hurd, /proc/self/exe is indeed a symlink to the path that was used to start the program, and not the eventual binary file. Llvm's getMainExecutable thus needs to run realpath over it to get the actual place where llvm was installed (/usr/lib/llvm-6.0/bin/llvm-config), and not /usr/bin/llvm-config-6.0. This will not change the result on Linux, where /proc/self/exe already points to the eventual file. Patch by Samuel Thibault! While making changes here, I reformatted this block a bit to reduce indentation and match 2 space indent style. Differential Revision: https://reviews.llvm.org/D53557 llvm-svn: 345104
* [PM] keeping history when original SCC split and then merge into itselfWei Mi2018-10-233-40/+128
| | | | | | | | | | | | | | | | | | | | in the same round of SCC update. In https://reviews.llvm.org/rL309784, inline history is added to prevent infinite inlining across multiple run of inliner and SCC update, but the history will only be kept when new SCC is actually generated during SCC update. We found a case that SCC can be split and then merge into itself in the same round of SCC update, so the same SCC will be pop out from UR.CWorklist and then added back immediately, without any new SCC generated, that is why the existing patch cannot catch the infinite inline case. What the patch does is even if no new SCC is generated, if only the current SCC appears in UR.CWorklist again, then keep the inline history. Differential Revision: https://reviews.llvm.org/D52915 llvm-svn: 345103
* SelectionDAG: Reuse bigger sized constants in memset expansion.Matthias Braun2018-10-237-41/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | When implementing memset's today we often see this pattern: $x0 = MOV 0xXYXYXYXYXYXYXYXY store $x0, ... $w1 = MOV 0xXYXYXYXY store $w1, ... We first create a 64bit constant in a 64bit register with all bytes the same and then create a 32bit constant with all bytes the same in a 32bit register. In many targets we could just access the lower byte of the 64bit register instead. - Ideally this would be handled by the ConstantHoist pass but it runs too early when memset isn't expanded yet. - The memset expansion code already had this optimization implemented, however SelectionDAG constantfolding would constantfold the "trunc(bigconstnat)" pattern to "smallconstant". - This patch makes the memset expansion mark the constant as Opaque and stop DAGCombiner from constant folding in this situation. (Similar to how ConstantHoisting marks things as Opaque to avoid folding ADD/SUB/etc.) Differential Revision: https://reviews.llvm.org/D53181 llvm-svn: 345102
* [analyzer] [NFC] Change scanReachableSymbols to use rangesGeorge Karpenkov2018-10-234-43/+14
| | | | | | | | Remove unused overload. Clean up some usages. Differential Revision: https://reviews.llvm.org/D53615 llvm-svn: 345101
* [analyzer] Do not stop tracking CXX methods touching OSObject.George Karpenkov2018-10-233-14/+69
| | | | | | | | Trust generalized annotations for OSObject. Differential Revision: https://reviews.llvm.org/D53550 llvm-svn: 345100
* [analyzer] Trust summaries for OSObject::retain and OSObject::releaseGeorge Karpenkov2018-10-233-27/+28
| | | | | | | | Refactor the way in which summaries are consumed for safeMetaCast Differential Revision: https://reviews.llvm.org/D53549 llvm-svn: 345099
* [ORC] Re-apply r345077 with fixes to remove ambiguity in lookup calls.Lang Hames2018-10-2315-171/+289
| | | | llvm-svn: 345098
OpenPOWER on IntegriCloud