summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* [XRay] Fix fdr-thread-order.cc when current directory contains ↵Fangrui Song2018-09-281-11/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | fdr-thread-order.cc Summary: Currently, cd test/xray/TestCases/Posix $build/bin/llvm-lit fdr-thread-order.cc fails because `rm fdr-thread-order.*` deletes the .cc file. This patch uses: * %t as temporary directory name containing log files * %t.exe as executable name It does not delete %t after the test finishes for debugging convenience. This matches the behavior of tests of various other LLVM components. Log files will not clog up because the temporary directory (unique among test files but the same among multiple invocations of a test) is cleaned at the beginning of the test. Reviewers: dberris, mboerger, eizan Reviewed By: dberris Subscribers: delcypher, llvm-commits, #sanitizers Differential Revision: https://reviews.llvm.org/D52638 llvm-svn: 343295
* [ScalarizeMaskedMemIntrin] Use MinAlign to calculate alignment for the ↵Craig Topper2018-09-282-2/+60
| | | | | | | | scalar load/stores to handle element types that are byte-sized but not powers of 2. This pass doesn't handle non-byte sized types correctly at all, but at least we can make byte sized types work. llvm-svn: 343294
* Handle dependent class template names in class template argumentRichard Smith2018-09-282-1/+11
| | | | | | deduction for new-expressions. llvm-svn: 343293
* [lldb] Remove an assertion in RichManglingContext::GetBufferRef() hit when ↵Aaron Smith2018-09-282-1/+23
| | | | | | | | | | | | | | | | debugging a native x86 Windows process Summary: A RichManglingContext constructed with an invalid demangled name or with a demangled function name without any context will have an empty context. This triggers an assertion in RichManglingContext::GetBufferRef() when debugging a native Windows process on x86 when it shouldn't. Remove the assertion. Reviewers: aleksandr.urakov, zturner, lldb-commits Reviewed By: zturner Subscribers: erik.pilkington Differential Revision: https://reviews.llvm.org/D52626 llvm-svn: 343292
* [pdb] Simplify the code by replacing a few string conversions with calls to ↵Aaron Smith2018-09-285-51/+11
| | | | | | | | | | | | invokeBstrMethod() Reviewers: aleksandr.urakov, zturner, llvm-commits Reviewed By: zturner Differential Revision: https://reviews.llvm.org/D52624 llvm-svn: 343291
* merge-request.sh: Add 7.0 metabugTom Stellard2018-09-281-0/+3
| | | | llvm-svn: 343290
* [XRay] Guard local variables with `static` and struct with unnamed namespacesFangrui Song2018-09-282-6/+11
| | | | | | | | | | | | | | | | | Summary: This is for coding standard conformance, and for fixing an ODR violation issue: __xray::ThreadLocalData is defined twice and differently in xray_fdr_logging.cc and xray_basic_logging.cc Reviewers: dberris, mboerger, eizan Reviewed By: dberris Subscribers: delcypher, jfb, llvm-commits, #sanitizers Differential Revision: https://reviews.llvm.org/D52639 llvm-svn: 343289
* [ORC] clang-format the ThreadSafeModule code.Lang Hames2018-09-283-23/+20
| | | | | | Evidently I forgot to do this before committing r343055. llvm-svn: 343288
* [ORC] Add a const version of ThreadSafeModule::getModule().Lang Hames2018-09-281-0/+3
| | | | llvm-svn: 343287
* [ORC] Lock ThreadSafeContext during module destruction in ThreadSafeModule'sLang Hames2018-09-281-0/+6
| | | | | | | | | | move constructor. This is basically the same fix as r343261, but applied to the move constructor: Failure to lock the context during module destruction can lead to data races if other threads are operating on the context. llvm-svn: 343286
* [cxx2a] P0641R2: (Some) type mismatches on defaulted functions onlyRichard Smith2018-09-2816-36/+138
| | | | | | | | | | | | | | | | render the function deleted instead of rendering the program ill-formed. This change also adds an enabled-by-default warning for the case where an explicitly-defaulted special member function of a non-template class is implicitly deleted by the type checking rules. (This fires either due to this language change or due to pre-C++20 reasons for the member being implicitly deleted). I've tested this on a large codebase and found only bugs (where the program means something that's clearly different from what the programmer intended), so this is enabled by default, but we should revisit this if there are problems with this being enabled by default. llvm-svn: 343285
* [ScalarizeMaskedMemIntrin] Fix the alignment calculation for the scalar ↵Craig Topper2018-09-282-3/+3
| | | | | | | | stores of a masked store expansion. It should be the minimum of the original alignment and the scalar size. llvm-svn: 343284
* [ScalarizeMaskedMemIntrin] Add test cases for masked store expansion. ↵Craig Topper2018-09-282-1/+60
| | | | | | | | Increase alignment of one of the masked load test cases. The masked store alignment is being miscalculated, but masked load is correct. llvm-svn: 343283
* [XRay] Fix argv0-log-file-name.cc race when tests are executed parallellyFangrui Song2018-09-271-1/+1
| | | | | | | `rm xray-log.*` may delete log files of other tests and cause them to fail, when tests are executed parallelly. llvm-svn: 343282
* [X86] Add the test case from PR38986.Craig Topper2018-09-271-0/+29
| | | | | | The assembly for this test should be optimal now after changes to the ScalarizeMaskedMemIntrin patch. llvm-svn: 343281
* [XRay] Add LD_LIBRARY_PATH to env variables for Unit TestsDean Michael Berris2018-09-273-5/+14
| | | | | | | | | | | | | | | | | Summary: This change allows us to use the library path from which the LLVM libraries are installed, in case the LLVM installation generates shared libraries. This should address llvm.org/PR39070. Reviewers: mboerger, eizan Subscribers: mgorny, jfb, llvm-commits Differential Revision: https://reviews.llvm.org/D52597 llvm-svn: 343280
* [cxx2a] P0624R2: Lambdas with no capture-default areRichard Smith2018-09-278-10/+95
| | | | | | default-constructible and assignable. llvm-svn: 343279
* [ScalarizeMaskedMemIntrin] Ensure the mask is a vector of ConstantInts ↵Craig Topper2018-09-271-4/+19
| | | | | | | | before generating the expansion without control flow. Its possible the mask itself or one of the elements is a ConstantExpr and we shouldn't optimize in that case. llvm-svn: 343278
* [ScalarizeMaskedMemIntrin] Use cast instead of dyn_cast checked by an ↵Craig Topper2018-09-271-10/+6
| | | | | | | | assert. Consistently make use of the element type variable we already have. NFCI cast will take care of asserting internally. llvm-svn: 343277
* [analyzer] Hotfix for the bug in exploded graph printingGeorge Karpenkov2018-09-271-0/+2
| | | | llvm-svn: 343276
* WebAssembly: Rename GetSignature to GetLibcallSignature [NFC]Derek Schuff2018-09-273-16/+19
| | | | llvm-svn: 343275
* [ScalarizeMaskedMemIntrin] When expanding masked gathers, start with the ↵Craig Topper2018-09-274-296/+237
| | | | | | | | passthru vector and insert the new load results into it. Previously we started with undef and did a final merge with the passthru at the end. llvm-svn: 343273
* [ScalarizeMaskedMemIntrin] Add some IR only test cases for masked gather ↵Craig Topper2018-09-271-0/+67
| | | | | | expansion. llvm-svn: 343272
* [ScalarizeMaskedMemIntrin] When expanding masked loads, start with the ↵Craig Topper2018-09-273-74/+31
| | | | | | | | passthru value and insert each conditional load result over their element. Previously we started with undef and did one final merge at the end with a select. llvm-svn: 343271
* [ScalarizeMaskedMemIntrin] Handle the case where the mask is an all zero vector.Craig Topper2018-09-272-26/+10
| | | | | | | | This shouldn't really happen in practice I hope, but we tried to handle other constant cases. We missed this one because we checked for ConstantVector without realizing that zero becomes ConstantAggregateZero instead. So instead just check for Constant and use getAggregateElement which will do the dirty work for us. llvm-svn: 343270
* [ScalarizeMaskedMemIntrin] Add dedicated IR only tests for masked load ↵Craig Topper2018-09-271-0/+80
| | | | | | expansion so I can begin making modifications. llvm-svn: 343269
* [ScalarizeMaskedMemIntrin] Remove some temporary variables that are only ↵Craig Topper2018-09-271-14/+5
| | | | | | used by a single if condition. llvm-svn: 343268
* [ScalarizeMaskedMemIntrin] Cleanup comments. NFCCraig Topper2018-09-271-58/+49
| | | | llvm-svn: 343267
* [ORC] Add definition for IRLayer::setCloneToNewContextOnEmit, use it to set theLang Hames2018-09-272-19/+27
| | | | | | | | | | | flag to true in LLJIT when running in multithreaded mode. The IRLayer::setCloneToNewContextOnEmit method sets a flag within the IRLayer that causes modules added to that layer to be moved to a new context (by serializing to/from a memory buffer) when they are emitted. This allows modules that were all loaded on the same context to be compiled in parallel. llvm-svn: 343266
* [WebAssembly] Add --[no]-export-dynamic to replace --export-defaultSam Clegg2018-09-2719-56/+64
| | | | | | | | | | | | | | | | | | | | | | | | In a very recent change I introduced a --no-export-default flag but after conferring with others it seems that this feature already exists in gnu GNU ld and lld in the form the --export-dynamic flag which is off by default. This change replaces export-default with export-dynamic and also changes the default to match the traditional linker behaviour. Now, by default, only the entry point is exported. If other symbols are required by the embedder then --export-dynamic or --export can be used to export all visibility hidden symbols or individual symbols respectively. This change touches a lot of tests that were relying on symbols being exported by default. I imagine it will also effect many users but do think the change is worth it match of the traditional behaviour and flag names. Differential Revision: https://reviews.llvm.org/D52587 llvm-svn: 343265
* AMDGPU: Split HasExt into HasExtDPP/SDWA/SDWA9Konstantin Zhuravlyov2018-09-274-21/+43
| | | | llvm-svn: 343264
* NFC: Fix some darwin linker warnings introduced in r338385Erik Pilkington2018-09-274-8/+8
| | | | | | | | | | The darwin linker was complaining about Toolchains/RISCV.cpp and Toolchains/Arch/RISCV.cpp had the same name. Fix is to just rename Toolchains/RISCV.cpp to Toolchains/RISCVToolchain.cpp. Differential revision: https://reviews.llvm.org/D52574 llvm-svn: 343263
* [ORC] Make LocalIndirectStubsManager's operations thread-safe.Lang Hames2018-09-271-2/+11
| | | | | | | Locks stub management operations and switches to atomic update for stub pointers. llvm-svn: 343262
* [ORC] Lock ThreadSafeContext during Module destructing in ThreadSafeModule.Lang Hames2018-09-271-3/+17
| | | | | | | Failure to lock the context can lead to data races if other threads are operating on other ThreadSafeModules that share the same context. llvm-svn: 343261
* [OpenMP] Make default parallel for schedule in NVPTX target regions in SPMD ↵Gheorghe-Teodor Bercea2018-09-276-7/+33
| | | | | | | | | | | | | | | | mode achieve coalescing Summary: Set default schedule for parallel for loops to schedule(static, 1) when using SPMD mode on the NVPTX device offloading toolchain to ensure coalescing. Reviewers: ABataev, Hahnfeld, caomhin Reviewed By: ABataev Subscribers: jholewinski, guansong, cfe-commits Differential Revision: https://reviews.llvm.org/D52629 llvm-svn: 343260
* AMDGPU: Split VOP2Inst into VOP2Inst_e32/e64/sdwaKonstantin Zhuravlyov2018-09-271-10/+32
| | | | llvm-svn: 343259
* Test commit. NFCPatrick Lyster2018-09-271-1/+1
| | | | llvm-svn: 343258
* [ORC] Coalesce all of ORC's symbol renaming / linkage-promotion utilities intoLang Hames2018-09-276-85/+31
| | | | | | | | | | | | one SymbolLinkagePromoter utility. SymbolLinkagePromoter renames anonymous and private symbols, and bumps all linkages to at least global/hidden-visibility. Modules whose symbols have been promoted by this utility can be decomposed into sub-modules without introducing link errors. This is used by the CompileOnDemandLayer to extract single-function modules for lazy compilation. llvm-svn: 343257
* [ORC] LastKey needs to be protected to prevent data races.Lang Hames2018-09-271-1/+3
| | | | llvm-svn: 343256
* [lli] Fix ArgV setup bug when running in -jit-kind=orc-lazy mode.Lang Hames2018-09-271-1/+4
| | | | | | ArgV[ArgC] should be null. llvm-svn: 343255
* AMDGPU/NFC: Simplify VOP_MAC_F16/F32Konstantin Zhuravlyov2018-09-271-11/+2
| | | | llvm-svn: 343254
* [OpenMP] Make default distribute schedule for NVPTX target regions in SPMD ↵Gheorghe-Teodor Bercea2018-09-276-8/+35
| | | | | | | | | | | | | | | | mode achieve coalescing Summary: For the OpenMP NVPTX toolchain choose a default distribute schedule that ensures coalescing on the GPU when in SPMD mode. This significantly increases the performance of offloaded target code and reduces the number of registers used on the GPU side. Reviewers: ABataev, caomhin, Hahnfeld Reviewed By: ABataev, Hahnfeld Subscribers: Hahnfeld, jholewinski, guansong, cfe-commits Differential Revision: https://reviews.llvm.org/D52434 llvm-svn: 343253
* [sanitizer] Disable failing Android test after D52371Kostya Kortchinsky2018-09-271-4/+5
| | | | | | | | | | | | | | | | | Summary: The default values used for Space/Size for the new SizeClassMap do not work with Android. The Compact map appears to be in the same boat. Disable the test on Android for now to turn the bots green, but there is no reason Compact & Dense should not have an Android test. Added a FIXME, I will revisit this soon. Reviewers: eugenis Subscribers: srhines, kubamracek, delcypher, #sanitizers, llvm-commits Differential Revision: https://reviews.llvm.org/D52623 llvm-svn: 343252
* [clang][ubsan][NFC] Slight test cleanup in preparation for D50901Roman Lebedev2018-09-274-80/+73
| | | | | | | | | | | | Reviewers: vsk, vitalybuka, filcab Reviewed By: vitalybuka Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D52589 llvm-svn: 343251
* [compiler-rt][ubsan][NFC] Slight test cleanup in preparation for D50902.Roman Lebedev2018-09-272-90/+605
| | | | | | | | | | | | Reviewers: vsk, vitalybuka, filcab Reviewed By: vitalybuka Subscribers: kubamracek, dberris, llvm-commits, #sanitizers Differential Revision: https://reviews.llvm.org/D52590 llvm-svn: 343250
* [AMDGPU] Fold copy (copy vgpr)Stanislav Mekhanoshin2018-09-272-0/+41
| | | | | | | | This allows to reduce a number of used VGPRs in some cases. Differential Revision: https://reviews.llvm.org/D52577 llvm-svn: 343249
* [clangd] Initial supoprt for cross-namespace global code completion.Eric Liu2018-09-278-15/+130
| | | | | | | | | | | | | | | | | | | | | Summary: When no scope qualifier is specified, allow completing index symbols from any scope and insert proper automatically. This is still experimental and hidden behind a flag. Things missing: - Scope proximity based scoring. - FuzzyFind supports weighted scopes. Reviewers: sammccall Reviewed By: sammccall Subscribers: kbobyrev, ilya-biryukov, MaskRay, jkorous, arphaman, kadircet, cfe-commits Differential Revision: https://reviews.llvm.org/D52364 llvm-svn: 343248
* [clangd] Add more tracing to index queries. NFCEric Liu2018-09-273-2/+28
| | | | | | | | | | Reviewers: sammccall Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, kadircet, cfe-commits Differential Revision: https://reviews.llvm.org/D52611 llvm-svn: 343247
* [sanitizer] Introduce a new SizeClassMap with minimal amount of cached entriesKostya Kortchinsky2018-09-272-0/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: _Note_: I am not attached to the name `DenseSizeClassMap`, so if someone has a better idea, feel free to suggest it. The current pre-defined `SizeClassMap` hold a decent amount of cached entries, either in cheer number of, or in amount of memory cached. Empirical testing shows that more compact per-class arrays (whose sizes are directly correlated to the number of cached entries) are beneficial to performances, particularly in highly threaded environments. The new proposed `SizeClassMap` has the following properties: ``` c00 => s: 0 diff: +0 00% l 0 cached: 0 0; id 0 c01 => s: 16 diff: +16 00% l 4 cached: 8 128; id 1 c02 => s: 32 diff: +16 100% l 5 cached: 8 256; id 2 c03 => s: 48 diff: +16 50% l 5 cached: 8 384; id 3 c04 => s: 64 diff: +16 33% l 6 cached: 8 512; id 4 c05 => s: 80 diff: +16 25% l 6 cached: 8 640; id 5 c06 => s: 96 diff: +16 20% l 6 cached: 8 768; id 6 c07 => s: 112 diff: +16 16% l 6 cached: 8 896; id 7 c08 => s: 128 diff: +16 14% l 7 cached: 8 1024; id 8 c09 => s: 144 diff: +16 12% l 7 cached: 7 1008; id 9 c10 => s: 160 diff: +16 11% l 7 cached: 6 960; id 10 c11 => s: 176 diff: +16 10% l 7 cached: 5 880; id 11 c12 => s: 192 diff: +16 09% l 7 cached: 5 960; id 12 c13 => s: 208 diff: +16 08% l 7 cached: 4 832; id 13 c14 => s: 224 diff: +16 07% l 7 cached: 4 896; id 14 c15 => s: 240 diff: +16 07% l 7 cached: 4 960; id 15 c16 => s: 256 diff: +16 06% l 8 cached: 4 1024; id 16 c17 => s: 320 diff: +64 25% l 8 cached: 3 960; id 49 c18 => s: 384 diff: +64 20% l 8 cached: 2 768; id 50 c19 => s: 448 diff: +64 16% l 8 cached: 2 896; id 51 c20 => s: 512 diff: +64 14% l 9 cached: 2 1024; id 48 c21 => s: 640 diff: +128 25% l 9 cached: 1 640; id 49 c22 => s: 768 diff: +128 20% l 9 cached: 1 768; id 50 c23 => s: 896 diff: +128 16% l 9 cached: 1 896; id 51 c24 => s: 1024 diff: +128 14% l 10 cached: 1 1024; id 48 c25 => s: 1280 diff: +256 25% l 10 cached: 1 1280; id 49 c26 => s: 1536 diff: +256 20% l 10 cached: 1 1536; id 50 c27 => s: 1792 diff: +256 16% l 10 cached: 1 1792; id 51 c28 => s: 2048 diff: +256 14% l 11 cached: 1 2048; id 48 c29 => s: 2560 diff: +512 25% l 11 cached: 1 2560; id 49 c30 => s: 3072 diff: +512 20% l 11 cached: 1 3072; id 50 c31 => s: 3584 diff: +512 16% l 11 cached: 1 3584; id 51 c32 => s: 4096 diff: +512 14% l 12 cached: 1 4096; id 48 c33 => s: 5120 diff: +1024 25% l 12 cached: 1 5120; id 49 c34 => s: 6144 diff: +1024 20% l 12 cached: 1 6144; id 50 c35 => s: 7168 diff: +1024 16% l 12 cached: 1 7168; id 51 c36 => s: 8192 diff: +1024 14% l 13 cached: 1 8192; id 48 c37 => s: 10240 diff: +2048 25% l 13 cached: 1 10240; id 49 c38 => s: 12288 diff: +2048 20% l 13 cached: 1 12288; id 50 c39 => s: 14336 diff: +2048 16% l 13 cached: 1 14336; id 51 c40 => s: 16384 diff: +2048 14% l 14 cached: 1 16384; id 48 c41 => s: 20480 diff: +4096 25% l 14 cached: 1 20480; id 49 c42 => s: 24576 diff: +4096 20% l 14 cached: 1 24576; id 50 c43 => s: 28672 diff: +4096 16% l 14 cached: 1 28672; id 51 c44 => s: 32768 diff: +4096 14% l 15 cached: 1 32768; id 48 c45 => s: 40960 diff: +8192 25% l 15 cached: 1 40960; id 49 c46 => s: 49152 diff: +8192 20% l 15 cached: 1 49152; id 50 c47 => s: 57344 diff: +8192 16% l 15 cached: 1 57344; id 51 c48 => s: 65536 diff: +8192 14% l 16 cached: 1 65536; id 48 c49 => s: 81920 diff: +16384 25% l 16 cached: 1 81920; id 49 c50 => s: 98304 diff: +16384 20% l 16 cached: 1 98304; id 50 c51 => s: 114688 diff: +16384 16% l 16 cached: 1 114688; id 51 c52 => s: 131072 diff: +16384 14% l 17 cached: 1 131072; id 48 c53 => s: 64 diff: +0 00% l 0 cached: 8 512; id 4 Total cached: 864928 (152/432) ``` It holds a bit less of 1MB of cached entries at most, and the cache fits in a page. The plan is to use this map by default for Scudo once we make sure that there is no unforeseen impact for any of current use case. Benchmarks give the most increase in performance (with Scudo) when looking at highly threaded/contentious environments. For example, rcp2-benchmark experiences a 10K QPS increase (~3%), and a decrease of 50MB for the max RSS (~10%). On platforms like Android where we only have a couple of caches, performance remain similar. Reviewers: eugenis, kcc Reviewed By: eugenis Subscribers: kubamracek, delcypher, #sanitizers, llvm-commits Differential Revision: https://reviews.llvm.org/D52371 llvm-svn: 343246
* [compiler-rt] [builtins] Restore tests from r342917 (disabled in r343095) on ↵Jordan Rupprecht2018-09-273-9/+3
| | | | | | | | | | | | | | | | | | | Windows. Summary: -lm is needed for these tests on Linux, but the lit config for this package automatically adds it for Linux and excludes it for Windows. So we should be able to get these tests running again by just dropping -lm and let the lit config add it when possible. I was under the impression that -lm worked across platforms because it exists in other tests without and 'UNSUPPORTED: windows' commands (e.g. divsc3_test.c), but those are actually excluded because they 'REQUIRES: c99-complex' which is excluded from windows platforms (also by the local lit config). I don't have easy access to a windows machine to verify this patch, but I can trigger a build bot run on clang-x64-ninja-win7 shortly after submitting. Reviewers: hans Subscribers: dberris, delcypher, llvm-commits, #sanitizers Differential Revision: https://reviews.llvm.org/D52563 llvm-svn: 343245
OpenPOWER on IntegriCloud