summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Support
Commit message (Collapse)AuthorAgeFilesLines
...
* - TargetParser does not handle armv7l in parseArchProfile().Alexandros Lamprineas2015-07-161-0/+1
| | | | | | | | - ARM V7L matches the 'A' profile of ARM architecture. Change-Id: I80c8b973f5c93fb040c177a227644d56b1b83ea8 Phabricator: http://reviews.llvm.org/D11261 llvm-svn: 242406
* Simplify a few uses of remove_filename by using parent_path instead.Rafael Espindola2015-07-151-2/+1
| | | | llvm-svn: 242334
* -Added API for retrieving the default FPU of a CPU from TargetParser.Alexandros Lamprineas2015-07-151-84/+95
| | | | | | | | -Implemented as a table lookup. Change-Id: Iaad0eaf4b29b06827e6700269496dc1ba20e9018 Phabricator: http://reviews.llvm.org/D11100 llvm-svn: 242284
* Caused regressions: compile Release+Asserts failed on clang-native-arm-cortex-a9Alexandros Lamprineas2015-07-141-96/+83
| | | | | | | | Revert "-Added API for retrieving the default FPU of a CPU from TargetParser." This reverts commit 01199ab0c6ff2d5c4f6b2c05a95ec011e41c4669. llvm-svn: 242147
* -Added API for retrieving the default FPU of a CPU from TargetParser.Alexandros Lamprineas2015-07-141-83/+96
| | | | | | | | -Implemented as a table lookup. Change-Id: Ibf7217f6bd2769e9c06835a5aede3d072dee6757 Phabricator: http://reviews.llvm.org/D11100 llvm-svn: 242141
* Remove macro guards for extern template instantiations.Benjamin Kramer2015-07-131-15/+15
| | | | | | | This is a C++11 feature that both GCC and MSVC have supported as ane extension long before C++11 was approved. llvm-svn: 242042
* Add getSizeInBits function to the APFloat classTamas Berghammer2015-07-091-8/+15
| | | | | | | | | The newly added function returns the size of the specified floating point semantics in bits. Differential revision: http://reviews.llvm.org/D8413 llvm-svn: 241793
* [Triple] Add a helper to switch between big/little endian variantsBenjamin Kramer2015-07-061-0/+116
| | | | | | This will be used from clang's driver. llvm-svn: 241527
* [Support] Lazy load of dbghlp.dll on WindowsLeny Kholodov2015-07-023-41/+54
| | | | | | | | | | | | | This patch changes linkage with dbghlp.dll for clang from static (at load time) to on demand (at the first use of required functions). Clang uses dbghlp.dll only in minor use-cases. First of all in case of crash and in case of plugin load. The dbghlp.dll library can be absent on system. In this case clang will fail to load. With lazy load of dbghlp.dll clang can work even if dbghlp.dll is not available. Differential Revision: http://reviews.llvm.org/D10737 llvm-svn: 241271
* [GraphWriter] Don't wait on xdg-open when not on Apple.Charlie Turner2015-07-021-1/+1
| | | | | | | | | | | | | | | | | | | | By default, the GraphWriter code assumes that the generic file open program (`open` on Apple, `xdg-open` on other systems) can wait on the forked proces to complete. When the fork ends, the code would delete the temporary dot files created, and return. On GNU/Linux, the xdg-open program does not have a "wait for your fork to complete before dying" option. So the behaviour was that xdg-open would launch a process, quickly die itself, and then the GraphWriter code would think its OK to quickly delete all the temporary files. Once the temporary files were deleted, the dot viewers would get very upset, and often give you weird errors. This change only waits on the generic open program on Apple platforms. Elsewhere, we don't wait on the process, and hence we don't try and clean up the temporary files. llvm-svn: 241250
* Drop the OS from the WebAssembly target triple for now.Dan Gohman2015-06-301-2/+0
| | | | | | | This unbreaks TripleTest.Normalization. We'll have to come up with a new plan for the OS component of the target triple for WebAssembly. llvm-svn: 241041
* Debug info: Add dwarf backend support for DIModule.Adrian Prantl2015-06-301-0/+3
| | | | | | rdar://problem/20965932 llvm-svn: 241034
* [WebAssembly] Initial WebAssembly backendDan Gohman2015-06-291-0/+16
| | | | | | | This WebAssembly backend is just a skeleton at this time and is not yet functional. llvm-svn: 241022
* Reapply "Use gethostuuid() on Mac to identify hosts for LockFileManager"Ben Langmuir2015-06-291-14/+56
| | | | | | | | | | | | | | Reapplies r241005 after fixing the build on non-Mac platforms. Original commit message below. 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: 241012
* 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
* 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
* 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
* [ARM]: Extend -mfpu options for half-precision and vfpv3xdJaved Absar2015-06-291-2/+0
| | | | | | | | removing default label in switch as it results. This is part of earlier commit http://reviews.llvm.org/D1064 Subscribers: llvm-commits llvm-svn: 240932
* [ARM]: Extend -mfpu options for half-precision and vfpv3xdJaved Absar2015-06-291-23/+37
| | | | | | | | | | | | | | | Some of the the permissible ARM -mfpu options, which are supported in GCC, are currently not present in llvm/clang.This patch adds the options: 'neon-fp16', 'vfpv3-fp16', 'vfpv3-d16-fp16', 'vfpv3xd' and 'vfpv3xd-fp16. These are related to half-precision floating-point and single precision. Reviewers: rengolin, ranjeet.singh Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D10645 llvm-svn: 240930
* ADT: Add a string APSInt constructor.Alex Lorenz2015-06-231-0/+19
| | | | | | | | | | | | This commit moves the APSInt initialization code that's used by the LLLexer class into a new APSInt constructor that constructs APSInts from strings. This change is useful for MIR Serialization, as it would allow the MILexer class to use the same APSInt initialization as LLexer when parsing immediate machine operands. llvm-svn: 240436
* Revert r240137 (Fixed/added namespace ending comments using clang-tidy. NFC)Alexander Kornienko2015-06-2326-39/+39
| | | | | | Apparently, the style needs to be agreed upon first. llvm-svn: 240390
* Fixed/added namespace ending comments using clang-tidy. NFCAlexander Kornienko2015-06-1926-39/+39
| | | | | | | | | | | | | The patch is generated using this command: tools/clang/tools/extra/clang-tidy/tool/run-clang-tidy.py -fix \ -checks=-*,llvm-namespace-comment -header-filter='llvm/.*|clang/.*' \ llvm/lib/ Thanks to Eugene Kosov for the original patch! llvm-svn: 240137
* Fix "the the" in comments.Eric Christopher2015-06-191-1/+1
| | | | llvm-svn: 240112
* Use std::unique_ptr to manage the DataStreamer in bitcode parsing.Rafael Espindola2015-06-162-11/+10
| | | | | | We were already deleting it, this just makes it explicit. llvm-svn: 239867
* MIR Serialization: Connect the machine function analysis pass to the MIR parser.Alex Lorenz2015-06-151-22/+24
| | | | | | | | | | | | | | | | | | | | | This commit connects the machine function analysis pass (which creates machine functions) to the MIR parser, which will initialize the machine functions with the state from the MIR file and reconstruct the machine IR. This commit introduces a new interface called 'MachineFunctionInitializer', which can be used to provide custom initialization for the machine functions. This commit also introduces a new diagnostic class called 'DiagnosticInfoMIRParser' which is used for MIR parsing errors. This commit modifies the default diagnostic handling in LLVMContext - now the the diagnostics are printed directly into llvm::errs() so that the MIR parsing errors can be printed with colours. Reviewers: Justin Bogner Differential Revision: http://reviews.llvm.org/D9928 llvm-svn: 239753
* Don't use std::errc.Rafael Espindola2015-06-132-3/+5
| | | | | | | | | | | | | | | | | | | | | As noted on Errc.h: // * std::errc is just marked with is_error_condition_enum. This means that // common patters like AnErrorCode == errc::no_such_file_or_directory take // 4 virtual calls instead of two comparisons. And on some libstdc++ those virtual functions conclude that ------------------------ int main() { std::error_code foo = std::make_error_code(std::errc::no_such_file_or_directory); return foo == std::errc::no_such_file_or_directory; } ------------------------- should exit with 0. llvm-svn: 239683
* Bring in a BumpPtrStringSaver from lld and simplify the interface.Rafael Espindola2015-06-133-28/+30
| | | | | | | | | | | | StringSaver now always saves to a BumpPtrAllocator. The only reason for having the virtual saveImpl is so lld can have a thread safe version. The reason for the distinct BumpPtrStringSaver class is to avoid the virtual destructor. llvm-svn: 239669
* Add 'shave' processor name to TripleDouglas Katzman2015-06-121-0/+7
| | | | | | | | | | Based on ArchType, Clang's driver can select a non-Clang compiler. String parsing in Clang would have sufficed if it were only that, however this change anticipates true llvm support. Differential Revision: http://reviews.llvm.org/D10413 llvm-svn: 239631
* [ARM] Disabling vfp4 should disable fp16John Brawn2015-06-121-1/+5
| | | | | | | | | | | ARMTargetParser::getFPUFeatures should disable fp16 whenever it disables vfp4, as otherwise something like -mcpu=cortex-a7 -mfpu=none leaves us with fp16 enabled (though the only effect that will have is a wrong build attribute). Differential Revision: http://reviews.llvm.org/D10397 llvm-svn: 239599
* [Support] Fix a race initializing a static local in MSVCReid Kleckner2015-06-111-1/+9
| | | | | | | | | static local initialization isn't thread safe with MSVC and a race was reported in PR23817. We can't use std::atomic because it's not trivially constructible, so instead do some lame volatile global integer manipulation. llvm-svn: 239566
* Add more wrappers for symbol APIs to the C API.Eli Bendersky2015-06-091-0/+9
| | | | | | | | | | | This represents some of the functionality we expose in the llvmlite Python binding. Patch by Antoine Pitrou Differential Revision: http://reviews.llvm.org/D10222 llvm-svn: 239411
* [ADT] Assert that SmallVectorBase::grow_pod() successfully reallocates memory.Daniel Sanders2015-06-091-0/+1
| | | | | | | | | | | | | | | | | | | | | | Summary: If malloc/realloc fails then the SmallVector becomes unusable since begin() and end() will return NULL. This is unlikely to occur but was the cause of recent bugpoint test failures on my machine. It is not clear whether not checking for malloc/realloc failure is a deliberate decision and adding checks has the potential to impact compiler performance. Therefore, this patch only adds the check to builds with assertions enabled for the moment. Reviewers: bkramer Reviewed By: bkramer Subscribers: bkramer, llvm-commits Differential Revision: http://reviews.llvm.org/D9520 llvm-svn: 239392
* TargetParser: Fix comments in enum(s) introduced in r239150. [-Wdocumentation]NAKAMURA Takumi2015-06-061-1/+1
| | | | llvm-svn: 239211
* [bpf] rename triple names bpf_be -> bpfebAlexei Starovoitov2015-06-051-16/+16
| | | | llvm-svn: 239162
* [TargetParser] Properly attach functions of ARMTargetParser to the classBenjamin Kramer2015-06-051-6/+2
| | | | llvm-svn: 239158
* [ARM] Add support for -sp- FPUs and FPU none to TargetParserJohn Brawn2015-06-051-3/+5
| | | | | | | | | | These are added mainly for the benefit of clang, but this also means that they are now allowed in .fpu directives and we emit the correct .fpu directive when single-precision-only is used. Differential Revision: http://reviews.llvm.org/D10238 llvm-svn: 239151
* [ARM] Add knowledge of FPU subtarget features to TargetParserJohn Brawn2015-06-051-15/+110
| | | | | | | | | | | | | Add getFPUFeatures to TargetParser, which gets the list of subtarget features that are enabled/disabled for each FPU, and use it when handling the .fpu directive. No functional change in this commit, though clang will start behaving differently once it starts using this. Differential Revision: http://reviews.llvm.org/D10237 llvm-svn: 239150
* [ARMTargetParser] Follow-up for r239099: one case was missedArtyom Skrobov2015-06-051-1/+1
| | | | llvm-svn: 239147
* Simplify ARMTargetParser::getArchSynonymArtyom Skrobov2015-06-042-12/+10
| | | | | | | | | | | | | | | | Summary: 1) The only caller, ARMTargetParser::parseArch, uses the results for an "endswith" test; so, including the "arm" prefix into the result is unnecessary. 2) Most ARMTargetParser::parseArch callers pass it the output from ARMTargetParser::getCanonicalArchName; so, make this behaviour the default. Then, including the "arm" prefix into the cases is unnecessary. Reviewers: rengolin Reviewed By: rengolin Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D10249 llvm-svn: 239099
* [bpf] add big- and host- endian supportAlexei Starovoitov2015-06-041-7/+30
| | | | | | | | | | | | | | | | | | | Summary: -march=bpf -> host endian -march=bpf_le -> little endian -match=bpf_be -> big endian Test Plan: v1 was tested by IBM s390 guys and appears to be working there. It bit rots too fast here. Reviewers: chandlerc, tstellarAMD Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D10177 llvm-svn: 239071
* [Support] Simplify Triple::getOSVersionDavid Majnemer2015-06-011-9/+1
| | | | | | | Those who are interested in the Android version can use getEnvironmentVersion instead of getOSVersion. llvm-svn: 238798
* [ADT] Add Triple::getEnvironmentVersionDavid Majnemer2015-06-011-16/+40
| | | | | | | | This allows us to extract version numbers from the environment. getOSVersion is currently overloaded for that purpose, this allows us to clean it up. llvm-svn: 238796
* [ARMTargetParser] Move IAS arch ext parser. NFCRenato Golin2015-05-301-1/+7
| | | | | | | | | | | The plan was to move the whole table into the already existing ArchExtNames but some fields depend on a table-generated file, and we don't yet have this feature in the generic lib/Support side. Once the minimum target-specific table-generated files are available in a generic fashion to these libraries, we'll have to keep it in the ASM parser. llvm-svn: 238651
* Fix indentation. NFC.Craig Topper2015-05-301-1/+1
| | | | llvm-svn: 238647
* [YAMLIO] Make line-wrapping configurable and test it.Frederic Riss2015-05-291-3/+4
| | | | | | | | | | | | | | | | Summary: We would wrap flow mappings and sequences when they go over a hardcoded 70 characters limit. Make the wrapping column configurable (and default to 70 co the change should be NFC for current users). Passing 0 allows to completely suppress the wrapping which makes it easier to handle in tools like FileCheck. Reviewers: bogner Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D10109 llvm-svn: 238584
* [ARMTargetParser] Adding sub-arch information for Clang. NFCRenato Golin2015-05-281-34/+44
| | | | llvm-svn: 238429
* [ARMTargetParser] Adding a few more CPUs for Clang CPU detection. NFC.Renato Golin2015-05-281-14/+22
| | | | llvm-svn: 238415
* Fix comments in ARMTargetParser. NFC.Renato Golin2015-05-281-2/+2
| | | | llvm-svn: 238404
* ARMTargetParser: Make BSD Thumb/BE armv6 workRenato Golin2015-05-271-2/+2
| | | | | | | Simple change to make arch like "thumbv6" and "armbev6" to return the correct CPU for FreeBSD and NetBSD. llvm-svn: 238353
* ARMTargetParser: Normalising build attributesRenato Golin2015-05-271-18/+22
| | | | | | | | | | | | | | | Now that most of the methods in Clang and LLVM that were parsing arch/cpu/fpu strings are using ARMTargetParser, it's time to make it a bit more conforming with what the ABI says. This commit adds some clarification on what build attributes are accepted and which are "non-standard". It also makes clear that the "defaultCPU" and "defaultArch" methods were really just build attribute getters. It also diverges from GCC's behaviour to say that armv2/armv3 are really an ARMv4 in the build attributes, when the ABI has a clear state for that: Pre-v4. llvm-svn: 238344
OpenPOWER on IntegriCloud