summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* [clang] [ToolChains/NetBSD] Support relative libc++ header pathMichal Gorny2019-03-031-2/+18
| | | | | | | | | | | | | | | | | | | Support locating the libc++ header files relatively to the clang executable, in addition to the default system path. This is meant to cover two use cases: running just-built clang from the install directory, and running installed clang from non-standard location (e.g. /usr/local). This is the first step towards ensuring that tests of more LLVM projects can work out-of-the-box within the build tree, and use the correct set of headers (rather than e.g. mixing just-built clang+libcxx with system install of libcxx). It avoids requiring the user to hack around missing include paths, or LLVM build system to replicate system-specific C++ library defaults in order to append appropriate paths implicitly. Differential Revision: https://reviews.llvm.org/D58592 llvm-svn: 355282
* [X86] Prefer VPBLENDD for v2i64/v4i64 blends with AVX2.Craig Topper2019-03-0310-83/+207
| | | | | | | | We were using VPBLENDW for v2i64 and VBLENDPD for v4i64. VPBLENDD has better throughput than VPBLENDW on some CPUs so it makes sense to use it when possible. VBLENDPD will probably become VBLENDD during execution domain fixing, but we might as well use integer in isel while we can. This should work around some issues with the domain fixing pass prefering PBLENDW when we start with PBLENDW. There may still be some v8i16 cases that could use PBLENDD. llvm-svn: 355281
* Tweak r355278 for compatibility with gcc 6 and earlier.James Y Knight2019-03-021-1/+1
| | | | llvm-svn: 355280
* Tweak r355278 for compatibility with gcc 6 and earlier.James Y Knight2019-03-021-2/+2
| | | | llvm-svn: 355279
* Make the new SanitizerMask code added in r355190 constexpr.James Y Knight2019-03-022-65/+53
| | | | | | | | | | | | | | | | | | | | | | | Then, as a consequence, remove the complex set of workarounds for initialization order -- which are apparently not 100% reliable. The only downside is that some of the member functions are now specific to kNumElem == 2, and will need to be updated if that constant is increased in the future. Unfortunately, the current code caused an initialization-order runtime failure for me in some compilation modes. It appears that in a toolchain without init-array enabled, the order of initialization of static data members of a template can be reversed w.r.t. the order within a file. This caused e.g. SanitizerKind::CFI to be initialized to 0. I'm not quite sure if that is an allowable ordering variation, or nonconforming behavior, but in any case, making everything constexpr eliminates the possibility of such an issue. llvm-svn: 355278
* Add test case for add to sub transformation. NFCAmaury Sechet2019-03-021-0/+27
| | | | llvm-svn: 355277
* Reinstate UNSUPPORTED: linux on stop-hook-threads.testPavel Labath2019-03-021-0/+1
| | | | | | | | This stanza was removed in r355213, but it seems that patch did not fully fix the problem, as the test still fails sporadically (particularly under heavy load) on linux. llvm-svn: 355276
* gn build: Add a cfi/sources target.Nico Weber2019-03-021-0/+8
| | | | | | | | This build target is currently unused, but after r355144 the sync script started complaining about cfi.cpp not being listed, and this makes the script happy again. llvm-svn: 355275
* [lldb] [lit] Pass -pthread on NetBSD as wellMichal Gorny2019-03-021-1/+1
| | | | llvm-svn: 355274
* [lldb] [lldbtest] Fix getBuildFlags() not to use libstdc++ on NetBSDMichal Gorny2019-03-021-1/+2
| | | | | | | | | | Remove the code forcing -stdlib=libstdc++ on NetBSD in getBuildFlags() method. NetBSD uses libc++ everywhere else, and using libstdc++ here causes lang/cpp/dynamic-value to fail to build. Differential Revision: https://reviews.llvm.org/D58871 llvm-svn: 355273
* [InstCombine] move add after smin/smaxSanjay Patel2019-03-022-39/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Follow-up to rL355221. This isn't specifically called for within PR14613, but we'll get there eventually if it's not already requested in some other bug report. https://rise4fun.com/Alive/5b0 Name: smax Pre: WillNotOverflowSignedSub(C1,C0) %a = add nsw i8 %x, C0 %cond = icmp sgt i8 %a, C1 %r = select i1 %cond, i8 %a, i8 C1 => %c2 = icmp sgt i8 %x, C1-C0 %u2 = select i1 %c2, i8 %x, i8 C1-C0 %r = add nsw i8 %u2, C0 Name: smin Pre: WillNotOverflowSignedSub(C1,C0) %a = add nsw i32 %x, C0 %cond = icmp slt i32 %a, C1 %r = select i1 %cond, i32 %a, i32 C1 => %c2 = icmp slt i32 %x, C1-C0 %u2 = select i1 %c2, i32 %x, i32 C1-C0 %r = add nsw i32 %u2, C0 llvm-svn: 355272
* [InstCombine] add tests for add+smin/smax; NFCSanjay Patel2019-03-021-0/+266
| | | | llvm-svn: 355271
* Fix gcc build for r355249Pavel Labath2019-03-021-1/+1
| | | | | | | automatic move should not fire when returning type T in a function with result type Expected<T>. Some compilers seem to allow that nonetheless. llvm-svn: 355270
* Add test case for add to sub transformation. NFCAmaury Sechet2019-03-021-0/+30
| | | | llvm-svn: 355269
* Fix update_mir_test_checks.py to run on python3Simon Pilgrim2019-03-021-1/+3
| | | | | | | | Split off from D58817 Differential Revision: https://reviews.llvm.org/D58820 llvm-svn: 355268
* Use SDValue::getConstantOperandAPInt helper where possible. NFCI.Simon Pilgrim2019-03-022-7/+4
| | | | llvm-svn: 355267
* [clang-format] clang-format off/on not respected when using C Style commentsPaul Hoad2019-03-022-2/+40
| | | | | | | | | | | | | | | | | | | Summary: If the clang-format on/off is in a /* comment */ then the sorting of headers is not ignored PR40901 - https://bugs.llvm.org/show_bug.cgi?id=40901 Reviewers: djasper, klimek, JonasToth, krasimir, alexfh Reviewed By: alexfh Subscribers: alexfh, cfe-commits, llvm-commits Tags: #clang, #clang-tools-extra Differential Revision: https://reviews.llvm.org/D58819 llvm-svn: 355266
* [Transforms] fix typo in test case. NFC.Xing GUO2019-03-021-1/+1
| | | | llvm-svn: 355265
* [Codegen] fix typos in test caseXing GUO2019-03-023-5/+5
| | | | llvm-svn: 355264
* [WebAssembly] Fix crash when __wasm_call_ctor is GCd in programs containing ↵Sam Clegg2019-03-022-0/+51
| | | | | | | | | | | | static init/fini Subscribers: dschuff, jgravelle-google, aheejin, sunfish, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D58864 llvm-svn: 355263
* [llvm-objdump] Should print unknown d_tag in hex formatXing GUO2019-03-024-14/+10
| | | | | | | | | | | | | | | | | | Summary: Currently, `llvm-objdump` prints "unknown" instead of d_tag value in hex format. Because getDynamicTagAsString returns "unknown" rather than empty string. Reviewers: grimar, jhenderson Reviewed By: jhenderson Subscribers: rupprecht, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D58763 llvm-svn: 355262
* [WebAssembly] Expand operations not supported by SIMDThomas Lively2019-03-022-0/+467
| | | | | | | | | | | | | | | | | | Summary: This prevents crashes in instruction selection when these operations are used. The tests check that the scalar version of the instruction is used where applicable, although some expansions do not use the scalar version. Reviewers: aheejin Subscribers: dschuff, sbc100, jgravelle-google, hiraditya, sunfish, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D58859 llvm-svn: 355261
* [X86] Improve use of SHLD/SHRDAmaury Sechet2019-03-023-25/+15
| | | | | | | | | | | | | | | Summary: This extends the variety of pattern that can generate a SHLD instead of using two shifts. This fixes a regression that would be introduced by D57367 or D33587 Reviewers: RKSimon, craig.topper Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D57389 llvm-svn: 355260
* [SCEV] Handle case where MaxBECount is less precise than ExactBECount for OR.Florian Hahn2019-03-023-20/+57
| | | | | | | | | | | | | | | | | | | | | | | | In some cases, MaxBECount can be less precise than ExactBECount for AND and OR (the AND case was PR26207). In the OR test case, both ExactBECounts are undef, but MaxBECount are different, so we hit the assertion below. This patch uses the same solution the AND case already uses. Assertion failed: ((isa<SCEVCouldNotCompute>(ExactNotTaken) || !isa<SCEVCouldNotCompute>(MaxNotTaken)) && "Exact is not allowed to be less precise than Max"), function ExitLimit This patch also consolidates test cases for both AND and OR in a single test case. Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=13245 Reviewers: sanjoy, efriedma, mkazantsev Reviewed By: sanjoy Differential Revision: https://reviews.llvm.org/D58853 llvm-svn: 355259
* Add test case for truncate funnel shifts. NFCAmaury Sechet2019-03-022-0/+62
| | | | llvm-svn: 355258
* [SCEV] Remove undef check for SCEVConstant (NFC)Florian Hahn2019-03-021-2/+0
| | | | | | | | | | | | | The value stored in SCEVConstant is of type ConstantInt*, which can never be UndefValue. So we should never hit that code. Reviewers: mkazantsev, sanjoy Reviewed By: sanjoy Differential Revision: https://reviews.llvm.org/D58851 llvm-svn: 355257
* Revert "[sanitizer] Fix return type of __bzero and __aeabi_mem* interceptors."Evgeniy Stepanov2019-03-024-87/+65
| | | | | | | | | Breaks TSan on Mac, which does return REAL(func)(... in COMMON_INTERCEPTOR_ENTER, which is not OK when REAL(func) has return type of void. llvm-svn: 355256
* Revert "[DWARFFormValue] Cleanup DWARFFormValue interface. (2/2) (NFC)"Vlad Tsyrklevich2019-03-026-42/+52
| | | | | | This reverts commit r355233, it was causing UBSan failures. llvm-svn: 355255
* Revert "[WebAssembly][WIP] Expand operations not supported by SIMD"Thomas Lively2019-03-021-17/+0
| | | | | | This was accidentally committed without tests or review. llvm-svn: 355254
* lib/Header: Simplify CMakeLists.txtTom Stellard2019-03-021-39/+30
| | | | | | | | | | | | | | | | | | | | | | | Summary: Replace cut and pasted code with cmake macros and reduce the number of install commands. This fixes an issue where the headers were being installed twice. This clean up should also make future modifications easier, like adding a cmake option to install header files into a custom resource directory. Reviewers: chandlerc, smeenai, mgorny, beanz, phosek Reviewed By: smeenai Subscribers: cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D58537 llvm-svn: 355253
* [ProfileData] Sort FuncData before iteration to remove non-determinismMandeep Singh Grang2019-03-021-6/+22
| | | | | | | | | | | | | | Reviewers: rsmith, bogner, dblaikie Reviewed By: dblaikie Subscribers: Hahnfeld, jdoerfert, vsk, dblaikie, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D57986 llvm-svn: 355252
* Revert "Revert "[sanitizers] Don't use Windows Trace Logging on MinGW""Vlad Tsyrklevich2019-03-022-3/+15
| | | | | | | This reverts my orignal revert in r355250, I misread the buildbot logs. Volodymyr's commit in r355244 fixed the build. llvm-svn: 355251
* Revert "[sanitizers] Don't use Windows Trace Logging on MinGW"Vlad Tsyrklevich2019-03-022-15/+3
| | | | | | | This reverts commits r355236 and r355244, they broke the Linux sanitizer build. llvm-svn: 355250
* [Reproducers] Capture and replay interpreter commands.Jonas Devlieghere2019-03-0211-35/+207
| | | | | | | | | | | | | | | | | This patch adds the necessary logic to capture and replay commands entered into the command interpreter. A DataRecorder shadows the input and writes its data to a know file. During replay this file is used as the command interpreter's input. It's possible to the command interpreter more than once, with a different input source. We support this scenario by using multiple buffers. The synchronization for this takes place at the SB layer, where we create a new recorder every time the debugger input is changed. During replay we use the corresponding buffer as input. Differential revision: https://reviews.llvm.org/D58564 llvm-svn: 355249
* [WebAssembly] Temporarily disable bulk-memory with -pthreadThomas Lively2019-03-023-35/+5
| | | | | | | | | | | | | | | | | | | Summary: To prevent the instability of bulk-memory in the wasm backend from blocking separate pthread testing, temporarily remove the logic that adds -mbulk-memory in the presence of -pthread. Since browsers will ship bulk memory before or alongside threads, this change will be reverted as soon as bulk memory has stabilized in the backend. Reviewers: sbc100 Subscribers: dschuff, jgravelle-google, aheejin, sunfish, jfb, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D58854 llvm-svn: 355248
* [WebAssembly][WIP] Expand operations not supported by SIMDThomas Lively2019-03-021-0/+17
| | | | llvm-svn: 355247
* [llvm] Fix typo: 's/analsyis/analysis/' [NFC]Mandeep Singh Grang2019-03-021-1/+1
| | | | llvm-svn: 355246
* [tblgen] Track CodeInit origins when possibleDaniel Sanders2019-03-024-11/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Add an SMLoc to CodeInit that records the source line it originated from. This allows tablegen to point precisely at portions of code when reporting errors within the CodeInit. For example, in the upcoming GlobalISel combiner, it can report undefined expansions and point at the instance of the expansion. This is achieved using something like: SMLoc::getFromPointer(SMLoc::getPointer() + (StringRef - CodeInit::getValue())) The location is lost when producing a CodeInit by string concatenation so a fallback SMLoc is required (e.g. the Record::getLoc()) but that's pretty rare for CodeInits. There's a reasonable case for extending tracking of a couple other Init objects, for example StringInit's are often parsed and it would be good to point inside the string when reporting errors about that. However, location tracking also harms de-duplication. This is fine for CodeInit where there's only a few hundred of them (~160 for X86) and it may be worth it for StringInit (~86k up to ~1.9M for roughly 15MB increase for X86). However the origin tracking would be a _terrible_ idea for IntInit, BitInit, and UnsetInit. I haven't measured either of those three but BitInit would most likely be on the order of increasing the current 2 BitInit values up to billions. Reviewers: volkan, aditya_nandakumar, bogner, paquette, aemerson Reviewed By: paquette Subscribers: javed.absar, kristof.beyls, dexonsmith, llvm-commits, kristina Tags: #llvm Differential Revision: https://reviews.llvm.org/D58141 llvm-svn: 355245
* [sanitizers] Fix build on macOS with LogFullErrorReport redefinition error.Volodymyr Sapsai2019-03-021-1/+1
| | | | | | | | | | | | | | | | macOS has implementation of LogFullErrorReport and INLINE void LogFullErrorReport(const char *buffer) {} was causing > compiler-rt/lib/sanitizer_common/sanitizer_mac.cc:658:6: error: redefinition of 'LogFullErrorReport' Fixup for r355236. rdar://problem/48526020 llvm-svn: 355244
* llvm-dwarfdump: Add new variable, parameter and inlining statistics; also ↵Caroline Tice2019-03-014-22/+1360
| | | | | | | | | | | | | function source location statistics. Add statistics for abstract origins, function, variable and parameter locations; break the 'variable' counts down into variables and parameters. Also update call site counting to check for DW_AT_call_{file,line} in addition to DW_TAG_call_site. Differential revision: https://reviews.llvm.org/D58849 llvm-svn: 355243
* [NFC][Sanitizer] Replace last uses of old Unwind APIJulian Lettner2019-03-012-25/+24
| | | | | | | | | | | | | Replace remaining uses of old Unwind API in unit tests. Allows us to remove the old API and WillUseFastUnwind can be made private. Reviewed By: vitalybuka Differential Revision: https://reviews.llvm.org/D58754 llvm-svn: 355242
* [libc++abi] Specify unwind lib before other system libraries when linkingLouis Dionne2019-03-011-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | This matters on OSX because static linking orders is also the order dyld uses to search for libs (the default - Two-level namespace). If system libs (including unwind lib) are specified before local unwind lib, local unwind lib would never be picked up by dyld. Before: $ otool -L lib/libc++abi.dylib @rpath/libc++abi.1.dylib (compatibility version 1.0.0, current version 1.0.0) /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1252.200.5) @rpath/libunwind.1.dylib (compatibility version 1.0.0, current version 1.0.0) After: $ otool -L lib/libc++abi.dylib @rpath/libc++abi.1.dylib (compatibility version 1.0.0, current version 1.0.0) @rpath/libunwind.1.dylib (compatibility version 1.0.0, current version 1.0.0) /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1252.200.5) Thanks to Yuanfang Chen for the patch. Differential Revision: https://reviews.llvm.org/D57496 llvm-svn: 355241
* [WebAssebmly] Allow __wasm_call_ctors to be GC'edSam Clegg2019-03-0129-479/+239
| | | | | | Differential Revision: https://reviews.llvm.org/D58806 llvm-svn: 355240
* [NFC][Sanitizer] Test unexpectedly passes on ppc64be botJulian Lettner2019-03-011-1/+1
| | | | llvm-svn: 355239
* Delete commented-out code.Adrian Prantl2019-03-011-6/+0
| | | | llvm-svn: 355238
* [CMake] Don't use llvm_replace_compiler_optionMartin Storsjo2019-03-011-3/+7
| | | | | | | | | | | | | | Building compiler-rt standalone outside of the main llvm tree is supported, and in this case, the llvm cmake modules are unavailable. (And even if they are available, it requires including LLVMProcessSources.cmake, which currently isn't included.) This fixes building compiler-rt standalone with MSVC/clang-cl. Differential Revision: https://reviews.llvm.org/D58767 llvm-svn: 355237
* [sanitizers] Don't use Windows Trace Logging on MinGWMartin Storsjo2019-03-012-3/+15
| | | | | | | | | | | | | | | | | | | mingw-w64 currently is lacking the headers for this feature. Make the include lowercase at the same time. We consistently use lowercase for windows header includes, as windows itself is case insensitive, the SDK headers (in general, not necessarily considering this particular header) aren't consistent among themselves about what the proper canonical capitalization for headers are, and MinGW uses all lowercase names for the headers (as it is often used on case sensitive filesystems). In case mingw-w64 later gets this header, we can revert this (but keep the include lowercased). Differential Revision: https://reviews.llvm.org/D58765 llvm-svn: 355236
* Try to fix Windows bots after r355226.Paul Robinson2019-03-011-1/+2
| | | | | | Windows has two path separator characters. llvm-svn: 355235
* [NFC][Sanitizer][Windows] Fix refactoring oversightJulian Lettner2019-03-011-1/+1
| | | | | | Fix mistake in previous commit: 9fe3b4906f351292691cd594b30fe6cf7230b94d llvm-svn: 355234
* [DWARFFormValue] Cleanup DWARFFormValue interface. (2/2) (NFC)Jonas Devlieghere2019-03-016-52/+42
| | | | | | | Continues the work started in r354941. Changes (all but one) uses of the extractValue to static createFromData. llvm-svn: 355233
OpenPOWER on IntegriCloud