summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* [gn build] Start adding build files for LLVM unittestsNico Weber2019-01-0413-3/+317
| | | | | | | | | | | | | | | Adds build files for //llvm/unittest/[A-D]. Also teach sync_source_lists_from_cmake.py to not complain about missing BUILD.gn files for CMakeLists.txt files that just call add_subdirectory() without calling add_.+_unittest, like e.g. llvm/unittests/Target/CMakeLists.txt. (Omits CodeGen/GlobalISel and DebugInfo/PDB because their build files are somewhat interesting, and this patch is already on the larger side.) Differential Revision: https://reviews.llvm.org/D56212 llvm-svn: 350411
* [gn build] Add check-llvm target and make it workNico Weber2019-01-046-64/+322
| | | | | | | | | | | | | | | | | | | | | With this, check-llvm runs and passes all of clang's lit tests. It doesn't run any of its unit tests yet. This is the only change in the GN build patch series that needs a change to a file outside of llvm/utils/gn: llvm/test/tools/llvm-config/booleans.test checks the result of llvm-config --build-system for some reason, so I'm updating the test to accept "gn" as valid output in addition to "cmake". (The alternative would be to let the gn build self-identify as cmake, which seems worse.) Like with check-clang and check-lld, running just ninja -C out/gn will build all prerequisites needed to run tests, but it won't run the tests (so that the build becomes clean after one build). Running ninja -C out/gn check-llvm will build prerequisites if needed and run the tests. The check-llvm target never becomes clean and runs tests every time. Differential Revision: https://reviews.llvm.org/D56195 llvm-svn: 350410
* [gn build] Add build file for libLTO.dylibNico Weber2019-01-042-1/+45
| | | | | | | | Not used by anything yet, but will be needed to make check-llvm run ld64's libLTO plugin tests. Differential Revision: https://reviews.llvm.org/D56317 llvm-svn: 350409
* [LICM] Adjust how moving the re-hoist point worksJohn Brawn2019-01-042-3/+168
| | | | | | | | | | | | | | | | In some cases the order that we hoist instructions in means that when rehoisting (which uses the same order as hoisting) we can rehoist to a block A, then a block B, then block A again. This currently causes an assertion failure as it expects that when changing the hoist point it only ever moves to a block that dominates the hoist point being moved from. Fix this by moving the re-hoist point when it doesn't dominate the dominator of hoisted instruction, or in other words when it wouldn't dominate the uses of the instruction being rehoisted. Differential Revision: https://reviews.llvm.org/D55266 llvm-svn: 350408
* [gn build] Add build files for llvm/lib/{LineEditor,Testing/Support,TextAPI}Nico Weber2019-01-046-2/+58
| | | | | | | | | | | Nothing pulls them in yet, but they will be needed for check-llvm. LineEditor depends on libedit, so create a gn/build/lib for it, following the usual pattern. Differential Revision: https://reviews.llvm.org/D56316 llvm-svn: 350407
* Undo r350355 "[X86] Remove terrible DX Register parsing hack in parse ↵Nirav Dave2019-01-042-5/+18
| | | | | | | | operand. NFCI." Add missing test case and update comments. llvm-svn: 350406
* [OPENMP][NVPTX]Improve performance + reduce number of used registers.Alexey Bataev2019-01-0413-83/+124
| | | | | | | | | | | | | | | | | Summary: Reduced number of the used register + improved performance propagating the information about current execution/data sharing mode directly from the compiler, where it is possible. In some cases, it requires new/reworked interfaces of the runtime external functions. Old functions are marked as deprecated. Reviewers: grokos, gtbercea, kkwli0 Subscribers: guansong, jfb, openmp-commits, caomhin Differential Revision: https://reviews.llvm.org/D56278 llvm-svn: 350405
* Refactor the way we handle diagnosing unused expression results.Aaron Ballman2019-01-0421-122/+196
| | | | | | | | Rather than sprinkle calls to DiagnoseUnusedExprResult() around in places where we want diagnostics, we now diagnose unused expression statements and full expressions in a more generic way when acting on the final expression statement. This results in more appropriate diagnostics for [[nodiscard]] where we were previously lacking them, such as when the body of a for loop is not a compound statement. This patch fixes PR39837. llvm-svn: 350404
* [CostModel][X86] Fix SSE1 FADD/FSUB costsSimon Pilgrim2019-01-042-2/+14
| | | | | | | | Noticed in D56011 - handle the case that scalar fp ops are quicker on P3 than P4 Add the other costs so that we're not relying on the default "is legal/custom" cost logic. llvm-svn: 350403
* Revert patches 348835 and 348571 because they'reRanjeet Singh2019-01-043-32/+20
| | | | | | causing code size performance regressions. llvm-svn: 350402
* [CostModel][X86] Add SSE1 fp cost testsSimon Pilgrim2019-01-041-40/+184
| | | | llvm-svn: 350401
* Fix typo: "with he MODULE" -> "with the MODULE"Mark Searles2019-01-041-1/+1
| | | | | | Differential Revision: https://reviews.llvm.org/D56302 llvm-svn: 350400
* [X86] Add VPSLLI/VPSRLI ((X >>u C1) << C2) SimplifyDemandedBits combineSimon Pilgrim2019-01-043-43/+26
| | | | | | Repeat of the generic SimplifyDemandedBits shift combine llvm-svn: 350399
* Prevent unreachable when checking invalid multiversion decls.Erich Keane2019-01-042-0/+17
| | | | | | | | | | | CPUSpecifc/CPUDispatch call resolution assumed that all declarations that would be passed are valid, however this was an invalid assumption. This patch deals with those situations by making the valid version take priority. Note that the checked ordering is arbitrary, since both are replaced by calls to the resolver later. Change-Id: I7ff2ec88c55a721d51bc1f39ea1a1fe242b4e45f llvm-svn: 350398
* [MCA] Improved handling of in-order issue/dispatch resources.Andrea Di Biagio2019-01-045-25/+19
| | | | | | | | | | | Added field 'MustIssueImmediately' to the instruction descriptor of instructions that only consume in-order issue/dispatch processor resources. This speeds up queries from the hardware Scheduler, and gives an average ~5% speedup on a release build. No functional change intended. llvm-svn: 350397
* [X86] Split immediate shifts tests. NFCI.Simon Pilgrim2019-01-041-26/+67
| | | | | | A future patch will combine logical shifts more aggressively. llvm-svn: 350396
* [ValueTracking] Fix a misuse of APInt in GetPointerBaseWithConstantOffsetFlorian Hahn2019-01-042-1/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | GetPointerBaseWithConstantOffset include this code, where ByteOffset and GEPOffset are both of type llvm::APInt : ByteOffset += GEPOffset.getSExtValue(); The problem with this line is that getSExtValue() returns an int64_t, but the += matches an overload for uint64_t. The problem is that the resulting APInt is no longer considered to be signed. That in turn causes assertion failures later on if the relevant pointer type is > 64 bits in width and the GEPOffset was negative. Changing it to ByteOffset += GEPOffset.sextOrTrunc(ByteOffset.getBitWidth()); resolves the issue and explicitly performs the sign-extending or truncation. Additionally, instead of asserting later if the result is > 64 bits, it breaks out of the loop in that case. See also https://reviews.llvm.org/D24729 https://reviews.llvm.org/D24772 This commit must be merged after D38662 in order for the test to pass. Patch by Michael Ferguson <mpfergu@gmail.com>. Reviewers: reames, sanjoy, hfinkel Reviewed By: hfinkel Differential Revision: https://reviews.llvm.org/D38501 llvm-svn: 350395
* [gn build] Make write_cmake_config.py check that each key passed is uniqueNico Weber2019-01-041-0/+3
| | | | | | | | I got that wrong once while locally while working on check-llvm. Reviewed as part of https://reviews.llvm.org/D56195 llvm-svn: 350394
* [CMake] Python bindings generation polishingStefan Granitz2019-01-043-46/+39
| | | | | | | | | | | | | | | | | Summary: Simplify SWIG invocation and handling of generated files. The `swig_wrapper` target can generate `LLDBWrapPython.cpp` and `lldb.py` in its own binary directory, so we can get rid of a few global variables and their logic. We can use the swig_wrapper's BINARY_DIR target property to refer to it and liblldb's LIBRARY_OUTPUT_DIRECTORY to refer to the framework/shared object output directory. Reviewers: JDevlieghere, aprantl, stella.stamenova, beanz, zturner, xiaobai Reviewed By: aprantl Subscribers: mgorny, lldb-commits, #lldb Differential Revision: https://reviews.llvm.org/D55332 llvm-svn: 350393
* [CMake] Revised RPATH handlingStefan Granitz2019-01-045-4/+67
| | | | | | | | | | | | | | | | | | | | | | | Summary: If we build LLDB.framework, dependant tools need appropriate RPATHs in both locations, the build-tree (for testing) and the install-tree (for deployment). Luckily, CMake can handle it for us: https://gitlab.kitware.com/cmake/community/wikis/doc/cmake/RPATH-handling. * In the build-tree, tools use the absolute path to the framework's actual output location. * In the install-tree, tools get a list of RPATHs to look for the framework when deployed. `LLDB_FRAMEWORK_INSTALL_DIR` is added to the `CMAKE_INSTALL_PREFIX` to change the relative location of LLDB.framework in the install-tree. If it is not empty, it will be added as an additional RPATH to all dependant tools (so they are functional in the install-tree). If it is empty, LLDB.framework goes to the root and tools will not be functional in the directory structure of the LLVM install-tree. For historical reasons `LLDB_FRAMEWORK_INSTALL_DIR` defaults to "Library/Frameworks". Reviewers: xiaobai, JDevlieghere, aprantl, clayborg Reviewed By: JDevlieghere Subscribers: ki.stfu, mgorny, lldb-commits, #lldb Differential Revision: https://reviews.llvm.org/D55330 llvm-svn: 350392
* [CMake] Revised LLDB.framework buildsStefan Granitz2019-01-0413-173/+190
| | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Add features to LLDB CMake builds that have so far only been available in Xcode. Clean up a few inconveniences and prepare further improvements. Options: * `LLDB_FRAMEWORK_BUILD_DIR` determines target directory (in build-tree) * `LLDB_FRAMEWORK_INSTALL_DIR` **only** determines target directory in install-tree * `LLVM_EXTERNALIZE_DEBUGINFO` allows externalized debug info (dSYM on Darwin, emitted to `bin`) * `LLDB_FRAMEWORK_TOOLS` determines which executables will be copied to the framework's Resources (dropped symlinking, removed INCLUDE_IN_SUITE, removed dummy targets) Other changes: * clean up `add_lldb_executable()` * include `LLDBFramework.cmake` from `source/API/CMakeLists.txt` * use `*.plist.in` files, which are typical for CMake and independent from Xcode * add clang headers to the framework bundle Reviewers: xiaobai, JDevlieghere, aprantl, davide, beanz, stella.stamenova, clayborg, labath Reviewed By: aprantl Subscribers: friss, mgorny, lldb-commits, #lldb Differential Revision: https://reviews.llvm.org/D55328 llvm-svn: 350391
* [CMake] Move debugserver options to separate debugserverConfig.cmakeStefan Granitz2019-01-042-2/+4
| | | | | | | | | | | | | | | Summary: One place for debugserver options, analog to LLDBConfig for LLDB options (see D55317). It was discussed in earlier reviews already, e.g. D55013. Reviewers: JDevlieghere, aprantl, xiaobai Reviewed By: aprantl, xiaobai Subscribers: mgorny, lldb-commits, #lldb Differential Revision: https://reviews.llvm.org/D55320 llvm-svn: 350390
* [CMake] Aggregate options for LLDB in LLDBConfig.cmakeStefan Granitz2019-01-042-38/+34
| | | | | | | | | | | | | | Summary: In preparation for LLDB.framework changes, collect options for LLDB in LLDBConfig.cmake (used for both, standalone and in-tree builds of LLDB). Reviewers: JDevlieghere, aprantl, xiaobai Reviewed By: aprantl Subscribers: srhines, mgorny, lldb-commits, #lldb Differential Revision: https://reviews.llvm.org/D55317 llvm-svn: 350389
* [CMake] Streamline code signing for debugserver #2Stefan Granitz2019-01-048-79/+136
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Major fixes after D54476 (use Diff1 as base for comparison to see only recent changes): * In standalone builds target directory for debugserver must be LLDB's bin, not LLVM's bin * Default identity for code signing must not force-override LLVM_CODESIGNING_IDENTITY globally We have a lot of cases, make them explicit: * ID used for code signing (debugserver and in tests): ** `LLDB_CODESIGN_IDENTITY` if set explicitly, or otherwise ** `LLVM_CODESIGNING_IDENTITY` if set explicitly, or otherwise ** `lldb_codesign` as the default * On Darwin we have a debugserver target that: * On other systems, the debugserver target is not defined, which is equivalent to **[3A]** Common configurations on Darwin: * **[1A]** `cmake -GNinja ../llvm` builds debugserver from source and signs with `lldb_codesign`, no code signing for other binaries (prints status: //lldb debugserver: /path/to/bin/debugserver//) * **[1A]** `cmake -GNinja -DLLVM_CODESIGNING_IDENTITY=- -DLLDB_CODESIGN_IDENTITY=lldb_codesign ../llvm` builds debugserver from source and signs with `lldb_codesign`, ad-hoc code signing for other binaries (prints status: //lldb debugserver: /path/to/bin/debugserver//) * **[2A]** `cmake -GNinja -DLLVM_CODESIGNING_IDENTITY=- -DLLDB_USE_SYSTEM_DEBUGSERVER=ON ../llvm` copies debugserver from system, ad-hoc code signing for other binaries (prints status: //Copy system debugserver from: /path/to/system/debugserver//) * **[2B]** `cmake -GNinja -DLLVM_CODESIGNING_IDENTITY=- ../llvm` same, but prints additional warning: //Cannot code sign debugserver with identity '-'. Will fall back to system's debugserver. Pass -DLLDB_CODESIGN_IDENTITY=lldb_codesign to override the LLVM value for debugserver.// * **[3A]** `cmake -GNinja -DLLVM_CODESIGNING_IDENTITY=- -DLLDB_NO_DEBUGSERVER=ON ../llvm` debugserver not available (prints status: //lldb debugserver will not be available)// Reviewers: JDevlieghere, beanz, davide, vsk, aprantl, labath Reviewed By: JDevlieghere, labath Subscribers: mgorny, #lldb, lldb-commits Differential Revision: https://reviews.llvm.org/D55013 llvm-svn: 350388
* [MCA] Store extra information about processor resources in the ResourceManager.Andrea Di Biagio2019-01-042-16/+86
| | | | | | | | | | | | | | | | | | | | | Method ResourceManager::use() is responsible for updating the internal state of used processor resources, as well as notifying resource groups that contain used resources. Before this patch, method 'use()' didn't know how to quickly obtain the set of groups that contain a particular resource unit. It had to discover groups by perform a potentially slow search (done by iterating over the set of processor resource descriptors). With this patch, the relationship between resource units and groups is stored in the ResourceManager. That means, method 'use()' no longer has to search for groups. This gives an average speedup of ~4-5% on a release build. This patch also adds extra code comments in ResourceManager.h to better describe the resource mask layout, and how resouce indices are computed from resource masks. llvm-svn: 350387
* [Basic] Extend DiagnosticEngine to store and format Qualifiers.Anastasia Stulova2019-01-048-33/+51
| | | | | | | | | | | Qualifiers can now be streamed into the DiagnosticEngine using regular << operator. If Qualifiers are empty 'unqualified' will be printed in the diagnostic otherwise regular qual syntax is used. Differential Revision: https://reviews.llvm.org/D56198 llvm-svn: 350386
* [AArch64] Add command-line option predresDiogo N. Sampaio2019-01-043-1/+5
| | | | | | | | | | | Prediction control instructions are only mandatory from v8.5a onwards but is optional from Armv8.0-A. This patch adds a command line option to enable it by it's own. Differential Revision: https://reviews.llvm.org/D56007 llvm-svn: 350385
* Symtab: Remove one copy of symbol size computation codePavel Labath2019-01-041-26/+2
| | | | | | | | | | | | | | | Summary: The implementation in CalculateSymbolSizes has been made redundant in D19004, as this patch added another copy of size computation code into InitAddressIndexes (which is called by CalculateSymbolSizes). Reviewers: clayborg, jasonmolenda, tberghammer Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D56132 llvm-svn: 350384
* [CMake] Use XCODE_ATTRIBUTE properties for code signing and entitlements in ↵Stefan Granitz2019-01-041-7/+11
| | | | | | | | | | | | | | | | Xcode Summary: A post-commit comment to D55116 amended that this was the correct way for code signing in Xcode. Reviewers: beanz Reviewed By: beanz Subscribers: mgorny, llvm-commits Differential Revision: https://reviews.llvm.org/D55816 llvm-svn: 350383
* RangeMap.h: merge RangeDataArray and RangeDataVectorPavel Labath2019-01-045-277/+67
| | | | | | | | | | | | | | | | | | | | | | | | | | Summary: The main difference between the classes was supposed to be the fact that one is backed by llvm::SmallVector, and the other by std::vector. However, over the years, they have accumulated various other differences too. This essentially removes the std::vector version, as that is pretty much identical to llvm::SmallVector<T, 0>, and combines their interfaces. It does not attempt to do a more significant refactoring, even though there is still a lot of duplication in this file, as it is hard to tell which quirk of some API is depended on by somebody (and, a previous, more ambitious attempt at this in D16769 has failed). I also add some tests, including one which demonstrates one of the quirks/bugs of the API I have noticed in the process. Reviewers: clayborg, teemperor, tberghammer Subscribers: mgorny, JDevlieghere, lldb-commits Differential Revision: https://reviews.llvm.org/D56170 llvm-svn: 350380
* [WebAssembly] Split the checking from the sorting logic.Richard Trieu2019-01-041-2/+13
| | | | | | | | Move the check for -1 and identical values outside the vector sorting code. Compare functions need to be able to compare identical elements to be conforming. llvm-svn: 350379
* [memcpyopt] Remove a few unnecessary isVolatile() checks. NFCXin Tong2019-01-041-6/+4
| | | | | | We already checked for isSimple() on the store. llvm-svn: 350378
* [OpenMP] Fix nvidia-cuda-toolkit detection on Debian/UbuntuJoel E. Denny2019-01-041-0/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | The OpenMP runtime's cmake scripts do not correctly locate the libdevice that the Debian/Ubuntu package nvidia-cuda-toolkit currently includes, at least on my Ubuntu 18.04.1 installation. This patch fixes that for me. This problem was discussed at length in D55269. D40453 added a similar adjustment in clang, but reviewers of D55269 concluded that, for the OpenMP runtime, the right place to address this problem is in cmake's CUDA support. However, it was also suggested we could add a workaround to OpenMP's cmake scripts now. This patch contains such a workaround, which I've tried to design so that it will have no harmful effect if cmake improves in the future. nvidia-cuda-toolkit also needs improvements because its intended monolithic CUDA tree shim, /usr/lib/cuda, has many empty directories, such as bin. I reported that at: <https://bugs.launchpad.net/ubuntu/+source/nvidia-cuda-toolkit/+bug/1808999> Reviewed By: grokos Differential Revision: https://reviews.llvm.org/D55588 llvm-svn: 350377
* [lldb] Fix ObjCExceptionRecognizedStackFrame to populate the list of ↵Kuba Mracek2019-01-042-0/+14
| | | | | | | | recognized arguments Differential Revision: https://reviews.llvm.org/D56027 llvm-svn: 350376
* [lldb] Check SafeToCallFunctions before calling functions in ↵Kuba Mracek2019-01-041-0/+3
| | | | | | | | GetExceptionObjectForThread Differential Revision: https://reviews.llvm.org/D56115 llvm-svn: 350375
* [X86] Add post-isel peephole to fold KAND+KORTEST into KTEST if only the ↵Craig Topper2019-01-042-46/+136
| | | | | | | | | | zero flag is used. Doing this late so we will prefer to fold the AND into a masked comparison first. That can be better for the live range of the mask register. Differential Revision: https://reviews.llvm.org/D56246 llvm-svn: 350374
* revert r350369: [x86] lower extracted fadd/fsub to horizontal vector mathSanjay Patel2019-01-043-647/+298
| | | | | | There are non-codegen tests that need to be updated with this code change. llvm-svn: 350373
* Adopt SwiftABIInfo for WebAssembly.Daniel Dunbar2019-01-031-6/+17
| | | | | | | | | | | | | | | | | Summary: - This adopts SwiftABIInfo as the base class for WebAssemblyABIInfo, which is in keeping with what is done for other targets for which Swift is supported. - This is a minimal patch to unblock exploration of WASM support for Swift (https://bugs.swift.org/browse/SR-9307) Reviewers: rjmccall, sunfish Reviewed By: rjmccall Subscribers: ahti, dschuff, sbc100, jgravelle-google, aheejin, cfe-commits Differential Revision: https://reviews.llvm.org/D56188 llvm-svn: 350372
* Fix MSVC visualizations for ActionResult and OpaquePtrMike Spertus2019-01-031-32/+8
| | | | | | | Mainly just fixing buggy code. Also removed unnecessary visualizers for specializations of OpaquePtr llvm-svn: 350371
* [hwasan] Switch to 64 allocator with a dense size class map.Evgeniy Stepanov2019-01-035-15/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Replace the 32-bit allocator with a 64-bit one with a non-constant base address, and reduce both the number of size classes and the maximum size of per-thread caches. As measured on [1], this reduces average weighted memory overhead (MaxRSS) from 26% to 12% over stock android allocator. These numbers include overhead from code instrumentation and hwasan shadow (i.e. not a pure allocator benchmark). This switch also enables release-to-OS functionality, which is not implemented in the 32-bit allocator. I have not seen any effect from that on the benchmark. [1] https://android.googlesource.com/platform/system/extras/+/master/memory_replay/ Reviewers: vitalybuka, kcc Subscribers: kubamracek, cryptoad, llvm-commits Differential Revision: https://reviews.llvm.org/D56239 llvm-svn: 350370
* [x86] lower extracted fadd/fsub to horizontal vector mathSanjay Patel2019-01-033-298/+647
| | | | | | | | | | | | | | This would show up if we fix horizontal reductions to narrow as they go along, but it's an improvement for size and/or Jaguar (fast-hops) independent of that. We need to do this late to not interfere with other pattern matching of larger horizontal sequences. We can extend this to integer ops in a follow-up patch. Differential Revision: https://reviews.llvm.org/D56011 llvm-svn: 350369
* symbols.enable-external-lookup=false on all hosts (not just OSX)Jan Kratochvil2019-01-036-24/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There is already in use: lit/lit-lldb-init: settings set symbols.enable-external-lookup false packages/Python/lldbsuite/test/lldbtest.py: self.runCmd('settings set symbols.enable-external-lookup false') But those are not in effect during MI part of the testsuite. Another problem is that symbols.enable-external-lookup (read by GetEnableExternalLookup) has been currently read only by LocateMacOSXFilesUsingDebugSymbols and therefore it had no effect on Linux. On Red Hat platforms (Fedoras, RHEL-7) there is DWZ in use and so MiSyntaxTestCase-test_lldbmi_output_grammar FAILs due to: AssertionError: error: inconsistent pattern ''^.+?\n'' for state 0x5f (matched string: warning: (x86_64) /lib64/libstdc++.so.6 unsupported DW_FORM values: 0x1f20 0x1f21 It is the only testcase with this error. It happens due to: (lldb) target create "/lib64/libstdc++.so.6" Current executable set to '/lib64/libstdc++.so.6' (x86_64). (lldb) b main warning: (x86_64) /lib64/libstdc++.so.6 unsupported DW_FORM values: 0x1f20 0x1f21 Breakpoint 1: no locations (pending). WARNING: Unable to resolve breakpoint to any actual locations. which happens only with gcc-base-debuginfo rpm installed (similarly for other packages). It should also speed up the testsuite as it no longer needs to read /usr/lib/debug symbols which have no effect (and should not have any effect) on the testsuite results. Differential Revision: https://reviews.llvm.org/D55859 llvm-svn: 350368
* [WebAssembly] Optimize Irreducible Control FlowHeejin Ahn2019-01-035-159/+613
| | | | | | | | | | | | | | | | | | | | | | | Summary: Irreducible control flow is not that rare, e.g. it happens in malloc and 3 other places in the libc portions linked in to a hello world program. This patch improves how we handle that code: it emits a br_table to dispatch to only the minimal necessary number of blocks. This reduces the size of malloc by 33%, and makes it comparable in size to asm2wasm's malloc output. Added some tests, and verified this passes the emscripten-wasm tests run on the waterfall (binaryen2, wasmobj2, other). Reviewers: aheejin, sunfish Subscribers: mgrang, jgravelle-google, sbc100, dschuff, llvm-commits Differential Revision: https://reviews.llvm.org/D55467 Patch by Alon Zakai (kripken) llvm-svn: 350367
* [WebAssembly] Fixed disassembler not knowing about new brlist operandWouter van Oortmerssen2019-01-035-1/+26
| | | | | | | | | | | | | | Summary: The previously introduced new operand type for br_table didn't have a disassembler implementation, causing an assert. Reviewers: dschuff, aheejin Subscribers: sbc100, jgravelle-google, sunfish, llvm-commits Differential Revision: https://reviews.llvm.org/D56227 llvm-svn: 350366
* [WebAssembly] Made InstPrinter more robustWouter van Oortmerssen2019-01-034-59/+77
| | | | | | | | | | | | | | | | | | | Summary: Instead of asserting on certain kinds of malformed instructions, it now still print, but instead adds an annotation indicating the problem, and/or indicates invalid_type etc. We're using the InstPrinter from many contexts that can't always guarantee values are within range (e.g. the disassembler), where having output is more valueable than asserting. Reviewers: dschuff, aheejin Subscribers: sbc100, jgravelle-google, sunfish, llvm-commits Differential Revision: https://reviews.llvm.org/D56223 llvm-svn: 350365
* [x86] add 512-bit vector tests for horizontal ops; NFCSanjay Patel2019-01-032-2/+128
| | | | llvm-svn: 350364
* Fix check-hwasan with LLVM_BUILD_EXTERNAL_COMPILER_RT=ONEvgeniy Stepanov2019-01-031-1/+1
| | | | | | Add a forwarding target for check-hwasan in clang. llvm-svn: 350363
* [x86] add AVX512 runs for horizontal ops; NFCSanjay Patel2019-01-032-15/+55
| | | | llvm-svn: 350362
* [cmake] Fix monorepo + LLVM_BUILD_EXTERNAL_COMPILER_RT=ON.Evgeniy Stepanov2019-01-031-1/+1
| | | | | | | | | In cmake 3.10.2, if (${VARIABLE_NAME}) seems to always be false no matter what documentation says (or maybe I just failed at reading). Anyway, if (VARIABLE_NAME) seems to do what this code intended. llvm-svn: 350361
* TestQueues: Move the synchronisation code into the binary itself.Adrian Prantl2019-01-032-43/+14
| | | | | | Thanks to Pavel Labath for the suggestion! llvm-svn: 350360
OpenPOWER on IntegriCloud