summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Fix linux build after r263190Ismail Donmez2016-03-111-0/+1
| | | | llvm-svn: 263213
* [AMDGPU] Assembler: change v_madmk operands to have same order as mad.Nikolay Haustov2016-03-116-37/+28
| | | | | | | | | | The constant is now at source operand 1 (previously at 2). This is also how it is in legacy AMD sp3 assembler. Update tests. Differential Revision: http://reviews.llvm.org/D17984 llvm-svn: 263212
* [PM/AA] Teach the AAManager how to handle module analyses in addition toChandler Carruth2016-03-117-9/+40
| | | | | | | function analyses, and use it to wire up globals-aa to the new pass manager. llvm-svn: 263211
* Update to include the new header file providing createGVNPass.Chandler Carruth2016-03-111-0/+1
| | | | llvm-svn: 263210
* Fix a bunch of signedness warnings in unittestsPavel Labath2016-03-112-16/+17
| | | | llvm-svn: 263209
* [PM] Port GVN to the new pass manager, wire it up, and teach a couple ofChandler Carruth2016-03-1113-359/+449
| | | | | | | | | | | | | | | | | | | | | | | | | | | tests to run GVN in both modes. This is mostly the boring refactoring just like SROA and other complex transformation passes. There is some trickiness in that GVN's ValueNumber class requires hand holding to get to compile cleanly. I'm open to suggestions about a better pattern there, but I tried several before settling on this. I was trying to balance my desire to sink as much implementation detail into the source file as possible without introducing overly many layers of abstraction. Much like with SROA, the design of this system is made somewhat more cumbersome by the need to support both pass managers without duplicating the significant state and logic of the pass. The same compromise is struck here. I've also left a FIXME in a doxygen comment as the GVN pass seems to have pretty woeful documentation within it. I'd like to submit this with the FIXME and let those more deeply familiar backfill the information here now that we have a nice place in an interface to put that kind of documentaiton. Differential Revision: http://reviews.llvm.org/D18019 llvm-svn: 263208
* Fix a couple of cornercases in FileSpec + testsPavel Labath2016-03-113-24/+117
| | | | | | | | | | | | | | | | | | | Summary: This fixes a couple of corner cases in FileSpec, related to AppendPathComponent and handling of root directory (/) file spec. I add a bunch of unit tests for the new behavior. Summary of changes: FileSpec("/bar").GetCString(): before "//bar", after "/bar". FileSpec("/").CopyByAppendingPathComponent("bar").GetCString(): before "//bar", after "/bar". FileSpec("C:", ePathSyntaxWindows).CopyByAppendingPathComponent("bar").GetCString(): before "C:/bar", after "C:\bar". Reviewers: clayborg, zturner Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D18044 llvm-svn: 263207
* AMDGPU: Don't use InstVisitor for AMDGPUPromoteAllocaMatt Arsenault2016-03-111-6/+12
| | | | | | | | Frontend authors are strongly encouraged to keep allocas in the entry block, so don't bother visiting every instruction in the other blocks of the function. llvm-svn: 263206
* skip newly segfaulting test on OS X public CITodd Fiala2016-03-111-0/+1
| | | | llvm-svn: 263205
* AMDGPU: R600 code splitting cleanupMatt Arsenault2016-03-1132-105/+93
| | | | | | | Move a few functions only used by R600 to R600 specific code, fix header macros to stop using R600, mark classes as final. llvm-svn: 263204
* [mips] Invalid tests for MTC0, MTC2, MFC0, MFC2, DMTC0, DMFC0 MIPS instructionsHrvoje Varga2016-03-114-0/+24
| | | | | | Differential Revision: http://reviews.llvm.org/D18037 llvm-svn: 263203
* [OpenMP] NFC fix compilation warning about unused variableDmitry Polukhin2016-03-111-2/+1
| | | | | | lib/Sema/SemaOpenMP.cpp:9243:13: warning: variable ‘IsRightMostExpression’ set but not used llvm-svn: 263202
* AMDGPU: Materialize sign bits with bfrevMatt Arsenault2016-03-116-16/+198
| | | | | | | If a constant is the same as the reverse of an inline immediate, this is 4 bytes smaller than having to embed a 32-bit literal. llvm-svn: 263201
* Minor code cleanups. NFC.Junmo Park2016-03-111-3/+3
| | | | llvm-svn: 263200
* [Compiler-rt] Fix ioctl codes for MIPS in sanitizer_ioctl_testMohit K. Bhakkad2016-03-111-2/+4
| | | | | | | | | | Reviewers: samsonov Subscribers: jaydeep, sagar, llvm-commits Differential Revision: http://reviews.llvm.org/D17985 llvm-svn: 263199
* Fix indentation.Sean Silva2016-03-111-1/+1
| | | | | | Somehow this slipped by in r263197. Thanks to Rui for noticing. llvm-svn: 263198
* [lto] The previous testcase was not useful enough.Sean Silva2016-03-112-0/+4
| | | | | | -shared was hiding the fact that the intrinsic wasn't being found. llvm-svn: 263197
* Minor code cleanup. NFC.Junmo Park2016-03-111-1/+1
| | | | llvm-svn: 263196
* Fix ASan test cases after r263177Alexey Samsonov2016-03-113-7/+7
| | | | llvm-svn: 263195
* Removing the friend declaration was not a good idea.John McCall2016-03-111-0/+1
| | | | llvm-svn: 263194
* Speculatively attempt to fix the MSVC build by making someJohn McCall2016-03-111-8/+9
| | | | | | methods non-private. llvm-svn: 263193
* Add a coerce-and-expand ABIArgInfo as a generalization of someJohn McCall2016-03-114-19/+243
| | | | | | | | of the things we do with Expand / Direct. NFC for now, but this will be used by swiftcall expansion. llvm-svn: 263192
* Preserve ExtParameterInfos into CGFunctionInfo.John McCall2016-03-1118-196/+337
| | | | | | | | | As part of this, make the function-arrangement interfaces a little simpler and more semantic. NFC. llvm-svn: 263191
* ELF: Add --thread option and partially parallelize writeTo().Rui Ueyama2016-03-114-2/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds --thread option and use parallel_for_each to write sections in regular OutputSections. This is the first patch to use more than one threads. Note that --thread is off by default because it is experimental. At this moment I still want to focus on single thread performance because multi-threading is not a magic wand to fix performance problems after all. It is generally very hard to make a slow program faster by threads. Therefore, I want to make the linker as efficient as possible first and then look for opportunity to make it even faster using more than one core. Here are some numbers to link programs with and without --threads and using GNU gold. Numbers are in seconds. Clang w/o --threads 0.697 w --threads 0.528 gold 1.643 Scylla w/o --threads 5.032 w --threads 4.935 gold 6.791 GNU gold w/o --threads 0.550 w --threads 0.551 gold 0.737 I limited the number of cores these processes can use to 4 using perf command, so although my machine has 20 physical cores, the performance gain I observed should be reproducible with a machine which is not as beefy as mine. llvm-svn: 263190
* Remove llvm::getDISubprogram in favor of Function::getSubprogramPete Cooper2016-03-118-36/+9
| | | | | | | | | | | | | | | | | llvm::getDISubprogram walks the instructions in a function, looking for one in the scope of the current function, so that it can find the !dbg entry for the subprogram itself. Now that !dbg is attached to functions, this should not be necessary. This patch changes all uses to just query the subprogram directly on the function. Ideally this should be NFC, but in reality its possible that a function: has no !dbg (in which case there's likely a bug somewhere in an opt pass), or that none of the instructions had a scope referencing the function, so we used to not find the !dbg on the function but now we will Reviewed by Duncan Exon Smith. Differential Revision: http://reviews.llvm.org/D18074 llvm-svn: 263184
* Fix SBDebugger.GetOutputFileHandle() on OS X.Jim Ingham2016-03-114-3/+10
| | | | | | | | | | | | | | | | | | | | | | | The swig typemaps had some magic for output File *'s on OS X that made: SBDebugger.GetOutputFileHandle() actually work. That was protected by a "#ifdef __MACOSX__", but the corresponding define got lost going from the Darwin shell scripts to the python scripts for running swig, so the code was elided. I need to pass the define to SWIG, but only when targetting Darwin. So I added a target-platform argument to prepare_bindings, and if that is Darwin, I pass -D__APPLE__ to swig, and that activates this code again, and GetOutputFileHandle works again. Note, I only pass that argument for the Xcode build. I'm sure it is possible to do that for cmake, but my cmake-foo is weak. I should have been able to write a test for this by creating a debugger, setting the output file handle to something file, writing to it, getting the output file handle and reading it. But SetOutputFileHandle doesn't seem to work from Python, so I'd have to write a pexpect test to test this, which I'd rather not do. llvm-svn: 263183
* [lto] Add a useful test case.Sean Silva2016-03-111-0/+3
| | | | | | | | | | | This is reduced from an issue found in practice. The original version of D18012 needed another patch to handle this, but it now works since we are using a more correct GV->hasAppendingLinkage() check that Rafael suggested. This is what remains of that other patch. llvm-svn: 263181
* [gold] Fix common symbols handling.Evgeniy Stepanov2016-03-113-20/+63
| | | | | | | | | | | | LLVM Gold plugin decides which instance of a common symbol it wants based on the symbol size in claim_file_hook. If the file that contains the chosen instance is later dropped from the link, we end up with an undefined reference. This change delays this decision until the set of the included files is known. llvm-svn: 263180
* [lto] Make sure that ctors are added to the combined module.Sean Silva2016-03-114-1/+31
| | | | | | | | | | | | | | Summary: More generally, appending linkage is a special case that we don't want to create a SymbolBody for. Reviewers: rafael, ruiu Subscribers: Bigcheese, llvm-commits, joker.eph Differential Revision: http://reviews.llvm.org/D18012 llvm-svn: 263179
* Tighten up this test a bit.Sean Silva2016-03-111-0/+1
| | | | | | Thanks to Rafael to spotting this in the post-commit review of r263070. llvm-svn: 263178
* [sanitizer] Add strlen to the common interceptorsAlexey Samsonov2016-03-117-37/+26
| | | | | | | | | | | | | | | | | | | | | | | | | Summary: Adds strlen to the common interceptors, under a new common flag intercept_strlen. This provides better sharing of interception code among sanitizers and cleans up the inconsistent type declarations of the previously duplicated interceptors. Removes the now-duplicate strlen interceptor from asan, msan, and tsan. The entry check semantics are normalized now for msan and asan, whose private strlen interceptors contained multiple layers of checks that included impossible-to-reach code. The new semantics are identical to the old: bypass interception if in the middle of init or if both on Mac and not initialized; else, call the init routine and proceed. Patch by Derek Bruening! Reviewers: samsonov, vitalybuka Subscribers: llvm-commits, kcc, zhaoqin Differential Revision: http://reviews.llvm.org/D18020 llvm-svn: 263177
* [UBSan] Improve bufferization of UBSan error reports.Alexey Samsonov2016-03-111-93/+90
| | | | | | | | | | | | | | | Summary: Use InternalScopedString more extensively. This reduces the number of write() syscalls, and reduces the chance that UBSan output will be mixed with program output. Reviewers: vitalybuka Subscribers: kcc, llvm-commits Differential Revision: http://reviews.llvm.org/D18068 llvm-svn: 263176
* Add doxygen comments to avxintrin.h's intrinsics.Ekaterina Romanova2016-03-111-0/+902
| | | | | | | | | | Only around 25% of the intrinsics in this file are documented here. The patches for the other half will be sent out later. The doxygen comments are automatically generated based on Sony's intrinsics document. I got an OK from Eric Christopher to commit doxygen comments without prior code review upstream. llvm-svn: 263175
* Fix Clang-tidy modernize-use-nullptr warnings in some files in source/Core; ↵Eugene Zelenko2016-03-106-273/+184
| | | | | | other minor fixes. llvm-svn: 263174
* [LLE] Add missed LoopSimplify dependenceAdam Nemet2016-03-102-0/+36
| | | | | | | | | The code assumed that we always had a preheader without making the pass dependent on LoopSimplify. Thanks to Mattias Eriksson V for reporting this. llvm-svn: 263173
* Print strict in Availability attribute when it is on.Manman Ren2016-03-102-0/+4
| | | | llvm-svn: 263172
* Add has_feature objc_class_property.Manman Ren2016-03-102-0/+5
| | | | | | rdar://23891898 llvm-svn: 263171
* libclang python bindings: Fix for bug 26394Jonathan Coe2016-03-101-1/+1
| | | | | | | | | | | Summary: https://llvm.org/bugs/show_bug.cgi?id=26394 reports that clang's python bindings tests are failing. I can confirm that the bug exists and that the proposed fix is good. Differential Revision: http://reviews.llvm.org/D17226 llvm-svn: 263170
* AArch64: only try to use scaled fcvt ops on legal vector types.Tim Northover2016-03-102-1/+10
| | | | | | | Before we ended up calling getSimpleVectorType on a <3 x float>, which asserted. llvm-svn: 263169
* Reenable asm-errors.cNico Weber2016-03-101-3/+2
| | | | | | | r134811 made the test pass and reenabled it, but r134831 accidentally disabled it again due to a bad merge. llvm-svn: 263168
* [x86] don't use a shuffle when a vselect will do; NFCISanjay Patel2016-03-101-16/+5
| | | | | | | | Looking at the IR definition of a masked load made me realize there was no reason to use a shuffle here, so we don't need to convert the format of the mask at all. llvm-svn: 263167
* Fixed ValueObject::GetExpressionPath() for paths including anonymous ↵Marianne Mailhot-Sarrasin2016-03-102-1/+12
| | | | | | | | | | struct/union When the parent of an expression is anonymous, skip adding '.' or '->' before the expression name. Differential Revision: http://reviews.llvm.org/D18005 llvm-svn: 263166
* Test commit accessMarianne Mailhot-Sarrasin2016-03-101-1/+1
| | | | llvm-svn: 263165
* Strip trailing whitespace.Simon Pilgrim2016-03-101-66/+66
| | | | llvm-svn: 263162
* Fixed the python interpreter so that it correctly inherits the top ↵Greg Clayton2016-03-104-96/+41
| | | | | | | | | | IOHandler's files instead of always using stdin/out/err. Removed lldb_private::File::Duplicate() and the copy constructor and the assignment operator that used to duplicate the file handles and made them private so no one uses them. Previously the lldb_private::File::Duplicate() function duplicated files that used file descriptors, (int) but not file streams (FILE *), so the lldb_private::File::Duplicate() function only worked some of the time. No one else excep thee ScriptInterpreterPython was using these functions, so that aren't needed nor desired. Previously every time you would drop into the python interpreter we would duplicate files, and now we avoid this file churn. <rdar://problem/24877720> llvm-svn: 263161
* [Windows] Fix UnmapOrDie and MmapAlignedOrDieReid Kleckner2016-03-104-24/+95
| | | | | | | | | | | | | | | | | | | | | | | | | Now ASan can return virtual memory to the underlying OS. Portable sanitizer runtime code needs to be aware that UnmapOrDie cannot unmap part of previous mapping. In particular, this required changing how we implement MmapAlignedOrDie on Windows, which is what Allocator32 uses. The new code first attempts to allocate memory of the given size, and if it is appropriately aligned, returns early. If not, it frees the memory and attempts to reserve size + alignment bytes. In this region there must be an aligned address. We then free the oversized mapping and request a new mapping at the aligned address immediately after. However, a thread could allocate that virtual address in between our free and allocation, so we have to retry if that allocation fails. The existing thread creation stress test managed to trigger this condition, so the code isn't totally untested. Reviewers: samsonov Differential Revision: http://reviews.llvm.org/D17431 llvm-svn: 263160
* [X86][SSE] Reapplied: Improve vector ZERO_EXTEND by combining to ↵Simon Pilgrim2016-03-106-44/+98
| | | | | | | | | | | | ZERO_EXTEND_VECTOR_INREG Generalise the existing SIGN_EXTEND to SIGN_EXTEND_VECTOR_INREG combine to support zero extension as well and get rid of a lot of unnecessary ANY_EXTEND + mask patterns. Reapplied with a fix for PR26870 (avoid premature use of TargetConstant in ZERO_EXTEND_VECTOR_INREG expansion). Differential Revision: http://reviews.llvm.org/D17691 llvm-svn: 263159
* Support arbitrary addrspace pointers in masked load/store intrinsicsArtur Pilipenko2016-03-1012-207/+338
| | | | | | | | | | | | This patch fixes the problem which occurs when loop-vectorize tries to use @llvm.masked.load/store intrinsic for a non-default addrspace pointer. It fails with "Calling a function with a bad signature!" assertion in CallInst constructor because it tries to pass a non-default addrspace pointer to the pointer argument which has default addrspace. The fix is to add pointer type as another overloaded type to @llvm.masked.load/store intrinsics. Reviewed By: reames Differential Revision: http://reviews.llvm.org/D17270 llvm-svn: 263158
* Retrieve command line arguments and environment correctly on FreeBSDDimitry Andric2016-03-101-1/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Recently I saw the test `TestCases/Posix/print_cmdline.cc` failing on FreeBSD, with "expected string not found in input". This is because asan could not retrieve the command line arguments properly. In `lib/sanitizer_common/sanitizer_linux.cc`, this is taken care of by the `GetArgsAndEnv()` function, but it uses `__libc_stack_end` to get at the required data. This variable does not exist on BSDs; the regular way to retrieve the arguments and environment information is via the `kern.ps_strings` sysctl. I added this functionality in sanitizer_linux.cc, as a separate #ifdef block in `GetArgsAndEnv()`. Also, `ReadNullSepFileToArray()` becomes unused due to this change. (It won't work on FreeBSD anyway, since `/proc` is not mounted by default.) Reviewers: kcc, emaste, joerg, davide Subscribers: llvm-commits, emaste Differential Revision: http://reviews.llvm.org/D17832 llvm-svn: 263157
* ARM: Support relative references using the PREL31 symbol variant.Peter Collingbourne2016-03-102-4/+13
| | | | | | Differential Revision: http://reviews.llvm.org/D17937 llvm-svn: 263156
OpenPOWER on IntegriCloud