summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* [ScopBuilder] Do not verify unfeasible SCoPs.Michael Kruse2017-05-052-0/+57
| | | | | | | | | | | | | | | | SCoPs with unfeasible runtime context are thrown away and therefore do not need their uses verified. The added test case requires a complexity limit to exceed. Normally, error statements are removed from the SCoP and for that reason are skipped during the verification. If there is a unfeasible runtime context (here: because of the complexity limit being reached), the removal of error statements and other SCoP construction steps are skipped to not waste time. Error statements are not modeled in SCoPs and therefore have no requirements on whether the scalars used in them are available. llvm-svn: 302234
* [X86][AVX512] Improve support and testing for CTLZ of 512-bit vectors ↵Simon Pilgrim2017-05-052-89/+599
| | | | | | without CDI llvm-svn: 302233
* Fix handling of signWrappedSets in access relationsTobias Grosser2017-05-052-1/+43
| | | | | | | | | | | | | | | | | | | | | | | Since r294891, in MemoryAccess::computeBoundsOnAccessRelation(), we skip manually bounding the access relation in case the parameter of the load instruction is already a wrapped set. Later on we assume that the lower bound on the set is always smaller or equal to the upper bound on the set. Bug 32715 manages to construct a sign wrapped set, in which case the assertion does not necessarily hold. Fix this by handling a sign wrapped set similar to a normal wrapped set, that is skipping the computation. Contributed-by: Maximilian Falkenstein <falkensm@student.ethz.ch> Reviewers: grosser Subscribers: pollydev, llvm-commits Tags: #Polly Differential Revision: https://reviews.llvm.org/D32893 llvm-svn: 302231
* [X86] Remove duplicate operation actions. NFCI.Simon Pilgrim2017-05-051-5/+0
| | | | llvm-svn: 302230
* [X86][AVX512CDI] Move v2i64/v4i64 and v4i32/v8i32 VPLZCNT lowering to tablegenSimon Pilgrim2017-05-052-39/+38
| | | | | | Extend NoVLX targets to use the 512-bit versions llvm-svn: 302229
* Remove stale live-ins in the branch folderKrzysztof Parzyszek2017-05-052-12/+81
| | | | | | | | | | | Hoisting common code can cause registers that live-in in the successor blocks to no longer be live-in. The live-in information needs to be updated to reflect this, or otherwise incorrect code can be generated later on. Differential Revision: https://reviews.llvm.org/D32661 llvm-svn: 302228
* [ELF] - Accept --defsym foo=value form.George Rimar2017-05-052-0/+6
| | | | | | | | Previously we accepted --defsym=foo=value only. Reported by Sean Silva. llvm-svn: 302227
* Remove unused variableSimon Pilgrim2017-05-051-1/+0
| | | | llvm-svn: 302226
* Fix segfault resulting from empty print promptPavel Labath2017-05-052-1/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: I have found a way to segfault lldb in 7 keystrokes! Steps to reproduce: 1) Launch lldb 2) Type `print` and hit enter. lldb will now prompt you to type a list of expressions, followed by an empty line. 3) Hit enter, indicating the end of your input. 4) Segfault! After some investigation, I've found the issue in Host/common/Editline.cpp. Editline::MoveCursor() relies on m_input_lines not being empty when the `to` argument is CursorPosition::BlockEnd. This scenario, as far as I can tell, occurs in one specific instance: In Editline::EndOrAddLineCommand() when the list of lines being processed contains exactly one string (""). Meeting this condition is fairly simple, I have posted steps to reproduce above. Reviewers: krytarowski, zturner, labath Reviewed By: labath Subscribers: scott.smith, lldb-commits Differential Revision: https://reviews.llvm.org/D32421 Patch by Alex Langford. llvm-svn: 302225
* [ARM] Add support for ORR and ORN instruction substitutionsJohn Brawn2017-05-054-0/+39
| | | | | | | | | | | | | Recently support was added for substituting one intruction for another by negating or inverting the immediate, but ORR and ORN were missed so this patch adds them. This one is slightly different to the others in that ORN only exists in thumb, so we only do the substitution in thumb. Differential Revision: https://reviews.llvm.org/D32534 llvm-svn: 302224
* Add TaskMap for iterating a function over a set of integersPavel Labath2017-05-054-167/+68
| | | | | | | | | | | | | | | | Summary: Many parallel tasks just want to iterate over all the possible numbers from 0 to N-1. Rather than enqueue N work items, instead just "map" the function across the requested integer space. Reviewers: clayborg, labath, tberghammer, zturner Reviewed By: clayborg, zturner Subscribers: zturner, lldb-commits Differential Revision: https://reviews.llvm.org/D32757 Patch by Scott Smith <scott.smith@purestorage.com>. llvm-svn: 302223
* [X86][AVX] Add LowerIntUnary helpers to split unary vector ops in half. NFCI.Simon Pilgrim2017-05-051-76/+51
| | | | | | Same as LowerIntArith helpers but for unary ops instead of binary. llvm-svn: 302222
* [llvm-dwarfdump] - Print an error message if section decompression failed.George Rimar2017-05-054-10/+43
| | | | | | | | | | | | | llvm-dwarfdump currently prints no message if decompression fails for some reason. I noticed that during work on one of LLD patches where LLD produced an broken output. It was a bit confusing to see no output for section dumped and no any error message at all. Patch adds error message for such cases. Differential revision: https://reviews.llvm.org/D32865 llvm-svn: 302221
* ABISysV_arm64: compute return value for large vectors correctlyPavel Labath2017-05-052-29/+55
| | | | | | | | | | | | | | | | | | | | | Summary: Arm64 Procedure Call Standard specifies than only vectors up to 16 bytes are stored in v0 (which makes sense, as that's the size of the register). 32-byte vector types are passed as regular structs via x8 pointer. Treat them as such. This fixes TestReturnValue for arm64-clang. I also split the test case into two so I can avoid the if(gcc) line, and annotate each test instead. (It seems the vector type tests fail with gcc only when targetting x86 arches). Reviewers: tberghammer, eugene Subscribers: aemerson, omjavaid, rengolin, srhines, lldb-commits Differential Revision: https://reviews.llvm.org/D32813 llvm-svn: 302220
* [X86] Remove unused code from X86 optimize LEAs. NFC.Andrew Ng2017-05-051-8/+0
| | | | | | | This patch removes unused code which is no longer required because of changes to the DIExpression::prepend function. llvm-svn: 302219
* [ubsan] Implement __sanitizer_print_stack_trace for standalone UBSan runtime.Alexander Potapenko2017-05-053-0/+58
| | | | | | Patch by Max Moroz, reviewed at https://reviews.llvm.org/D32542 llvm-svn: 302218
* Revert "[Polly] Added OpenCL Runtime to GPURuntime Library for GPGPU CodeGen"Siddharth Bhat2017-05-0510-1428/+156
| | | | | | | | | | | | | | | This reverts commit 17a84e414adb51ee375d14836d4c2a817b191933. Patches should have been submitted in the order of: 1. D32852 2. D32854 3. D32431 I mistakenly pushed D32431(3) first. Reverting to push in the correct order. llvm-svn: 302217
* [ArgPromotion] Add a testcase for PR32917Martin Storsjo2017-05-051-0/+23
| | | | | | Differential Revision: https://reviews.llvm.org/D32882 llvm-svn: 302216
* [Polly] Added OpenCL Runtime to GPURuntime Library for GPGPU CodeGenSiddharth Bhat2017-05-0510-156/+1428
| | | | | | | | | | | | | | | | | | | | | | | Summary: When compiling for GPU, one can now choose to compile for OpenCL or CUDA, with the corresponding polly-gpu-runtime flag (libopencl / libcudart). The GPURuntime library (GPUJIT) has been extended with the OpenCL Runtime library for that purpose, correctly choosing the corresponding library calls to the option chosen when compiling (via different initialization calls). Additionally, a specific GPU Target architecture can now be chosen with -polly-gpu-arch (only nvptx64 implemented thus far). Reviewers: grosser, bollu, Meinersbur, etherzhhb, singam-sanjay Reviewed By: grosser, Meinersbur Subscribers: singam-sanjay, llvm-commits, pollydev, nemanjai, mgorny, yaxunl, Anastasia Tags: #polly Differential Revision: https://reviews.llvm.org/D32431 llvm-svn: 302215
* Initialize new member X86Operand::FrontendSize in all codepaths.Daniel Jasper2017-05-051-1/+2
| | | | | | This fixes MSAN-builds after r302179. llvm-svn: 302214
* Document XFAIL's with the relevent bug numberEric Fiselier2017-05-052-0/+4
| | | | llvm-svn: 302213
* [XRay][compiler-rt] Remove dependency on FileCheck from function id ↵Dean Michael Berris2017-05-051-18/+14
| | | | | | | | | | utilities tests Follow-up on D32846 to simplify testing and not rely on FileCheck to test boundary conditions, and instead do all the testing in code instead. llvm-svn: 302212
* [ubsan] Fix error summary message for ObjC BOOL invalid loadsVedant Kumar2017-05-052-1/+16
| | | | llvm-svn: 302211
* [XRay][compiler-rt] Add function id utilities for XRayDean Michael Berris2017-05-053-1/+68
| | | | | | | | | | | | | | | | | | | | | | | | Summary: This change allows us to provide users and implementers of XRay handlers a means of converting XRay function id's to addresses. This, in combination with the facilities provided in D32695, allows users to find out: - How many function id's there are defined in the current binary. - Get the address of the function associated with this function id. - Patch only specific functions according to their requirements. While we don't directly provide symbolization support in XRay, having the function's address lets users determine this information easily either during runtime, or offline with tools like 'addr2line'. Reviewers: dblaikie, echristo, pelikan Subscribers: kpw, llvm-commits Differential Revision: https://reviews.llvm.org/D32846 llvm-svn: 302210
* Update VP prof metadata during inlining.Dehao Chen2017-05-052-13/+42
| | | | | | | | | | | | | | Summary: r298270 added profile update logic for branch_weights. This patch implements profile update logic for VP prof metadata too. Reviewers: eraman, tejohnson, davidxl Reviewed By: eraman Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D32773 llvm-svn: 302209
* [ADT] A few minor improvements to BitVectorZachary Turner2017-05-053-2/+33
| | | | | | | Fixes some spelling mistakes, uses a helper function, and adds an additional test case. llvm-svn: 302208
* Document that Multilib flags must be actual flagsJonathan Roelofs2017-05-053-10/+33
| | | | | | | | This is because -print-multi-lib depends on them being flags for correctness. Fixes a case of this in the arm-android multilib selection logic. llvm-svn: 302207
* [pdb] Don't verify TPI hash values up front.Zachary Turner2017-05-043-33/+21
| | | | | | | | | | | | | | | | | | | | | | | | Verifying the hash values as we are currently doing results in iterating every type record before the user even tries to access the first one, and the API user has no control over, or ability to hook into this process. As a result, when the user wants to iterate over types to print them or index them, this results in a second iteration over the same list of types. When there's upwards of 1,000,000 type records, this is obviously quite undesirable. This patch raises the verification outside of TpiStream , and llvm-pdbdump hooks a hash verification visitor into the normal dumping process. So we still verify the hash records, but we can do it while not requiring a second iteration over the type stream. Differential Revision: https://reviews.llvm.org/D32873 llvm-svn: 302206
* [PDB] Don't build the entire source file list up front.Zachary Turner2017-05-0416-181/+473
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | I tried to run llvm-pdbdump on a very large (~1.5GB) PDB to try and identify show-stopping performance problems. This patch addresses the first such problem. When loading the DBI stream, before anyone has even tried to access a single record, we build an in memory map of every source file for every module. In the particular PDB I was using, this was over 85 million files. Specifically, the complexity is O(m*n) where m is the number of modules and n is the average number of source files (including headers) per module. The whole reason for doing this was so that we could have constant time access to any module and any of its source file lists. However, we can still get O(1) access to the source file list for a given module with a simple O(m) precomputation, and access to the list of modules is already O(1) anyway. So this patches reduces the O(m*n) up-front precomputation to an O(m) one, where n is ~6,500 and n*m is about 85 million in my pathological test case. Differential Revision: https://reviews.llvm.org/D32870 llvm-svn: 302205
* [llvm-pdbdump] Only build the TypeDatabase if necessary.Zachary Turner2017-05-042-41/+77
| | | | | | | | | Building the type database is expensive, and can take multiple minutes for large PDBs. But we only need it in certain cases depending on what command line options are specified. So only build it when we know we're about to need it. llvm-svn: 302204
* Remap metadata attached to global variables.Evgeniy Stepanov2017-05-042-5/+23
| | | | | | | Fix for PR32577. Global variables may have !associated metadata, which includes a reference to another global. It needs remapping. llvm-svn: 302203
* [RegisterBankInfo] Fix 80-col introduced in r293506.Quentin Colombet2017-05-041-3/+6
| | | | | | NFC. llvm-svn: 302202
* [GlobalISel] Add missing doxygen keyword for doxygen groups.Quentin Colombet2017-05-044-11/+11
| | | | | | NFC llvm-svn: 302201
* AMDGPU: GFX9 GS and HS shaders always have the scratch wave offset in SGPR5Marek Olsak2017-05-045-31/+123
| | | | | | | | | | Reviewers: arsenm, nhaehnle Subscribers: kzhuravl, wdng, yaxunl, dstuttard, tpr, t-tye, llvm-commits Differential Revision: https://reviews.llvm.org/D32645 llvm-svn: 302200
* [GISel]:Skip legalizing Intermediate inst(with generic types)Aditya Nandakumar2017-05-041-2/+7
| | | | | | | | | | During legalization, targets can create Pseudo Instructions with generic types. We shouldn't try to legalize them. Reviewed by Quentin, dsanders https://reviews.llvm.org/D32575 llvm-svn: 302199
* [JumpThreading] When processing compares, explicitly check that the result ↵Craig Topper2017-05-041-1/+1
| | | | | | | | type is not a vector rather than check for it being an integer. Compares always return a scalar integer or vector of integers. isIntegerTy returns false for vectors, but that's not completely obvious. So using isVectorTy is less confusing. llvm-svn: 302198
* [JumpThreading] Change a dyn_cast that is already protected by an isa check ↵Craig Topper2017-05-041-16/+14
| | | | | | | | to a static cast. Combine the with another static cast. NFC Differential Revision: https://reviews.llvm.org/D32874 llvm-svn: 302197
* [GISel]: Add support to translate ConstantVectorsAditya Nandakumar2017-05-042-0/+17
| | | | | | | Reviewed by Quentin https://reviews.llvm.org/D32814 llvm-svn: 302196
* Fix whitespace before token-paste of an argument.James Y Knight2017-05-043-19/+43
| | | | | | | | | | | | | | | The whitespace should come from the argument name in the macro expansion, rather than from the token passed to the macro (same as it does when not pasting). Added a new test case for the change in behavior to stringize_space.c. FileCheck'ized macro_paste_commaext.c, tweaked the test case, and added a comment; no behavioral change to this test. Differential Revision: https://reviews.llvm.org/D30427 llvm-svn: 302195
* [ConstantRange] Add LLVM_NODISCARD to ConstantRange since a large number of ↵Craig Topper2017-05-041-1/+1
| | | | | | its methods construct new ConstantRange objects. llvm-svn: 302194
* [Float2Int] Remove return of ConstantRange from seen method. Nothing uses it ↵Craig Topper2017-05-042-3/+2
| | | | | | so it just creates and discards a ConstantRange object for no reason. llvm-svn: 302193
* Strip trailing whitespace. NFCI.Simon Pilgrim2017-05-041-3/+3
| | | | llvm-svn: 302192
* [clangd] Add documentation pageMarc-Andre Laperle2017-05-042-0/+107
| | | | | | | | | | | | | | | | | | | Summary: Add a simple documentation page for Clangd. This will be useful for interested users and contributors to get basic information about how to get started and the progress of Clangd. Reviewers: krasimir, bkramer Reviewed By: krasimir Subscribers: Prazek, jbcoe, JDevlieghere, mgehre, JonasToth, kromanenkov, xazax.hun, cfe-commits Tags: #clang-tools-extra Differential Revision: https://reviews.llvm.org/D31887 llvm-svn: 302191
* Turn on -Wmicrosoft-enum-forward-reference by default.Nico Weber2017-05-041-1/+1
| | | | | | | | | clang-cl already errs or warns on everything that cl warns on in /permissive- mode, except for enum foward declarations (and ATL attributes). So warn on enum forward declarations by default. llvm-svn: 302190
* [InstSimplify] add folds for or-of-casted-icmpsSanjay Patel2017-05-042-51/+48
| | | | | | | | | | | | | | | | | The sibling folds for 'and' with casts were added with https://reviews.llvm.org/rL273200. This is a preliminary step for adding the 'or' variants for the folds added with https://reviews.llvm.org/rL301260. The reason for the strange form with constant LHS in the 1st test is because there's another missing fold in that case for the inverted predicate. That should be fixed when we add the ConstantRange functionality for 'or-of-icmps' that already exists for 'and-of-icmps'. I'm hoping to share more code for the and/or cases, so we won't have these differences. This will allow us to remove code from InstCombine. It's also possible that we can remove some code here in InstSimplify. I think we have some duplicated folds because patterns are not matched in a general way. Differential Revision: https://reviews.llvm.org/D32876 llvm-svn: 302189
* Fix bugs checking va_start in lambdas and erroneous contextsReid Kleckner2017-05-044-12/+78
| | | | | | | | | | | | | | | | | | | | | | | | | Summary: First, getCurFunction looks through blocks and lambdas, which is wrong. Inside a lambda, va_start should refer to the lambda call operator prototype. This fixes PR32737. Second, we shouldn't use any of the getCur* methods, because they look through contexts that we don't want to look through (EnumDecl, CapturedStmtDecl). We can use CurContext directly as the calling context. Finally, this code assumed that CallExprs would never appear outside of code contexts (block, function, obj-c method), which is wrong. Struct member initializers are an easy way to create and parse exprs in a non-code context. Reviewers: rsmith Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D32761 llvm-svn: 302188
* Turn -Wmicrosoft-enum-value off by default.Nico Weber2017-05-041-1/+1
| | | | | | | | | The warning is currently way too noisy to be useful. The plan is to make it warn when an MS enum that's negative is compared to something, but until that's done the warning shouldn't default to on. llvm-svn: 302187
* Simplify the header allocation.Rafael Espindola2017-05-044-70/+52
| | | | | | | | | | | | | | | | In the non linker script case we would try very early to find out if we could allocate the headers. Failing to do that would add extra alignment to the first ro section, since we would set PageAlign thinking it was the first section in the PT_LOAD. In the linker script case the header allocation must be done in the end, causing some duplication. We now tentatively add the headers to the first PT_LOAD and if it turns out they don't fit, remove them. With this we only need to allocate the headers in one place in the code. llvm-svn: 302186
* [WebAssembly] Add wasm symbol table support to llvm-objdumpSam Clegg2017-05-043-22/+60
| | | | | | Differential Revision: https://reviews.llvm.org/D32760 llvm-svn: 302185
* Driver: only inject libstdc++ paths when needed on CrossWindowsSaleem Abdulrasool2017-05-042-5/+10
| | | | | | | | When building with libc++ don't bother with injecting the libstdc++ search paths into the linker search path. This will make it easier to switch between ld and lld. llvm-svn: 302184
OpenPOWER on IntegriCloud