1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 11:02:59 +02:00
llvm-mirror/lib/Support/CMakeLists.txt

133 lines
2.6 KiB
CMake
Raw Normal View History

set(system_libs)
if( NOT MSVC )
if( MINGW )
set(system_libs ${system_libs} imagehlp psapi shell32 ole32)
elseif( CMAKE_HOST_UNIX )
if( HAVE_LIBRT )
set(system_libs ${system_libs} rt)
endif()
if( HAVE_LIBDL )
set(system_libs ${system_libs} ${CMAKE_DL_LIBS})
endif()
if(LLVM_ENABLE_TERMINFO)
if(HAVE_TERMINFO)
set(system_libs ${system_libs} ${TERMINFO_LIBS})
endif()
endif()
if( LLVM_ENABLE_THREADS AND HAVE_LIBATOMIC )
set(system_libs ${system_libs} atomic)
endif()
if( LLVM_ENABLE_THREADS AND HAVE_LIBPTHREAD )
set(system_libs ${system_libs} pthread)
endif()
if ( LLVM_ENABLE_ZLIB AND HAVE_LIBZ )
set(system_libs ${system_libs} z)
endif()
set(system_libs ${system_libs} m)
endif( MINGW )
endif( NOT MSVC )
add_llvm_library(LLVMSupport
APFloat.cpp
APInt.cpp
APSInt.cpp
ARMBuildAttrs.cpp
ARMWinEH.cpp
Allocator.cpp
BlockFrequency.cpp
BranchProbability.cpp
2009-12-23 18:03:46 +01:00
circular_raw_ostream.cpp
COM.cpp
CommandLine.cpp
Compression.cpp
ConvertUTF.c
ConvertUTFWrapper.cpp
CrashRecoveryContext.cpp
DataExtractor.cpp
DataStream.cpp
Debug.cpp
DeltaAlgorithm.cpp
DAGDeltaAlgorithm.cpp
Dwarf.cpp
2009-07-07 20:52:14 +02:00
ErrorHandling.cpp
FileUtilities.cpp
FileOutputBuffer.cpp
FoldingSet.cpp
2009-07-14 22:44:17 +02:00
FormattedStream.cpp
GraphWriter.cpp
Rewrite LLVM's generalized support library for hashing to follow the API of the proposed standard hashing interfaces (N3333), and to use a modified and tuned version of the CityHash algorithm. Some of the highlights of this change: -- Significantly higher quality hashing algorithm with very well distributed results, and extremely few collisions. Should be close to a checksum for up to 64-bit keys. Very little clustering or clumping of hash codes, to better distribute load on probed hash tables. -- Built-in support for reserved values. -- Simplified API that composes cleanly with other C++ idioms and APIs. -- Better scaling performance as keys grow. This is the fastest algorithm I've found and measured for moderately sized keys (such as show up in some of the uniquing and folding use cases) -- Support for enabling per-execution seeds to prevent table ordering or other artifacts of hashing algorithms to impact the output of LLVM. The seeding would make each run different and highlight these problems during bootstrap. This implementation was tested extensively using the SMHasher test suite, and pased with flying colors, doing better than the original CityHash algorithm even. I've included a unittest, although it is somewhat minimal at the moment. I've also added (or refactored into the proper location) type traits necessary to implement this, and converted users of GeneralHash over. My only immediate concerns with this implementation is the performance of hashing small keys. I've already started working to improve this, and will continue to do so. Currently, the only algorithms faster produce lower quality results, but it is likely there is a better compromise than the current one. Many thanks to Jeffrey Yasskin who did most of the work on the N3333 paper, pair-programmed some of this code, and reviewed much of it. Many thanks also go to Geoff Pike Pike and Jyrki Alakuijala, the original authors of CityHash on which this is heavily based, and Austin Appleby who created MurmurHash and the SMHasher test suite. Also thanks to Nadav, Tobias, Howard, Jay, Nick, Ahmed, and Duncan for all of the review comments! If there are further comments or concerns, please let me know and I'll jump on 'em. llvm-svn: 151822
2012-03-01 19:55:25 +01:00
Hashing.cpp
IntEqClasses.cpp
IntervalMap.cpp
IntrusiveRefCntPtr.cpp
LEB128.cpp
LineIterator.cpp
Locale.cpp
LockFileManager.cpp
ManagedStatic.cpp
MathExtras.cpp
MemoryBuffer.cpp
2009-09-11 23:49:45 +02:00
MemoryObject.cpp
MD5.cpp
Options.cpp
PluginLoader.cpp
2009-03-05 10:19:13 +01:00
PrettyStackTrace.cpp
RandomNumberGenerator.cpp
2009-09-01 19:01:02 +02:00
Regex.cpp
ScaledNumber.cpp
SmallPtrSet.cpp
SmallVector.cpp
SourceMgr.cpp
SpecialCaseList.cpp
Statistic.cpp
StreamingMemoryObject.cpp
StringExtras.cpp
StringMap.cpp
StringPool.cpp
StringRef.cpp
SystemUtils.cpp
TargetParser: FPU/ARCH/EXT parsing refactory - NFC This new class in a global context contain arch-specific knowledge in order to provide LLVM libraries, tools and projects with the ability to understand the architectures. For now, only FPU, ARCH and ARCH extensions on ARM are supported. Current behaviour it to parse from free-text to enum values and back, so that all users can share the same parser and codes. This simplifies a lot both the ASM/Obj streamers in the back-end (where this came from), and the front-end parsers for command line arguments (where this is going to be used next). The previous implementation, using .def/.h includes is deprecated due to its inflexibility to be built without the backend support and for being too cumbersome. As more architectures join this scheme, and as more features of such architectures are added (such as hardware features, type sizes, etc) into a full blown TargetDescription class, having a set of classes is the most sane implementation. The ultimate goal of this refactor both LLVM's and Clang's target description classes into one unique interface, so that we can de-duplicate and standardise the descriptions, as well as make it available for other front-ends, tools, etc. The FPU parsing for command line options in Clang has been converted to use this new library and a number of aliases were added for compatibility: * A bogus neon-vfpv3 alias (neon defaults to vfp3) * armv5/v6 * {fp4/fp5}-{sp/dp}-d16 Next steps: * Port Clang's ARCH/EXT parsing to use this library. * Create a TableGen back-end to generate this information. * Run this TableGen process regardless of which back-ends are built. * Expose more information and rename it to TargetDescription. * Continue re-factoring Clang to use as much of it as possible. llvm-svn: 236900
2015-05-08 23:04:27 +02:00
TargetParser.cpp
Timer.cpp
2010-10-08 01:12:15 +02:00
ToolOutputFile.cpp
Triple.cpp
2009-07-24 09:04:49 +02:00
Twine.cpp
Unicode.cpp
YAMLParser.cpp
YAMLTraits.cpp
raw_os_ostream.cpp
raw_ostream.cpp
regcomp.c
regerror.c
regexec.c
regfree.c
regstrlcpy.c
# System
Atomic.cpp
DynamicLibrary.cpp
Errno.cpp
Host.cpp
Memory.cpp
Mutex.cpp
Path.cpp
Process.cpp
Program.cpp
RWMutex.cpp
SearchForAddressOfSpecialSymbol.cpp
Signals.cpp
TargetRegistry.cpp
ThreadLocal.cpp
Threading.cpp
TimeValue.cpp
Valgrind.cpp
Watchdog.cpp
Teach llvm_add_library() to find include dirs. Since header files are not compilation units, CMake does not require you to specify them in the CMakeLists.txt file. As a result, unless a header file is explicitly added, CMake won't know about it, and when generating IDE-based projects, CMake won't put the header files into the IDE project. LLVM currently tries to deal with this in two ways: 1) It looks for all .h files that are in the project directory, and adds those. 2) llvm_add_library() understands the ADDITIONAL_HEADERS argument, which allows one to list an arbitrary list of headers. This patch takes things one step further. It adds the ability for llvm_add_library() to take an ADDITIONAL_HEADER_DIRS argument, which will specify a list of folders which CMake will glob for header files. Furthermore, it will glob not only for .h files, but also for .inc files. Included in this CL is an update to one of the existing users of ADDITIONAL_HEADERS to use this new argument instead, to serve as an illustration of how this cleans up the CMake. The big advantage of this new approach is that until now, there was no way for the IDE projects to locate the header files that are in the include tree. In other words, if you are in, for example, lib/DebugInfo/DWARF, the corresponding includes for this project will be located under include/llvm/DebugInfo/DWARF. Now, in the CMakeLists.txt for lib/DebugInfo/DWARF, you can simply write: ADDITIONAL_HEADER_DIRS ../../include/llvm/DebugInfo/DWARF as an argument to llvm_add_library(), and all header files will get added to the IDE project. Differential Revision: http://reviews.llvm.org/D7460 Reviewed By: Chris Bieneman llvm-svn: 228670
2015-02-10 06:04:37 +01:00
ADDITIONAL_HEADER_DIRS
Unix
Windows
${LLVM_MAIN_INCLUDE_DIR}/llvm/Support
LINK_LIBS ${system_libs}
)
set_property(TARGET LLVMSupport PROPERTY LLVM_SYSTEM_LIBS "${system_libs}")