summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* [AVX-512] Add support for commuting VPTERNLOG instructions.Craig Topper2016-09-225-105/+201
| | | | | | | | | | VPTERNLOG is a ternary instruction with an immediate specifying the logical operation to perform. For each bit position in the 3 source vectors the bit from each source is concatenated together and the resulting 3-bit value is used to select a bit in the immediate. This bit value is written to the result vector. We can commute this by swapping operands and modifying the immediate. To modify the immediate we need to swap two pairs of bits. The pairs correspond to the locations in the immediate where the commuted operands bits have opposite values and the uncommuted operand has the same value. Bits 0 and 7 will never be swapped since the relevant bits from all sources are the same value. This refactors and reuses parts of the FMA3 commuting code which is also a three operand instruction. llvm-svn: 282132
* [RegisterBankInfo] Move to statically allocated RegisterBank.Quentin Colombet2016-09-226-12/+68
| | | | | | | | | | | | This commit is basically the first step toward what will RegisterBankInfo look when it gets TableGen'ed. It introduces a XXXGenRegisterBankInfo.def file that is what TableGen will issue at some point. Moreover, the RegBanks field in RegisterBankInfo changed to reflect the static (compile time) aspect of the information. llvm-svn: 282131
* [RegisterBankInfo] Take advantage of the extra argument of SmallVector::resize.Quentin Colombet2016-09-221-3/+1
| | | | | | | | When initializing an instance of OperandsMapper, instead of using SmallVector::resize followed by std::fill, use the function that directly does that in SmallVector. llvm-svn: 282130
* [libFuzzer] add 'features' to the corpus elements, allow mutations with Size ↵Kostya Serebryany2016-09-228-44/+66
| | | | | | > MaxSize, fix sha1 in corpus stats; various refactorings llvm-svn: 282129
* fix Args function broken in r281942Todd Fiala2016-09-221-1/+1
| | | | | | | | The method was hard-coded to check only the 0th element of the array. This manifested as NSLog messages behaving incorrectly on macOS. (This is independent of the broken DarwinLog feature). llvm-svn: 282128
* [libFuzzer] one more test Kostya Serebryany2016-09-223-0/+30
| | | | llvm-svn: 282127
* Add missing _v traits. is_bind_expression_v, is_placeholder_v and ↵Marshall Clow2016-09-225-8/+60
| | | | | | uses_allocator_v llvm-svn: 282126
* [CMake] More robust handling for bootstrap variablesChris Bieneman2016-09-221-1/+5
| | | | | | Checking defined isn't good enough we also need to handle defined to empty string. llvm-svn: 282125
* [Sema] Fix PR30481: crash on checking printf args.George Burgess IV2016-09-222-2/+7
| | | | | | | We were falling through from one case to another in a switch statement. Oops. llvm-svn: 282124
* Fix typo in lldb --helpEd Maste2016-09-211-1/+1
| | | | | | | | Patch by Yacine Belkadi Differential Revision: https://reviews.llvm.org/D12158 llvm-svn: 282123
* [CMake] Check if passthrough variables are definedChris Bieneman2016-09-211-1/+1
| | | | | | Checking if they evaluate to true cases prevents passing values that evaluate to false cases. Instead we should check if the variables are defined. llvm-svn: 282122
* [libFuzzer] add stats to the corpus; more refactoringKostya Serebryany2016-09-2110-49/+53
| | | | llvm-svn: 282121
* Fix for loop sign fix in r282112 for column = 0Ed Maste2016-09-211-1/+1
| | | | llvm-svn: 282119
* Once more unto the strict weak ordering, once more.Rafael Espindola2016-09-213-24/+108
| | | | | | This should finally give a stable sorting over all implementations. llvm-svn: 282118
* Fix an incorrect nullptr conversion.Zachary Turner2016-09-211-1/+1
| | | | llvm-svn: 282117
* =delete the StringRef(nullptr_t) constructor.Zachary Turner2016-09-211-0/+2
| | | | | | | | It's a guaranteed crash if you construct a StringRef with nullptr, so might as well delete the constructor that allows it. llvm-svn: 282116
* [libFuzzer] more refactoring; don't compute sha1sum every time we mutate a ↵Kostya Serebryany2016-09-214-57/+53
| | | | | | unit from the corpus, use the stored one. llvm-svn: 282115
* [libFuzzer] more refactoringKostya Serebryany2016-09-2110-8/+13
| | | | llvm-svn: 282113
* Fix integer sign warning from r282105Ed Maste2016-09-211-1/+1
| | | | llvm-svn: 282112
* Fix -Wcovered-switch-default warning in StackFrame.cppEd Maste2016-09-211-2/+0
| | | | | | | | The switch coveres all possible values. If a new one is added in the future the compiler will start warning, providing a notification that the switch needs updating. llvm-svn: 282111
* [CMake] Initial support for LLDB.frameworkChris Bieneman2016-09-2111-40/+103
| | | | | | | | | | | | | | | | | | | Summary: This patch adds a CMake option LLDB_BUILD_FRAMEWORK, which builds libLLDB as a macOS framework instead of as a *nix shared library. With this patch any LLDB executable that has the INCLUDE_IN_FRAMEWORK option set will be built into the Framework's resources directory, and a symlink to the exeuctable will be placed under the build directory's bin folder. Creating the symlinks allows users to run commands from the build directory without altering the workflow. The framework generated by this patch passes the LLDB test suite, but has not been tested beyond that. It is not expected to be fully ready to ship, but it is a first step. With this patch binaries that are placed inside the framework aren't being properly installed. Fixing that would increase the patch size significantly, so I'd like to do that in a follow-up. Reviewers: zturner, tfiala Subscribers: beanz, lldb-commits, mgorny Differential Revision: https://reviews.llvm.org/D24749 llvm-svn: 282110
* [CMake] Pass CLANG_VERSION_* variables into later stagesChris Bieneman2016-09-211-0/+3
| | | | | | When supporting overriding clang versions we also need to pass those through to the next stage so they remain overridden. llvm-svn: 282109
* Add -Wignored-pragma-intrinsic flagAlbert Gutowski2016-09-213-2/+15
| | | | | | | | | | | | Summary: People might want to receive warnings about pragmas but not about intrinsics that are implemented in intrin.h. Reviewers: thakis, hans Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D24775 llvm-svn: 282108
* [asan] Reify ErrorGenericFilipe Cabecinhas2016-09-214-241/+276
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Finish work on PR30351 (last one, after D24551, D24552, and D24554 land) Also replace the old ReportData structure/variable with the current_error_ static member of the ScopedInErrorReport class. This has the following side-effects: - Move ASAN_ON_ERROR(); call to the start of the destructor, instead of in StartReporting(). - We only generate the error structure after the ScopedInErrorReport constructor finishes, so we can't call ASAN_ON_ERROR() during the constructor. I think this makes more sense, since we end up never running two of the ASAN_ON_ERROR() callback. This also works the same way as error reporting, since we end up having a lock around it. Otherwise we could end up with the ASAN_ON_ERROR() call for error 1, then the ASAN_ON_ERROR() call for error 2, and then lock the mutex for reporting error 1. - The __asan_get_report_* functions will be able to, in the future, provide information about other errors that aren't a "generic error". But we might want to rethink that API, since it's too restricted. Ideally we teach lldb about the current_error_ member of ScopedInErrorReport. Reviewers: vitalybuka, kcc, eugenis Subscribers: kubabrecka, llvm-commits Differential Revision: https://reviews.llvm.org/D24555 llvm-svn: 282107
* Provide vstore_half helper to workaround clc restrictionsJan Vesely2016-09-214-26/+75
| | | | | | clang won't accept half precision loads and stores without cl_khr_fp16 since r281904 llvm-svn: 282106
* add stop column highlighting supportTodd Fiala2016-09-2116-51/+341
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change introduces optional marking of the column within a source line where a thread is stopped. This marking will show up when the source code for a thread stop is displayed, when the debug info knows the column information, and if the optional column marking is enabled. There are two separate methods for handling the marking of the stop column: * via ANSI terminal codes, which are added inline to the source line display. The default ANSI mark-up is to underline the column. * via a pure text-based caret that is added in the appropriate column in a newly-inserted blank line underneath the source line in question. There are some new options that control how this all works. * settings set stop-show-column This takes one of 4 values: * ansi-or-caret: use the ANSI terminal code mechanism if LLDB is running with color enabled; if not, use the caret-based, pure text method (see the "caret" mode below). * ansi: only use the ANSI terminal code mechanism to highlight the stop line. If LLDB is running with color disabled, no stop column marking will occur. * caret: only use the pure text caret method, which introduces a newly-inserted line underneath the current line, where the only character in the new line is a caret that highlights the stop column in question. * none: no stop column marking will be attempted. * settings set stop-show-column-ansi-prefix This is a text format that indicates the ANSI formatting code to insert into the stream immediately preceding the column where the stop column character will be marked up. It defaults to ${ansi.underline}; however, it can contain any valid LLDB format codes, e.g. ${ansi.fg.red}${ansi.bold}${ansi.underline} * settings set stop-show-column-ansi-suffix This is the text format that specifies the ANSI terminal codes to end the markup that was started with the prefix described above. It defaults to: ${ansi.normal}. This should be sufficient for the common cases. Significant leg-work was done by Adrian Prantl. (Thanks, Adrian!) differential review: https://reviews.llvm.org/D20835 reviewers: clayborg, jingham llvm-svn: 282105
* Next set of additional error checks for invalid Mach-O files for bad LC_UUIDKevin Enderby2016-09-214-2/+12
| | | | | | | load commands. Added a missing check and made the check for more than one like other other “more than one” checks. And of course added test cases. llvm-svn: 282104
* Probably should add the breakpoint names test directory as well...Jim Ingham2016-09-213-0/+200
| | | | llvm-svn: 282103
* [asan] Store full AddressDescription objects in ErrorInvalidPointerPairFilipe Cabecinhas2016-09-212-7/+15
| | | | | | | | | | Reviewers: kcc, vitalybuka, eugenis Subscribers: kubabrecka, llvm-commits Differential Revision: https://reviews.llvm.org/D24777 llvm-svn: 282102
* [LoopInterchange] Track all dependencies, not just anti dependencies.Chad Rosier2016-09-212-50/+239
| | | | | | | | | | | | | | | | | Currently, we give up on loop interchange if we encounter a flow dependency anywhere in the loop list. Worse yet, we don't even track output dependencies. This patch updates the dependency matrix computation to track flow and output dependencies in the same way we track anti dependencies. This improves an internal workload by 2.2x. Note the loop interchange pass is off by default and it can be enabled with '-mllvm -enable-loopinterchange' Differential Revision: https://reviews.llvm.org/D24564 llvm-svn: 282101
* [ThinLTO] Emit files for distributed builds for all modulesTeresa Johnson2016-09-214-21/+77
| | | | | | | | | | | | | | | | | | | | With the new LTO API in r278338, we stopped emitting the individual index files and imports files for some modules in the distributed backend case (thinlto-index-only plugin option). Specifically, this is when the linker decides not to include a module in the link, because it was in an archive library and did not have a strong reference to it. Not creating the expected output files makes the distributed build system implementation more difficult, in terms of checking for the expected outputs of the thin link, and scheduling the backend jobs. To address this, the gold-plugin will write dummy empty .thinlto.bc and .imports files for modules not included in the link (which LTO never sees). Augmented a gold v1.12+ test, since that version of gold has the handling for notifying on modules not being included in the link. llvm-svn: 282100
* Implement ONLY_IF_RO/ONLY_IF_RW like bfd.Rafael Espindola2016-09-212-9/+36
| | | | | | | | | | The actual logic is to keep the output section if the output section would have been ro/rw. This is both simpler and more practical, as the intention is linker scripts is to always keep of of a pair of ONLY_IF_RO/ONLY_IF_RW. llvm-svn: 282099
* [MIRParser] Delete dead code. NFCI.Davide Italiano2016-09-211-12/+0
| | | | llvm-svn: 282098
* revert 281908 because 281909 got revertedNico Weber2016-09-212-81/+7
| | | | llvm-svn: 282097
* revert 282085, 281909, they broke 32-bit dynamic ASan and the ↵Nico Weber2016-09-218-74/+32
| | | | | | sanitizer-windows bot llvm-svn: 282096
* Remove obsolete XFAIL.Nico Weber2016-09-211-3/+0
| | | | | | The sanitizer-windows bot is currently red because this test unexpectedly passes. llvm-svn: 282095
* Fix typo in comment [NFC]Etienne Bergeron2016-09-211-1/+1
| | | | llvm-svn: 282092
* fix typo in comment [NFC]Etienne Bergeron2016-09-211-1/+1
| | | | llvm-svn: 282091
* Fix failing regex tests.Zachary Turner2016-09-211-1/+1
| | | | | | | | | | | r282079 converted the regular expression interface to accept and return StringRefs instead of char pointers. In one case a null pointer check was converted to an empty string check, but this was an incorrect conversion because an empty string is a valid regular expression. Removing this check should fix the test failures. llvm-svn: 282090
* [docs] Add ThinLTO user documentationTeresa Johnson2016-09-213-1/+165
| | | | | | | | | | | | Summary: Add some user facing documentation on ThinLTO and how to use it. Reviewers: mehdi_amini Subscribers: mehdi_amini, cfe-commits Differential Revision: https://reviews.llvm.org/D24806 llvm-svn: 282089
* Disable tail calls if there is an swifterror argumentArnold Schwaighofer2016-09-214-0/+41
| | | | | | | | | ISel does not handle them correctly yet i.e we crash trying to emit tail call code. radar://28407842 llvm-svn: 282088
* [LV] Don't emit unused scalars for uniform instructionsMatthew Simpson2016-09-213-52/+58
| | | | | | | | | | | | If we identify an instruction as uniform after vectorization, we know that we should only use the value corresponding to the first vector lane of each unroll iteration. However, when scalarizing such instructions, we still produce values for the other vector lanes. This patch prevents us from generating the unused scalars. Differential Revision: https://reviews.llvm.org/D24275 llvm-svn: 282087
* [AMDGPU][mc] Add support for ds_add_[rtn_]f32.Artem Tamazov2016-09-212-2/+20
| | | | | | | | | Lit tests added. Resolves https://github.com/RadeonOpenCompute/hcc/issues/122. Differential Revision: https://reviews.llvm.org/D24765 llvm-svn: 282086
* [compiler-rt] Fix Asan build on AndroidEtienne Bergeron2016-09-212-2/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: The dynamic shadow code is not detected correctly on Android. The android shadow seems to start at address zero. The bug is introduced here: https://reviews.llvm.org/D23363 Started here: https://build.chromium.org/p/chromium.fyi/builders/ClangToTAndroidASan/builds/4029 Likely due to an asan runtime change, filed https://llvm.org/bugs/show_bug.cgi?id=30462 From asan_mapping.h: ``` #if SANITIZER_WORDSIZE == 32 # if SANITIZER_ANDROID # define SHADOW_OFFSET (0) <<---- HERE # elif defined(__mips__) ``` Shadow address on android is 0. From asan_rtl.c: ``` if (shadow_start == 0) { [...] shadow_start = FindAvailableMemoryRange(space_size, alignment, granularity); } ``` We assumed that 0 is dynamic address. On windows, the address was determined with: ``` # elif SANITIZER_WINDOWS64 # define SHADOW_OFFSET __asan_shadow_memory_dynamic_address # else ``` and __asan_shadow_memory_dynamic_address is initially zero. Reviewers: rnk, eugenis, vitalybuka Subscribers: kcc, tberghammer, danalbert, kubabrecka, dberris, llvm-commits, chrisha Differential Revision: https://reviews.llvm.org/D24768 llvm-svn: 282085
* Change the basic block weight calculation algorithm to use max instead of ↵Dehao Chen2016-09-213-22/+14
| | | | | | | | | | | | | | voting. Summary: Now that we have more precise debug info, we should change back to use maximum to get basic block weight. Reviewers: dnovillo Subscribers: andreadb, llvm-commits Differential Revision: https://reviews.llvm.org/D24788 llvm-svn: 282084
* [LV] Rename "Width" to "Lane" (NFC)Matthew Simpson2016-09-211-6/+6
| | | | llvm-svn: 282083
* [AVX512] Fix return types on __builtin_ia32_gather3XivXdi builtinsCameron McInally2016-09-211-4/+4
| | | | | | | | | | | | The return types on the AVX512 __builtin_ia32_gather3XivXdi builtins are incorrect. The return type should match the type of the pass through vector. Differential Revision: https://reviews.llvm.org/D24785 -This line, and those below, will be ignored-- M include/clang/Basic/BuiltinsX86.def llvm-svn: 282082
* [AVX512] Fix return types on int_x86_avx512_gatherXXX_di intrinsicsCameron McInally2016-09-212-32/+32
| | | | | | | | The return type should match the pass through vector type. Differential Revision: https://reviews.llvm.org/D24744 llvm-svn: 282081
* Fix an inefficient StringRef conversion.Zachary Turner2016-09-211-3/+1
| | | | | | | Since the original object was already an llvm::SmallString<> there's no point calling c_str() first. llvm-svn: 282080
* Make lldb::Regex use StringRef.Zachary Turner2016-09-2149-192/+230
| | | | | | | | | | This updates getters and setters to use StringRef instead of const char *. I tested the build on Linux, Windows, and OSX and saw no build or test failures. I cannot test any BSD or Android variants, however I expect the required changes to be minimal or non-existant. llvm-svn: 282079
OpenPOWER on IntegriCloud