summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* [Sema] Fix a crash that occurs when a variable template is initializedAkira Hatanaka2016-04-282-3/+23
| | | | | | | | | | | | | | | with a generic lambda. This patch fixes Sema::InstantiateVariableInitializer to switch to the context of the variable before instantiating its initializer, which is necessary to set the correct type for VarTemplateSpecializationDecl. This is the first part of the patch that was reviewed here: http://reviews.llvm.org/D19175 rdar://problem/23440346 llvm-svn: 267956
* [llvm-pdbdump] Restore error messages, handle bad block sizesDavid Majnemer2016-04-284-15/+29
| | | | | | | We lost the ability to report errors, bring it back. Also, correctly validate the block size. llvm-svn: 267955
* LiveIntervalAnalysis: Remove LiveVariables requirementMatthias Braun2016-04-284-8/+11
| | | | | | | | | | | | This requirement was a huge hack to keep LiveVariables alive because it was optionally used by TwoAddressInstructionPass and PHIElimination. However we have AnalysisUsage::addUsedIfAvailable() which we can use in those passes. This re-applies r260806 with LiveVariables manually added to PowerPC to hopefully not break the stage 2 bots this time. llvm-svn: 267954
* [llvm-pdbdump] Correctly read data larger than a blockDavid Majnemer2016-04-283-82/+994
| | | | | | | | | A bug was introduced when the code was refactored which resulted in a bad memory access. This fixes PR27565. llvm-svn: 267953
* [LoopDist] Emit optimization remarks (-Rpass*)Adam Nemet2016-04-282-0/+143
| | | | | | | | | | | | | | | | I closely followed the precedents set by the vectorizer: * With -Rpass-missed, the loop is reported with further details pointing to -Rpass--analysis. * -Rpass-analysis reports the details why distribution has failed. * Regardless of -Rpass*, when distribution fails for a loop where distribution was forced with the pragma, a warning is produced according to -Wpass-failed. In this case the analysis info is also printed even without -Rpass-analysis. llvm-svn: 267952
* [LoopDist] Improve debug messagesAdam Nemet2016-04-281-6/+6
| | | | | | | | | | | The next patch will start using these for -Rpass-analysis so they won't be internal-only anymore. Move the 'Skipping; ' prefix that some of the message are using into the 'fail' function. We don't want to include this prefix in the -Rpass-analysis report. llvm-svn: 267951
* [LoopDist] Add helper to print debug message when distribution fails. NFCAdam Nemet2016-04-281-23/+20
| | | | | | This will form the basis to emit optimization remarks (-Rpass*). llvm-svn: 267950
* [Inliner] Preserve llvm.mem.parallel_loop_access metadataHal Finkel2016-04-282-0/+88
| | | | | | | | | | | | | | | | | | | | | | | When inlining a call site with llvm.mem.parallel_loop_access metadata, this metadata needs to be propagated to all cloned memory-accessing instructions. Otherwise, inlining parts of the loop body will invalidate the annotation. With this functionality, we now vectorize the following as expected: void Body(int *res, int *c, int *d, int *p, int i) { res[i] = (p[i] == 0) ? res[i] : res[i] + d[i]; } void Test(int *res, int *c, int *d, int *p, int n) { int i; #pragma clang loop vectorize(assume_safety) for (i = 0; i < 1600; i++) { Body(res, c, d, p, i); } } llvm-svn: 267949
* Differential Revision: http://reviews.llvm.org/D19687Sriraman Tallam2016-04-281-8/+6
| | | | | | Set module flag PIELevel. Simplify code that sets PICLevel flag. llvm-svn: 267948
* Guard libc++ specific c.__invariants() tests in LIBCPP_ASSERT macrosEric Fiselier2016-04-28101-342/+390
| | | | llvm-svn: 267947
* [ASan] Reenable __builtin_setjmp test on PowerPC, disable on SystemZ.Marcin Koscielnicki2016-04-281-6/+5
| | | | | | | | | | | | Since __builtin_setjmp has been fixed by rL267943, the test now works on PowerPC. Enable it. On the other hand, the SystemZ backend doesn't currently support __builtin_setjmp. Disable it. Differential Revision: http://reviews.llvm.org/D19657 llvm-svn: 267946
* Read discriminators correctly from object file.Dehao Chen2016-04-284-48/+169
| | | | | | | | | | | | | | | Summary: This is the follow-up patch for http://reviews.llvm.org/D19436 * Update the discriminator reading algorithm to match the assignment algorithm. * Add test to cover the new algorithm. Reviewers: dnovillo, echristo, dblaikie Subscribers: danielcdh, dblaikie, echristo, llvm-commits, joker.eph Differential Revision: http://reviews.llvm.org/D19522 llvm-svn: 267945
* [CodeGen] Remove extra ';'Marcin Koscielnicki2016-04-281-1/+1
| | | | | | Squashes a -Wpedantic warning. llvm-svn: 267944
* [PowerPC] Fix the EH_SjLj_Setup pseudo.Marcin Koscielnicki2016-04-283-1/+54
| | | | | | | | | | | | | | | | | | | This instruction is just a control flow marker - it should not actually exist in the object file. Unfortunately, nothing catches it before it gets to AsmPrinter. If integrated assembler is used, it's considered to be a normal 4-byte instruction, and emitted as an all-0 word, crashing the program. With external assembler, a comment is emitted. Fixed by setting Size to 0 and handling it in MCCodeEmitter - this means the comment will still be emitted if integrated assembler is not used. This broke an ASan test, which has been disabled for a long time as a result (see the discussion on D19657). We can reenable it once this lands. llvm-svn: 267943
* [clang][AVX512][Builtin] Adding intrinsics for the SAD instruction set.Michael Zuckerman2016-04-285-0/+143
| | | | | | Differential Revision: http://reviews.llvm.org/D19591 llvm-svn: 267942
* [CMake] Adding another missing include. NFC.Chris Bieneman2016-04-281-0/+2
| | | | | | This also works fine today, but will break with my upcoming refactoring. llvm-svn: 267941
* Fix a bug in llvm-objdump for -private-headers printing the ↵Kevin Enderby2016-04-283-1/+8
| | | | | | | | LC_CODE_SIGNATURE Mach-O load command. rdar://25985653 llvm-svn: 267940
* [RDF] Recognize tail calls in graph creationKrzysztof Parzyszek2016-04-281-4/+20
| | | | llvm-svn: 267939
* Fix warning in PDB code. NFCAmaury Sechet2016-04-281-1/+1
| | | | llvm-svn: 267938
* LiveIntervalAnalysis: No need to deal with dead subregister defs anymore.Matthias Braun2016-04-281-20/+3
| | | | | | | | The DetectDeadLaneMask already ensures that we have no dead subregister definitions making the special handling in LiveIntervalAnalysis unnecessary. This reverts most of r248335. llvm-svn: 267937
* [RDF] Improve handling of inline-asmKrzysztof Parzyszek2016-04-283-4/+78
| | | | | | | - Keep implicit defs from inline-asm instructions. - Treat register references from inline-asm as fixed. llvm-svn: 267936
* Delete dead variable.Rafael Espindola2016-04-281-1/+0
| | | | llvm-svn: 267935
* Add parentheses to silence -Wparentheses warnings.Zachary Turner2016-04-281-6/+6
| | | | llvm-svn: 267934
* [clang-tidy] cppcoreguidelines-pro-type-member-init should not complain ↵Alexander Kornienko2016-04-283-13/+14
| | | | | | | | | | | | | | | | about static variables Summary: Variables with static storage duration are zero-initialized per [stmt.dcl]p4 and [basic.start.init]p2. Reviewers: sbenza, aaron.ballman Subscribers: michael_miller, flx, cfe-commits Differential Revision: http://reviews.llvm.org/D19672 llvm-svn: 267933
* [RDF] Add option to keep dead phi nodes in DFGKrzysztof Parzyszek2016-04-283-4/+15
| | | | | | | | | | Dead phi nodes are needed for code motion (such as copy propagation), where a new use would be placed in a location that would be dominated by a dead phi. Such a transformation is not legal for copy propagation, and the existence of the phi would prevent it, but if the phi is not there, it may appear to be valid. llvm-svn: 267932
* Used llvm_unreached to quite a VC++ compiler warning.Adrian McCarthy2016-04-281-0/+4
| | | | | | Differential Revision: http://reviews.llvm.org/D19489 llvm-svn: 267931
* [CMake] [Darwin] Use libtool instead of ar && ranlibChris Bieneman2016-04-281-0/+15
| | | | | | | | | | | | Summary: Using libtool instead of ar and ranlib on Darwin shaves a minute off my clang build. This is because on Darwin libtool is optimized to give hints to the kernel about filesystem interactions that allow it to be faster. Reviewers: bogner, pete Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D19611 llvm-svn: 267930
* Update llvm-objdump for disassembly of ARM Mach-O files to always include ↵Kevin Enderby2016-04-282-7/+9
| | | | | | | | | | the opcode bytes. As this is the expected behavior of the old darwin otool(1) for ARM Mach-O files. rdar://25896249 llvm-svn: 267929
* Read the rest of the DBI substreams, and parse source info.Zachary Turner2016-04-285-27/+166
| | | | | | | | | | | | | We now read out the rest of the substreams from the DBI streams. One of these substreams, the FileInfo substream, contains information about which source files contribute to each module (aka compiland). This patch additionally parses out the file information from that substream, and dumps it in llvm-pdbdump. Differential Revision: http://reviews.llvm.org/D19634 Reviewed by: ruiu llvm-svn: 267928
* This reverts commit r265505.Kit Barton2016-04-2810-379/+0
| | | | | | | Revert "[Power9] Implement add-pc, multiply-add, modulo, extend-sign-shift, random number, set bool, and dfp test significance". This patch has caused a functional regression in SPEC2k6 namd, and a performance regression in mesa-pipe. llvm-svn: 267927
* One more fix for use of invalid PresumedLocs missed by r267914.Richard Smith2016-04-281-2/+3
| | | | llvm-svn: 267926
* [Hexagon] Add instruction aliases for vector unsigned compare-equalKrzysztof Parzyszek2016-04-282-0/+101
| | | | | | Unsigned compare-equal instructions are mapped to signed compare-equal. llvm-svn: 267925
* [analyzer] Add path note for localizability checker.Devin Coughlin2016-04-282-14/+93
| | | | | | | | | Add a path note indicating the location of the non-localized string literal in NonLocalizedStringChecker. rdar://problem/25981525 llvm-svn: 267924
* XFail TestBitfields.py Python API tests.Chaoren Lin2016-04-281-0/+1
| | | | | | | | | | | | | | Summary: Started failing after rL267895. Possibly related to http://llvm.org/pr27510. Reviewers: labath, tfiala Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D19680 llvm-svn: 267923
* AMDGPU: Emit error if too much LDS is usedMatt Arsenault2016-04-283-3/+22
| | | | llvm-svn: 267922
* Use a single context for lto.Rafael Espindola2016-04-286-16/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Using multiple context used to be a really big memory saving because we could free memory from each file while the linker proceeded with the symbol resolution. We are getting lazier about reading data from the bitcode, so I was curious if this was still a good tradeoff. One thing that is a bit annoying is that we still have to copy the symbol names. The problem is that the names are stored in the Module and get freed when we move the module bits during linking. Long term I think the solution is to add a symbol table to the bitcode. That way IRObject file will not need to use a Module or a Context and we can drop it while still keeping a StringRef to the names. This patch is still be an interesting medium term improvement. When linking llvm-as without debug info this patch is a small speedup: master: 29.861877513 seconds patch: 29.814533787 seconds With debug info the numbers are master: 34.765181469 seconds patch: 34.563351584 seconds The peak memory usage when linking llvm-as with debug info was master: 599.10MB patch: 600.13MB llvm-svn: 267921
* Remove doInitialization() and doFinalization() member declarations without ↵Yaron Keren2016-04-281-16/+0
| | | | | | | | definitions. Visual C++ 2015 flags this in the IDE. llvm-svn: 267919
* Reset the TopRPTracker's position in ScheduleDAGMILive::initQueuesKrzysztof Parzyszek2016-04-283-5/+166
| | | | | | | | | | | | | | | | | | | ScheduleDAGMI::initQueues changes the RegionBegin to the first non-debug instruction. Since it does not track register pressure, it does not affect any RP trackers. ScheduleDAGMILive inherits initQueues from ScheduleDAGMI, and it does reset the TopTPTracker in its schedule method. Any derived, target-specific scheduler will need to do it as well, but the TopRPTracker is only exposed as a "const" object to derived classes. Without the ability to modify the tracker directly, this leaves a derived scheduler with a potential of having the TopRPTracker out-of-sync with the CurrentTop. The symptom of the problem: void llvm::ScheduleDAGMILive::scheduleMI(llvm::SUnit *, bool): Assertion `TopRPTracker.getPos() == CurrentTop && "out of sync"' failed. Differential Revision: http://reviews.llvm.org/D19438 llvm-svn: 267918
* Skip scanRelocs for non-alloc sections.Rui Ueyama2016-04-284-20/+56
| | | | | | | | | | | | | | | | | | | | | | | Relocations against sections with no SHF_ALLOC bit are R_ABS relocations. Currently we are creating Relocations vector for them, but that is wasteful. This patch is to skip vector construction and to directly apply relocations in place. This patch seems to be pretty effective for large executables with debug info. r266158 (Rafael's patch to change the way how we apply relocations) caused a temporary performance degradation for such executables, but this patch makes it even faster than before. Time to link clang with debug info (output size is 1070 MB): before r266158: 15.312 seconds (0%) r266158: 17.301 seconds (+13.0%) Head: 16.484 seconds (+7.7%) w/patch: 13.166 seconds (-14.0%) Differential Revision: http://reviews.llvm.org/D19645 llvm-svn: 267917
* AMDGPU: Fix mishandling array allocations when promoting allocaMatt Arsenault2016-04-284-17/+69
| | | | | | | | The canonical form for allocas is a single allocation of the array type. In case we see a non-canonical array alloca, make sure we aren't replacing this with an array N times smaller. llvm-svn: 267916
* Fix builds broken in r267910.Eugene Zelenko2016-04-281-1/+1
| | | | llvm-svn: 267915
* Fix use of uninitialized value exposed by r267802. Accessors of an invalidRichard Smith2016-04-284-11/+14
| | | | | | PresumedLoc should not be called. llvm-svn: 267914
* [CMake] Updating Apple CMake cache fileChris Bieneman2016-04-281-3/+6
| | | | | | Changing the Apple CMake cache file to better match the way Apple Clang builds are built. llvm-svn: 267913
* [CMake] Adding some missing CMake includes. NFC.Chris Bieneman2016-04-281-0/+3
| | | | | | This happens to be working now because the includes exist in another CMake file that is included before this one. That will change with upcoming refactoring. llvm-svn: 267912
* Add "PIE Level" metadata to module flags.Sriraman Tallam2016-04-283-0/+29
| | | | | | http://reviews.llvm.org/D19671 llvm-svn: 267911
* Fix some Clang-tidy modernize and Include What You Use warnings.Eugene Zelenko2016-04-285-30/+104
| | | | | | Differential revision: http://reviews.llvm.org/D19673 llvm-svn: 267910
* Make the test exercise all paths modified in r267746.Paul Robinson2016-04-281-1/+7
| | | | llvm-svn: 267909
* [PGO] Fix incorrect Twine usage in emitting optimization remarks.Rong Xu2016-04-281-9/+8
| | | | | | | Should not store Twine objects to local variables. This is fixed the test failures with r267815 in VS2015 X64 build. llvm-svn: 267908
* [test/asan] Update a test case to work with old Darwin SDK'sVedant Kumar2016-04-281-1/+1
| | | | | | | | | On Darwin, MAP_ANONYMOUS is a synonym for MAP_ANON. However, some SDK's don't define MAP_ANONYMOUS. Use MAP_ANON to work around this. (As a point of interest, the situation is exactly reversed on Linux.) llvm-svn: 267907
* [OpenCL] Fix bug in mergeTypes which causes equivalent types treated as ↵Yaxun Liu2016-04-282-2/+11
| | | | | | | | | | different. When comparing unqualified types, canonical types should be used, otherwise equivalent types may be treated as different type. Differential Revision: http://reviews.llvm.org/D19662 llvm-svn: 267906
OpenPOWER on IntegriCloud