summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Move llvm_unreachable out of switch to avoid -Wswitch-covered-defualt.Rui Ueyama2015-06-291-6/+3
| | | | llvm-svn: 241008
* Revert "Use gethostuuid() on Mac to identify hosts for LockFileManager"Ben Langmuir2015-06-291-54/+14
| | | | | | | | Broke non-Mac builds. This reverts commit r241005. llvm-svn: 241007
* Add -lpthread to LLDB shared lib link line unconditionallyKeno Fischer2015-06-293-5/+5
| | | | | | | | | | | Usually -lpthread is included due to LLVM link options, but when LLVM threading is disabled, this does not happen. pthread is still needed however because LLDB uses threading regardless of whether LLVM is built with threading support or not. Differential Revision: http://reviews.llvm.org/D5431 llvm-svn: 241006
* Use gethostuuid() on Mac to identify hosts for LockFileManagerBen Langmuir2015-06-291-14/+54
| | | | | | | | | | | The hostname can be very unstable when there are many machines on the network competing for the same name. Using the hardware UUID makes it less likely to have collisions or to consider files written by the current host to be owned by a different one at a later time. rdar://problem/21512307 llvm-svn: 241005
* Silence MSVC "not all control paths return a value" warning.Rui Ueyama2015-06-291-0/+6
| | | | llvm-svn: 241004
* ARM: add correct kill flags when combining stm instructionsTim Northover2015-06-292-0/+49
| | | | | | | | | When the store sequence being combined actually stores the base register, we should not mark it as killed until the end. rdar://21504262 llvm-svn: 241003
* X86: Rework inline asm integer register specification.Matthias Braun2015-06-295-73/+203
| | | | | | | | | | | | | | | | | | | | | | | This is a new version of http://reviews.llvm.org/D10260. It turned out that when you specify an integer register in inline asm on x86 you get the register of the required type size back. That means that X86TargetLowering::getRegForInlineAsmConstraint() has to accept any of the integer registers and adapt its size to the given target size which may be any 8/16/32/64 bit sized type. Surprisingly that means given a constraint of "{ax}" and a type of MVT::F32 we need to return X86::EAX. This change makes this face explicit, the previous code seemed like working by accident because there it never returned an error once a register was found. On the other hand this rewrite allows to actually return errors for invalid situations like requesting an integer register for an i128 type. Related to rdar://21042280 Differential Revision: http://reviews.llvm.org/D10813 llvm-svn: 241002
* [opt] Devirtualize the SymbolBody type hierarchy and start compactingChandler Carruth2015-06-292-178/+234
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | its members into the base class. First, to help motivate this kind of change, understand that in a self-link, LLD creates 5.5 million defined regular symbol bodies (and 6 million symbol bodies total). A significant portion of its time is spent allocating the memory for these symbols, and befor ethis patch the defined regular symbol body objects alone consumed some 420mb of memory during the self link. As a consequence, I think it is worth expending considerable effort to make these objects as memory efficient as possible. This is the first of several components of that. This change starts with the goal of removing the virtual functins from SymbolBody so that it can avoid having a vptr embedded in it when it already contains a "kind" member, and that member can be much more compact than a vptr. The primary way of doing this is to sink as much of the logic that we would have to dispatch for into data in the base class. As part of this, I made the various flags bits that will pack into a bitfield with the kind tag. I also sank the Name down to eliminate the dispatch for that, and used LLVM's RTTI-style dispatch for everything else (most of which is cold and so doesn't matter terribly if we get minutely worse lowering than a vtable dispatch). As I was doing this, I wanted to make the RTTI-dispatch (which would become much hotter than before) as efficient as possible, so I've re-organized the tags somewhat. Notably, the common case (regular defined symbols) is now zero which we can test for faster. I also needed to rewrite the comparison routine used during resolving symbols. This proved to be quite complex as the semantics of the existing one were very subtle due to the back-and-forth virtual dispatch caused by re-dispatching with reversed operands. I've consolidated it to a single function and tried to comment it quite a bit more to help explain what is going on. However, this may need more comments or other explanations. It at least passes all the regression tests. I'm not working on Windows, so I can't fully test it. With all of these changes, the size of a DefinedRegular symbol on a 64-bit build goes from 80 bytes to 64 bytes, and we save approximately 84mb or 20% of the memory consumed by these symbol bodies during the link. The link time appears marginally faster as well, and the profile hotness of the memory allocation subsystem got a bit better, but there is still a lot of allocation traffic. Differential Revision: http://reviews.llvm.org/D10792 llvm-svn: 241001
* [cleanup] Clean up the flow of creating a symbol body for regular symbols.Chandler Carruth2015-06-291-17/+17
| | | | | | | | | | | | This uses a single cast and test to get the section for the symbol, and uses the cast_or_null<> pattern throughout to handle the known type but unknown non-null-ness. No functionality changed. Differential Revision: http://reviews.llvm.org/D10791 llvm-svn: 241000
* [LoopSimplify] Set proper debug location in loop backedge blocks.Alexey Samsonov2015-06-292-12/+29
| | | | | | | | | | | | | Set debug location for terminator instruction in loop backedge block (which is an unconditional jump to loop header). We can't copy debug location from original backedges, as there can be several of them, with different debug info locations. So, we follow the approach of SplitBlockPredecessors, and copy the debug info from first non-PHI instruction in the header (i.e. destination block). This is yet another change for PR23837. llvm-svn: 240999
* [FaultMaps] Fix test case.Sanjoy Das2015-06-291-16/+1
| | | | | | | implicit-null-check-negative.ll had a missing 2>&1. Fix this, and remove an incorrect test case that this exposes. llvm-svn: 240998
* Update for llvm api change.Rafael Espindola2015-06-291-1/+1
| | | | llvm-svn: 240997
* Convert obj->getSymbolName to sym->getName.Rafael Espindola2015-06-295-17/+18
| | | | | | I doesn't depend on the object anymore. llvm-svn: 240996
* [opt] Replace the recursive walk for GC with a worklist algorithm.Chandler Carruth2015-06-294-22/+68
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This flattens the entire liveness walk from a recursive mark approach to a worklist approach. It also sinks the worklist management completely out of the SectionChunk and into the Writer by exposing the ability to iterato over children of a chunk and over the symbol bodies of relocated symbols. I'm not 100% happy with the API names, so suggestions welcome there. This allows us to use a single worklist for the entire recursive walk and would also be a natural place to take advantage of parallelism at some future point. With this, we completely inline away the GC walk into the Writer::markLive function and it makes it very easy to profile what is slow. Currently, time is being wasted checking whether a Chunk isa SectionChunk (it essentially always is), finding (or skipping) a replacement for a symbol, and chasing pointers between symbols and their chunks. There are a bunch of things we can do to fix this, and its easier to do them after this change IMO. This change alone saves 1-2% of the time for my self-link of lld.exe (which I'm running and benchmarking on Linux ironically). Perhaps more notably, we'll no longer blow out the stack for large links. =] Just as an FYI, at this point, I/O is starting to really dominate the profile. Well over 10% of the time appears to be inside the kernel doing page table silliness. I think a decent chunk of this can be nuked as well, but it's a little odd as cross-linking in this way isn't really the primary goal here. Differential Revision: http://reviews.llvm.org/D10790 llvm-svn: 240995
* Add support for the x86 builtin __builtin_cpu_supports.Eric Christopher2015-06-299-0/+174
| | | | | | | | | | | | | | | | | | | | This matches the implementation of the gcc support for the same feature, including checking the values set up by libgcc at runtime. The structure looks like this: unsigned int __cpu_vendor; unsigned int __cpu_type; unsigned int __cpu_subtype; unsigned int __cpu_features[1]; with a set of enums to match various fields that are field out after parsing the output of the cpuid instruction. This also adds a set of errors checking for valid input (and cpu). compiler-rt support for this and the other builtins in this family (__builtin_cpu_init and __builtin_cpu_is) are forthcoming. llvm-svn: 240994
* Make sure that SharingPtr.h appears in the LLDB.framework by making it a ↵Greg Clayton2015-06-291-0/+2
| | | | | | | | public header in the LLDB framework target. This fixes test issues with building lldb/test/api/multithreaded and a few other tests that build against the LLDB.framework in our build directory. llvm-svn: 240993
* [asan] Fix SanitizerCommon.PthreadDestructorIterations test on Android L.Evgeniy Stepanov2015-06-298-28/+37
| | | | | | | On Android L, TSD destructors run 8 times instead of 4. Back to 4 times on the current master branch (as well as on K). llvm-svn: 240992
* [DAGCombiner] Fix & simplify constant folding of sext/zext.Pawel Bylica2015-06-292-13/+103
| | | | | | | | | | | | | | | | Summary: This patch fixes the cases of sext/zext constant folding in DAG combiner where constans do not fit 64 bits. The fix simply removes un$ Test Plan: New regression test included. Reviewers: RKSimon Reviewed By: RKSimon Subscribers: RKSimon, llvm-commits Differential Revision: http://reviews.llvm.org/D10607 llvm-svn: 240991
* [MMI] Use TinyPtrVector instead of PointerUnion with vector.Benjamin Kramer2015-06-293-102/+26
| | | | | | Also simplify duplicated code a bit. No functionality change intended. llvm-svn: 240990
* [CodeGen] Remove atomic sugar from record types in isSafeToConvertDavid Majnemer2015-06-292-7/+25
| | | | | | | | | | We failed to see that we should have deferred the creation of a type which references a type currently under construction because of atomic sugar. This fixes PR23985. llvm-svn: 240989
* More packet reduction when debugging with GDB server.Greg Clayton2015-06-295-62/+238
| | | | | | | | | - Avoid sending the qfThreadInfo, qsThreadInfo packets if we have a stop reply packet with the threads already (save 2 round trip packets) - Include the qname, qserial and qkind in the JSON info - Report the qname, qserial and qkind to the thread so it can cache it to avoid many packets on MacOSX and iOS - Don't clear all discoverable settings when we exec, just the ones we need to saves 1-5 packets for each exec. llvm-svn: 240988
* Tidy comment.Diego Novillo2015-06-291-1/+1
| | | | llvm-svn: 240987
* [Polly] Add -std=c99 flag only to C source filesMichael Kruse2015-06-291-2/+7
| | | | | | | | | | | | | | Summary: Adding the flag to C++ source files emits a warning, hence we set the compile flag depending on the file's language. Reviewers: grosser Subscribers: Meinersbur, pollydev, llvm-commits Projects: #polly Differential Revision: http://reviews.llvm.org/D10809 llvm-svn: 240986
* Remove _KMP_BUILD_TIME macro from kmp_version.cJonathan Peyton2015-06-291-1/+1
| | | | | | | | At the suggestion of Chandler Carruth, I've removed the timestamp macro, _KMP_BUILD_TIME, that cmake currently sets to "No_Timestamp" and replaced it with standard __DATE__ and __TIME__ macros inside kmp_version.c. llvm-svn: 240985
* More range-based for loops. NFCDouglas Katzman2015-06-291-7/+5
| | | | llvm-svn: 240984
* Rewrite FileSpec::EnumerateDirectory to avoid code duplication.Chaoren Lin2015-06-292-199/+17
| | | | | | | | | | | | Reviewers: clayborg Reviewed By: clayborg Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D10811 llvm-svn: 240983
* [opt] Hoist the call throuh SymbolBody::getReplacement out of the inlineChandler Carruth2015-06-294-8/+20
| | | | | | | | | | | | | | | | | | | method to get a SymbolBody and into the callers, and kill now dead includes. This removes the need to have the SymbolBody definition when we're defining the inline method and makes it a better inline method. That was the only reason for a lot of header includes here. Removing these and using forward declarations actually uncovers a bunch of cross-header dependencies that I've fixed while I'm here, and will allow me to introduce some *important* inline code into Chunks.h that requires the definition of ObjectFile. No functionality changed at this point. Differential Revision: http://reviews.llvm.org/D10789 llvm-svn: 240982
* Fix bug #23967. The gtest and gtest_main targets were exported into theDan Liew2015-06-292-3/+16
| | | | | | | | | | | | | | | | | | | CMake files and should not be by both build systems and also the targets were also installed by the CMake build system which they should not be. The problem was that - the CMake build of LLVM installs and exports the gtest library targets. We should not being doing this, these are not part of LLVM. - the Autoconf/Makefile build of LLVM still had gtest libraries in the installed LLVMConfig.cmake. These problems would cause problems for an external project because when calling llvm_map_components_to_libnames(XXX all) ${XXX} would to contain LLVM's internal gtest libraries. llvm-svn: 240981
* Comment fixes. NFC.Douglas Katzman2015-06-292-2/+3
| | | | | | | | | - Hexagon options were physically next to to ones that had a preceding comment saying "Double dash options", which they aren't. - The 'ld' tool classes are named Linker, not Link. llvm-svn: 240980
* Fix buildbot failures for:Greg Clayton2015-06-291-0/+2
| | | | | | | http://lab.llvm.org:8011/builders/lldb-x86-win7-msvc/builds/6152 http://lab.llvm.org:8011/builders/lldb-x86-windows-msvc/builds/7422 llvm-svn: 240979
* Avoid a recursive function call that could run LLDB out of file descriptors ↵Greg Clayton2015-06-293-18/+231
| | | | | | | | | | | | | | | | | in FileSystem::DeleteDirectory(...). Fixes include: - use FileSystem::Unlink() instead of a direct call to ::unlink(...) when deleting files when iterating through the current directory - save directories from current directory in a list and iterate through those _after_ the current directory has been iterated - Use new FileSpec::ForEachItemInDirectory() instead of manually iterating across directories with opendir()/readdir()/closedir() We should switch all code over to using FileSpec::ForEachItemInDirectory(...) in the near future and get rid of FileSpec::EnumerateDirectory(). This is a follow up patch to: http://reviews.llvm.org/D10787 llvm-svn: 240978
* Fix a test case broken by my previous commit.Douglas Gregor2015-06-291-2/+2
| | | | llvm-svn: 240977
* Make __has_feature(nullability) and __has_extension(nullability) always true.Douglas Gregor2015-06-292-4/+7
| | | | | | | These are _Underbar_capital-prefixed additions to the language that shouldn't depend on language standard. llvm-svn: 240976
* [asan] Re-enable clang_gcc_abi test at higher opt levels.Evgeniy Stepanov2015-06-291-5/+5
| | | | | | PR23971 is fixed. llvm-svn: 240975
* Instantiation of local class members.Serge Pavlov2015-06-294-9/+87
| | | | | | | | | | | | If a function containing a local class is instantiated, instantiate all of local class member, including default arguments and exception specifications. This change fixes PR21332 and thus implements DR1484. Differential Revision: http://reviews.llvm.org/D9990 llvm-svn: 240974
* Simplify .gitignore: projects/* => projects/*/Duncan P. N. Exon Smith2015-06-291-4/+1
| | | | | | | | Avoid listing inclusions (like `!projects/LLVMBuild.txt`) for files directly underneath `projects/` in `.gitignore`. Instead, change the `projects/*` exclusion to the more specific `projects/*/`. llvm-svn: 240973
* Remove use of assignment to multiple struct fields using .fieldname (OMPT)Jonathan Peyton2015-06-291-6/+4
| | | | | | | | | | | Remove use of assignment to multiple struct fields using .fieldname syntax. This doesn't work with gcc 4.8 and earlier. Replace with elementwise field assignments. Patch by John Mellor-Crummey Differential Revision: http://reviews.llvm.org/D10798 llvm-svn: 240972
* Account for calling convention specifiers in function definitions in IR test ↵David Blaikie2015-06-2981-366/+366
| | | | | | | | | | | | | cases Several tests wouldn't pass when executed on an armv7a_pc_linux triple due to the non-default arm_aapcs calling convention produced on the function definitions in the IR output. Account for this with the application of a little regex. Patch by Ying Yi. llvm-svn: 240971
* Fix OMPT state maintenance for barriers and missing init of implicit task id.Jonathan Peyton2015-06-292-7/+18
| | | | | | | | | | | | | | | | | | Fix OMPT support for barriers so that state changes occur even if OMPT_TRACE turned off. These state changes are needed by performance tools that use callbacks for either ompt_event_wait_barrier_begin or ompt_event_wait_barrier_end. Change ifdef flag to OMPT_BLAME for callbacks ompt_event_wait_barrier_begin or ompt_event_wait_barrier_end rather than OMPT_TRACE -- they were misclassified. Without this patch, when the runtime is compiled with LIBOMP_OMPT_SUPPORT=true, LIBOMP_OMPT_BLAME=true, and LIBOMP_OMPT_TRACE=false, and a callback is registered for either ompt_event_wait_barrier_begin or ompt_event_wait_barrier_end, then an assertion will trip. Fix the scoping of one OMPT_TRACE ifdef, which should not have surrounded an update of an OMPT state. Add a missing initialization of an OMPT task id for an implicit task. Patch by John Mellor-Crummey Differential Revision: http://reviews.llvm.org/D10759 llvm-svn: 240970
* Make __has_extension(assume_nonnull) always true.Douglas Gregor2015-06-292-0/+5
| | | | llvm-svn: 240969
* [Modules] Test lock file removed on signalBen Langmuir2015-06-293-0/+15
| | | | | | | | For r240967. rdar://problem/21512307 llvm-svn: 240968
* Clean up unique lock files on signal and always release the lockBen Langmuir2015-06-291-1/+40
| | | | | | | | | | | | | | Make sure to remove the unique lock file, which is what the .lock symlink points to, if there is a signal while the lock is held. This will release the lock, since the symlink will point to nothing (already tested in unit tests). For good measure, also clean up the unique lock file if there is an error or signal before the lock is acquired. I will add a clang test. rdar://problem/21512307 llvm-svn: 240967
* MIR Serialization: Serialize the register mask machine operands.Alex Lorenz2015-06-295-3/+134
| | | | | | | | | | | | | | | | | This commit implements serialization of the register mask machine operands. This commit serializes only the call preserved register masks that are defined by a target, it doesn't serialize arbitrary register masks. This commit also extends the TargetRegisterInfo class and TableGen so that the users of TRI can get the list of all the call preserved register masks and their names. Reviewers: Duncan P. N. Exon Smith Differential Revision: http://reviews.llvm.org/D10673 llvm-svn: 240966
* sanitizer_common: fix and re-enable signal_segv_handler testDmitry Vyukov2015-06-291-2/+3
| | | | | | | | | struct sigaction was not initialized. As the result if SA_RESETHAND is set in sa_flags, then the handler is reset after first invocation leading to crash. Initialize struct sigaction to zero. Reviewed in http://reviews.llvm.org/D10803 llvm-svn: 240965
* Mark test_sb_api_listener_event_process_state as flakeyTamas Berghammer2015-06-291-0/+1
| | | | llvm-svn: 240964
* Remove unnecessary include.Adrian Prantl2015-06-291-1/+0
| | | | llvm-svn: 240963
* Mark AttachResumeTestCase as flakyTamas Berghammer2015-06-291-0/+1
| | | | llvm-svn: 240962
* [SymbolSize] Skip sorting by index, just assign by index.Benjamin Kramer2015-06-291-7/+3
| | | | | | No functional change intended. llvm-svn: 240961
* [libsanitizer] Replace ReadBinaryName() with ReadBinaryNameCached(),Alexander Potapenko2015-06-294-3/+16
| | | | | | | | | which caches the executable name upon the first invocation. This is necessary because Google Chrome (and potentially other programs) restrict the access to /proc/self/exe on linux. This change should fix https://code.google.com/p/chromium/issues/detail?id=502974 llvm-svn: 240960
* clang-format: Add option to break after definition return type for top-level ↵Birunthan Mohanathas2015-06-296-25/+85
| | | | | | | | functions only Differential Revision: http://reviews.llvm.org/D10774 llvm-svn: 240959
OpenPOWER on IntegriCloud