summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* [Clang][AVX512][Builtin] Adding support for VBROADCAST and ↵Michael Zuckerman2016-04-1311-3/+1049
| | | | | | | | | VPBROADCASTB/W/D/Q instruction set Differential Revision: http://reviews.llvm.org/D19012 llvm-svn: 266195
* [X86][SSE] Regenerated vector integer absolute testsSimon Pilgrim2016-04-131-200/+503
| | | | llvm-svn: 266194
* Calculate __builtin_object_size when pointer depends on a conditionPetar Jovanovic2016-04-135-19/+207
| | | | | | | | | | | | | | | | This patch fixes calculating of builtin_object_size if it depends on a condition. Before this patch compiler did not know how to calculate the object size when it finds a condition that cannot be eliminated. This patch enables calculating of builtin_object_size even in case when condition cannot be eliminated by choosing minimum or maximum value as a result from condition. Choosing minimum or maximum value from condition is based on the second argument of __builtin_object_size function. Patch by Strahinja Petrovic. Differential Revision: http://reviews.llvm.org/D18438 llvm-svn: 266193
* Fix test rerun logicPavel Labath2016-04-131-1/+1
| | | | | | | | | | | | | | result_formatter used inspect.getfile() to get the python file name, which returned "*.pyc" if the bytecode file was present. This resulted in files being displayed with the wrong extension, and more critically, would confuse the rerun logic because it would try to rerun the pyc file (which resulted in an empty rerun list as unittest refused to run those). Fix: use inspect.getsourcefile() instead. I am not sure why does was not an issue before. I can only assume that some system update tricked python into producing bytecode files more aggressively. llvm-svn: 266192
* Complete support for C++ Core Guidelines Type.6: Always initialize a member ↵Alexander Kornienko2016-04-1310-172/+761
| | | | | | | | | | | | | | | | variable. Summary: Added the remaining features needed to satisfy C++ Core Guideline Type.6: Always initialize a member variable to cppcoreguidelines-pro-type-member-init. The check now flags all default-constructed uses of record types without user-provided default constructors that would leave their memory in an undefined state. The check suggests value initializing them instead. Reviewers: flx, alexfh, aaron.ballman Subscribers: klimek, aaron.ballman, LegalizeAdulthood, cfe-commits Patch by Michael Miller! Differential Revision: http://reviews.llvm.org/D18584 llvm-svn: 266191
* [clang-tidy] Add a readability-deleted-default clang-tidy check.Alexander Kornienko2016-04-138-0/+264
| | | | | | | | | | | Checks if constructors and assignment operators that are marked '= default' are actually deleted by the compiler. Patch by Alex Pilkiewicz! Differential Revision: http://reviews.llvm.org/D18961 llvm-svn: 266190
* Add AST Matchers for CXXConstructorDecl::isDelegatingConstructor and ↵Alexander Kornienko2016-04-133-13/+96
| | | | | | | | | | | | | | | | CXXMethodDecl::isUserProvided. Summary: Added two AST matchers: isDelegatingConstructor for CXXConstructorDecl::IsDelegatingConstructor; and isUserProvided corresponding to CXXMethodDecl::isUserProvided. Reviewers: aaron.ballman, alexfh Subscribers: klimek, cfe-commits Patch by Michael Miller! Differential Revision: http://reviews.llvm.org/D19038 llvm-svn: 266189
* [Clang][AVX512][Builtin] Adding supporting to intrinsics of ↵Michael Zuckerman2016-04-139-0/+278
| | | | | | | | cvt{b|d|q}2mask{128|256|512} and cvtmask2{b|d|q}{128|256|512} instruction set. Differential Revision: http://reviews.llvm.org/D19009 llvm-svn: 266188
* [modules] Add OpenCLImageTypes.def to module map to fix the modules build.Alexey Bader2016-04-131-0/+1
| | | | llvm-svn: 266187
* Enable support for __float128 in ClangNemanja Ivanovic2016-04-1352-75/+393
| | | | | | | | | | | | | | | | This patch corresponds to review: http://reviews.llvm.org/D15120 It adds support for the __float128 keyword, literals and a target feature to enable it. This support is disabled by default on all targets and any target that has support for this type is free to add it. Based on feedback that I've received from target maintainers, this appears to be the right thing for most targets. I have not heard from the maintainers of X86 which I believe supports this type. I will subsequently investigate the impact of enabling this on X86. llvm-svn: 266186
* Added missing autogeneration noteSimon Pilgrim2016-04-131-0/+1
| | | | llvm-svn: 266185
* Try to use readability-identifier-naming check on Clang.Alexander Kornienko2016-04-131-1/+12
| | | | llvm-svn: 266184
* Don't use misc-unused-parameters check on LLVM.Alexander Kornienko2016-04-131-1/+1
| | | | llvm-svn: 266183
* [clang-tidy] Disable misc-unused-parameters for clang.Alexander Kornienko2016-04-131-1/+1
| | | | llvm-svn: 266182
* [clang-tidy] add_new_check.py should fail if check name starts with the ↵Alexander Kornienko2016-04-131-21/+30
| | | | | | | | module name + updated formatting llvm-svn: 266181
* [OpenCL] Move OpenCLImageTypes.def from clangAST to clangBasic library.Alexey Bader2016-04-1332-42/+42
| | | | | | | | | | Putting OpenCLImageTypes.def to clangAST library violates layering requirement: "It's not OK for a Basic/ header to include an AST/ header". This fixes the modules build. Differential revision: http://reviews.llvm.org/D18954 Reviewers: Richard Smith, Vassil Vassilev. llvm-svn: 266180
* [mips][microMIPS] Add CodeGen support for DIV, MOD, DIVU, MODU, DDIV, DMOD, ↵Zlatko Buljan2016-04-1315-59/+655
| | | | | | | | | | | | DDIVU and DMODU instructions Differential Revision: http://reviews.llvm.org/D17137 This patch was reverted after the revertion of dependant patch http://reviews.llvm.org/D17068. There was the problem with test-suite failure. The problem is hopefully solved with dependant patch so this patch is commited again. llvm-svn: 266179
* constexpr -> const to appease MSVC bots.Richard Smith2016-04-131-1/+1
| | | | llvm-svn: 266178
* ASTWriterDecl.cpp: Prune a couple of \param(s), corresponding to r266160. ↵NAKAMURA Takumi2016-04-131-10/+0
| | | | | | [-Wdocumentation] llvm-svn: 266177
* [modules] Add some missing blockinfo records. No functionality change except ↵Richard Smith2016-04-131-0/+12
| | | | | | to llvm-bcanalyzer output. llvm-svn: 266176
* [InstCombine] We folded an fcmp to an i1 instead of a vector of i1David Majnemer2016-04-138-72/+92
| | | | | | | | | Remove an ad-hoc transform in InstCombine and replace it with more general machinery (ValueTracking, InstructionSimplify and VectorUtils). This fixes PR27332. llvm-svn: 266175
* Simplify LTOInternalize into UpdateLLVMCompilerUsedMehdi Amini2016-04-135-95/+91
| | | | | | | | | It is now only doing the update to the llvm.compiler_used global. The client has to call separately the internalization stage. Hopefully the code is simpler to understand this way. From: Mehdi Amini <mehdi.amini@apple.com> llvm-svn: 266174
* Minor cleanup in Internalize, hide helper class using anonymous namespace (NFC)Mehdi Amini2016-04-133-5/+6
| | | | | From: Mehdi Amini <mehdi.amini@apple.com> llvm-svn: 266173
* LTOInternalize: Use a StringSet instead of a sorted vector and a binary ↵Mehdi Amini2016-04-131-9/+4
| | | | | | | search query for each function From: Mehdi Amini <mehdi.amini@apple.com> llvm-svn: 266172
* [mips][microMIPS] Fix for "Cannot copy registers" assertionHrvoje Varga2016-04-136-10/+74
| | | | | | | | Differential Revision: http://reviews.llvm.org/D17068 This changes contains fix for failing test-suite. So, this patch should hopefully work now. llvm-svn: 266171
* Move "ExternalSymbols" out of LTOInternalize (NFC)Mehdi Amini2016-04-133-18/+22
| | | | | | | This is not really related to internalization per se. From: Mehdi Amini <mehdi.amini@apple.com> llvm-svn: 266170
* Really return whether Internalize did change the Module or not.Mehdi Amini2016-04-131-7/+5
| | | | | From: Mehdi Amini <mehdi.amini@apple.com> llvm-svn: 266169
* Modernize Internalizer with for-range loop (NFC)Mehdi Amini2016-04-131-8/+6
| | | | | From: Mehdi Amini <mehdi.amini@apple.com> llvm-svn: 266168
* Refactor the InternalizePass into a helper class, and expose it through a ↵Mehdi Amini2016-04-134-76/+121
| | | | | | | | | | public free function (NFC) There is really no reason to require to instanciate a pass manager to internalize. From: Mehdi Amini <mehdi.amini@apple.com> llvm-svn: 266167
* [PPC64][VSX] Add a couple of new data types for vec_vsx_ld and vec_vsx_st ↵Chuang-Yu Cheng2016-04-132-54/+164
| | | | | | | | | | | | | | | | | | | | | | | | | | intrinsics and fix incorrect testcases with minor refactoring New added data types: vector double vec_vsx_ld (int, const double *); vector float vec_vsx_ld (int, const float *); vector bool short vec_vsx_ld (int, const vector bool short *); vector bool int vec_vsx_ld (int, const vector bool int *); vector signed int vec_vsx_ld (int, const signed int *); vector unsigned int vec_vsx_ld (int, const unsigned int *); void vec_vsx_st (vector double, int, double *); void vec_vsx_st (vector float, int, float *); void vec_vsx_st (vector bool short, int, vector bool short *); void vec_vsx_st (vector bool short, int, signed short *); void vec_vsx_st (vector bool short, int, unsigned short *); void vec_vsx_st (vector bool int, int, vector bool int *); void vec_vsx_st (vector bool int, int, signed int *); void vec_vsx_st (vector bool int, int, unsigned int *); Also fix testcases which use non-vector argument version of vec_vsx_ld or vec_vsx_st, but pass incorrect parameter. llvm-svn: 266166
* Update Symtab::InitAddressIndexes so that computed symbol sizesJason Molenda2016-04-132-13/+100
| | | | | | | | | | | | | will not exceed the bounds of their Section. This is addressing a problem where a file had a large space between two sections that were not used by this module - the last symbol in the text section had an enormous size because the distance between that and the first symbol in the data section were used to compute the size. http://reviews.llvm.org/D19004 <rdar://problem/25227945> llvm-svn: 266165
* Attempt to fix TestCPPBreakpointLocations on Linux/Android.Oleksiy Vyalov2016-04-131-1/+1
| | | | llvm-svn: 266164
* Refactor Internalization pass to use as a callback instead of a StringSet (NFC)Mehdi Amini2016-04-136-119/+144
| | | | | | | | | | | | This will save a bunch of copies / initialization of intermediate datastructure, and (hopefully) simplify the code. This also abstract the symbol preservation mechanism outside of the Internalization pass into the client code, which is not forced to keep a map of strings for instance (ThinLTO will prefere hashes). From: Mehdi Amini <mehdi.amini@apple.com> llvm-svn: 266163
* Recommit r265547, and r265610,r265639,r265657 on top of it, plusWei Mi2016-04-1318-1060/+1306
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | two fixes with one about error verify-regalloc reported, and another about live range update of phi after rematerialization. r265547: Replace analyzeSiblingValues with new algorithm to fix its compile time issue. The patch is to solve PR17409 and its duplicates. analyzeSiblingValues is a N x N complexity algorithm where N is the number of siblings generated by reg splitting. Although it causes siginificant compile time issue when N is large, it is also important for performance since it removes redundent spills and enables rematerialization. To solve the compile time issue, the patch removes analyzeSiblingValues and replaces it with lower cost alternatives containing two parts. The first part creates a new spill hoisting method in postOptimization of register allocation. It does spill hoisting at once after all the spills are generated instead of inside every instance of selectOrSplit. The second part queries the define expr of the original register for rematerializaiton and keep it always available during register allocation even if it is already dead. It deletes those dead instructions only in postOptimization. With the two parts in the patch, it can remove analyzeSiblingValues without sacrificing performance. Patches on top of r265547: r265610 "Fix the compare-clang diff error introduced by r265547." r265639 "Fix the sanitizer bootstrap error in r265547." r265657 "InlineSpiller.cpp: Escap \@ in r265547. [-Wdocumentation]" Differential Revision: http://reviews.llvm.org/D15302 Differential Revision: http://reviews.llvm.org/D18934 Differential Revision: http://reviews.llvm.org/D18935 Differential Revision: http://reviews.llvm.org/D18936 llvm-svn: 266162
* ELF: Do not create relative relocations for undefined symbols.Peter Collingbourne2016-04-132-0/+20
| | | | | | | | | | | | | We need to ensure that the address of an undefined weak symbol evaluates to zero. We were getting this right for non-PIC executables (where the symbol can be evaluated directly) and for DSOs (where we emit a symbolic relocation for these symbols, as they are preemptible). But we weren't getting it right for PIEs. Probably the simplest way to ensure that these symbols evaluate to zero is by not creating a relocation in .got for them. Differential Revision: http://reviews.llvm.org/D19044 llvm-svn: 266161
* [modules] Refactor handling of cases where we write an offset to a prior ↵Richard Smith2016-04-133-29/+45
| | | | | | record into the bitstream and simplify a little, in preparation for doing this in more cases. llvm-svn: 266160
* Fix FunctionImport export list computation: need to take a reference to a ↵Mehdi Amini2016-04-131-1/+1
| | | | | | | map entry to actually modify it From: Mehdi Amini <mehdi.amini@apple.com> llvm-svn: 266159
* Change how we apply relocations.Rafael Espindola2016-04-138-526/+606
| | | | | | | | | | | | | | | | | | | | | | | With this patch we use the first scan over the relocations to remember the information we found about them: will them be relaxed, will a plt be used, etc. With that the actual relocation application becomes much simpler. That is particularly true for the interfaces in Target.h. This unfortunately means that we now do two passes over relocations for non SHF_ALLOC sections. I think this can be solved by factoring out the code that scans a single relocation. It can then be used both as a scan that record info and for a dedicated direct relocation of non SHF_ALLOC sections. I also think it is possible to reduce the number of enum values by representing a target with just an OutputSection and an offset (which can be from the start or end). This should unblock adding features like relocation optimizations. llvm-svn: 266158
* [analyzer] Nullability: Treat nil _Nonnull ivar as invariant violation.Devin Coughlin2016-04-132-14/+98
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Treat a _Nonnull ivar that is nil as an invariant violation in a similar fashion to how a nil _Nonnull parameter is treated as a precondition violation. This avoids warning on defensive returns of nil on defensive internal checks, such as the following common idiom: @class InternalImplementation @interface PublicClass { InternalImplementation * _Nonnull _internal; } -(id _Nonnull)foo; @end @implementation PublicClass -(id _Nonnull)foo { if (!_internal) return nil; // no-warning return [_internal foo]; } @end rdar://problem/24485171 llvm-svn: 266157
* AMDGPU: Add test for m0 initialization in basic loopMatt Arsenault2016-04-131-0/+48
| | | | | | | | | | | | Initialization of m0 is emitted for each LDS operation, so every block with LDS usage ends up with one. MachineLICM used to fail to hoist this out of the loop, so every loop iteration with LDS usage in it would re-initialize it. This seems to be fixed now, so add a test to make sure that it stays this way. llvm-svn: 266156
* AMDGPU: Remove leftover ShaderType attributes in testsMatt Arsenault2016-04-135-32/+30
| | | | llvm-svn: 266155
* clang/test/Driver/cl-options.c: Fix an expression to recognize dos r'\\'.NAKAMURA Takumi2016-04-131-1/+1
| | | | llvm-svn: 266154
* LTOInternalize: Fix member type, should be a reference and not a copyMehdi Amini2016-04-121-1/+1
| | | | | From: Mehdi Amini <mehdi.amini@apple.com> llvm-svn: 266153
* AMDGPU/SI: Fix spilling of 96-bit registersTom Stellard2016-04-121-0/+4
| | | | | | | | | | | | | | | Summary: It seems like this was broken in r252327. I thought we had test cases for this, but it's really hard to tirgger spills of this exact register size since they aren't used very much. Reviewers: arsenm, nhaehnle Subscribers: nhaehnle, arsenm, llvm-commits Differential Revision: http://reviews.llvm.org/D19021 llvm-svn: 266152
* Fix mismatch on returned type between header and implementation for ↵Mehdi Amini2016-04-121-1/+1
| | | | | | | createNameAnonFunctionPass() From: Mehdi Amini <mehdi.amini@apple.com> llvm-svn: 266151
* CodeGen: Clear the MFI's save and restore point after PrologEpilogInserterJustin Bogner2016-04-123-2/+29
| | | | | | | | | | This state is no longer useful and not guaranteed to be valid in later codegen passes. For example, see the added test, which would print a savepoint of %bb.-1 without this change, and crashes with a use-after-free error under ASan if you apply the recycling allocator patch from llvm.org/PR26808. llvm-svn: 266150
* Add space between words in verify-scev-maps option help messageJeroen Ketema2016-04-121-1/+1
| | | | llvm-svn: 266149
* [x86, InstCombine] fix masked load pass-through operand to be a zero vectorSanjay Patel2016-04-122-14/+17
| | | | | | | | | | | | | | This bug was introduced with: http://reviews.llvm.org/rL262269 AVX masked loads are specified to set vector lanes to zero when the high bit of the mask element for that lane is zero: "If the mask is 0, the corresponding data element is set to zero in the load form of these instructions, and unmodified in the store form." --Intel manual Differential Revision: http://reviews.llvm.org/D19017 llvm-svn: 266148
* [ObjC] Pop all cleanups created in EmitObjCForCollectionStmt beforeAkira Hatanaka2016-04-122-4/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | exiting the for-in loop. This commit fixes a bug where EmitObjCForCollectionStmt didn't pop cleanups for captures. For example, in the following for-in loop, a block which captures self is passed to foo1: for (id x in [self foo1:^{ use(self); }]) { use(x); break; } Previously, the code in EmitObjCForCollectionStmt wouldn't pop the cleanup for the captured self before exiting the loop, which caused code-gen to generate an IR in which objc_release was called twice on the captured self. This commit fixes the bug by entering a RunCleanupsScope before the loop condition is evaluated and forcing its cleanup before exiting the loop. rdar://problem/16865751 Differential Revision: http://reviews.llvm.org/D18618 llvm-svn: 266147
* ObjC class properties: add diagnostics for unimplemented class properties.Manman Ren2016-04-124-45/+76
| | | | | | rdar://24711047 llvm-svn: 266146
OpenPOWER on IntegriCloud