summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* On Windows expansion of regex file name patterns is the responsibility of eachDmitry Mikulin2018-03-052-4/+17
| | | | | | | | tool. Fix ar to do that. Differential Revision: https://reviews.llvm.org/D43987 llvm-svn: 326734
* Improve OpenMP threadprivate implementation.Andrey Churbanov2018-03-053-111/+182
| | | | | | | | Patch by Terry Wilmarth Differential Revision: https://reviews.llvm.org/D41914 llvm-svn: 326733
* Fix an unused variable warning introduced by rr326703. NFCEric Liu2018-03-051-1/+3
| | | | llvm-svn: 326732
* [llvm-pdbdump] Dump restrict type qualifierAaron Smith2018-03-056-0/+92
| | | | | | | | | | | | Reviewers: zturner, llvm-commits, rnk Reviewed By: zturner Subscribers: majnemer Differential Revision: https://reviews.llvm.org/D43639 llvm-svn: 326731
* [InstCombine] Don't blow up in foldICmpWithCastAndCast on vector icmp ↵Daniel Neilson2018-03-052-1/+20
| | | | | | | | | | | | | | | | | | | | | | | instructions. Summary: Presently, InstCombiner::foldICmpWithCastAndCast() implicitly assumes that it is only invoked with icmp instructions of integer type. If that assumption is broken, and it is called with an icmp of vector type, then it fails (asserts/crashes). This patch addresses the deficiency. It allows it to simplify icmp (ptrtoint x), (ptrtoint/c) of vector type into a compare of the inputs, much as is done when the type is integer. Reviewers: apilipenko, fedor.sergeev, mkazantsev, anna Reviewed By: anna Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D44063 llvm-svn: 326730
* [InstCombine] Add constant vector support to getMinimumFPType for visitFPTrunc.Craig Topper2018-03-052-8/+53
| | | | | | | | This patch teaches getMinimumFPType to support shrinking a vector of ConstantFPs. This should improve our ability to combine vector fptrunc with fp binops. Differential Revision: https://reviews.llvm.org/D43774 llvm-svn: 326729
* Fixed build of the OpenMP stubs library.Andrey Churbanov2018-03-051-1/+1
| | | | | | Differential Revision: https://reviews.llvm.org/D44019 llvm-svn: 326728
* Including <functional> for std::bindRaphael Isemann2018-03-051-0/+1
| | | | | | Differential Revision: https://reviews.llvm.org/D44099 llvm-svn: 326727
* Revert r326723: Make STATISTIC() values available programmaticallyDaniel Sanders2018-03-056-154/+7
| | | | | | Despite building cleanly on my machine in three separate configs, it's failing on pretty much all bots due to missing includes among other things. Investigating. llvm-svn: 326726
* [AMDGPU] Clean up old address space mapping and fix constant address space valueYaxun Liu2018-03-053-102/+56
| | | | | | Differential Revision: https://reviews.llvm.org/D43911 llvm-svn: 326725
* [AArch64] Harden test caseEvandro Menezes2018-03-051-151/+158
| | | | | | NFC llvm-svn: 326724
* Make STATISTIC() values available programmaticallyDaniel Sanders2018-03-056-7/+154
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: It can be useful for tools to be able to retrieve the values of variables declared via STATISTIC() directly without having to emit them and parse them back. Use cases include: * Needing to report specific statistics to a test harness * Wanting to post-process statistics. For example, to produce a percentage of functions that were fully selected by GlobalISel Make this possible by adding llvm::GetStatistics() which returns an iterator_range that can be used to inspect the statistics that have been touched during execution. When statistics are disabled (NDEBUG and not LLVM_ENABLE_STATISTICS) this method will return an empty range. This patch doesn't address the effect of multiple compilations within the same process. In such situations, the statistics will be cumulative for all compilations up to the GetStatistics() call. Reviewers: qcolombet, rtereshin, aditya_nandakumar, bogner Reviewed By: rtereshin, bogner Subscribers: llvm-commits, mgorny Differential Revision: https://reviews.llvm.org/D43901 llvm-svn: 326723
* fix PR36582Sebastian Pop2018-03-052-5/+24
| | | | | | | | | The error occurs when reading i16 elements (as in the testcase) from a v8i8 with a pattern of <0,2,4,6>. As all the data in the vector is accessed, the operation is not a VUZP. The patch stops the pattern recognition of VUZP when EXTRACT_VECTOR_ELT has a different element type than BUILD_VECTOR. llvm-svn: 326722
* [clangd] Fix unintentionally loose fuzzy matching, and the tests masking it.Sam McCall2018-03-054-47/+76
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: The intent was that [ar] doesn't match "FooBar"; the first character must match a Head character (hard requirement, not just a low score). This matches VSCode, and was "tested" but the tests were defective. The tests expected matches("FooBar") to fail for lack of a match. But instead it fails because the string should be annotated - matches("FooB[ar]"). This patch makes matches("FooBar") ignore annotations, as was intended. Fixing the code to reject weak matches for the first char causes problems: - [bre] no longer matches "HTMLBRElement". We allow matching against an uppercase char even if we don't think it's head. Only do this if there's at least one lowercase, to avoid triggering on MACROS - [print] no longer matches "sprintf". This is hard to fix without false positives (e.g. [int] vs "sprintf"]) This patch leaves this case broken. A future patch will add a dictionary providing custom segmentation to common names from the standard library. Fixed a couple of index tests that indirectly relied on broken fuzzy matching. Added const in a couple of missing places for consistency with new code. Subscribers: klimek, ilya-biryukov, jkorous-apple, ioeric, cfe-commits Differential Revision: https://reviews.llvm.org/D44003 llvm-svn: 326721
* [IPSCCP] Add getCompare which returns either true, false, undef or null.Florian Hahn2018-03-054-60/+115
| | | | | | | | | | | | | | | getCompare returns true, false or undef constants if the comparison can be evaluated, or nullptr if it cannot. This is in line with what ConstantExpr::getCompare returns. It also allows us to use ConstantExpr::getCompare for comparing constants. Reviewers: davide, mssimpso, dberlin, anna Reviewed By: davide Differential Revision: https://reviews.llvm.org/D43761 llvm-svn: 326720
* [clangd] Extract ClangdServer::Options struct.Sam McCall2018-03-0510-173/+133
| | | | | | | | | | | | | | | | | | Summary: This subsumes most of the params to ClangdServer and ClangdLSPServer. Adjacent changes: - tests use a consistent set of options, except when testing specific options - tests that previously used synchronous mode for convenience no longer do - added a runAddDocument helper to SyncAPIs to mitigate the extra code - rearranged main a bit to follow the structure of the options Reviewers: ilya-biryukov Subscribers: klimek, jkorous-apple, ioeric, cfe-commits Differential Revision: https://reviews.llvm.org/D44088 llvm-svn: 326719
* [AArch64] Improve code generation of constant vectorsEvandro Menezes2018-03-055-101/+207
| | | | | | | | | | | | | Use the whole gammut of constant immediates available to set up a vector. Instead of using, for example, `mov w0, #0xffff; dup v0.4s, w0`, which transfers between register files, use the more efficient `movi v0.4s, #-1` instead. Not limited to just a few values, but any immediate value that can be encoded by all the variants of `FMOV`, `MOVI`, `MVNI`, thus eliminating the need to there be patterns to optimize special cases. Differential revision: https://reviews.llvm.org/D42133 llvm-svn: 326718
* [demangler] Modernize parse_name.Erik Pilkington2018-03-052-1238/+730
| | | | llvm-svn: 326717
* [MachineScheduler] Dump SUnits before calling SchedImpl->initialize()Jonas Paulsson2018-03-051-4/+4
| | | | | | | | | | | | | | | This is a NFC simple patch that changes the DEBUG dumping in the MachineScheduler so that the dumping of the built SUnits is done before the SchedImpl->initialize() is called. This is better on SystemZ, since it has a strategy that does some dumping at the start of the region, and it is not possible to easily read it if it is output above a long list of SU. Review: Javed Absar https://reviews.llvm.org/D44089 llvm-svn: 326716
* AMDGPU/GlobalISel: Add InstrMapping for G_EXTRACTMatt Arsenault2018-03-052-0/+40
| | | | llvm-svn: 326715
* AMDGPU/GlobalISel: Make some G_EXTRACTs legalMatt Arsenault2018-03-052-0/+117
| | | | | | | As far as I can tell legalization of weird sizes for the output type isn't implemented. llvm-svn: 326714
* AMDGPU: Fix build warning about overrideMatt Arsenault2018-03-051-3/+3
| | | | llvm-svn: 326713
* [CVP] fix formatting; NFCSanjay Patel2018-03-051-4/+2
| | | | llvm-svn: 326711
* Fuzzer: remove temporary files after we're done with them.Tim Northover2018-03-053-0/+10
| | | | | | | | These were just copies of the relevant fuzzer binary with (presumably) meaningful suffixes, but accounted for more than 10% of my build directory (> 8GB). Hard drive space is cheap, but not that cheap. llvm-svn: 326710
* [analyzer] Improves the logic of GenericTaintChecker identifying stdin.Henry Wong2018-03-052-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: GenericTaintChecker can't recognize stdin in some cases. The reason is that `if (PtrTy->getPointeeType() == C.getASTContext().getFILEType()` does not hold when stdin is encountered. My platform is ubuntu16.04 64bit, gcc 5.4.0, glibc 2.23. The definition of stdin is as follows: ``` __BEGIN_NAMESPACE_STD /* The opaque type of streams. This is the definition used elsewhere. */ typedef struct _IO_FILE FILE; ___END_NAMESPACE_STD ... /* The opaque type of streams. This is the definition used elsewhere. */ typedef struct _IO_FILE __FILE; ... /* Standard streams. */ extern struct _IO_FILE *stdin; /* Standard input stream. */ extern struct _IO_FILE *stdout; /* Standard output stream. */ extern struct _IO_FILE *stderr; /* Standard error output stream. */ ``` The type of stdin is as follows AST: ``` ElaboratedType 0xc911170'struct _IO_FILE'sugar `-RecordType 0xc911150'struct _IO_FILE' `-CXXRecord 0xc923ff0'_IO_FILE' ``` `C.getASTContext().GetFILEType()` is as follows AST: ``` TypedefType 0xc932710 'FILE' sugar |-Typedef 0xc9111c0 'FILE' `-ElaboratedType 0xc911170 'struct _IO_FILE' sugar `-RecordType 0xc911150 'struct _IO_FILE' `-CXXRecord 0xc923ff0 '_IO_FILE' ``` So I think it's better to use `getCanonicalType()`. Reviewers: zaks.anna, NoQ, george.karpenkov, a.sidorin Reviewed By: zaks.anna, a.sidorin Subscribers: a.sidorin, cfe-commits, xazax.hun, szepet, MTC Differential Revision: https://reviews.llvm.org/D39159 llvm-svn: 326709
* TableGen: Resolve all template args simultaneously in ResolveMulticlassDefARgsNicolai Haehnle2018-03-051-11/+12
| | | | | | | | | | | | | | | | Summary: Use the new resolver interface more explicitly, and avoid traversing all the initializers multiple times. Change-Id: I679e86988b309d19f25e6cca8b0b14ea150198a6 Reviewers: arsenm, craig.topper, tra, MartinO Subscribers: wdng, llvm-commits Differential Revision: https://reviews.llvm.org/D43654 llvm-svn: 326708
* TableGen: Resolve all template args simultaneously in AddSubMultiClassNicolai Haehnle2018-03-051-12/+20
| | | | | | | | | | | | | | | | Summary: Use the new resolver interface more explicitly, and avoid traversing all the initializers multiple times. Change-Id: Ia4dcc6d42dd8b65e6079d318c6a202f36f320fee Reviewers: arsenm, craig.topper, tra, MartinO Subscribers: wdng, llvm-commits Differential Revision: https://reviews.llvm.org/D43653 llvm-svn: 326707
* TableGen: Resolve all template args simultaneously in AddSubClassNicolai Haehnle2018-03-054-27/+52
| | | | | | | | | | | | | | | | | | | | | | Summary: Use the new resolver interface more explicitly, and avoid traversing all the initializers multiple times. Add a test case for a pattern that was broken by an earlier version of this change. An additional change is that we now remove *all* template arguments after resolving them. Change-Id: I86c828c8cc84c18b052dfe0f64c0d5cbf3c4e13c Reviewers: arsenm, craig.topper, tra, MartinO Subscribers: wdng, llvm-commits Differential Revision: https://reviews.llvm.org/D43652 llvm-svn: 326706
* TableGen: Reimplement !foreach using the resolving mechanismNicolai Haehnle2018-03-059-153/+275
| | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This changes the syntax of !foreach so that the first "parameter" is a new syntactic variable: !foreach(x, lst, expr) will define the variable x within the scope of expr, and evaluation of the !foreach will substitute elements of the given list (or dag) for x in expr. Aside from leading to a nicer syntax, this allows more complex expressions where x is deeply nested, or even constant expressions in which x does not occur at all. !foreach is currently not actually used anywhere in trunk, but I plan to use it in the AMDGPU backend. If out-of-tree targets are using it, they can adjust to the new syntax very easily. Change-Id: Ib966694d8ab6542279d6bc358b6f4d767945a805 Reviewers: arsenm, craig.topper, tra, MartinO Subscribers: wdng, llvm-commits, tpr Differential Revision: https://reviews.llvm.org/D43651 llvm-svn: 326705
* TableGen: Introduce an abstract variable resolver interfaceNicolai Haehnle2018-03-053-60/+150
| | | | | | | | | | | | | | | | | Summary: The intention is to allow us to more easily restructure how resolving is done, e.g. resolving multiple variables simultaneously, or using the resolving mechanism to implement !foreach. Change-Id: I4b976b54a32e240ad4f562f7eb86a4d663a20ea8 Reviewers: arsenm, craig.topper, tra, MartinO Subscribers: wdng, llvm-commits Differential Revision: https://reviews.llvm.org/D43564 llvm-svn: 326704
* Pass Divergence Analysis data to Selection DAG to drive divergenceAlexander Timofeev2018-03-0519-94/+405
| | | | | | | | dependent instruction selection. Differential revision: https://reviews.llvm.org/D35267 llvm-svn: 326703
* [Polly][CMake] Fix lit setup for building the in the mono repoPhilip Pfaffe2018-03-051-1/+5
| | | | | | | | | | | | | | | | | Summary: When building polly as part of the monorepo (actually, as part of any setup using LLVM_ENABLE_PROJECTS), the LLVMPolly library used in the lit tests ends up in a different directory in the build tree than in an in-tree build Reviewers: Meinersbur, grosser, bollu Reviewed By: Meinersbur Subscribers: mgorny, bollu, pollydev, llvm-commits Differential Revision: https://reviews.llvm.org/D44078 llvm-svn: 326702
* [Power9] Add more missing instructions to the Power 9 schedulerStefan Pintilie2018-03-052-38/+150
| | | | | | | Adding more instructions using InstRW so that we can move away from ItinRW and ultimately have a complete Power 9 scheduler. llvm-svn: 326701
* TableGen: Allow NAME in template arguments in defm in multiclassNicolai Haehnle2018-03-053-0/+85
| | | | | | | | | | | | | | | | | | | | Summary: NAME has already worked for def in a multiclass, since the (protoype) record including its NAME variable is created before parsing the superclasses. Since defm's do not have an associated single record, support for NAME has to be implemented differently here. Original test cases provided by Artem Belevich (tra) Change-Id: I933b74f328c0ff202e7dc23a35b78f3505760cc9 Reviewers: arsenm, craig.topper, tra, MartinO Subscribers: wdng, llvm-commits Differential Revision: https://reviews.llvm.org/D43656 llvm-svn: 326700
* TableGen: Use DefInit::getDef() instead of the type's getRecord()Nicolai Haehnle2018-03-051-14/+11
| | | | | | | | | | | The former simply makes more sense: we want to access the data here in the backend, not information about the type. More importantly, removing users of RecordRecTy::getRecord() allows us more freedom to refactor the frontend. Change-Id: Iee8905fd22cdb9b11c42ca03246c03d8fe4dd77f llvm-svn: 326699
* [MergeICmp] We can discard initial blocks that do other workXin Tong2018-03-052-3/+72
| | | | | | | | | | | | | | | | Summary: We can discard initial blocks that do other work We do not need to limit ourselves to just the first block in the chain. Reviewers: courbet, davide Reviewed By: courbet Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D44029 llvm-svn: 326698
* [WebAssembly] Add validation to reloc sectionNicholas Wilson2018-03-054-6/+67
| | | | | | | | | | | | We now check relocations offsets are within range, and the relocation index is valid. Also updated tests which contained invalid Wasm files that were previously not checked. Differential Revision: https://reviews.llvm.org/D43684 llvm-svn: 326697
* [ARM][Asm] VMOVSRR and VMOVRRS need sequential S registersOliver Stannard2018-03-052-0/+24
| | | | | | | | | | These instructions require that the two S registers are adjacent (but not the R registers), because only the first register is included in the encoding, but we were not checking this in the assembler. Differential revision: https://reviews.llvm.org/D44084 llvm-svn: 326696
* [WebAssembly] Reorder reloc sections to come between symtab and nameNicholas Wilson2018-03-056-8/+8
| | | | | | | | | | | This is required in order to enable relocs to be validated as they are read in. Also update tests with new section ordering. Differential Revision: https://reviews.llvm.org/D43940 llvm-svn: 326694
* [WebAssembly] Reorder reloc sections to come after symtabNicholas Wilson2018-03-051-1/+1
| | | | | | | | This matches LLVM change D43940. Differential Revision: https://reviews.llvm.org/D43946 llvm-svn: 326693
* [WebAssembly] Fix tests with invalid yaml (required CODE section missing)Nicholas Wilson2018-03-053-3/+28
| | | | | | Differential Revision: https://reviews.llvm.org/D44023 llvm-svn: 326692
* [WebAssembly] Attach a name to globals similarly to function namingNicholas Wilson2018-03-052-3/+10
| | | | | | | | | This allows LLD to print the name for an InputGlobal when encountering an error. Differential Revision: https://reviews.llvm.org/D44033 llvm-svn: 326691
* Fix location of comment in EmitPopInstThomas Preud'homme2018-03-051-1/+1
| | | | | | | Comment about folding return in LDM was not moved along with the corresponding code in r242714. This commit fixes that. llvm-svn: 326690
* [x86][CET] Introduce _get_ssp, _inc_ssp intrinsicsAlexander Ivchenko2018-03-052-2/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | Summary: The _get_ssp intrinsic can be used to retrieve the shadow stack pointer, independent of the current arch -- in contract with the rdsspd and the rdsspq intrinsics. Also, this intrinsic returns zero on CPUs which don't support CET. The rdssp[d|q] instruction is decoded as nop, essentially just returning the input operand, which is zero. Example result of compilation: ``` xorl %eax, %eax movl %eax, %ecx rdsspq %rcx # NOP when CET is not supported movq %rcx, %rax # return zero ``` Reviewers: craig.topper Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D43814 llvm-svn: 326689
* [ELF] - Support moving location counter when MEMORY is used.George Rimar2018-03-053-29/+62
| | | | | | | | | | | | | | | | We do not expand memory region correctly for following scripts: .foo.1 : { *(.foo.1) . += 0x1000; } > ram Patch generalizes expanding of output sections and memory regions in one place and fixes the issue. Differential revision: https://reviews.llvm.org/D43999 llvm-svn: 326688
* [test] Add dotest wrapperJonas Devlieghere2018-03-052-2/+31
| | | | | | | | | | | | | | | | | | | | | This adds a wrapper around dotest, similar to llvm-lit in llvm. The wrapper is created in the binary directory, next to LLDB and allows you to invoke dotest without having to pass any of the configuration arguments yourself. I think this could also be useful for re-running a particular test case when it fails, as an alternative to "Command Invoked". The motivation for this is that I'd like to replace the driver part of dotest with lit. As a first step, I'd like to have lit invoke dotest, which would just run the complete test suite, completely identical to what the CMake target does today. Once this is in place, we can have lit run dotest for the different test directories, and ultimately once per python file. Along the way we can strip out driver functionality from dotest where appropriate. https://reviews.llvm.org/D44002 llvm-svn: 326687
* [ELF] - Report location for div/mod by zero.George Rimar2018-03-052-20/+27
| | | | | | | | | | | "division by zero" or "modulo by zero" are not very informative errors and even probably confusing as does not let to know that error is coming from linker script. Patch adds location reporting. Differential revision: https://reviews.llvm.org/D43934 llvm-svn: 326686
* [Bash-autocompletion] Fixed formattingYuka Takahashi2018-03-051-3/+4
| | | | | | Fixed a trivial formatting and indent. llvm-svn: 326685
* [Bash-autocompletion] Pass all flags in shell command-line to ClangYuka Takahashi2018-03-055-78/+75
| | | | | | | | | | | | | | | | | | | | Previously, we passed "#" to --autocomplete to indicate to enable cc1 flags. For example, when -cc1 or -Xclang was passed to bash, bash executed `clang --autocomplete=#-<flag they want to complete>`. However, this was not a good implementation because it depends -Xclang and -cc1 parsing to shell. So I changed this to pass all flags shell has, so that Clang can handle them internally. I had to change many testcases because API spec changed quite a lot. Reviewers: teemperor, v.g.vassilev Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D39342 llvm-svn: 326684
* [MergeICmps][NFC] Improve logging.Clement Courbet2018-03-051-7/+9
| | | | llvm-svn: 326683
OpenPOWER on IntegriCloud