summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* [CUDA] Use the right section and constant names for fatbins when compiling ↵Justin Lebar2016-11-181-3/+8
| | | | | | | | | | | | for macos. Reviewers: tra Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D26777 llvm-svn: 287287
* [CUDA] Initialize our header search using the host triple.Justin Lebar2016-11-182-2/+22
| | | | | | | | | | | | | | | | Summary: This used to work because system headers are found in a (somewhat) predictable set of locations on Linux. But this is not the case on MacOS; without this change, we don't look in the right places for our headers when doing device-side compilation on Mac. Reviewers: tra Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D26776 llvm-svn: 287286
* [CUDA] Driver changes to support CUDA compilation on MacOS.Justin Lebar2016-11-1813-113/+247
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Compiling CUDA device code requires us to know the host toolchain, because CUDA device-side compiles pull in e.g. host headers. When we only supported Linux compilation, this worked because CudaToolChain, which is responsible for device-side CUDA compilation, inherited from the Linux toolchain. But in order to support MacOS, CudaToolChain needs to take a HostToolChain pointer. Because a CUDA toolchain now requires a host TC, we no longer will create a CUDA toolchain from Driver::getToolChain -- you have to go through CreateOffloadingDeviceToolChains. I am *pretty* sure this is correct, and that previously any attempt to create a CUDA toolchain through getToolChain() would eventually have resulted in us throwing "error: unsupported use of NVPTX for host compilation". In any case hacking getToolChain to create a CUDA+host toolchain would be wrong, because a Driver can be reused for multiple compilations, potentially with different host TCs, and getToolChain will cache the result, causing us to potentially use a stale host TC. So that's the main change in this patch. In addition, we have to pull CudaInstallationDetector out of Generic_GCC and into a top-level class. It's now used by the Generic_GCC and MachO toolchains. Reviewers: tra Subscribers: rryan, hfinkel, sfantao Differential Revision: https://reviews.llvm.org/D26774 llvm-svn: 287285
* Add missing REQUIRES.Rafael Espindola2016-11-181-0/+1
| | | | llvm-svn: 287284
* EHABI: mark some functions as exportedSaleem Abdulrasool2016-11-171-24/+17
| | | | | | | These are part of the EHABI specification and are exported to be available to users. Mark them as `_LIBUNWIND_EXPORT` like the rest of the unwind interfaces. llvm-svn: 287283
* Resubmit "Change RegisterValue getters / setters to use StringRef."Zachary Turner2016-11-175-97/+101
| | | | | | | This resubmits r287279 with a fix for the original issue, which was a trivial typo. llvm-svn: 287282
* Revert "Change RegisterValue getters / setters to use StringRef."Zachary Turner2016-11-175-101/+97
| | | | | | | This reverts commit r287279, which breaks some register tests on Linux. llvm-svn: 287281
* Always compute sh_link for SHF_LINK_ORDER sections.Rafael Espindola2016-11-175-19/+40
| | | | | | | | Since the output has a section table too, it is meaningful to compute the sh_link. In a more practical note, the binutils' strip crashes if sh_link is not set for SHT_ARM_EXIDX. llvm-svn: 287280
* Change RegisterValue getters / setters to use StringRef.Zachary Turner2016-11-175-97/+101
| | | | | | | | In the process, found some functions that were duplicates of existing StringRef member functions. So deleted those functions and used the StringRef functions instead. llvm-svn: 287279
* Minor changes in x86 intrinsics headers; NFCEkaterina Romanova2016-11-174-15/+36
| | | | | | | | | | | | | | | | | | | | | | | | I made several changes for consistency with the rest of x86 instrinsics header files. Some of these changes help to render doxygen comments better. 1. avxintrin.h – Moved the opening bracket on a separate line for several intrinsics (for consistency with the rest of the intrinsics). 2. emmintrin.h - Moved the doxygen comment next to the body of the function; - Added braces after extern "C" even though there is only one declaration each time 3. xmmintrin.h - Moved the doxygen comment next to the body of the function; - Added intrinsic prototypes for a couple of macro definitions into the doxygen comment; - Added braces after extern "C" even though there is only one declaration each time 4. ammintrin.h – Removed extra line between the doxygen comment and the body of the functions (for consistency with the rest of the files). Desk reviewed by Paul Robinson. llvm-svn: 287278
* [lli] Prefer `exit(1)` to `return 1` for consistency.Davide Italiano2016-11-171-1/+1
| | | | llvm-svn: 287277
* [lli] Factor out error handling. NFCI.Davide Italiano2016-11-171-18/+15
| | | | llvm-svn: 287276
* [Preprocessor] Support for '-dI' flagBruno Cardoso Lopes2016-11-178-8/+51
| | | | | | | | | | | | | | | | | Re-introduce r285411. Implement the -dI as supported by GCC: Output ‘#include’ directives in addition to the result of preprocessing. This change aims to add this option, pass it through to the preprocessor via the options class, and when inclusions occur we output some information (+ test cases). Patch by Steve O'Brien! Differential Revision: https://reviews.llvm.org/D26089 llvm-svn: 287275
* Fix step-over when SymbolContext.function is missing and symbol is present.Sam McCall2016-11-171-14/+15
| | | | | | | | | | | | | | | | | | | | | | | Summary: Fix step-over when SymbolContext.function is missing and symbol is present. With targets from our build configuration, ThreadPlanStepOverRange::IsEquivalentContext fails to fire for relevant frames, leading to ShouldStop() returning true prematurely. The frame's SymbolContext, and m_addr_context have: - comp_unit set and matching - function = nullptr - symbol set and matching (but this is never checked) My naive guess is that the context should be equivalent in this case :-) Reviewers: jingham Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D26804 llvm-svn: 287274
* [ReleaseNotes] Mention the completion of the upstreaming of the AVR backendDylan McKay2016-11-171-0/+7
| | | | llvm-svn: 287273
* Probably overwritten loads should not be considered hoistableJohannes Doerfert2016-11-174-7/+28
| | | | | | | | Do not assume a load to be hoistable/invariant if the pointer is used by another instruction in the SCoP that might write to memory and that is always executed. llvm-svn: 287272
* [NFC] Add flag to disable error block assumptionsJohannes Doerfert2016-11-171-0/+7
| | | | | | | | | The declaration as an "error block" is currently aggressive and not very smart. This patch allows to disable error blocks completely. This might be useful to prevent SCoP expansion to a point where the assumed context becomes infeasible, thus the SCoP has to be discarded. llvm-svn: 287271
* [FIX] Do not try to hoist memory intrinsicJohannes Doerfert2016-11-172-2/+8
| | | | | | | | Since we do not necessarily treat memory intrinsics as non-affine anymore, we have to check for them explicitly before we try to hoist an access. llvm-svn: 287270
* [NFC] Skip over trivial assumptionsJohannes Doerfert2016-11-171-0/+14
| | | | | | | Filter trivial assumptions, thus assume { : } or restrict { : 0 = 1 }, as they clutter the user output as well as the statistics. llvm-svn: 287269
* [sanitizers] specifying style for global constantMike Aizatsky2016-11-171-0/+4
| | | | | | | | Subscribers: kubabrecka Differential Revision: https://reviews.llvm.org/D26755 llvm-svn: 287268
* [DBG] Collect statistics about actually versioned SCoPsJohannes Doerfert2016-11-171-0/+8
| | | | llvm-svn: 287267
* Make GetRegisterByName() take a StringRef.Zachary Turner2016-11-174-28/+25
| | | | | | | This one is fairly trivial and only really involves changing function signatures and a few simple call-sites. llvm-svn: 287266
* [DBG] Allow to emit the RTC value at runtimeJohannes Doerfert2016-11-171-0/+16
| | | | | | | | The new command line flag "polly-codegen-emit-rtc-print" can be used to place a "printf" in the generated code that will print the RTC value and the overflow state. llvm-svn: 287265
* [ELF][MIPS] Remove 'mips' word from MipsGotSection fields and methods names. NFCSimon Atanasyan2016-11-173-76/+118
| | | | | | Also add new comments with MIPS GOT description. llvm-svn: 287264
* [DBG] Collect statistics about statically infeasible SCoPsJohannes Doerfert2016-11-171-0/+3
| | | | llvm-svn: 287263
* [CrashReproducer][Darwin] Suggest attaching .crash diagnostic fileBruno Cardoso Lopes2016-11-173-0/+146
| | | | | | | | | | | | | | | | | | | | | | | In addition to the preprocessed sources file and reproducer script, also point to the .crash diagnostic files on Darwin. Example: PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT: Preprocessed source(s) and associated run script(s) are located at: clang-4.0: note: diagnostic msg: /var/folders/bk/1hj20g8j4xvdj5gd25ywhd3m0000gq/T/RegAllocGreedy-238f28.cpp clang-4.0: note: diagnostic msg: /var/folders/bk/1hj20g8j4xvdj5gd25ywhd3m0000gq/T/RegAllocGreedy-238f28.cache clang-4.0: note: diagnostic msg: /var/folders/bk/1hj20g8j4xvdj5gd25ywhd3m0000gq/T/RegAllocGreedy-238f28.sh clang-4.0: note: diagnostic msg: /var/folders/bk/1hj20g8j4xvdj5gd25ywhd3m0000gq/T/RegAllocGreedy-238f28.crash When no match is found for the .crash, point the user to a directory where those can be found. Example: clang-4.0: note: diagnostic msg: Crash backtrace is located in clang-4.0: note: diagnostic msg: /Users/bruno/Library/Logs/DiagnosticReports/clang-4.0_<YYYY-MM-DD-HHMMSS>_<hostname>.crash clang-4.0: note: diagnostic msg: (choose the .crash file that corresponds to your crash) rdar://problem/27286266 llvm-svn: 287262
* [DBG] Collect statistics about taken assumptionsJohannes Doerfert2016-11-171-1/+52
| | | | llvm-svn: 287261
* Allow use define symbols to override linker defined ones.Rafael Espindola2016-11-173-12/+20
| | | | | | | | | | | | | I hit an internal linker script that was defining _DYNAMIC instead of letting the linker do it. It turns out that both bfd and gold allow that. This is pretty easy to implement, just make the linker defined symbol weak. This should have no impact in the case where there is no user defined symbol: The visibility is hidden, which causes the output to still be local. llvm-svn: 287260
* Convert Platform, Process, and Connection functions to StringRef.Zachary Turner2016-11-1723-108/+108
| | | | | | All tests pass on Linux and Windows. llvm-svn: 287259
* Fixes for r287241. Use placement new. Apply clang-format.Malcolm Parsons2016-11-173-8/+6
| | | | llvm-svn: 287258
* Allow SIZEOF() command on nonexistent section.Rui Ueyama2016-11-173-7/+22
| | | | | | | | | | | | | | | | | | | | | | Linker script doesn't create a section if it has no content. So the following script doesn't create .norelocs section if it doesn't have any .rel* sections. .norelocs : { *(.rel*) } Later, if you assert that the size of .norelocs is 0, LLD printed out an error message, because it didn't allow calling SIZEOF() on nonexistent sections. This patch allows SIZEOF() on nonexistent sections, so that you can do something like this. ASSERT(SIZEOF(.norelocs), "shouldn't contain .rel sections!") Note that this behavior is compatible with GNU. Differential Revision: https://reviews.llvm.org/D26810 llvm-svn: 287257
* [CMake] Error when LTO and lld are enabled on DarwinPetr Hosek2016-11-171-0/+3
| | | | | | | | lld on Darwin does not currently support LTO. Differential Revision: https://reviews.llvm.org/D26715 llvm-svn: 287256
* Workaround compilers w/o C++1z inline variablesEric Fiselier2016-11-172-3/+17
| | | | llvm-svn: 287255
* Add single quotes to error messages.Rui Ueyama2016-11-172-5/+5
| | | | llvm-svn: 287254
* Use consistent variable name.Rui Ueyama2016-11-171-4/+4
| | | | llvm-svn: 287253
* Use llvm::reverse to get a reverse range.Rui Ueyama2016-11-171-3/+4
| | | | llvm-svn: 287252
* Remove files missed in r287250Eric Fiselier2016-11-171-36/+0
| | | | llvm-svn: 287251
* Implement P0504R0: Revisiting in-place tag types for any/optional/variantEric Fiselier2016-11-172-56/+32
| | | | llvm-svn: 287250
* Test changes for P0504R0 "Revisiting in-place tag types for ↵Eric Fiselier2016-11-175-86/+54
| | | | | | any/optional/variant". Patch from Casey Carter llvm-svn: 287249
* Fix spelling mistakes in Hexagon target comments. NFC.Simon Pilgrim2016-11-179-12/+12
| | | | | | Identified by Pedro Giffuni in PR27636. llvm-svn: 287248
* Fix spelling mistakes in X86 target comments. NFC.Simon Pilgrim2016-11-173-5/+5
| | | | | | Identified by Pedro Giffuni in PR27636. llvm-svn: 287247
* [asan] Create a .ASAN$G(A-Z) section for global registrationReid Kleckner2016-11-1710-1/+161
| | | | | | | | | | | | | | | | | | | | | | | | | Summary: The expectation is that new instrumented code will add global variable metadata to the .ASAN$GL section, and we will use this new code to iterate over it. This technique seems to break when using incremental linking, which seems to align every global to a 256 byte boundary. Presumably this is so that it can incrementally cope with global changing size. Clang already passes -incremental:no as a linker flag when you invoke it to do the link step. The two tests added for this feature will fail until the LLVM instrumentation change in D26770 lands, so they are marked XFAIL for now. Reviewers: pcc, kcc, mehdi_amini, kubabrecka Subscribers: llvm-commits, mgorny Differential Revision: https://reviews.llvm.org/D26771 llvm-svn: 287246
* [tests] Use __SSE2__ (rather than __i686__...) for SSE2 ASAN testMichal Gorny2016-11-171-1/+1
| | | | | | | | | | | | | Use the __SSE2__ to determine whether SSE2 is enabled in the ASAN tests rather than relying on either of the __i686__ and __x86_64__. The former is only set with explicit -march=i686, and therefore misses most of the x86 CPUs that support SSE2. __SSE2__ is in turn defined if the current settings (-march, -msse2) indicate that SSE2 is supported which should be more reliable. Differential Revision: https://reviews.llvm.org/D26763 llvm-svn: 287245
* ObjC Module: try to make objc module deterministic.Manman Ren2016-11-172-2/+30
| | | | | | | Make sure that comparing selectors in DeclarationName does its job. rdar://problem/28988750 llvm-svn: 287244
* [CodeView] Fix some Clang-tidy modernize-use-default, modernize-use-override ↵Eugene Zelenko2016-11-1712-93/+153
| | | | | | | | and Include What You Use warnings; other minor fixes (NFC). Per Zachary Turner and Mehdi Amini suggestion to make only post-commit reviews. llvm-svn: 287243
* Rewrite all Property related functions in terms of StringRef.Zachary Turner2016-11-1724-345/+269
| | | | | | | | | | | | | | | This was a bit tricky, especially for things like OptionValueArray and OptionValueDictionary since they do some funky string parsing. Rather than try to re-write line-by-line I tried to make the StringRef usage idiomatic, even though it meant often re-writing from scratch large blocks of code in a different way while keeping true to the original intent. The finished code is a big improvement though, and often much shorter than the original code. All tests and unit tests pass on Windows and Linux. llvm-svn: 287242
* Use unique_ptr for cached tokens for default arguments in C++.Malcolm Parsons2016-11-177-26/+24
| | | | | | | | | | | | | | | | | Summary: This changes pointers to cached tokens for default arguments in C++ from raw pointers to unique_ptrs. There was a fixme in the code where the cached tokens are created about using a smart pointer. The change is straightforward, though I did have to track down and fix a memory corruption caused by the change. memcpy was being used to copy parameter information. This duplicated the unique_ptr, which led to the cached token buffer being deleted prematurely. Patch by David Tarditi! Reviewers: malcolm.parsons Subscribers: arphaman, malcolm.parsons, cfe-commits Differential Revision: https://reviews.llvm.org/D26435 llvm-svn: 287241
* [libFuzzer] better documentation for -fsanitize-coverage=trace-cmpKostya Serebryany2016-11-171-3/+13
| | | | llvm-svn: 287240
* Sema: correct typo correction for ivars in @implementationSaleem Abdulrasool2016-11-172-4/+34
| | | | | | | | | | | | The previous typo correction handling assumed that ivars are only declared in the interface declaration rather than as a private ivar in the implementation. Adjust the handling to permit both interfaces. Assert earlier that the interface has been acquired to ensure that we can identify when both possible casts have failed. Addresses PR31040! llvm-svn: 287238
* Enable -threads by default.Rui Ueyama2016-11-171-1/+1
| | | | | | | | | | | | | | | | | LLD supports multi-threading, and it seems to be working well as you can see in r287140. In short, LLD runs a few percent to 30% faster with -threads and more than 50% faster if you are using -build-id (your mileage may vary depending on your computer). However, I don't think most users even don't know about that because -threads is not a default option. This patch enables it by default. Discussion thread: http://lists.llvm.org/pipermail/llvm-dev/2016-November/107160.html llvm-svn: 287237
OpenPOWER on IntegriCloud