summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* [asan_symbolize] Avoid blocking when llvm-symbolizer is installed as addr2lineAlexander Richardson2019-08-262-5/+38
| | | | | | | | | | | | | | | | | | | | | | Summary: Currently, llvm-symbolizer will print -1 when presented with -1 and not print a second line. In that case we will block for ever trying to read the file name. This also happens for non-existent files, in which case GNU addr2line exits immediate, but llvm-symbolizer does not (see https://llvm.org/PR42754). While touching these lines, I also added some more debug logging to help diagnose this and potential future issues. Reviewers: kcc, eugenis, glider, samsonov Reviewed By: eugenis Subscribers: kubamracek, #sanitizers, llvm-commits Tags: #sanitizers, #llvm Differential Revision: https://reviews.llvm.org/D65322 llvm-svn: 369924
* [PowerPC] add tests for fma with negated ops; NFCSanjay Patel2019-08-261-7/+37
| | | | llvm-svn: 369923
* [dotest] Print invocation when encountering an error.Jonas Devlieghere2019-08-261-2/+6
| | | | | | | | | | | With this patch dotest.py will print the full invocation whenever it fails to parse its arguments. The dotest invocation is usually build up with different inputs, potentially coming from CMake, lldb-dotest, lit or passed directly. This can make debugging hard, especially on CI, where there might be another layer of indirection. This aims to make that a bit easier. llvm-svn: 369922
* [clangd] Fix docsKadir Cetinkaya2019-08-261-2/+3
| | | | llvm-svn: 369920
* [SampleFDO] Extract the code calling each section reader to readOneSection.Wei Mi2019-08-262-20/+33
| | | | | | | | | | | | This is a followup of https://reviews.llvm.org/D66513. The code calling each section reader should be put into a separate function (readOneSection), so SampleProfileExtBinaryReader can override it. Otherwise, the base class SampleProfileExtBinaryBaseReader will need to be aware of all different kinds of section readers. That is not right. Differential Revision: https://reviews.llvm.org/D66693 llvm-svn: 369919
* Moved GlobList into a separate header fileDmitri Gribenko2019-08-2610-125/+173
| | | | | | | | | | | | | | Summary: It is a separate abstraction that is used in more contexts than just a helper for ClangTidyDiagnosticConsumer. Subscribers: mgorny, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D66747 llvm-svn: 369918
* [clangd] Add docs for configuration knobs in clangdKadir Cetinkaya2019-08-262-0/+40
| | | | | | | | | | | | | | | | Summary: This is a first step in documenting different configuration knobs we have in clangd. Reviewers: sammccall Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D66740 llvm-svn: 369917
* clang-format: [JS] handle `as const`.Martin Probst2019-08-262-0/+7
| | | | | | | | | | | | | | | | | | | | Summary: TypeScript 3.4 supports casting into a const type using `as const`: const x = {x: 1} as const; Previously, clang-format would insert a space after the `const`. With this patch, no space is inserted after the sequence `as const`. Reviewers: krasimir Subscribers: cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D66736 llvm-svn: 369916
* [clang-tidy][NFC] Qualify `makeRule` call in test, for consistency with ↵Yitzhak Mandelbaum2019-08-261-2/+3
| | | | | | | | | | other calls. One call `makeRule` is unqualified (and unintentionally relying on ADL to resolve correctly). This revision qualifies that call for consistency and to drop use of ADL. llvm-svn: 369915
* [clang-tidy] TransformerClangTidyCheck: change choice of location for ↵Yitzhak Mandelbaum2019-08-262-15/+59
| | | | | | | | | | | | | | | | | | | | | | | | | diagnostic message. Summary: This patch changes the location specified to the `ClangTidyCheck::diag()`. Currently, the beginning of the matched range is used. This patch uses the beginning of the first fix's range. This change both simplifies the code and (hopefully) gives a more intuitive result: the reported location aligns with the fix(es) provided, rather than the (arbitrary) range of the rule's match. N.B. this patch will break the line offset numbers in lit tests if the first fix is not at the beginning of the match. Reviewers: gribozavr Subscribers: xazax.hun, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D66676 llvm-svn: 369914
* [clangd] Handling text editor/document lifetimes in vscode extension.Johan Vikstrom2019-08-262-11/+36
| | | | | | | | | | | | | | | | Summary: Just reapplies highlightings for all files when visible text editors change. Could find the correct text editor that should be reapplied but going for a simple implementation instead. Removes the associated highlighting entry from the Colorizer when a text document is closed. Reviewers: hokein, ilya-biryukov Subscribers: MaskRay, jkorous, arphaman, kadircet, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D66735 llvm-svn: 369911
* Really fix the type mismatch error in GDBRemoteCommunicationServerCommonPavel Labath2019-08-261-2/+2
| | | | | | | | My previous attempt in attempt in r369904 actually broke the 32bit build because File::Read expects to take a reference to size_t. Fix the warning by using SIZE_MAX to denote failure instead. llvm-svn: 369910
* [X86] Automatically generate various tests. NFCAmaury Sechet2019-08-2625-235/+1033
| | | | llvm-svn: 369909
* [ProcessWindows] Remove equivalent macrosTatyana Krasnukha2019-08-262-4/+4
| | | | llvm-svn: 369908
* Move ProcessInstanceInfoTest to UtilityPavel Labath2019-08-263-1/+1
| | | | | | The class under test was moved in r355342. This moves the test code too. llvm-svn: 369907
* ProcessInstanceInfo: Fix dumping of invalid user idsPavel Labath2019-08-262-11/+44
| | | | | | | Don't attempt to print invalid user ids. Previously, these would come out as UINT32_MAX, or as an assertion failure. llvm-svn: 369906
* Fix windows build after r369894Pavel Labath2019-08-261-6/+4
| | | | | | | | | | | Constructing a std::vector from a llvm::map_range fails on windows, apparently because std::vector expects the input iterator to have a const operator* (map_range iterator has a non-const one). This avoids the cleverness and unrolls the map-loop manually (which is also slightly shorter). llvm-svn: 369905
* Fix a type mismatch error in GDBRemoteCommunicationServerCommonPavel Labath2019-08-261-1/+1
| | | | | | | GetU64 returns a uint64_t. Don't store it in size_t as that is only 32-bit on 32-bit platforms. llvm-svn: 369904
* Postfix: move more code out of the PDB pluginPavel Labath2019-08-265-77/+97
| | | | | | | | | | | | | | | | Summary: Previously we moved the code which parses a single expression out of the PDB plugin, because that was useful for DWARF expressions in breakpad. However, FPO programs are used in breakpad files too (when unwinding on windows), so this completes the job, and moves the rest of the FPO parser too. Reviewers: amccarth, aleksandr.urakov Subscribers: aprantl, markmentovai, rnk, lldb-commits Differential Revision: https://reviews.llvm.org/D66634 llvm-svn: 369894
* [clangd] Added a colorizer to the vscode extension.Johan Vikstrom2019-08-263-9/+230
| | | | | | | | | | | | | | | | | | | | Summary: Adds the main colorizer component. It colorizes every time clangd sends a publishSemanticHighlighting notification. Every time it colorizes it does a full recolorization (removes all decorations from the editor and applies new ones). The reason for this is that all ranges for the same scope share a TextEditorDecorationType. This is due to TextEditorDecorationTypes being very expensive to create. The prototype used one DecorationType per range but that ran into very big performance problems (it took >100 ms to apply 600 lines of highlightings which froze the editor). This version does not share the problem of being extremly slow, but there is probably potential to optimize it even more. No document/texteditor lifecycle management code in this CL, that will come in the next one. Reviewers: hokein, ilya-biryukov Subscribers: MaskRay, jkorous, arphaman, kadircet, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D66219 llvm-svn: 369893
* Breakpad: Add support for parsing STACK WIN recordsPavel Labath2019-08-263-4/+151
| | | | | | | | | | | | Summary: The fields that aren't useful for us right now are simply ignored. Reviewers: amccarth, markmentovai Subscribers: rnk, lldb-commits Differential Revision: https://reviews.llvm.org/D66633 llvm-svn: 369892
* [GWP_ASAN] Avoid using VERSION_GREATER_EQUAL in cmake filesBjorn Pettersson2019-08-261-1/+1
| | | | | | | | | | | This is a fixup for r369823 which introduced the use of VERSION_GREATER_EQUAL in the cmake config for gwp_asan. Minimum supported version of cmake in LLVM is 3.4.3 and VERSION_GREATER_EQUAL was not introduced until later versions of cmake. llvm-svn: 369891
* [ELF] EhFrameSection: postpone FDE liveness check to finalizeSectionsFangrui Song2019-08-264-32/+50
| | | | | | | | | | | | | | | EhFrameSection::addSection checks liveness of FDE early. This makes it infeasible to move combineEhSections() before ICF. Postpone the check to EhFrameSection::finalizeContents(). This is what ARMExidxSyntheticSection does and it will make a subsequent patch D66717 simpler. Reviewed By: ruiu Differential Revision: https://reviews.llvm.org/D66727 llvm-svn: 369890
* [ELF] Make LinkerScript::assignAddresses iterativeFangrui Song2019-08-267-17/+140
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | PR42990. For `SECTIONS { b = a; . = 0xff00 + (a >> 8); a = .; }`, we currently set st_value(a)=0xff00 while st_value(b)=0xffff. The following call tree demonstrates the problem: ``` link<ELF64LE>(Args); Script->declareSymbols(); // insert a and b as absolute Defined Writer<ELFT>().run(); Script->processSectionCommands(); addSymbol(cmd); // a and b are re-inserted. LinkerScript::getSymbolValue // is lazily called by subsequent evaluation finalizeSections(); forEachRelSec(scanRelocations<ELFT>); processRelocAux // another problem PR42506, not affected by this patch finalizeAddressDependentContent(); // loop executed once script->assignAddresses(); // a = 0, b = 0xff00 script->assignAddresses(); // a = 0xff00, _end = 0xffff ``` We need another assignAddresses() to finalize the value of `a`. This patch 1) modifies assignAddress() to track the original section/value of each symbol and return a symbol whose section/value has changed. 2) moves the post-finalizeSections assignAddress() inside the loop of finalizeAddressDependentContent() and makes it iterative. Symbol assignment may not converge so we make a few attempts before bailing out. Note, assignAddresses() must be called at least twice. The penultimate call finalized section addresses while the last finalized symbol values. It is somewhat obscure and there was no comment. linkerscript/addr-zero.test tests this. Reviewed By: ruiu Differential Revision: https://reviews.llvm.org/D66279 llvm-svn: 369889
* [NFC][cmake] Build fix in tools/llvm-config/CMakeLists.txtGabor Buella2019-08-261-3/+3
| | | | | | | | | | | | | | | To avoid the following error message (using cmake version 3.13.4) : ``` CMake Error at tools/llvm-config/CMakeLists.txt:37 (string): Syntax error in cmake code when parsing string-std=[^ ]\+Invalid escape sequence \+ ``` Reviewed By: mgorny Differential Revision: https://reviews.llvm.org/D58619 llvm-svn: 369887
* [LoopUnroll] Handle certain PHIs in full unrolling properlyBjorn Pettersson2019-08-262-3/+112
| | | | | | | | | | | | | | | | | | | | | | | | | | Summary: When reconstructing the CFG of the loop after unrolling, LoopUnroll could in some cases remove the phi operands of loop-carried values instead of preserving them, resulting in undef phi values after loop unrolling. When doing this reconstruction, avoid removing incoming phi values for phis in the successor blocks if the successor is the block we are jumping to anyway. Patch-by: ebevhan Reviewers: fhahn, efriedma Reviewed By: fhahn Subscribers: bjope, lebedev.ri, zzheng, dmgreen, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D66334 llvm-svn: 369886
* [lldb] Construct the dummy target when the first Debugger object is constructedRaphael Isemann2019-08-262-5/+5
| | | | | | | | | | | | | | | | | | | | | Summary: We should always have a dummy target, so we might as well construct it directly when we create a Debugger object. The idea is that if this patch doesn't cause any problems that we can get rid of all the logic that handles situations where we don't have a dummy target (as all that code is currently untested as there seems to be no way to have no dummy target in LLDB). Reviewers: labath, jingham Reviewed By: labath, jingham Subscribers: jingham, abidh, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D66581 llvm-svn: 369885
* [clangd] Send highlighting diff beyond the end of the file.Haojian Wu2019-08-268-45/+57
| | | | | | | | | | | | | | Summary: This would make the client life (tracking the changes) easier. Reviewers: jvikstrom Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, kadircet, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D66541 llvm-svn: 369884
* [lldb][NFC] Add ProcessInfo::GetNameAsStringRef to simplify some codeRaphael Isemann2019-08-264-15/+7
| | | | llvm-svn: 369880
* [ELF] Error if --strip-all and --emit-relocs are used togetherFangrui Song2019-08-262-0/+6
| | | | | | | | | | | | | | | | | | | | | | | --strip-all suppresses the creation of in.symtab This can cause a null pointer dereference in OutputSection::finalize() // --emit-relocs => copyRelocs is true if (!config->copyRelocs || (type != SHT_RELA && type != SHT_REL)) return; ... link = in.symTab->getParent()->sectionIndex; // in.symTab is null Let's just disallow the combination. In some cases the combination can cause GNU linkers to fail: * ld.bfd: final link failed: invalid operation * gold: internal error in set_no_output_symtab_entry, at ../../gold/object.h:1814 Reviewed By: ruiu Differential Revision: https://reviews.llvm.org/D66704 llvm-svn: 369878
* [NFC][Regalloc] Add testcases for D66576Zi Xuan Wu2019-08-264-0/+854
| | | | llvm-svn: 369877
* [X86] Automatically generate stack folding tests. NFCAmaury Sechet2019-08-2522-3750/+19916
| | | | llvm-svn: 369876
* [Hexagon] remove noise from tests; NFCSanjay Patel2019-08-251-15/+10
| | | | llvm-svn: 369875
* [Hexagon][x86] add tests for bit-test; NFCSanjay Patel2019-08-252-1/+114
| | | | | | | More coverage for D66687 (assuming we make this a generic combine with TLI hook). llvm-svn: 369874
* [Wdocumentation] improve wording of a warning messageDmitri Gribenko2019-08-252-7/+7
| | | | | | | | | | | Based on @davezarzycki remarks in D64696 improved the wording of the warning message. Differential Revision: https://reviews.llvm.org/D66700 Patch by Mark de Wever. llvm-svn: 369873
* [X86][DAGCombiner] Teach narrowShuffle to use concat_vectors instead of ↵Craig Topper2019-08-252-2/+41
| | | | | | | | | | | | | | | | | | | | | inserting into undef Summary: Concat_vectors is more canonical during early DAG combine. For example, its what's used by SelectionDAGBuilder when converting IR shuffles into SelectionDAG shuffles when element counts between inputs and mask don't match. We also have combines in DAGCombiner than can pull concat_vectors through a shuffle. See partitionShuffleOfConcats. So it seems like concat_vectors is a better operation to use here. I had to teach DAGCombiner's SimplifyVBinOp to also handle concat_vectors with undef. I haven't checked yet if we can remove the INSERT_SUBVECTOR version in there or not. I didn't want to mess with the other caller of getShuffleHalfVectors that's used during shuffle lowering where insert_subvector probably is what we want to produce so I've enabled this via a boolean passed to the function. Reviewers: spatel, RKSimon Reviewed By: RKSimon Subscribers: hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D66504 llvm-svn: 369872
* [X86] Add test case for inserting/extracting from two shuffled vectors. NFCAmaury Sechet2019-08-251-0/+82
| | | | llvm-svn: 369871
* [X86] Add test case for inserting/extracting from shuffled vectors. NFCAmaury Sechet2019-08-251-0/+80
| | | | llvm-svn: 369870
* [PowerPC][AIX] Adds support for writing the .data section in assembly filesXing Xue2019-08-2510-13/+130
| | | | | | | | | | | | | | | | | Summary: Adds support for generating the .data section in assembly files for global variables with a non-zero initialization. The support for writing the .data section in XCOFF object files will be added in a follow-on patch. Any relocations are not included in this patch. Reviewers: hubert.reinterpretcast, sfertile, jasonliu, daltenty, Xiangling_L Reviewed by: hubert.reinterpretcast Subscribers: nemanjai, hiraditya, kbarton, MaskRay, jsji, wuzish, shchenz, DiggerLin, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D66154 llvm-svn: 369869
* [ELF] Delete a redundant dyn_cast<InputSection>. NFCFangrui Song2019-08-251-6/+5
| | | | llvm-svn: 369868
* [AMDGPU] Downgrade from StringLiteral to const char* in an attempt to make ↵Benjamin Kramer2019-08-251-3/+3
| | | | | | GCC 5 happy llvm-svn: 369867
* Fixup in test/DebugInfo/X86/live-debug-vars-discard-invalid.mirBjorn Pettersson2019-08-251-7/+7
| | | | | | | | | | | | The test case used invalid source operands as input to BTS64rr instructions (feeding register operands with immediates). This patch changes those instruction into using BTS64ri8 instead, which seems to better match the operand types. Fixes problems seen in https://reviews.llvm.org/D63973. llvm-svn: 369866
* [TableGen] Correct comments for end of namespace. NFCBjorn Pettersson2019-08-2510-29/+29
| | | | | | | | | | | | | | | | | | | | | | Summary: Update end-of-namespace comments generated by tablegen emitters to fulfill the rules setup by clang-tidy's llvm-namespace-comment checker. Fixed a few end-of-namespace comments in the tablegen source code as well. Reviewers: craig.topper Reviewed By: craig.topper Subscribers: craig.topper, stoklund, dschuff, sbc100, jgravelle-google, aheejin, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D66396 llvm-svn: 369865
* [SDAG] Fold umul_lohi with 0 or 1 multiplicandNikita Popov2019-08-259-7745/+4999
| | | | | | | | | | These can turn up during multiplication legalization. In principle these should also apply to smul_lohi, but I wasn't able to figure out how to produce those with the necessary operands. Differential Revision: https://reviews.llvm.org/D66380 llvm-svn: 369864
* [X86] Teach -Os immediate sharing code to not count constant uses that will ↵Craig Topper2019-08-252-22/+21
| | | | | | | | | | | become INC/DEC. INC/DEC don't use an immediate so we don't need to count it. We also shouldn't use the custom isel for it. Fixes PR42998. llvm-svn: 369863
* [X86] Add test cases for PR42998. NFCCraig Topper2019-08-251-0/+73
| | | | llvm-svn: 369862
* FileManager: Factor duplicated code in getBufferForFile, NFCDuncan P. N. Exon Smith2019-08-252-12/+14
| | | | | | | Incidentally, this also unifies the two versions (removing an unnecessary call to `SmallString::c_str`). llvm-svn: 369861
* Removing block comments from CodeView records in assembly files & related ↵Nilanjana Basu2019-08-2511-757/+70
| | | | | | code cleanup llvm-svn: 369860
* [X86] Add isel patterns to match vpdpwssd avx512vnni instruction from ↵Craig Topper2019-08-242-0/+227
| | | | | | add+pmaddwd nodes. llvm-svn: 369859
* AMDGPU: Add baseline test for mul24 ordering issuesMatt Arsenault2019-08-241-0/+263
| | | | llvm-svn: 369858
OpenPOWER on IntegriCloud