summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Support
Commit message (Collapse)AuthorAgeFilesLines
...
* Try once more to ensure constant initializaton of ManagedStaticsReid Kleckner2019-04-241-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | First, use the old style of linker initialization for MSVC 2019 in addition to 2017. MSVC 2019 emits a dynamic initializer for ManagedStatic when compiled in debug mode, and according to zturner, also sometimes in release mode. I wasn't able to reproduce that, but it seems best to stick with the old code that works. When clang is using the MSVC STL, we have to give ManagedStatic a constexpr constructor that fully zero initializes all fields, otherwise it emits a dynamic initializer. The MSVC STL implementation of std::atomic has a non-trivial (but constexpr) default constructor that zero initializes the atomic value. Because one of the fields has a non-trivial constructor, ManagedStatic ends up with a non-trivial ctor. The ctor is not constexpr, so clang ends up emitting a dynamic initializer, even though it simply does zero initialization. To make it constexpr, we must initialize all fields of the ManagedStatic. However, while the constructor that takes a pointer is marked constexpr, clang says it does not evaluate to a constant because it contains a cast from a pointer to an integer. I filed this as: https://developercommunity.visualstudio.com/content/problem/545566/stdatomic-value-constructor-is-not-actually-conste.html Once we do that, we can add back the LLVM_REQUIRE_CONSTANT_INITIALIZATION marker, and so far as I'm aware it compiles successfully on all supported targets. llvm-svn: 359135
* Revert using fcopyfile(3) to implement sys::fs::copy_file(Twine, int) on macOSAdrian Prantl2019-04-242-22/+6
| | | | | | | | | It turns out that I mesread the man page and fcopyfile(3) does not actually support COPYFILE_CLONE for files. <rdar://problem/50148757> llvm-svn: 359127
* [AMDGPU] Add gfx1010 target definitionsStanislav Mekhanoshin2019-04-241-18/+20
| | | | | | Differential Revision: https://reviews.llvm.org/D61041 llvm-svn: 359113
* [CommandLine] Provide parser<unsigned long> instantiation to allow ↵Fangrui Song2019-04-242-8/+17
| | | | | | | | | | | | | cl::opt<uint64_t> on LP64 platforms Summary: And migrate opt<unsigned long long> to opt<uint64_t> Fixes PR19665 Differential Revision: https://reviews.llvm.org/D60933 llvm-svn: 359068
* Use llvm::stable_sortFangrui Song2019-04-231-2/+1
| | | | | | While touching the code, simplify if feasible. llvm-svn: 358996
* [CachePruning] Simplify comparatorFangrui Song2019-04-211-9/+2
| | | | llvm-svn: 358843
* Initial implementation of JITLink - A replacement for RuntimeDyld.Lang Hames2019-04-201-0/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: JITLink is a jit-linker that performs the same high-level task as RuntimeDyld: it parses relocatable object files and makes their contents runnable in a target process. JITLink aims to improve on RuntimeDyld in several ways: (1) A clear design intended to maximize code-sharing while minimizing coupling. RuntimeDyld has been developed in an ad-hoc fashion for a number of years and this had led to intermingling of code for multiple architectures (e.g. in RuntimeDyldELF::processRelocationRef) in a way that makes the code more difficult to read, reason about, extend. JITLink is designed to isolate format and architecture specific code, while still sharing generic code. (2) Support for native code models. RuntimeDyld required the use of large code models (where calls to external functions are made indirectly via registers) for many of platforms due to its restrictive model for stub generation (one "stub" per symbol). JITLink allows arbitrary mutation of the atom graph, allowing both GOT and PLT atoms to be added naturally. (3) Native support for asynchronous linking. JITLink uses asynchronous calls for symbol resolution and finalization: these callbacks are passed a continuation function that they must call to complete the linker's work. This allows for cleaner interoperation with the new concurrent ORC JIT APIs, while still being easily implementable in synchronous style if asynchrony is not needed. To maximise sharing, the design has a hierarchy of common code: (1) Generic atom-graph data structure and algorithms (e.g. dead stripping and | memory allocation) that are intended to be shared by all architectures. | + -- (2) Shared per-format code that utilizes (1), e.g. Generic MachO to | atom-graph parsing. | + -- (3) Architecture specific code that uses (1) and (2). E.g. JITLinkerMachO_x86_64, which adds x86-64 specific relocation support to (2) to build and patch up the atom graph. To support asynchronous symbol resolution and finalization, the callbacks for these operations take continuations as arguments: using JITLinkAsyncLookupContinuation = std::function<void(Expected<AsyncLookupResult> LR)>; using JITLinkAsyncLookupFunction = std::function<void(const DenseSet<StringRef> &Symbols, JITLinkAsyncLookupContinuation LookupContinuation)>; using FinalizeContinuation = std::function<void(Error)>; virtual void finalizeAsync(FinalizeContinuation OnFinalize); In addition to its headline features, JITLink also makes other improvements: - Dead stripping support: symbols that are not used (e.g. redundant ODR definitions) are discarded, and take up no memory in the target process (In contrast, RuntimeDyld supported pointer equality for weak definitions, but the redundant definitions stayed resident in memory). - Improved exception handling support. JITLink provides a much more extensive eh-frame parser than RuntimeDyld, and is able to correctly fix up many eh-frame sections that RuntimeDyld currently (silently) fails on. - More extensive validation and error handling throughout. This initial patch supports linking MachO/x86-64 only. Work on support for other architectures and formats will happen in-tree. Differential Revision: https://reviews.llvm.org/D58704 llvm-svn: 358818
* [APInt] Optimize umul_ovFangrui Song2019-04-191-5/+12
| | | | | | | | | | | | | Change two costly udiv() calls to lshr(1)*RHS + left-shift + plus On one 64-bit umul_ov benchmark, I measured an obvious improvement: 12.8129s -> 3.6257s Note, there may be some value to special case 64-bit (the most common case) with __builtin_umulll_overflow(). Differential Revision: https://reviews.llvm.org/D60669 llvm-svn: 358730
* Implement sys::fs::copy_file using the macOS copyfile(3) APIAdrian Prantl2019-04-182-0/+50
| | | | | | | | | | | | | | | | | | to support APFS clones. This patch adds a Darwin-specific implementation of llvm::sys::fs::copy_file() that uses the macOS copyfile(3) API to support APFS copy-on-write clones, which should be faster and much more space efficient. https://developer.apple.com/library/archive/documentation/FileManagement/Conceptual/APFS_Guide/ToolsandAPIs/ToolsandAPIs.html Differential Revision: https://reviews.llvm.org/D60802 This reapplies 358628 with an additional bugfix handling the case where the destination file already exists. (Caught by the clang testsuite). llvm-svn: 358716
* Revert Implement sys::fs::copy_file using the macOS copyfile(3) API to ↵Adrian Prantl2019-04-182-53/+0
| | | | | | | | | support APFS clones. This reverts r358628 (git commit 91a06bee788262a294527b815354f380d99dfa9b) while investigating a crash reproducer bot failure. llvm-svn: 358634
* Implement sys::fs::copy_file using the macOS copyfile(3) APIAdrian Prantl2019-04-182-0/+53
| | | | | | | | | | | | | | | to support APFS clones. This patch adds a Darwin-specific implementation of llvm::sys::fs::copy_file() that uses the macOS copyfile(3) API to support APFS copy-on-write clones, which should be faster and much more space efficient. https://developer.apple.com/library/archive/documentation/FileManagement/Conceptual/APFS_Guide/ToolsandAPIs/ToolsandAPIs.html Differential Revision: https://reviews.llvm.org/D60802 llvm-svn: 358628
* [Support] Add LEB128 support to BinaryStreamReader/Writer.Lang Hames2019-04-172-1/+45
| | | | | | | | | | | | | | | | | | | Summary: This patch adds support for ULEB128 and SLEB128 encoding and decoding to BinaryStreamWriter and BinaryStreamReader respectively. Support for ULEB128/SLEB128 will be used for eh-frame parsing in the JITLink library currently under development (see https://reviews.llvm.org/D58704). Reviewers: zturner, dblaikie Subscribers: kristina, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D60810 llvm-svn: 358584
* Time profiler: optimize json output timeAnton Afanasyev2019-04-161-0/+5
| | | | | | | | | | | | | | | | | | Summary: Use llvm::json::Array.reserve() to optimize json output time. Here is motivation: https://reviews.llvm.org/D60609#1468941. In short: for the json array with ~32K entries, pushing back each entry takes ~4% of whole time compared to the method of preliminary memory reservation: (3995-3845)/3995 = 3.75%. Reviewers: lebedev.ri Subscribers: hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D60792 llvm-svn: 358522
* [llvm][Support] Provide interface to set thread prioritiesKadir Cetinkaya2019-04-162-0/+55
| | | | | | | | | | | | | | | | | | | Summary: We have a multi-platform thread priority setting function(last piece landed with D58683), I wanted to make this available to all llvm community, there seem to be other users of such functionality with portability fixmes: lib/Support/CrashRecoveryContext.cpp tools/clang/tools/libclang/CIndex.cpp Reviewers: gribozavr, ioeric Subscribers: krytarowski, jfb, kristina, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D59130 llvm-svn: 358494
* Use native llvm JSON library for time profiler outputAnton Afanasyev2019-04-161-37/+37
| | | | | | | | | | | | | | Summary: Replace plain json text output with llvm JSON library wrapper using. Reviewers: takuto.ikuta, lebedev.ri Subscribers: hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D60609 llvm-svn: 358476
* Reapply [Support] Fix recursive response file expansion guardShoaib Meenai2019-04-161-4/+6
| | | | | | | | | | | | | | | | | | | | | The test in the dependent revision has been fixed for Windows. Original commit message: Response file expansion limits the amount of expansion to prevent potential infinite recursion. However, the current logic assumes that any argument beginning with @ is a response file, which is not true for e.g. `-Xlinker -rpath -Xlinker @executable_path/../lib` on Darwin. Having too many of these non-response file arguments beginning with @ prevents actual response files from being expanded. Instead, limit based on the number of successful response file expansions, which should still prevent infinite recursion but also avoid false positives. Differential Revision: https://reviews.llvm.org/D60631 > llvm-svn: 358452 llvm-svn: 358466
* Revert [Support] Fix recursive response file expansion guardShoaib Meenai2019-04-151-6/+4
| | | | | | | | This reverts r358452 (git commit c8df4fb9c3865eac52a99602c26bbc070098c3d4) A dependent commit breaks the Windows buildbots. llvm-svn: 358460
* Only use argv[0] as the main executable name if it exists.Sean Silva2019-04-151-2/+2
| | | | | | | | | | | | Under some environments, argv[0] doesn't hold a valid file name, but sys::fs::getMainExecutable will find the main executable properly. This patch tweaks the logic to fall back to sys::fs::getMainExecutable in more situations. Differential Revision: https://reviews.llvm.org/D60730 llvm-svn: 358455
* [Support] Fix recursive response file expansion guardShoaib Meenai2019-04-151-4/+6
| | | | | | | | | | | | | | | Response file expansion limits the amount of expansion to prevent potential infinite recursion. However, the current logic assumes that any argument beginning with @ is a response file, which is not true for e.g. `-Xlinker -rpath -Xlinker @executable_path/../lib` on Darwin. Having too many of these non-response file arguments beginning with @ prevents actual response files from being expanded. Instead, limit based on the number of successful response file expansions, which should still prevent infinite recursion but also avoid false positives. Differential Revision: https://reviews.llvm.org/D60631 llvm-svn: 358452
* Time profiler: small fixes and optimizationsAnton Afanasyev2019-04-151-35/+43
| | | | | | | | | | | | | | Summary: Fixes from Roman's review here: https://reviews.llvm.org/D58675#1465336 Reviewers: lebedev.ri Subscribers: hiraditya, mgrang, cfe-commits, llvm-commits Tags: #clang, #llvm Differential Revision: https://reviews.llvm.org/D60663 llvm-svn: 358448
* [CommandLineParser] Add DefaultOption flagDon Hinton2019-04-151-5/+45
| | | | | | | | | | | | | | | | | | | | | | | | | Summary: Add DefaultOption flag to CommandLineParser which provides a default option or alias, but allows users to override it for some other purpose as needed. Also, add `-h` as a default alias to `-help`, which can be seamlessly overridden by applications like llvm-objdump and llvm-readobj which use `-h` as an alias for other options. (relanding after revert, r358414) Added DefaultOptions.clear() to reset(). Reviewers: alexfh, klimek Reviewed By: klimek Subscribers: kristina, MaskRay, mehdi_amini, inglorion, dexonsmith, hiraditya, llvm-commits, jhenderson, arphaman, cfe-commits Tags: #clang, #llvm Differential Revision: https://reviews.llvm.org/D59746 llvm-svn: 358428
* Revert r358337: "[CommandLineParser] Add DefaultOption flag"Ilya Biryukov2019-04-151-43/+5
| | | | | | | The change causes test failures under asan. Reverting to unbreak our integrate. llvm-svn: 358414
* FileCheck [1/12]: Move variable table in new objectThomas Preud'homme2019-04-151-85/+86
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This patch is part of a patch series to add support for FileCheck numeric expressions. This specific patch adds a new class to hold pattern matching global state. The table holding the values of FileCheck variable constitutes some sort of global state for the matching phase, yet is passed as parameters of all functions using it. This commit create a new FileCheckPatternContext class pointed at from FileCheckPattern. While it increases the line count, it separates local data from global state. Later commits build on that to add numeric expression global state to that class. Copyright: - Linaro (changes up to diff 183612 of revision D55940) - GraphCore (changes in later versions of revision D55940 and in new revision created off D55940) Reviewers: jhenderson, chandlerc, jdenny, probinson, grimar, arichardson, rnk Subscribers: hiraditya, llvm-commits, probinson, dblaikie, grimar, arichardson, tra, rnk, kristina, hfinkel, rogfer01, JonChesterfield Tags: #llvm Differential Revision: https://reviews.llvm.org/D60381 llvm-svn: 358390
* [CommandLineParser] Add DefaultOption flagDon Hinton2019-04-131-5/+43
| | | | | | | | | | | | | | | | | | | | | | Summary: Add DefaultOption flag to CommandLineParser which provides a default option or alias, but allows users to override it for some other purpose as needed. Also, add `-h` as a default alias to `-help`, which can be seamlessly overridden by applications like llvm-objdump and llvm-readobj which use `-h` as an alias for other options. Reviewers: alexfh, klimek Reviewed By: klimek Subscribers: MaskRay, mehdi_amini, inglorion, dexonsmith, hiraditya, llvm-commits, jhenderson, arphaman, cfe-commits Tags: #clang, #llvm Differential Revision: https://reviews.llvm.org/D59746 llvm-svn: 358337
* [KnownBits] Add computeForAddCarry()Nikita Popov2019-04-121-12/+31
| | | | | | | | | | | | | | | | This is for D60460. computeForAddSub() essentially already supports carries because it has to deal with subtractions. This revision extracts a lower-level computeForAddCarry() function, which allows computing the known bits for add (carry known zero), sub (carry known one) and addcarry (carry unknown). As we don't seem to have any yet, I've added a unit test file for KnownBits and exhaustive tests for the new computeForAddCarry() functionality, as well the existing computeForAddSub() function. Differential Revision: https://reviews.llvm.org/D60522 llvm-svn: 358297
* YAMLIO: Fix serialization of strings with embedded nulsPavel Labath2019-04-111-6/+6
| | | | | | | | | | | | | | | | | | | | | | Summary: A bug/typo in Output::scalarString caused us to round-trip a StringRef through a const char *. This meant that any strings with embedded nuls were unintentionally cut short at the first such character. (It also could have caused accidental buffer overruns, but it seems that all StringRefs coming into this functions were formed from null-terminated strings.) This patch fixes the bug and adds an appropriate test. Reviewers: sammccall, jhenderson Subscribers: kristina, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D60505 llvm-svn: 358176
* Improve hashing for time profilerAnton Afanasyev2019-04-091-16/+19
| | | | | | | | | | | | | | | | Summary: Use optimized hashing while writing time trace by join two hashes to one. Used for -ftime-trace option. Reviewers: rnk, takuto.ikuta Subscribers: hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D60404 llvm-svn: 357998
* Attempt to recommit r357901Eugene Leviant2019-04-082-0/+69
| | | | llvm-svn: 357905
* Reverting r357901 as fails to build on some of the buildbotsEugene Leviant2019-04-082-69/+0
| | | | llvm-svn: 357902
* [Support] Add zlib independent CRC32Eugene Leviant2019-04-082-0/+69
| | | | | | Differential revision: https://reviews.llvm.org/D59816 llvm-svn: 357901
* Appease STLs where std::atomic<void*> lacks a constexpr default ctorReid Kleckner2019-04-041-4/+2
| | | | | | | | MSVC 2019 casts the pointer to a pointer-sized integer, which is a reinterpret_cast, which is invalid in a constexpr context, so I have to remove the LLVM_REQUIRES_CONSTANT_INITIALIZATION annotation for now. llvm-svn: 357716
* Ensure that ManagedStatic is constant initialized in MSVC 2017 & 2019Reid Kleckner2019-04-041-3/+8
| | | | | | | | | | | | | | | | | | | Fixes PR41367. This effectively relands r357655 with a workaround for MSVC 2017. I tried various approaches with unions, but I ended up going with this ifdef approach because it lets us write the proper C++11 code that we want to write, with a separate workaround that we can delete when we drop MSVC 2017 support. This also adds LLVM_REQUIRE_CONSTANT_INITIALIZATION, which wraps [[clang::require_constant_initialization]]. This actually detected a minor issue when using clang-cl where clang wasn't able to use the constexpr constructor in MSVC's STL, so I switched back to using the default ctor of std::atomic<void*>. llvm-svn: 357714
* [Support] On AIX, Check ENOTSUP on posix_fallocate instead of EOPNOTSUPPHubert Tong2019-04-041-1/+6
| | | | | | | | | | | | | | | | | | | | Summary: `posix_fallocate` can fail if the underlying filesystem does not support it; and, on AIX, such a failure is reported by a return value of `ENOTSUP`. The existing code checks only for `EOPNOTSUPP`, which may share the same value as `ENOTSUP`, but is not required to. Reviewers: xingxue, sfertile, jasonliu Reviewed By: xingxue Subscribers: kristina, jsji, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D60175 llvm-svn: 357662
* [WebAssembly] Add Emscripten OS definition + small_printfAlon Zakai2019-04-031-0/+2
| | | | | | | | | | | | | | | The Emscripten OS provides a definition of __EMSCRIPTEN__, and also that it supports iprintf optimizations. Also define small_printf optimizations, which is a printf with float support but not long double (which in wasm can be useful since long doubles are 128 bit and force linking of float128 emulation code). This part is based on sunfish's https://reviews.llvm.org/D57620 (which can't land yet since the WASI integration isn't ready yet). Differential Revision: https://reviews.llvm.org/D60167 llvm-svn: 357552
* Adds `-ftime-trace` option to clang that produces Chrome `chrome://tracing` ↵Anton Afanasyev2019-03-302-0/+185
| | | | | | | | | | | | | | compatible JSON profiling output dumps. This change adds hierarchical "time trace" profiling blocks that can be visualized in Chrome, in a "flame chart" style. Each profiling block can have a "detail" string that for example indicates the file being processed, template name being instantiated, function being optimized etc. This is taken from GitHub PR: https://github.com/aras-p/llvm-project-20170507/pull/2 Patch by Aras Pranckevičius. Differential Revision: https://reviews.llvm.org/D58675 llvm-svn: 357340
* [Support] Implement is_local_impl with AIX mntctlHubert Tong2019-03-291-3/+45
| | | | | | | | | | | | | | | | | | | | | | Summary: On AIX, we can determine whether a filesystem is remote using `mntctl`. If the information is not found, then claim that the file is remote (since that is the more restrictive case). Testing for the associated interface is restored with a modified version of the unit test from rL295768. Reviewers: jasonliu, xingxue Reviewed By: xingxue Subscribers: jsji, apaprocki, Hahnfeld, zturner, krytarowski, kristina, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D58801 llvm-svn: 357333
* [MC] Fix floating-point literal lexing.Eli Friedman2019-03-281-1/+4
| | | | | | | | | | | | | | | | | | | | | This patch has three related fixes to improve float literal lexing: 1. Make AsmLexer::LexDigit handle floats without a decimal point more consistently. 2. Make AsmLexer::LexFloatLiteral print an error for floats which are apparently missing an "e". 3. Make APFloat::convertFromString use binutils-compatible exponent parsing. Together, this fixes some cases where a float would be incorrectly rejected, fixes some cases where the compiler would crash, and improves diagnostics in some cases. Patch by Brandon Jones. Differential Revision: https://reviews.llvm.org/D57321 llvm-svn: 357214
* New methods to check for under-/overflow in the SMT APIMikhail R. Gadelha2019-03-271-0/+70
| | | | | | | | | | | | | | | | Summary: Added methods to check for under-/overflow in additions, subtractions, signed divisions/modulus, negations, and multiplications. Reviewers: ddcc, gou4shi1 Reviewed By: ddcc, gou4shi1 Subscribers: hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D59796 llvm-svn: 357088
* [Support] MemoryBlock size should reflect the requested sizeAndrew Ng2019-03-271-3/+4
| | | | | | | | | | This patch mirrors the change made to the Unix equivalent in r351916. This in turn fixes bugs related to the use of FileOutputBuffer to output to "-", i.e. stdout, on Windows. Differential Revision: https://reviews.llvm.org/D59663 llvm-svn: 357058
* Moved body of methods dump to .cpp file to fix compilation when modulesMikhail R. Gadelha2019-03-261-0/+4
| | | | | | are enabled llvm-svn: 356994
* Moved everything SMT-related to LLVM and updated the cmake scripts.Mikhail R. Gadelha2019-03-252-1/+842
| | | | | | Differential Revision: https://reviews.llvm.org/D54978 llvm-svn: 356929
* [Legacy][TimePasses] allow -time-passes reporting into a custom streamFedor Sergeev2019-03-221-6/+11
| | | | | | | | | | | | | | | | As a followup to newpm -time-passes fix (D59366), now adding a similar functionality to legacy time-passes. Enhancing llvm::reportAndResetTimings to accept an optional stream for reporting output. By default it still reports into the stream created by CreateInfoOutputFile (-info-output-file). Also fixing to actually reset after printing as declared. Reviewed By: philip.pfaffe Differential Revision: https://reviews.llvm.org/D59416 llvm-svn: 356824
* [X86] Add CMPXCHG8B feature flag. Set it for all CPUs except i386/i486 ↵Craig Topper2019-03-201-0/+1
| | | | | | | | | | | | including 'generic'. Disable use of CMPXCHG8B when this flag isn't set. CMPXCHG8B was introduced on i586/pentium generation. If its not enabled, limit the atomic width to 32 bits so the AtomicExpandPass will expand to lib calls. Unclear if we should be using a different limit for other configs. The default is 1024 and experimentation shows that using an i256 atomic will cause a crash in SelectionDAG. Differential Revision: https://reviews.llvm.org/D59576 llvm-svn: 356631
* [AMDGPU] Factored PAL metadata handling out into its own classTim Renouf2019-03-201-14/+0
| | | | | | | | | | | | | | | | | | | | | | Summary: This commit introduces a new AMDGPUPALMetadata class that: * is inside the AMDGPU target; * keeps an in-memory representation of PAL metadata; * provides a method to read the frontend-supplied metadata from LLVM IR; * provides methods for the asm printer to set metadata items; * provides methods to write the metadata as a binary blob to put in a .note record or as an asm directive; * provides a method to read the metadata as a binary blob from a .note record. Because llvm-readobj cannot call directly into a target, I had to remove llvm-readobj's ability to dump PAL metadata, pending a resolution to https://reviews.llvm.org/D52821 Differential Revision: https://reviews.llvm.org/D57027 Change-Id: I756dc830894fcb6850324cdcfa87c0120eb2cf64 llvm-svn: 356582
* [llvm-objcopy] Make .build-id linking atomicJake Ehrlich2019-03-181-26/+27
| | | | | | | | This change makes linking into .build-id atomic and safe to use. Some users under particular workflows are reporting that this races more than half the time under particular conditions. llvm-svn: 356404
* AMDGPU: Partially fix default device for HSAMatt Arsenault2019-03-171-4/+6
| | | | | | | | | | | | | | | | | | There are a few different issues, mostly stemming from using generation based checks for anything instead of subtarget features. Stop adding flat-address-space as a feature for HSA, as it should only be a device property. This was incorrectly allowing flat instructions to select for SI. Increase the default generation for HSA to avoid the encoding error when emitting objects. This has some other side effects from various checks which probably should be separate subtarget features (in the cost model and for dealing with the DS offset folding issue). Partial fix for bug 41070. It should probably be an error to try using amdhsa without flat support. llvm-svn: 356347
* Handle consecutive-double-quotes in Windows argument parsingSunil Srivastava2019-03-141-0/+7
| | | | | | | | | Windows command line argument processing treats consecutive double quotes as a single double-quote. This patch implements this functionality. Differential Revision: https://reviews.llvm.org/D58662 llvm-svn: 356193
* [Support] Treat truncation of fullpath as errorJonas Hahnfeld2019-03-131-1/+5
| | | | | | | | | | | | If the concatenation of arguments dir and bin has at least PATH_MAX characters the call to snprintf will truncate. The result will usually not exist, but if it does it's actually incorrect to return that the path exists. (Motivated by GCC compiler warning about format truncation.) Differential Revision: https://reviews.llvm.org/D58835 llvm-svn: 356036
* Use AIX version detection at LLVM run-timeHubert Tong2019-03-131-0/+17
| | | | | | | | | | | | | | | | | | | | | | | Summary: AIX compilers define macros based on the version of the operating system. This patch implements updating of versionless AIX triples to include the host AIX version. Also, the host triple detection in the build system is adjusted to strip the AIX version information so that the run-time detection is preferred. Reviewers: xingxue, stefanp, nemanjai, jasonliu Reviewed By: xingxue Subscribers: mgorny, kristina, jdoerfert, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D58798 llvm-svn: 355995
* Add XCOFF triple object format type for AIXJason Liu2019-03-121-0/+6
| | | | | | | | | This patch adds an XCOFF triple object format type into LLVM. This XCOFF triple object file type will be used later by object file and assembly generation for the AIX platform. Differential Revision: https://reviews.llvm.org/D58930 llvm-svn: 355989
OpenPOWER on IntegriCloud