summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Support
Commit message (Collapse)AuthorAgeFilesLines
* When printing MIR, output to errs() rather than outs().Justin Lebar2016-02-191-3/+4
| | | | | | | | | | | | | | | | | | | | | Summary: Without this, this command $ llvm-run llc -stop-after machine-cp -o - <( echo '' ) outputs an error, because we close stdout twice -- once when closing the file opened for "-o", and again when closing outs(). Also clarify in the outs() definition that you can't ever call it if you want to open your own raw_fd_ostream on stdout. Reviewers: jroelofs, tstellarAMD Subscribers: jholewinski, qcolombet, dsanders, llvm-commits Differential Revision: http://reviews.llvm.org/D17422 llvm-svn: 261286
* Remove uses of builtin comma operator.Richard Trieu2016-02-185-10/+21
| | | | | | Cleanup for upcoming Clang warning -Wcomma. No functionality change intended. llvm-svn: 261270
* Simplify users of StringRef::{l,r}trim (NFC)Vedant Kumar2016-02-161-1/+1
| | | | | | | r260925 introduced a version of the *trim methods which is preferable when trimming a single kind of character. Update all users in llvm. llvm-svn: 260926
* SmallPtrSet: Avoid initializing Array in the small case.Matthias Braun2016-02-151-53/+50
| | | | | | | | | | | This patch avoids the initial memset at the cost of making iterators slightly more complex. This should be beneficial as most SmallPtrSets hold no or only a few elements, while iterating over them is less common. Differential Revision: http://reviews.llvm.org/D16672 llvm-svn: 260913
* APInt: Slightly simplify countLeadingZerosSlowCase()Matthias Braun2016-02-151-19/+8
| | | | | | | | | We always clear the unused bits in the most signifant word so there is no need to mask them out in countLeadingZerosSlowCase(). Differential Revision: http://reviews.llvm.org/D16621 llvm-svn: 260911
* APInt: Further simplify APInt::EqualSlowCase as suggested by DuncanMatthias Braun2016-02-151-4/+1
| | | | llvm-svn: 260910
* Add AMDGPU related triple vendors/OSesMatt Arsenault2016-02-131-0/+6
| | | | | | | | As support expands to more runtimes, we'll need to distinguish between more than just HSA and unknown. This also lets us stop using unknown everywhere. llvm-svn: 260790
* ARMv7k: use Cortex-A7 by default even for tvOSTim Northover2016-02-111-0/+1
| | | | | | Also actually test the default CPU from those triples. llvm-svn: 260621
* [lanai] Add Lanai triple.Jacques Pienaar2016-02-111-0/+10
| | | | | | | | | | Add triple for the Lanai backend. General Lanai backend discussion on llvm-dev thread "[RFC] Lanai backend". Differential Revision: http://reviews.llvm.org/D17003 llvm-svn: 260545
* APInt: Simplify EqualSlowCaseMatthias Braun2016-02-101-15/+2
| | | | | | | | | | | | | Previously the code used getActiveBits() to determine the highest set bit of each APInt first. However doing so requires the same amount of memory accesses as simply comparing both numbers right away. Removing all the active bit checks leads to simpler code and is faster in my benchmark. Differential Revision: http://reviews.llvm.org/D16620 llvm-svn: 260447
* llvm-config: Add preliminary Windows supportEhsan Akhgari2016-02-091-27/+25
| | | | | | | | | | | | | | | | | Summary: This patch adds Windows support for a few of the llvm-config commands, including cflags, ldflags, libs, and system-libs. Currently llvm-config is untested, so this patch adds tests for the commands that it fixes as well. Reviewers: rnk Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D16762 llvm-svn: 260263
* [Support] Use hexdigit. NFCCraig Topper2016-02-081-3/+2
| | | | llvm-svn: 260068
* [Support] Use range-based for loop. NFCCraig Topper2016-02-041-3/+1
| | | | llvm-svn: 259763
* [Support] Use hexdigit instead of manually coding the same thing. NFCCraig Topper2016-02-041-2/+2
| | | | llvm-svn: 259762
* Fix undefined behavior when compiling in C++14 mode (with sized deletionRichard Smith2016-02-041-0/+8
| | | | | | | enabled): ensure that we do not invoke the sized deallocator for MemoryBuffer subclasses that have tail-allocated data. llvm-svn: 259735
* Shrink character buffer size in raw_ostream::write_hex to 16 characters ↵Craig Topper2016-01-311-1/+1
| | | | | | intead of 20 as that's the largest string a 64-bit hex value can be. llvm-svn: 259313
* Use std::end instead of repeating buffer sizes.Craig Topper2016-01-311-2/+2
| | | | llvm-svn: 259312
* Avoid overly large SmallPtrSet/SmallSetMatthias Braun2016-01-301-1/+1
| | | | | | | These sets perform linear searching in small mode so it is never a good idea to use SmallSize/N bigger than 32. llvm-svn: 259283
* Annotate dump() methods with LLVM_DUMP_METHOD, addressing Richard Smith ↵Yaron Keren2016-01-293-3/+3
| | | | | | | | r259192 post commit comment. clang part in r259232, this is the LLVM part of the patch. llvm-svn: 259240
* Don't mention a command line option in an error.Rafael Espindola2016-01-281-2/+1
| | | | | | | | The program using this code may not have it. Patch by Wilfred Hughes. llvm-svn: 259106
* SmallPtrSet: Make destructor available for inliningMatthias Braun2016-01-281-5/+0
| | | | llvm-svn: 259019
* SmallPtrSet: Share some code between copy/move constructor/assignment operatorMatthias Braun2016-01-281-33/+13
| | | | llvm-svn: 259018
* SmallPtrSet: Remove trailing whitespace, fix indentationMatthias Braun2016-01-281-13/+13
| | | | llvm-svn: 259017
* SmallPtrSet: Inline the part of insert_imp in the small caseMatthias Braun2016-01-271-16/+1
| | | | | | | | | | Most of the time we only hit the small case, so it is beneficial to pull it out of the insert_imp() implementation. This improves compile time at least for non-LTO builds. Differential Revision: http://reviews.llvm.org/D16619 llvm-svn: 258908
* Fix identify_magic() to check that a file that starts with MH_MAGIC isKevin Enderby2016-01-261-2/+15
| | | | | | | | | | | | at least as big as the mach header to be identified as a Mach-O file and make sure smaller files are not identified as a Mach-O files but as unknown files. Also fix identify_magic() so it looks at all 4 bytes of the filetype field when determining the type of the Mach-O file. Then fix the macho-invalid-header test case to check that it is an unknown file and make sure it does not get the error for object_error::parse_failed. And also update the unit tests. llvm-svn: 258883
* Remove autoconf supportChris Bieneman2016-01-261-23/+0
| | | | | | | | | | | | | | | | Summary: This patch is provided in preparation for removing autoconf on 1/26. The proposal to remove autoconf on 1/26 was discussed on the llvm-dev thread here: http://lists.llvm.org/pipermail/llvm-dev/2016-January/093875.html "I felt a great disturbance in the [build system], as if millions of [makefiles] suddenly cried out in terror and were suddenly silenced. I fear something [amazing] has happened." - Obi Wan Kenobi Reviewers: chandlerc, grosbach, bob.wilson, tstellarAMD, echristo, whitequark Subscribers: chfast, simoncook, emaste, jholewinski, tberghammer, jfb, danalbert, srhines, arsenm, dschuff, jyknight, dsanders, joker.eph, llvm-commits Differential Revision: http://reviews.llvm.org/D16471 llvm-svn: 258861
* Fix Clang-tidy modernize-use-nullptr and modernize-use-override warnings; ↵Eugene Zelenko2016-01-261-2/+2
| | | | | | | | other minor fixes. Differential revision: reviews.llvm.org/D16568 llvm-svn: 258831
* [ARM] Add DSP build attribute and extension targetingBradley Smith2016-01-251-0/+1
| | | | | | | | This patch was originally committed as r257885, but was reverted due to windows failures. The cause of these failures has been fixed under r258677, hence re-committing the original patch. llvm-svn: 258683
* Added Skylake client to X86 targets and featuresElena Demikhovsky2016-01-241-3/+12
| | | | | | | | | | | | | Changes in X86.td: I set features of Intel processors in incremental form: IVB = SNB + X HSW = IVB + X .. I added Skylake client processor and defined it's features FeatureADX was missing on KNL Added some new features to appropriate processors SMAP, IFMA, PREFETCHWT1, VMFUNC and others Differential Revision: http://reviews.llvm.org/D16357 llvm-svn: 258659
* AMDGPU: Fix getArchTypePrefixMatt Arsenault2016-01-221-2/+2
| | | | llvm-svn: 258525
* parseArch() supports more variations of arch names for PowerPC buildsKelvin Li2016-01-191-4/+4
| | | | llvm-svn: 258103
* [AVX512] adding AVXVBMI feature flagMichael Zuckerman2016-01-181-1/+1
| | | | | | | | | Fixing wrong typo (avx515) → (avx512) Review over the shoulder by asaf . Differential Revision: http://reviews.llvm.org/D16190 llvm-svn: 258041
* [AVX512] adding AVXVBMI feature flagMichael Zuckerman2016-01-171-0/+1
| | | | | | | | | | The feature flag is for VPERMB,VPERMI2B,VPERMT2B and VPMULTISHIFTQB instructions. More about the instruction can be found in: hattps://software.intel.com/sites/default/files/managed/07/b7/319433-023.pdf Differential Revision: http://reviews.llvm.org/D16190 llvm-svn: 258012
* # This is a combination of 2 commits.Reid Kleckner2016-01-151-1/+0
| | | | | | | | | | | | | | | | # The first commit's message is: Revert "[ARM] Add DSP build attribute and extension targeting" This reverts commit b11cc50c0b4a7c8cdb628abc50b7dc226ff583dc. # This is the 2nd commit message: Revert "[ARM] Add new system registers to ARMv8-M Baseline/Mainline" This reverts commit 837d08454e3e5beb8581951ac26b22fa07df3cd5. llvm-svn: 257916
* [ARM] Add DSP build attribute and extension targetingBradley Smith2016-01-151-0/+1
| | | | llvm-svn: 257885
* [ARM] Add ARMv8-M Baseline/Mainline LLVM targetingBradley Smith2016-01-152-0/+10
| | | | llvm-svn: 257878
* Update to use new name alignTo().Rui Ueyama2016-01-141-1/+1
| | | | llvm-svn: 257804
* Auto-link with ole32.dll to simplify building LLVM.dllReid Kleckner2016-01-121-0/+1
| | | | | | Patch by Jakob Bornecrantz llvm-svn: 257499
* The --debug-only option now takes a comma separated list of debug types.Christof Douma2016-01-121-3/+5
| | | | | | | | | This means that the DEBUG_TYPE cannot take a comma anymore. All existing passes conform to this rule. Differential Revision: http://reviews.llvm.org/D15645 llvm-svn: 257466
* Avoid the deprecated GetVersionEx APIReid Kleckner2016-01-112-10/+19
| | | | | | | | | Apparently the preferred version is the incredibly complicated VerifyVersionInfoW function. Rename the function to avoid potential future name clashes. llvm-svn: 257415
* Revert "[Windows] Simplify assertion code. NFC."Reid Kleckner2016-01-111-1/+4
| | | | | | | | | | | | | This reverts commit r254363. load64BitDebugHelp() has the side effect of loading dbghelp and setting globals. It should be called in no-asserts builds as well as debug builds. llvm_unreachable is also not appropriate here, since we actually want to return if dbghelp couldn't be loaded in a non-asserts build. llvm-svn: 257384
* Use ::GetVersionEx directly rather than the Win8.1 SDK helpersReid Kleckner2016-01-111-6/+4
| | | | | | | | This removes ifdefs and fixes the build for users of the Win8.0 SDK, which I happen to be. Upgrading is not hard, but executing the same code everywhere seems better. llvm-svn: 257379
* IntEqClasses: Let join() return the new leaderMatthias Braun2016-01-081-1/+3
| | | | | | | | The new leader is known anyway so we can return it for some micro optimization in code where it is easy to pass along the result to the next join(). llvm-svn: 257130
* Mark arm as the 32bit variant of aarch64 in TripleTamas Berghammer2016-01-071-28/+28
| | | | | | | | | | Change Triple::get32BitArchVariant to return arm/armeb as the 32bit variant of aarch64/aarch64_be and do the same change for the oppoiste direction in Triple::get64BitArchVariant. Differential revision: http://reviews.llvm.org/D15529 llvm-svn: 257048
* Do not define NOGDI. Mingw defines LOGFONTW type in wingdi.h and the mingwYunzhong Gao2016-01-061-1/+0
| | | | | | version of shlobj.h includes shobjidl.h and the latter uses the LOGFONTW type. llvm-svn: 256904
* Another attempt at fixing the i686-mingw32-RA-on-linux buildbot. I am gettingYunzhong Gao2016-01-061-4/+2
| | | | | | | | confused with what version of mingw is actually installed on the buildbot, and for now I will just assume this is an unknown version which does not ship with VersionHelpers.h. llvm-svn: 256902
* Another attempt at fixing the i686-mingw32-RA-on-linux buildbot.Yunzhong Gao2016-01-061-2/+3
| | | | llvm-svn: 256901
* Hopefully fix a mingw32 buildbot (i686-mingw32-RA-on-linux) which does not haveYunzhong Gao2016-01-061-1/+5
| | | | | | the VersionHelpers.h header. llvm-svn: 256896
* Fixing PR25717: fatal IO error writing large outputs to console on Windows.Yunzhong Gao2016-01-062-1/+34
| | | | | | | | | | | | | This patch is similar to the Python issue#11395. We need to cap the output size to 32767 on Windows to work around the size limit of WriteConsole(). Reference: https://bugs.python.org/issue11395 Writing a test for this bug turns out to be harder than I thought. I am still working on it (see phabricator review D15705). Differential Revision: http://reviews.llvm.org/D15553 llvm-svn: 256892
* [Clang/Support/Windows/Unix] Command lines created by clang may exceed the ↵Oleg Ranevskyy2016-01-052-6/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | command length limit set by the OS Summary: Hi Rafael, Would you be able to review this patch, please? (Clang part of the patch is D15832). When clang runs an external tool, e.g. a linker, it may create a command line that exceeds the length limit. Clang uses the llvm::sys::argumentsFitWithinSystemLimits function to check if command line length fits the OS limitation. There are two problems in this function that may cause exceeding of the limit: 1. It ignores the length of the program path in its calculations. On the other hand, clang adds the program path to the command line when it runs the program. 2. It assumes no space character is inserted after the last argument, which is not true for Windows. The flattenArgs function adds the trailing space for *each* argument. The result of this is that the terminating NULL character is not counted and may be placed beyond the length limit if the command line is exactly 32768 characters long. The WinAPI's CreateProcess does not find the NULL character and fails. Reviewers: rafael, ygao, probinson Subscribers: asl, llvm-commits Differential Revision: http://reviews.llvm.org/D15831 llvm-svn: 256866
OpenPOWER on IntegriCloud