summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* [SCCP] Factor out common code.Davide Italiano2016-07-131-8/+9
| | | | llvm-svn: 275308
* [SCCP] Use early return. NFCI.Davide Italiano2016-07-131-5/+5
| | | | llvm-svn: 275307
* [OpenMP] add more tests for 'distribute simd' pragmaKelvin Li2016-07-132-0/+1873
| | | | | | | | This patch is to add two additional tests for testing 'distribute simd' pragma with disallowed clauses and loops. Differential Revision: http://reviews.llvm.org/D22176 llvm-svn: 275306
* Update the readme text.Rui Ueyama2016-07-131-0/+7
| | | | llvm-svn: 275305
* Reverting r275284 due to platform-specific test failuresAndrew Kaylor2016-07-1310-103/+1
| | | | llvm-svn: 275304
* Implement FunctionDecl::getDefinition() to be consistent withYaron Keren2016-07-133-7/+15
| | | | | | | | VarDecl, TagDecl, EnumDecl, RecordDecl, CXXRecordDecl. Use getDefinition in two locations to make the code more readable. llvm-svn: 275303
* add more tests for zexty xor sandwichesSanjay Patel2016-07-132-0/+39
| | | | | | ...mmm sandwiches llvm-svn: 275302
* Add GotEntrySize/GotPltEntrySize to ELF target.Rui Ueyama2016-07-134-7/+21
| | | | | | | | | | | | | Patch by H.J Lu. For x86-64 psABI, the entry size of .got and .got.plt sections is 8 bytes for both LP64 and ILP32. Add GotEntrySize and GotPltEntrySize to ELF target instead of using size of ELFT::uint. Now we can generate a simple working x32 executable. Differential Revision: http://reviews.llvm.org/D22288 llvm-svn: 275301
* [X86][SSE] Regenerate truncated shift testSimon Pilgrim2016-07-131-6/+20
| | | | | | Check SSE2 and AVX2 implementations llvm-svn: 275300
* Regenerate testSimon Pilgrim2016-07-131-2/+2
| | | | llvm-svn: 275299
* Rename VAStart -> ImageBase. NFC.Rui Ueyama2016-07-136-11/+13
| | | | | | | | | | Config members are named after corresponding command line options. This patch renames VAStart ImageBase so that they are in line with --image-base. Differential Revision: http://reviews.llvm.org/D22277 llvm-svn: 275298
* add test for zexty xor sandwichSanjay Patel2016-07-131-0/+14
| | | | llvm-svn: 275297
* Fix header comment in unittests/CodeGen/DIEHashTest.cpp.Justin Lebar2016-07-131-1/+1
| | | | llvm-svn: 275296
* [ELF] Rename the test to reflect the option namePetr Hosek2016-07-131-0/+0
| | | | | | | | | This is to follow the convention of naming the test after the name of the option. Differential Revision: http://reviews.llvm.org/D22276 llvm-svn: 275295
* Move mempcpy_call.ll to X86 subdirectoryKrzysztof Parzyszek2016-07-131-0/+0
| | | | llvm-svn: 275294
* Fix warning in ObjectTransformLayerTest.Justin Lebar2016-07-131-1/+2
| | | | | | | | | | | | | | Doing "I++" inside of an EXPECT_* triggers warning: expression with side effects has no effect in an unevaluated context because EXPECT_* partially expands to EqHelper<(sizeof(::testing::internal::IsNullLiteralHelper(MockObjects[I++] + 1)) == 1)> which is an unevaluated context. llvm-svn: 275293
* [ADT] Add LLVM_MARK_AS_BITMASK_ENUM, used to enable bitwise operations on ↵Justin Lebar2016-07-133-0/+287
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | enums without static_cast. Summary: Normally when you do a bitwise operation on an enum value, you get back an instance of the underlying type (e.g. int). But using this macro, bitwise ops on your enum will return you back instances of the enum. This is particularly useful for enums which represent a combination of flags. Suppose you have a function which takes an int and a set of flags. One way to do this would be to take two numeric params: enum SomeFlags { F1 = 1, F2 = 2, F3 = 4, ... }; void Fn(int Num, int Flags); void foo() { Fn(42, F2 | F3); } But now if you get the order of arguments wrong, you won't get an error. You might try to fix this by changing the signature of Fn so it accepts a SomeFlags arg: enum SomeFlags { F1 = 1, F2 = 2, F3 = 4, ... }; void Fn(int Num, SomeFlags Flags); void foo() { Fn(42, static_cast<SomeFlags>(F2 | F3)); } But now we need a static cast after doing "F2 | F3" because the result of that computation is the enum's underlying type. This patch adds a mechanism which gives us the safety of the second approach with the brevity of the first. enum SomeFlags { F1 = 1, F2 = 2, F3 = 4, ..., F_MAX = 128, LLVM_MARK_AS_BITMASK_ENUM(F_MAX) }; void Fn(int Num, SomeFlags Flags); void foo() { Fn(42, F2 | F3); // No static_cast. } The LLVM_MARK_AS_BITMASK_ENUM macro enables overloads for bitwise operators on SomeFlags. Critically, these operators return the enum type, not its underlying type, so you don't need any static_casts. An advantage of this solution over the previously-proposed BitMask class [0, 1] is that we don't need any wrapper classes -- we can operate directly on the enum itself. The approach here is somewhat similar to OpenOffice's typed_flags_set [2]. But we skirt the need for a wrapper class (and a good deal of complexity) by judicious use of enable_if. We SFINAE on the presence of a particular enumerator (added by the LLVM_MARK_AS_BITMASK_ENUM macro) instead of using a traits class so that it's impossible to use the enum before the overloads are present. The solution here also seamlessly works across multiple namespaces. [0] http://lists.llvm.org/pipermail/llvm-commits/Week-of-Mon-20150622/283369.html [1] http://lists.llvm.org/pipermail/llvm-commits/attachments/20150623/073434b6/attachment.obj [2] https://cgit.freedesktop.org/libreoffice/core/tree/include/o3tl/typed_flags_set.hxx Reviewers: chandlerc, rsmith Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D22279 llvm-svn: 275292
* Fix warnings in FunctionTest.cpp.Justin Lebar2016-07-131-6/+12
| | | | | | | | | | | | | Because of the goop involved in the EXPECT_EQ macro, we were getting the following warning expression with side effects has no effect in an unevaluated context because the "I++" was being used inside of a template type: switch (0) case 0: default: if (const ::testing::AssertionResult gtest_ar = (::testing::internal:: EqHelper<(sizeof(::testing::internal::IsNullLiteralHelper(Args[I++])) == 1)>::Compare("Args[I++]", "&A", Args[I++], &A))) ; else ::testing::internal::AssertHelper(::testing::TestPartResult::kNonFatalFailure, "../src/unittests/IR/FunctionTest.cpp", 94, gtest_ar.failure_message()) = ::testing::Message(); llvm-svn: 275291
* [analyzer] Implement a methond to discover origin region of a symbol.Artem Dergachev2016-07-134-18/+18
| | | | | | | | | | | | | This encourages checkers to make logical decisions depending on value of which region was the symbol under consideration introduced to denote. A similar technique is already used in a couple of checkers; they were modified to call the new method. Differential Revision: http://reviews.llvm.org/D22242 llvm-svn: 275290
* [InstCombine] extend vector select matching for non-splat constantsSanjay Patel2016-07-132-18/+68
| | | | | | | | | | | | | | | In D21740, we discussed trying to make this a more general matcher. However, I didn't see a clean way to handle the regular m_Not cases and these non-splat vector patterns, so I've opted for the direct approach here. If there are other potential uses of areInverseVectorBitmasks(), we could move that helper function to a higher level. There is an open question as to which is of these forms should be considered the canonical IR: %sel = select <4 x i1> <i1 true, i1 false, i1 false, i1 true>, <4 x i32> %a, <4 x i32> %b %shuf = shufflevector <4 x i32> %a, <4 x i32> %b, <4 x i32> <i32 0, i32 5, i32 6, i32 3> Differential Revision: http://reviews.llvm.org/D22114 llvm-svn: 275289
* AMDGPU/SI: Emit the number of SGPR and VGPR spillsMarek Olsak2016-07-135-0/+30
| | | | | | | | | | | | | | | | | | | | | Summary: v2: don't count SGPRs spilled to scratch twice I think this is sufficient. It doesn't count private memory usage, which happens often and uses scratch but isn't technically a spill. The private memory usage can be computed by: [scratch_per_thread - vgpr_spills - a random multiple of SGPR spills]. The fact SGPR spills add very high numbers to the scratch size make that computation a guessing game, but I don't have a solution to that. Reviewers: tstellarAMD Subscribers: arsenm, kzhuravl Differential Revision: http://reviews.llvm.org/D22197 llvm-svn: 275288
* Fix a check in the objc trampoline handlerStephane Sezer2016-07-131-1/+1
| | | | | | | | | | | | | | | | Summary: The function FunctionCaller::WriteFunctionArguments returns false on errors, so they should check for the false return value. Change by Walter Erquinigo <a20012251@gmail.com> Reviewers: jingham, clayborg Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D22278 llvm-svn: 275287
* Remove comment that isn't needed anymore.Greg Clayton2016-07-131-47/+0
| | | | | | <rdar://problem/24599697> llvm-svn: 275285
* Fix for Bug 26903, adds support to inline __builtin_mempcpyAndrew Kaylor2016-07-1310-1/+103
| | | | | | | | Patch by Sunita Marathe Differential Revision: http://reviews.llvm.org/D21920 llvm-svn: 275284
* PR28516: Fix LangRef description of call and invoke to match IR changes for ↵David Blaikie2016-07-131-14/+16
| | | | | | typeless pointers llvm-svn: 275283
* [OpenMP] Initial implementation of parse+sema for OpenMP clause ↵Carlo Bertolli2016-07-1318-2/+744
| | | | | | | | 'is_device_ptr' of target http://reviews.llvm.org/D22070 llvm-svn: 275282
* Centralize the way symbol and functions are looked up by making a ↵Greg Clayton2016-07-135-273/+311
| | | | | | | | | | | | | | Module::LookupInfo class that does all of the heavy lifting. Background: symbols and functions can be looked up by full mangled name and by basename. SymbolFile and ObjectFile are expected to be able to do the lookups based on full mangled name or by basename, so when the user types something that is incomplete, we must be able to look it up efficiently. For example the user types "a::b::c" as a symbol to set a breakpoint on, we will break this down into a 'lookup "c"' and then weed out N matches down to just the ones that match "a::b::c". Previously this was done manaully in many functions by calling Module::PrepareForFunctionNameLookup(...) and then doing the lookup and manually pruning the results down afterward with duplicated code. Now all places use Module::LookupInfo to do the work in one place. This allowed me to fix the name lookups to look for "func" with eFunctionNameTypeFull as the "name_type_mask", and correctly weed the results: "func", "func()", "func(int)", "a::func()", "b::func()", and "a::b::func()" down to just "func", "func()", "func(int)". Previously we would have set 6 breakpoints, now we correctly set just 3. This also extends to the expression parser when it looks up names for functions it needs to not get multiple results so we can call the correct function. <rdar://problem/24599697> llvm-svn: 275281
* Constuct a sentry object in istream::readsome, and handle failures ↵Marshall Clow2016-07-131-11/+28
| | | | | | appropriately. Fixes PR#28217. llvm-svn: 275280
* [include-fixer] Implement adding missing namespace qualifiers in vim ↵Haojian Wu2016-07-137-87/+186
| | | | | | | | | | | | | | | | | integration. Summary: The patch extends include-fixer's "-output-headers", and "-insert-headers" command line options to make it dump more information (e.g. QualifiedSymbol), so that vim-integration can add missing qualifiers. Reviewers: bkramer Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D22299 llvm-svn: 275279
* PatchableFunction: Skip pseudos that do not create codeMatthias Braun2016-07-132-5/+47
| | | | | | This fixes http://llvm.org/PR28524 llvm-svn: 275278
* [ThinLTO/gold] Enable symbol resolution in distributed backend caseTeresa Johnson2016-07-132-7/+0
| | | | | | | | | | | | | | | | While testing a follow-on change to enable index-based symbol resolution and internalization in the distributed backends, I realized that a test case change I made in r275247 was only required because we were not analyzing symbols in the claimed files in thinlto-index-only mode. In the fixed test case there should be no internalization because we are linking in -shared mode, so f() is in fact exported, which is detected properly when we analyze symbols in thinlto-index-only mode. Note that this is not (yet) a correctness issue (because we are not yet performing the index-based linkage optimizations in the distributed backends - that's coming in a follow-on patch). llvm-svn: 275277
* [x86][SSE/AVX] optimize pcmp results better (PR28484)Sanjay Patel2016-07-135-41/+66
| | | | | | | | | | | | | | We know that pcmp produces all-ones/all-zeros bitmasks, so we can use that behavior to avoid unnecessary constant loading. One could argue that load+and is actually a better solution for some CPUs (Intel big cores) because shifts don't have the same throughput potential as load+and on those cores, but that should be handled as a CPU-specific later transformation if it ever comes up. Removing the load is the more general x86 optimization. Note that the uneven usage of vpbroadcast in the test cases is filed as PR28505: https://llvm.org/bugs/show_bug.cgi?id=28505 Differential Revision: http://reviews.llvm.org/D22225 llvm-svn: 275276
* Add accelerator code generation pass skeletonTobias Grosser2016-07-134-14/+118
| | | | | | | | | | | | | | | | | | | | | | | Add a new pass to serve as basis for automatic accelerator mapping in Polly. The pass structure and the analyses preserved are copied from CodeGeneration.cpp, as we will rely on IslNodeBuilder and IslExprBuilder for LLVM-IR code generation. Polly's accelerator code generation is enabled with -polly-target=gpu I would like to use this commit as opportunity to thank Yabin Hu for his work in the context of two Google summer of code projects during which he implemented initial prototypes of the Polly accelerator code generation -- in parts this code is already available in todays Polly (e.g., tools/GPURuntime). More will come as part of the upcoming Polly ACC changes. Reviewers: Meinersbur Subscribers: pollydev, llvm-commits Differential Revision: http://reviews.llvm.org/D22036 llvm-svn: 275275
* Add ppcg-0.04 to lib/ExternalTobias Grosser2016-07-1377-6/+55862
| | | | | | | | | | | | | | | | | | | | | | | ppcg will be used to provide mapping decisions for GPU code generation. As we do not use C as input language, we do not include pet. However, we include pet.h from pet 82cacb71 plus a set of dummy functions to ensure ppcg links without problems. The version of ppcg committed is unmodified ppcg-0.04 which has been well tested in the context of LLVM. It does not provide an official library interface yet, which means that in upcoming commits we will add minor modifications to make necessary functionality accessible. We will aim to upstream these modifications after we gained enough experience with GPU generation support in Polly to propose a stable interface. Reviewers: Meinersbur Subscribers: pollydev, llvm-commits Differential Revision: http://reviews.llvm.org/D22033 llvm-svn: 275274
* [ConstantFolding] Use sdiv_ovDavid Majnemer2016-07-131-4/+4
| | | | | | This is a simplification, there should be no functional change. llvm-svn: 275273
* [X86][AVX512] Add support for VPERMILPD/VPERMILPS variable shuffle mask commentsSimon Pilgrim2016-07-132-10/+27
| | | | llvm-svn: 275272
* [OpenMP] Initial implementation of parse+sema for clause use_device_ptr of ↵Carlo Bertolli2016-07-1318-0/+574
| | | | | | | | | | | | | | 'target data' http://reviews.llvm.org/D21904 This patch is similar to the implementation of 'private' clause: it adds a list of private pointers to be used within the target data region to store the device pointers returned by the runtime. Please refer to the following document for a full description of what the runtime witll return in this case (page 10 and 11): https://github.com/clang-omp/OffloadingDesign I am happy to answer any question related to the runtime interface to help reviewing this patch. llvm-svn: 275271
* [X86][AVX] Add support for target shuffle combining to VPERMILPS variable ↵Simon Pilgrim2016-07-134-4/+59
| | | | | | | | shuffle mask Added AVX512F VPERMILPS shuffle decoding support llvm-svn: 275270
* [ELF] - Add predefined sections to output sections list in one place.George Rimar2016-07-131-11/+11
| | | | | | | | | | | Minor cleanup. Currently it looks wierd that having method addPredefinedSections() we still add 2 sections outside it without real reasons. Patch fixes that. Differential revision: http://reviews.llvm.org/D19981 llvm-svn: 275269
* AMDGPU/SI: Add support for R_AMDGPU_GOTPCRELTom Stellard2016-07-1310-51/+277
| | | | | | | | | | Reviewers: rafael, ruiu, tony-tye, arsenm, kzhuravl Subscribers: arsenm, llvm-commits, kzhuravl Differential Revision: http://reviews.llvm.org/D21484 llvm-svn: 275268
* [PCH] Add a fno-pch-timestamp option to cc1 to disable inclusion of ↵Pierre Gousseau2016-07-137-3/+42
| | | | | | | | | | | | timestamps in PCH files. This is to allow distributed build systems, that do not preserve time stamps, to use PCH files. Second and last part of the patch proposed at: Differential Revision: http://reviews.llvm.org/D20867 llvm-svn: 275267
* Rename llc's -fpreserve-as-comments flag -preserve-as-comments.Nirav Dave2016-07-131-1/+1
| | | | llvm-svn: 275266
* [MC] Fix lexing ordering in assembly label parsing to preserve same lineNirav Dave2016-07-132-7/+9
| | | | | | comment placement. llvm-svn: 275265
* [RT-ARM] Syntax unified for aeabi_mem* functionsRenato Golin2016-07-133-0/+3
| | | | | | | | | | | | | Use unified syntax for builtins/arm/aeabi_mem*.S. This makes these files consistent with the others. This fixes a problem on the linker, which can fail with the message "relocation truncated to fit: R_ARM_THM_JUMP11 against symbol" Patch by Kor Nielsen. llvm-svn: 275264
* [clang-tidy] Fix misc-definitions-in-headers misplaced fixing to fully ↵Haojian Wu2016-07-132-3/+6
| | | | | | | | | | | | templated function. Reviewers: alexfh, aaron.ballman Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D22260 llvm-svn: 275263
* [X86][SSE] Check for lane crossing shuffles before trying to combine to PSHUFBSimon Pilgrim2016-07-131-8/+11
| | | | | | Removes a return-on-fail that was making it tricky to add other variable mask shuffles. llvm-svn: 275262
* [PCH] Fix timestamp check on windows hosts.Pierre Gousseau2016-07-131-9/+0
| | | | | | | | | | | | | | | On Linux, if the timestamp of a header file, included in the pch, is modified, then including the pch without regenerating it causes a fatal error, which is reasonable. On Windows the check is ifdefed out, allowing the compilation to continue in a broken state. The root of the broken state is that, if timestamps dont match, the preprocessor will reparse a header without discarding the pch data. This leads to "#pragma once" header to be included twice. The reason behind the ifdefing of the check lacks documentation, and was done 6 years ago. This change tentatively removes the ifdefing. First part of patch proposed at: Differential Revision: http://reviews.llvm.org/D20867 llvm-svn: 275261
* Add "support" for DW_CFA_GNU_args_size to the unwinderPavel Labath2016-07-131-0/+20
| | | | | | | | | | | | | | | | | | | Summary: This adds the knowledge of the DW_CFA_GNU_args_size instruction to the eh_frame parsing code. Right now it is ignored as I am unsure how is it supposed to be handled, but now we are at least able to parse the rest of the FDE containing this instruction. I also add a fix for a bug which was exposed by this instruction. Namely, a mismatched sequence of remember/restore instructions in the input could cause us to pop an empty stack and crash. Now we just log the error and ignore the offending instruction. Reviewers: jasonmolenda Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D22266 llvm-svn: 275260
* [OpenCL] Fix code generation of kernel pipe parameters.Alexey Bader2016-07-132-3/+25
| | | | | | | | | | | Improved test with user define structure pipe type case. Reviewers: Anastasia, pxli168 Subscribers: yaxunl, cfe-commits Differential revision: http://reviews.llvm.org/D21744 llvm-svn: 275259
* Reverted r275257 "[ELF] - Implement extern "c++" version script tag"George Rimar2016-07-136-179/+33
| | | | | | | | It broke build bots: http://lab.llvm.org:8011/builders/llvm-clang-lld-x86_64-scei-ps4-windows10pro-fast/builds/8204 http://lab.llvm.org:8011/builders/lld-x86_64-freebsd/builds/19432 llvm-svn: 275258
OpenPOWER on IntegriCloud