summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* [COFF] Alias /DEBUG:FULL to /DEBUGZachary Turner2018-04-231-0/+1
| | | | | | | | | | | | | | With MSVC linker, /DEBUG is an alias of /DEBUG:FASTLINK, and if you don't want /DEBUG:FASTLINK you have to explicitly specify /DEBUG:FULL. LLD doesn't support /DEBUG:FASTLINK, and so our standard /DEBUG option is what MSVC calls /DEBUG:FULL. To provide command line compatibility with MSVC, we should also support /DEBUG:FULL, and since it's the same as what LLD already does for /DEBUG, just alias it. llvm-svn: 330647
* [DAGCombiner] Unfold scalar masked merge if profitableRoman Lebedev2018-04-233-120/+170
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This is [[ https://bugs.llvm.org/show_bug.cgi?id=37104 | PR37104 ]]. [[ https://bugs.llvm.org/show_bug.cgi?id=6773 | PR6773 ]] will introduce an IR canonicalization that is likely bad for the end assembly. Previously, `andl`+`andn`/`andps`+`andnps` / `bic`/`bsl` would be generated. (see `@out`) Now, they would no longer be generated (see `@in`). So we need to make sure that they are still generated. If the mask is constant, we do nothing. InstCombine should have unfolded it. Else, i use `hasAndNot()` TLI hook. For now, only handle scalars. https://rise4fun.com/Alive/bO6 ---- I *really* don't like the code i wrote in `DAGCombiner::unfoldMaskedMerge()`. It is super fragile. Is there something like IR Pattern Matchers for this? Reviewers: spatel, craig.topper, RKSimon, javed.absar Reviewed By: spatel Subscribers: andreadb, courbet, kristof.beyls, javed.absar, rengolin, nemanjai, llvm-commits Differential Revision: https://reviews.llvm.org/D45733 llvm-svn: 330646
* [X86][AArch64][NFC] Add tests for masked merge unfoldingRoman Lebedev2018-04-2310-0/+4008
| | | | | | | | | | | | | | | | | | | | Summary: This is [[ https://bugs.llvm.org/show_bug.cgi?id=37104 | PR37104 ]]. [[ https://bugs.llvm.org/show_bug.cgi?id=6773 | PR6773 ]] will introduce an IR canonicalization that is likely bad for the end assembly. Previously, `andl`+`andn`/`andps`+`andnps` / `bic`/`bsl` would be generated. (see `@out`) Now, they would no longer be generated (see `@in`). I'm guessing `llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp` should be able to unfold this. Reviewers: spatel, craig.topper, RKSimon, javed.absar Reviewed By: spatel Subscribers: nemanjai, rengolin, javed.absar, kristof.beyls, llvm-commits Differential Revision: https://reviews.llvm.org/D45563 llvm-svn: 330645
* Remove duplicate "error:" from an error message.Rui Ueyama2018-04-233-8/+8
| | | | | | | This patch also simplifies the code a bit which wasn't committed in https://reviews.llvm.org/r330600. llvm-svn: 330644
* [Sanitizer] Internal Printf string width + left-justify.Alex Shlyapnikov2018-04-232-11/+35
| | | | | | | | | | | | | | | | | | | | | | | | | Summary: Example: Printf("%-5s", "123"); should yield: '123 ' In case Printf's requested string field width is larger than the string argument length, the resulting string should be padded up to the requested width. For the simplicity sake, implementing left-justified (right padding) only. Reviewers: eugenis Subscribers: kubamracek, delcypher, #sanitizers, llvm-commits Differential Revision: https://reviews.llvm.org/D45906 llvm-svn: 330643
* [AggressiveInstCombine] add tests for PR37098; NFCSanjay Patel2018-04-231-0/+39
| | | | | | | | | I'm not sure if this is where we should try to fold these patterns inspired by: https://bugs.llvm.org/show_bug.cgi?id=37098 ...if this isn't the right place, we can move the tests. llvm-svn: 330642
* [CallSiteSplit] Make sure we remove nonnull if the parameter turns out to be ↵Xin Tong2018-04-232-1/+34
| | | | | | | | | | | | | | a constant. Summary: We do not need nonull attribute if we know an argument is going to be constant. Reviewers: junbuml, davide, fhahn Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D45608 llvm-svn: 330641
* [X86] Revert r330638 - accidental commitGabor Buella2018-04-2317-216/+2
| | | | llvm-svn: 330640
* Fix a broken typedef; NFCIGeorge Burgess IV2018-04-231-4/+1
| | | | | | | | | | | | | Richard Smith noted that `typedef typename iplist::iplist_impl_type iplist_impl_type` is incorrect, per http://eel.is/c++draft/basic.scope#class-2 It seems that neither clang nor gcc get too angry about this, but a newer version of msvc does. Thanks to jcmac on IRC for pointing this out! llvm-svn: 330639
* [X86] movdiri and movdir64b instructionsGabor Buella2018-04-2317-2/+216
| | | | | Reviewers: craig.topper llvm-svn: 330638
* [clangd] Implementation of workspace/symbol requestMarc-Andre Laperle2018-04-2322-25/+714
| | | | | | | | | | | | | | | | | | | | | | | Summary: This is a basic implementation of the "workspace/symbol" request which is used to find symbols by a string query. Since this is similar to code completion in terms of result, this implementation reuses the "fuzzyFind" in order to get matches. For now, the scoring algorithm is the same as code completion and improvements could be done in the future. The index model doesn't contain quite enough symbols for this to cover common symbols like methods, enum class enumerators, functions in unamed namespaces, etc. The index model will be augmented separately to achieve this. Reviewers: sammccall, ilya-biryukov Reviewed By: sammccall Subscribers: jkorous, hokein, simark, sammccall, klimek, mgorny, ilya-biryukov, mgrang, jkorous-apple, ioeric, MaskRay, cfe-commits Differential Revision: https://reviews.llvm.org/D44882 llvm-svn: 330637
* Revert "[libcxx] implement <experimental/simd> declarations based on P0214R7."Tim Shen2018-04-2314-1956/+0
| | | | | | | | This reverts commit r330627. This causes several bots to freak out. llvm-svn: 330636
* [MemCpyOpt] Skip optimizing basic blocks not reachable from entryBjorn Pettersson2018-04-232-1/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Skip basic blocks not reachable from the entry node in MemCpyOptPass::iterateOnFunction. Code that is unreachable may have properties that do not exist for reachable code (an instruction in a basic block can for example be dominated by a later instruction in the same basic block, for example if there is a single block loop). MemCpyOptPass::processStore is only safe to use for reachable basic blocks, since it may iterate past the basic block beginning when used for unreachable blocks. By simply skipping to optimize unreachable basic blocks we can avoid asserts such as "Assertion `!NodePtr->isKnownSentinel()' failed." in MemCpyOptPass::processStore. The problem was detected by fuzz tests. Reviewers: eli.friedman, dneilson, efriedma Reviewed By: efriedma Subscribers: efriedma, llvm-commits Differential Revision: https://reviews.llvm.org/D45889 llvm-svn: 330635
* [OPENMP] Formatting and code improvement, NFC.Alexey Bataev2018-04-231-88/+93
| | | | llvm-svn: 330634
* Fix typo in comment.Nico Weber2018-04-231-1/+1
| | | | llvm-svn: 330633
* [WebAssembly] MC: Refactor section creation codeSam Clegg2018-04-231-17/+14
| | | | | | | | | Remove the use of default argument in favor of a separate startCustomSection method. Differential Revision: https://reviews.llvm.org/D45794 llvm-svn: 330632
* [CODE_OWNERS] Update my email address.Quentin Colombet2018-04-231-1/+1
| | | | | | NFC llvm-svn: 330631
* Reland r329956, "AArch64: Introduce a DAG combine for folding offsets into ↵Peter Collingbourne2018-04-238-83/+256
| | | | | | | | | | | | | | | | | | | | addresses.", with a fix for the bot failure. This reland includes a check to prevent the DAG combiner from folding an offset that is smaller than the existing one. This can cause oscillations between two possible DAGs, which was the cause of the hang and later assertion failure observed on the lnt-ctmark-aarch64-O3-flto bot. http://green.lab.llvm.org/green/job/lnt-ctmark-aarch64-O3-flto/2024/ Original commit message: > This is a code size win in code that takes offseted addresses > frequently, such as C++ constructors that typically need to compute > an offseted address of a vtable. This reduces the size of Chromium > for Android's .text section by 108KB. Differential Revision: https://reviews.llvm.org/D45199 llvm-svn: 330630
* [DSE] Teach the pass that atomic memory intrinsics are stores.Daniel Neilson2018-04-235-42/+52
| | | | | | | | | | | | | | | | | | | Summary: This change teaches DSE that the atomic memory intrinsics are stores that can be eliminated, and can allow other stores to be eliminated. This change specifically does not teach DSE that these intrinsics can be partially eliminated (i.e. length reduced, and dest/src changed); that will be handled in another change. Reviewers: mkazantsev, skatkov, apilipenko, efriedma, rsmith Reviewed By: efriedma Subscribers: dmgreen, llvm-commits Differential Revision: https://reviews.llvm.org/D45535 llvm-svn: 330629
* [HWASan] Add files missing in r330624Alex Shlyapnikov2018-04-233-0/+244
| | | | llvm-svn: 330628
* [libcxx] implement <experimental/simd> declarations based on P0214R7.Tim Shen2018-04-2314-0/+1956
| | | | | | | | | | | | | | | Summary: The patch includes all declarations, and also implements the following features: * ABI. * narrowing-conversion related SFIANE, including simd<> ctors and (static_)simd_cast. Reviewers: mclow.lists, EricWF Subscribers: lichray, sanjoy, MaskRay, cfe-commits Differential Revision: https://reviews.llvm.org/D41148 llvm-svn: 330627
* DR727: remove wrong assertion for use of class-scope explicitRichard Smith2018-04-232-5/+28
| | | | | | specialization without -fms-extensions. llvm-svn: 330626
* [AArch64] Add cost model test case for transposeMatthew Simpson2018-04-231-0/+182
| | | | | | | This patch adds a cost model test case for vector shuffles having transpose masks. The given costs are inaccurate and will be updated in a follow-on patch. llvm-svn: 330625
* [HWASan] Introduce non-zero based and dynamic shadow memory (compiler-rt).Alex Shlyapnikov2018-04-2310-70/+169
| | | | | | | | | | | | | | | Retire the fixed shadow memory mapping to avoid conflicts with default process memory mapping (currently manifests on Android). Tests on AArch64 show <1% performance loss and code size increase, making it possible to use dynamic shadow memory by default. Keep the fixed shadow memory mapping around to be able to run performance comparison tests later. Re-commiting D45847 with fixed shadow for x86-64. llvm-svn: 330624
* [HWASan] Switch back to fixed shadow mapping for x86-64Alex Shlyapnikov2018-04-231-1/+1
| | | | | | | | | | For now switch back to fixed shadow mapping for x86-64 due to the issues with IFUNC linking on older binutils. More details will be added to https://bugs.chromium.org/p/chromium/issues/detail?id=835864 Differential Revision: https://reviews.llvm.org/D45840 llvm-svn: 330623
* Improve checks in test/Frontend/ftime-report-template-decl.cppBjorn Pettersson2018-04-231-2/+2
| | | | | | | | | | | | | | | | | Some buildbots seems to have problems with the CHECKs in test/Frontend/ftime-report-template-decl.cpp. I this the problem is that the order in which timers are printed is based on consumed wall time. So there is no guarantee in which order the timers are printed. This patch uses CHECK-DAG instead of CHECK to make the test case less sensitive to the actual time used by the different passes. The (sometimes) failing test cases where introduced in trunk@330571. llvm-svn: 330622
* [X86] Add disassembler test cases for bswap.Craig Topper2018-04-231-0/+9
| | | | | | | | This demonstrates a bug where the encoding for a 16-bit bswap prints a 16-bit register and a 32-bit mnemonic. Intel docs say 16-bit bswap is undefined. We should either claim it as an invalid encoding or we should print a 16-bit mnemonic. objdump does print the encoding as bswap with a 16-bit register. But it doesn't seem to ever print a suffix. llvm-svn: 330621
* [OPENMP] Do not cast captured by value variables with pointer types inAlexey Bataev2018-04-232-5/+15
| | | | | | | | | | | NVPTX target. When generating the wrapper function for the offloading region, we need to call the outlined function and cast the arguments correctly to follow the ABI. Usually, variables captured by value are casted to `uintptr_t` type. But this should not performed for the variables with pointer type. llvm-svn: 330620
* Revert r330474 - "[HWASan] Introduce non-zero based and dynamic shadow ↵Reid Kleckner2018-04-2313-409/+70
| | | | | | | | | | | | | | | memory (compiler-rt)." This commit causes internal errors with ld.bfd 2.24. My guess is that the ifunc usage in this commit is causing problems. This is the default system linker on Trusty Tahr, which is from 2014. I claim it's still in our support window. Maybe we will decide to drop support for it, but let's get the bots green while we do the investigation and have that discussion. Discovered here: https://crbug.com/835864 llvm-svn: 330619
* [SelectionDAG] Dump debug locs in SDNodesVedant Kumar2018-04-232-0/+62
| | | | | | | | | This helps debug issues where selection-dag assigns the wrong location to an instruction. Differential Revision: https://reviews.llvm.org/D45913 llvm-svn: 330618
* [CMake] Add the missing `dsymutil` dependency when running tests.Davide Italiano2018-04-231-0/+1
| | | | llvm-svn: 330617
* Fix clang-cl warnings in compiler-rtReid Kleckner2018-04-233-4/+5
| | | | | | | | | The profile library was missing some includes and was erroneously using ftruncate. WinASan was using `= {0}` to initialize structs, which creates -Wmissing-field-initializers and -Wmissing-braces warnings with clang. Use `= {}` instead, since this is C++. llvm-svn: 330616
* [MC] Remove MachineInstr reference in MC layer (PR37160)Simon Pilgrim2018-04-232-6/+1
| | | | | | | | Only add support for getSchedInfoStr(const MachineInstr &MI) at the TargetSubtargetInfo level. Really, the getSchedInfoStr calls need to be removed entirely, we should just return a latency/rthroughput through the subtarget and keep a string creation helper function somewhere else. llvm-svn: 330615
* Fix -Wtautological-compare warning with npos on WindowsReid Kleckner2018-04-231-2/+1
| | | | llvm-svn: 330614
* Quick fix for rC330605: specify a target arch for testAleksei Sidorin2018-04-231-1/+1
| | | | llvm-svn: 330613
* AMDGPU: Move a flawed assert when spilling SGPRsMatt Arsenault2018-04-233-4/+33
| | | | | | | | It's possible to validly spill the frame offset register in a call sequence to a VGPR. There are definitely issues with SGPR spilling to memory, so move the assert later. llvm-svn: 330612
* [X86] Replace x87 instregex with instrs if they only match one instructionSimon Pilgrim2018-04-236-43/+37
| | | | llvm-svn: 330611
* Fix computeSymbolSizes SEGFAULT on invalid fileAdrian Prantl2018-04-232-1/+9
| | | | | | | | | | | | | | | | | | | | | | | | | We use llvm-symbolizer in some production systems, and we run it against all possibly related files, including some that are not ELF. We noticed that for some of those invalid files, llvm-symbolizer would crash with SEGFAULT. Here is an example of such a file. It is due to that in computeSymbolSizes, a loop uses condition for (unsigned I = 0, N = Addresses.size() - 1; I < N; ++I) { where if Addresses.size() is 0, N would overflow and causing the loop to access invalid memory. Instead of patching the loop conditions, the commit makes so that the function returns early if Addresses is empty. Validated by checking that llvm-symbolizer no longer crashes. Patch by Teng Qin! Differential Revision: https://reviews.llvm.org/D44285 llvm-svn: 330610
* [clangd][tests] Fix delimiter handlingJan Korous2018-04-232-1/+14
| | | | | | | | Empty line shouldn't be considered a delimiter Differential Revision: https://reviews.llvm.org/D45764 llvm-svn: 330609
* [clangd][tests] Fix handling of EOF in delimited inputJan Korous2018-04-232-9/+19
| | | | | | | | Request in delimited input ended by EOF shouldn't be an error state. Comments at the end of test file shouldn't be logged as an error state. Input mirroring should work for the last request in delimited test file. llvm-svn: 330608
* AMDGPU: Assign enum name to stack IDMatt Arsenault2018-04-233-2/+10
| | | | | | | | | Also assert that it is correct for SGPRs. There is currently a bug where stack slot coloring replaces SGPR spill FIs with one with the default ID, which results in a more confusing assert later about a dead object. llvm-svn: 330607
* StackSlotColoring: Fix missing skipFunction checkMatt Arsenault2018-04-231-0/+3
| | | | llvm-svn: 330606
* [analyzer] Don't crash on printing ConcreteInt of size >64 bitsAleksei Sidorin2018-04-232-7/+10
| | | | | | | | Printing of ConcreteInts with size >64 bits resulted in assertion failure in get[Z|S]ExtValue() because these methods are only allowed to be used with integers of 64 max bit width. This patch fixes the issue. llvm-svn: 330605
* Fix case of LLVM library names.Nico Weber2018-04-231-3/+3
| | | | llvm-svn: 330604
* [SelectionDAG] Refactor lowering of atomic memory intrinsics.Daniel Neilson2018-04-233-91/+167
| | | | | | | | | | | Summary: This just refactors the lowering of the atomic memory intrinsics to more closely match the code patterns used in the lowering of the non-atomic memory intrinsics. Specifically, we encapsulate the lowering in SelectionDAG::getAtomicMem*() functions rather than embedding the code directly in the SelectionDAGBuilder code. llvm-svn: 330603
* [clangd] Fix Context::derive to actually call the right method.Benjamin Kramer2018-04-231-1/+1
| | | | | | C++ is weird. llvm-svn: 330602
* Remove unused code (made unused by r161073, and later more so by r248043).Nico Weber2018-04-231-6/+0
| | | | llvm-svn: 330601
* [PPC64] Fix toc restore nops offset for V2 ABIZaara Syeda2018-04-237-66/+122
| | | | | | | | | | The PPC64 V2 ABI restores the toc base by loading from an offset of 24 from r1. This patch fixes the offset and updates the testcases from V1 to V2. It also issues an error when a nop is missing after a call to an external function. Differential Revision: https://reviews.llvm.org/D45892 llvm-svn: 330600
* [clangd] Prune some dead declarations. No functionality change.Benjamin Kramer2018-04-232-9/+0
| | | | llvm-svn: 330599
* [scudo] Read ARM feature bits using Fuchsia APIs.Kostya Kortchinsky2018-04-231-1/+12
| | | | | | | | | | | | | | | | | Summary: Fuchsia uses zx_system_get_features in lieu of getauxval. Use this call when checking for CRC32 support. Reviewers: cryptoad Reviewed By: cryptoad Subscribers: delcypher, llvm-commits, #sanitizers, kristof.beyls, chrib Differential Revision: https://reviews.llvm.org/D45896 llvm-svn: 330598
OpenPOWER on IntegriCloud