summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* [CodeGen] Disable the machine verifier on a ThinLTO testFrancis Visoiu Mistrih2018-10-301-0/+2
| | | | | | This allows us to turn the machine verifier on by default on X86. llvm-svn: 345591
* [clangd] Use thread pool for background indexing.Kadir Cetinkaya2018-10-304-7/+44
| | | | | | | | | | | | Reviewers: sammccall, ioeric Reviewed By: sammccall Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, jfb, cfe-commits Differential Revision: https://reviews.llvm.org/D53651 llvm-svn: 345590
* [llc] Error out when -print-machineinstrs is used with an unknown passFrancis Visoiu Mistrih2018-10-302-9/+23
| | | | | | | | We used to assert instead of reporting an error. PR39494 llvm-svn: 345589
* [llvm-size] Reject unknown radix valuesJames Henderson2018-10-301-4/+6
| | | | | | | | | | | | | | This addresses https://bugs.llvm.org/show_bug.cgi?id=39403 by making -radix an enumeration option with 8, 10, and 16 as the only accepted values. Reviewed by: jhenderson, MaskRay Differential Revision: https://reviews.llvm.org/D53799 Patch by Eugene Sharygin llvm-svn: 345588
* [FIX][AArch64] Add support for UDF instructionDiogo N. Sampaio2018-10-302-26/+8
| | | | | | | Fix wrong test files submited in rL345581 llvm-svn: 345587
* Cleanup includes in sanitizer_platform_limits_netbsd.ccKamil Rytarowski2018-10-301-105/+119
| | | | | | | | Sort the headers more correctly according to NetBSD style. Prevent in this code part clang-format, as shuffling the order will cause build failures. llvm-svn: 345586
* [SROA] Use offset sizes from the DataLayout instead of the pointer siezes.Nicola Zaghen2018-10-302-6/+35
| | | | | | | | | | This fixes an assertion when constant folding a GEP when the part of the offset was in i32 (IndexSize, as per DataLayout) and part in the i64 (PointerSize) in the newly created test case. Differential Revision: https://reviews.llvm.org/D52609 llvm-svn: 345585
* [X86][BMI1] X86DAGToDAGISel: select BEXTR from x & (-1 >> (32 - y)) patternRoman Lebedev2018-10-302-58/+40
| | | | | | | | | | | | | | | | | | | | | Summary: The final pattern. There is no test changes: * We are looking for the pattern with one-use of it's mask, * If the mask is one-use, D48768 will unfold it into pattern d. * Thus, the tests have extra-use on the mask. * Thus, only the BMI2 BZHI can be tested, and it already worked. * So there is no BMI1 test coverage, we just assume it works since it uses the same codepath. Reviewers: craig.topper, RKSimon Reviewed By: RKSimon Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D53575 llvm-svn: 345584
* [X86] Add extra-uses on the mask of pattern c of extract-{low,}bits.ll testsRoman Lebedev2018-10-302-609/+2087
| | | | | | | | | | | | | | | | Summary: Because of the D48768, that pattern is always unfolded into pattern d, thus we had no test coverage. Reviewers: RKSimon, craig.topper Reviewed By: craig.topper Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D53574 llvm-svn: 345583
* Regenerate syscall hooks for NetBSD 8.99.25Kamil Rytarowski2018-10-302-45/+39
| | | | | | | | | | Register new syscall getsockopt2. Drop removed syscalls pmc_get_info and pmc_control. While there address compiler warnings about potentially unused variables. llvm-svn: 345582
* [AArch64] Add support for UDF instructionDiogo N. Sampaio2018-10-305-10/+81
| | | | | | | | | | | | | | | | Summary: Add support for AArch64 UDF instruction. UDF - Permanently Undefined generates an Undefined Instruction exception (ESR_ELx.EC = 0b000000). Reviewers: DavidSpickett, javed.absar, t.p.northover Reviewed By: javed.absar Subscribers: nhaehnle, kristof.beyls Differential Revision: https://reviews.llvm.org/D53319 llvm-svn: 345581
* Update generate_netbsd_syscalls.awk for NetBSD 8.99.25Kamil Rytarowski2018-10-301-8/+4
| | | | | | | | | | Register new syscall getsockopt2. Drop removed syscalls pmc_get_info and pmc_control. While there address compiler warnings about potentially unused variables. llvm-svn: 345580
* [ELF][PPC64]Workaround bogus Visual Studio build warningJames Henderson2018-10-301-1/+2
| | | | | | | | | | | | | | | | | Visual Studio has a bug where it converts the integer literal 2147483648 into an unsigned int instead of a long long (i.e. it follows C89 rules). The bug has been reported as: https://developercommunity.visualstudio.com/content/problem/141813/-2147483648-c4146-error.html. Because of this bug, we were getting a signed/unsigned comparison warning in VS2015 from the old code (the subsequent unary negation had no effect on the type). Reviewed by: sfertile Differential Revision: https://reviews.llvm.org/D53821 llvm-svn: 345579
* [SelectionDAG] Add FoldBUILD_VECTOR to simplify new BUILD_VECTOR nodesSimon Pilgrim2018-10-305-174/+88
| | | | | | | | | | Similar to FoldCONCAT_VECTORS, this patch adds FoldBUILD_VECTOR to simplify cases that can avoid the creation of the BUILD_VECTOR - if all the operands are UNDEF or if the BUILD_VECTOR simplifies to a copy. This exposed an assumption in some AMDGPU code that getBuildVector was guaranteed to be a BUILD_VECTOR node that I've tried to handle. Differential Revision: https://reviews.llvm.org/D53760 llvm-svn: 345578
* [x86] Fix issues with a realigned stack in MSVC compiled applicationsAleksandr Urakov2018-10-308-150/+484
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This patch fixes issues with a stack realignment. MSVC maintains two frame pointers (`ebx` and `ebp`) for a realigned stack - one is used for access to function parameters, while another is used for access to locals. To support this the patch: - adds an alternative frame pointer (`ebx`); - considers stack realignment instructions (e.g. `and esp, -32`); - along with CFA (Canonical Frame Address) which point to the position next to the saved return address (or to the first parameter on the stack) introduces AFA (Aligned Frame Address) which points to the position of the stack pointer right after realignment. AFA is used for access to registers saved after the realignment (see the test); Here is an example of the code with the realignment: ``` struct __declspec(align(256)) OverAligned { char c; }; void foo(int foo_arg) { OverAligned oa_foo = { 1 }; auto aaa_foo = 1234; } void bar(int bar_arg) { OverAligned oa_bar = { 2 }; auto aaa_bar = 5678; foo(1111); } int main() { bar(2222); return 0; } ``` and here is the `bar` disassembly: ``` push ebx mov ebx, esp sub esp, 8 and esp, -100h add esp, 4 push ebp mov ebp, [ebx+4] mov [esp+4], ebp mov ebp, esp sub esp, 200h mov byte ptr [ebp-200h], 2 mov dword ptr [ebp-4], 5678 push 1111 ; foo_arg call j_?foo@@YAXH@Z ; foo(int) add esp, 4 mov esp, ebp pop ebp mov esp, ebx pop ebx retn ``` Reviewers: labath, zturner, jasonmolenda, stella.stamenova Reviewed By: jasonmolenda Subscribers: abidh, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D53435 llvm-svn: 345577
* Remove trailing space from clang/Basic/LangOptions.hTakuto Ikuta2018-10-301-2/+2
| | | | llvm-svn: 345576
* [DAGCombiner] Improve X div/rem Y fold if single bit element typeDavid Bolvansky2018-10-3010-940/+62
| | | | | | | | | | | | | | Summary: Tests by @spatel, thanks Reviewers: spatel, RKSimon Reviewed By: spatel Subscribers: sdardis, atanasyan, llvm-commits, spatel Differential Revision: https://reviews.llvm.org/D52668 llvm-svn: 345575
* Handle pthread_sigmask in DemangleFunctionName()Kamil Rytarowski2018-10-301-0/+2
| | | | | | Translate __libc_thr_sigsetmask to pthread_sigmask on NetBSD. llvm-svn: 345574
* [OPENMP] Fix for "error: unused variable 'CED'"Bjorn Pettersson2018-10-301-1/+1
| | | | | | Quick fix to make code compile with -Werror,-Wunused-variable. llvm-svn: 345573
* Drop now hidden ioctl(2) operations for NetBSDKamil Rytarowski2018-10-301-11/+7
| | | | | | POWER_IOC_GET_TYPE_WITH_LOSSAGE is no longer accessible from userland. llvm-svn: 345572
* Handle NetBSD symbol mangling for tzsetKamil Rytarowski2018-10-301-0/+1
| | | | | | | | Native code generated on NetBSD mangles tzet to __tzset50. Handle this accordingly in MSan. llvm-svn: 345571
* Handle NetBSD symbol mangling for nanosleep and vforkKamil Rytarowski2018-10-301-0/+2
| | | | | | | | | | | | | | | | | | | | | | Summary: Native code generated on NetBSD mangles: - vfork into __vfork14 - nanosleep into __nanosleep50 Handle this accordingly in TSan. Reviewers: vitalybuka, dvyukov, joerg Reviewed By: vitalybuka Subscribers: kubamracek, llvm-commits, #sanitizers, mgorny Tags: #sanitizers Differential Revision: https://reviews.llvm.org/D53806 llvm-svn: 345570
* Utility: fix cross-compilation from Linux to WindowsSaleem Abdulrasool2018-10-301-1/+3
| | | | | | | | Only attempt to link against Backtrace if it is found. Without this, trying to cross-compile to Windows would try to link against "Backtrace_LIBRARY-NOTFOUND.lib". llvm-svn: 345569
* [XRay] Migrate FDR runtime to use refactored controllerDean Michael Berris2018-10-303-650/+238
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This change completes the refactoring of the FDR runtime to support the following: - Generational buffer management. - Centralised and well-tested controller implementation. In this change we've had to: - Greatly simplify the code in xray_fdr_logging.cc to only implement the glue code for calling into the controller. - Implement the custom and typed event logging functions in the FDRLogWriter. - Imbue the `XRAY_NEVER_INSTRUMENT` attribute onto all functions in the controller implementation. Reviewers: mboerger, eizan, jfb Subscribers: jfb, llvm-commits Differential Revision: https://reviews.llvm.org/D53858 llvm-svn: 345568
* [LegalizeTypes] Teach PromoteIntRes_BITCAST to better handle a bitcast with ↵Craig Topper2018-10-303-17/+27
| | | | | | | | | | | | | | | | vector output type and a vector input type that needs to be widened Summary: Previously if we had a bitcast vector output type that needs promotion and a vector input type that needs widening we would just do a stack store and load to handle the conversion. We can do a little better if we can widen the bitcast to a legal vector type the same size as the widened input type. Then we can do the bitcast between this widened type and the widened input type. Afterwards we can extract_subvector back to the original output and any_extend that. Type legalization will then circle back and handle promotion of the extract_subvector and the any_extend will just be removed. This will avoid going through the stack and allows us to remove a custom version of this legalization from X86. Reviewers: efriedma, RKSimon Reviewed By: efriedma Subscribers: javed.absar, llvm-commits Differential Revision: https://reviews.llvm.org/D53229 llvm-svn: 345567
* [AArch64] Add test case for D53229. NFCCraig Topper2018-10-301-0/+31
| | | | llvm-svn: 345566
* [X86] Cleanup the code in LowerFABSorFNEG and LowerFCOPYSIGN a little. NFCCraig Topper2018-10-301-30/+20
| | | | | | Use SelectionDAG::EVTToAPFloatSemantics. Make the LogicVT calculation in LowerFABSorFNEG similar to LowerFCOPYSIGN. Use APInt::getSignedMaxValue instead of ~APInt::getSignMask. llvm-svn: 345565
* [X86] Stop changing f128 fand/for/fxor to v2i64.Craig Topper2018-10-302-21/+38
| | | | | | The additional patterns don't cost us much and it seems better than changing element widths. llvm-svn: 345564
* [lldb-mi] Implement -gdb-set breakpoint pending on/offMarc-Andre Laperle2018-10-309-3/+163
| | | | | | | | | | | | | | | | | | Summary: This allows creating pending breakpoint automatically when a location is not found. This is used by some front-ends instead of doing "-break-insert -f" every time. See also https://sourceware.org/gdb/onlinedocs/gdb/Set-Breaks.html Signed-off-by: Marc-Andre Laperle <malaperle@gmail.com> Subscribers: MaskRay, llvm-commits, lldb-commits, ki.stfu Tags: #lldb Differential Revision: https://reviews.llvm.org/D52953 llvm-svn: 345563
* PR23833, DR2140: an lvalue-to-rvalue conversion on a glvalue of typeRichard Smith2018-10-3010-20/+81
| | | | | | | | | nullptr_t does not access memory. We now reuse CK_NullToPointer to represent a conversion from a glvalue of type nullptr_t to a prvalue of nullptr_t where necessary. llvm-svn: 345562
* Unify definition of _LIBCPP_BEGIN/END_NAMESPACE_STDEric Fiselier2018-10-301-35/+19
| | | | llvm-svn: 345561
* AMDGPU: Remove custom BUILD_VECTOR combineMatt Arsenault2018-10-304-52/+33
| | | | | | | This was looping in a testcase and removing it now slightly improves a test. llvm-svn: 345560
* AMDGPU: Use scavengeRegisterBackwardsMatt Arsenault2018-10-303-46/+51
| | | | llvm-svn: 345559
* [analyzer] Allow padding checker to traverse simple class hierarchiesAlexander Shaposhnikov2018-10-302-8/+58
| | | | | | | | | | | | | | | The existing padding checker skips classes that have any base classes. This patch allows the checker to traverse very simple cases: classes that have no fields and have exactly one base class. This is important mostly in the case of array declarations. Patch by Max Bernstein! Test plan: make check-all Differential revision: https://reviews.llvm.org/D53206 llvm-svn: 345558
* [ubsan-minimal] update comments in CMakeLists.txtVitaly Buka2018-10-301-5/+3
| | | | | | | | | | | | | | | | | Summary: Prepend minimal when UBsan is mentioned and delete a dead comment Patch by Igor Sugak Reviewers: eugenis, pcc Reviewed By: eugenis Subscribers: mgorny, llvm-commits, #sanitizers Differential Revision: https://reviews.llvm.org/D53826 llvm-svn: 345557
* [sanitizer] Move interceptor initialization check into real_clock_gettimeVitaly Buka2018-10-302-5/+4
| | | | | | | | | | Reviewers: cryptoad, kubamracek Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D53777 llvm-svn: 345556
* Remove dead declarationMatt Arsenault2018-10-301-7/+0
| | | | llvm-svn: 345555
* Fix typos in commentMatt Arsenault2018-10-301-3/+3
| | | | llvm-svn: 345554
* Pass TRI to printRegMatt Arsenault2018-10-301-1/+1
| | | | llvm-svn: 345553
* [CMake][Fuchsia] Drop the LIBCXX_HIDE_FROM_ABI_PER_TU_BY_DEFAULTPetr Hosek2018-10-291-4/+0
| | | | | | | | | Now that libc++ uses __exclude_from_explicit_instantiation__ attribute, this is no longer needed. Differential Revision: https://reviews.llvm.org/D53839 llvm-svn: 345552
* [compiler-rt][builtins] Don't #include CoreFoundation in os_version_check.cErik Pilkington2018-10-291-8/+33
| | | | | | | | | | This breaks some configurations, so just forward declare everything that we need. rdar://35943793 Differential revision: https://reviews.llvm.org/D50269 llvm-svn: 345551
* [builtins] Fix -Wunused-local-typedef warning in compile time assertsReid Kleckner2018-10-291-1/+1
| | | | | | | Use the __attribute__ spellings when compiling with clang-cl so that __attribute__((unused)) expands to something. llvm-svn: 345550
* Remove unneeded friend declarations that clang-cl warns onReid Kleckner2018-10-292-4/+0
| | | | llvm-svn: 345549
* [AliasSetTracker] Cleanup addPointer interface. [NFCI]Alina Sbirlea2018-10-292-12/+7
| | | | | | | | | | | | | | Summary: Attempting to simplify the addPointer interface. Currently there's code decomposing a MemoryLocation into (Ptr, Size, AAMDNodes) only to recreate the MemoryLocation inside the call. Reviewers: reames, mkazantsev Subscribers: sanjoy, jlebar, llvm-commits Differential Revision: https://reviews.llvm.org/D53836 llvm-svn: 345548
* [CMake] When built with LLVM, not use `-Wl,-z,defs`Petr Hosek2018-10-291-0/+1
| | | | | | | | | | This matches standalone build behavior. PR28681 Differential Revision: https://reviews.llvm.org/D53686 Patch By: tabloid.adroit llvm-svn: 345547
* [DWARF][NFC] Refactor range list extraction and dumpingWolfgang Pieb2018-10-2915-398/+394
| | | | | | | | | | | | | | | | | The purpose of this patch is twofold: - Fold pre-DWARF v5 functionality into v5 to eliminate the need for 2 different versions of range list handling. We get rid of DWARFDebugRangelist{.cpp,.h}. - Templatize the handling of range list tables so that location list handling can take advantage of it as well. Location list and range list tables have the same basic layout. A non-NFC version of this patch was previously submitted with r342218, but it caused errors with some TSan tests. This patch has no functional changes. The difference to the non-NFC patch is that there are no changes to rangelist dumping in this patch. Differential Revision: https://reviews.llvm.org/D53545 llvm-svn: 345546
* [ASTImporter] Reorder fields after structure import is finishedAleksei Sidorin2018-10-292-4/+55
| | | | | | | | | | | | There are multiple reasons why field structures can be imported in wrong order. The simplest is the ability of field initializers and method bodies to refer fields not in order they are listed in. Unfortunately, there is no clean solution for that currently so I'm leaving a FIXME. Differential Revision: https://reviews.llvm.org/D44100 llvm-svn: 345545
* [llvm-objcopy] Move elf-specific code into subfolderAlexander Shaposhnikov2018-10-296-472/+540
| | | | | | | | | | | In this diff the elf-specific code is moved into the subfolder ELF (and factored out from llvm-objcopy.cpp). Test plan: make check-all Differential revision: https://reviews.llvm.org/D53790 llvm-svn: 345544
* Add parens to fix incorrect assert check.Erich Keane2018-10-291-1/+1
| | | | | | | | && has higher priority than ||, so this assert works really oddly. Add parens to match the programmer's intent. Change-Id: I3abe1361ee0694462190c5015779db664012f3d4 llvm-svn: 345543
* AMDGPU: Enable code object v3 by defaultKonstantin Zhuravlyov2018-10-2944-180/+195
| | | | | | Differential Revision: https://reviews.llvm.org/D53525 llvm-svn: 345542
OpenPOWER on IntegriCloud