summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* [x86] add negative tests for setcc folds; NFCSanjay Patel2019-02-121-0/+70
| | | | llvm-svn: 353855
* [SelectionDAG] Fix return calling convention in expansion of ?MULOwhitequark2019-02-122-3/+52
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: The SMULO/UMULO DAG nodes, when not directly supported by the target, expand to a multiplication twice as wide. In case that the resulting type is not legal, the legalizer cannot directly call the intrinsic with the wide arguments; instead, it "pre-lowers" them by splitting them in halves. rL283203 made sure that on big endian targets, the legalizer passes the argument halves in the correct order. It did not do the same for the return value halves because the existing code used a hack; it put an illegal type into DAG and hoped that nothing would break and it would be correctly lowered elsewhere. rL307207 fixed this, handling return value halves similar to how argument handles are handled, but did not take big-endian targets into account. This commit fixes the expansion on big-endian targets, such as the out-of-tree OR1K target. Reviewers: eli.friedman, vadimcn Subscribers: george-hopkins, efriedma, llvm-commits Differential Revision: https://reviews.llvm.org/D45355 llvm-svn: 353854
* [CMake][Fuchsia] Pass -ldl -lpthread LDFLAGS to second stagePetr Hosek2019-02-121-0/+6
| | | | | | | We're using static libc++ for the second stage which requires explicitly linking -ldl and -lpthread. llvm-svn: 353853
* [MCA] Improved debug prints. NFCAndrea Di Biagio2019-02-123-18/+25
| | | | llvm-svn: 353852
* [PowerPC] Regenerate testSimon Pilgrim2019-02-121-153/+170
| | | | llvm-svn: 353851
* [libc++] Avoid UB in the no-exceptions mode in a few placesLouis Dionne2019-02-1214-50/+301
| | | | | | | | | | | | | | | | | | | | | | | Summary: A few places in the library seem to behave unexpectedly when the library is compiled or used with exceptions disabled. For example, not throwing an exception when a pointer is NULL can lead us to dereference the pointer later on, which is UB. This patch fixes such occurences. It's hard to tell whether there are other places where the no-exceptions mode misbehaves like this, because the replacement for throwing an exception does not always seem to be abort()ing, but at least this patch will improve the situation somewhat. See http://lists.llvm.org/pipermail/libcxx-dev/2019-January/000172.html Reviewers: mclow.lists, EricWF Subscribers: christof, jkorous, dexonsmith, libcxx-commits Differential Revision: https://reviews.llvm.org/D57761 llvm-svn: 353850
* [PPC64] Sort .toc sections accessed with small code model relocs.Sean Fertile2019-02-125-20/+27
| | | | | | | | | | | | | A follow up to the intial patch that unblocked linking against libgcc. For lld we don't need to bother tracking which objects have got based small code model relocations. This is due to the fact that the compilers on powerpc64 use the .toc section to generate indirections to symbols (rather then using got relocations) which keeps the got small. This makes overflowing a small code model got relocation very unlikely. Differential Revision: https://reviews.llvm.org/D57245 llvm-svn: 353849
* AMDGPU/GlobalISel: Add more insert/extract testcasesMatt Arsenault2019-02-122-115/+918
| | | | llvm-svn: 353848
* [Codegen] Make sure kill flags are not incorrect from removed machine phi'sDavid Green2019-02-122-3/+42
| | | | | | | | | We need to clear the kill flags on both SingleValReg and OldReg, to ensure they remain conservatively correct. Differential Revision: https://reviews.llvm.org/D58114 llvm-svn: 353847
* [llvm-dwp] Abort when dwo_id is unsetJordan Rupprecht2019-02-125-5/+13
| | | | | | | | | | | | | | | | | | | Summary: An empty dwo_id indicates a degenerate .dwo file that should not have been generated in the first place. Instead of discovering this error later when merging with another degenerate .dwo file, print an error immediately when noticing an unset dwo_id, including the filename of the offending file. Test case created by compiling a trivial file w/ `-fno-split-dwarf-inlining -gmlt -gsplit-dwarf -c` prior to r353771 Reviewers: dblaikie Reviewed By: dblaikie Subscribers: jdoerfert, aprantl, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D58085 llvm-svn: 353846
* AMDGPU/GlobalISel: Only make f16 constants legal on f16 targetsMatt Arsenault2019-02-122-14/+32
| | | | | | We could deal with it, but there's no real point. llvm-svn: 353845
* GlobalISel: Use default rounding mode when extending fconstantMatt Arsenault2019-02-121-3/+8
| | | | | | | I don't think this matters since the values should all be exactly representable. llvm-svn: 353844
* GlobalISel: Move some more legalize cases into functionsMatt Arsenault2019-02-122-165/+196
| | | | llvm-svn: 353843
* [LoopSimplifyCFG] Fix test broken in release mode in r353813Sam McCall2019-02-121-0/+1
| | | | llvm-svn: 353842
* Have Stream::PutCStringAsRawHex8 take llvm::StringRefPavel Labath2019-02-129-52/+50
| | | | | | | | | This enables the function to be called with a StringRef without jumping through any hoops. I rename the function to "PutStringAsRawHex8" to honor the extended interface. I also remove ".c_str()" from any calls to this function I could find. llvm-svn: 353841
* [Sema] Fix a crash in access checking for deduction guidesIlya Biryukov2019-02-122-1/+16
| | | | | | | | | | | | | | | | Summary: See the added test for a repro. Reviewers: sammccall Reviewed By: sammccall Subscribers: cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D58111 llvm-svn: 353840
* Renaming yet another diagnostic to not conflict; NFC.Aaron Ballman2019-02-122-2/+3
| | | | llvm-svn: 353839
* Renaming this diagnostic to not conflict with another; NFC.Aaron Ballman2019-02-122-2/+2
| | | | | | Amends r353837 which renamed the diagnostics to conflict. llvm-svn: 353838
* Fixing a typo; NFC.Aaron Ballman2019-02-122-4/+4
| | | | llvm-svn: 353837
* Disable test after r353718, r353725, r353729 while I investigateNico Weber2019-02-121-13/+17
| | | | llvm-svn: 353836
* [NFC] Simplify code & reduce nest slightlyMax Kazantsev2019-02-121-33/+35
| | | | llvm-svn: 353832
* [DebugInfo] Don't salvage load operations (PR40628).Jeremy Morse2019-02-125-19/+69
| | | | | | | | | | | | | | | | | | | | | | | | Salvaging a redundant load instruction into a debug expression hides a memory read from optimisation passes. Passes that alter memory behaviour (such as LICM promoting memory to a register) aren't aware of these debug memory reads and leave them unaltered, making the debug variable location point somewhere unsafe. Teaching passes to know about these debug memory reads would be challenging and probably incomplete. Finding dbg.value instructions that need to be fixed would likely be computationally expensive too, as more analysis would be required. It's better to not generate debug-memory-reads instead, alas. Changed tests: * DeadStoreElim: test for salvaging of intermediate operations contributing to the dead store, instead of salvaging of the redundant load, * GVN: remove debuginfo behaviour checks completely, this behaviour is still covered by other tests, * InstCombine: don't test for salvaged loads, we're removing that behaviour. Differential Revision: https://reviews.llvm.org/D57962 llvm-svn: 353824
* [DebugInfo] Keep parameter DBG_VALUEs before prologue codeDavid Stenberg2019-02-123-1/+206
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This is a preparatory change for removing the code from DebugHandlerBase::beginFunction() which changes the starting label for the first non-overlapping DBG_VALUEs of parameters to the beginning of the function. It does that to be able to show parameters when entering a function. However, that code does not consider what defines the values, which can result in the ranges for the debug values starting before their defining instructions. That code is removed in a follow-up patch. When prologue code is inserted, it leads to DBG_VALUEs that start directly in the entry block being moved down after the prologue instructions. This patch fixes that by stashing away DBG_VALUEs for parameters before emitting the prologue, and then reinserts them at the start of the block. This assumes that there is no target that somehow clobbers parameter registers in the frame setup; there is no such case in the lit tests at least. See PR40188 for more information. Reviewers: aprantl, dblaikie, rnk, jmorse Reviewed By: aprantl Subscribers: bjope, llvm-commits Tags: #debug-info Differential Revision: https://reviews.llvm.org/D57510 llvm-svn: 353823
* [clangd] Fix use-after-free in XRefsSam McCall2019-02-121-8/+8
| | | | llvm-svn: 353821
* tsan: update check_analyze.shDmitry Vyukov2019-02-121-7/+1
| | | | | | | Update numbers after 353817. This was extensively benchmarked in https://reviews.llvm.org/D54889 llvm-svn: 353820
* tsan: add fiber supportDmitry Vyukov2019-02-1213-2/+464
| | | | | | | | | | | | | | | | | This patch adds functions for managing fibers: __tsan_get_current_fiber() __tsan_create_fiber() __tsan_destroy_fiber() __tsan_switch_to_fiber() __tsan_set_fiber_name() See the added tests for use examples. Author: yuri (Yuri Per) Reviewed in: https://reviews.llvm.org/D54889 llvm-svn: 353817
* [IndVars] Fix corner case with unreachable Phi inputs. PR40454Max Kazantsev2019-02-122-9/+44
| | | | | | | | | | | | | | | Logic in `getInsertPointForUses` doesn't account for a corner case when `Def` only comes to a Phi user from unreachable blocks. In this case, the incoming value may be arbitrary (and not even available in the input block) and break the loop-related invariants that are asserted below. In fact, if we encounter this situation, no IR modification is needed. This Phi will be simplified away with nearest cleanup. Differential Revision: https://reviews.llvm.org/D58045 Reviewed By: spatel llvm-svn: 353816
* [llvm-readobj] Only allow 4-byte pr_dataFangrui Song2019-02-122-14/+12
| | | | | | | | | | | | | | | | Summary: AMD64 psABI says: "The pr_data field of each property contains a 4-byte unsigned integer." Thus we don't need to handle 8-byte pr_data. Reviewers: mike.dvoretsky, grimar, craig.topper, xiangzhangllvm, hjl.tools Reviewed By: grimar Subscribers: rupprecht, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D58103 llvm-svn: 353815
* [llvm-readobj] - Simplify .gnu.version_r dumping a bit.George Rimar2019-02-121-8/+1
| | | | | | | | | | | Current implementation takes "Number of needed versions" from DT_VERNEEDNUM dynamic tag entry. Though it would be a bit simpler to take it from sh_info section header field directly: https://docs.oracle.com/cd/E19683-01/816-1386/chapter6-94076/index.html Differential revision: https://reviews.llvm.org/D58048 llvm-svn: 353814
* [LoopSimplifyCFG] Change logic of dead loops removal to avoid hitting assertsMax Kazantsev2019-02-122-8/+56
| | | | | | | | | | | | | | | | | | | | The function `LI.erase` has some invariants that need to be preserved when it tries to remove a loop which is not the top-level loop. In particular, it requires loop's preheader to be strictly in loop's parent. Our current logic of deletion of dead blocks may erase the information about preheader before we handle the loop, and therefore we may hit this assertion. This patch changes the logic of loop deletion: we make them top-level loops before we actually erase them. This allows us to trigger the simple branch of `erase` logic which just detatches blocks from the loop and does not try to do some complex stuff that need this invariant. Thanks to @uabelho for reporting this! Differential Revision: https://reviews.llvm.org/D57221 Reviewed By: fedor.sergeev llvm-svn: 353813
* Extract common PlatformPOSIX/Windows code into a separate classPavel Labath2019-02-127-359/+200
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: The two classes contained a lot of duplicated code, but there wasn't a good place to factor it to. It couldn't be the base Platform class, since we also have platforms which are only remote (such as PlatformGDBRemoteServer), and so it did not make sense for those to have an m_remote_platform member. This patch creates a new class, RemoteAwarePlatform, which can serve as a base class for platforms which can both serve as a host, and forward actions to a remote system. It is motivated partly by D56232 (which was about to add a bunch of additional duplicated methods), and partly by my own need to modify a function which happens to be implemented in both places identically. The patch moves the methods which are trivially identical in the two classes into the common base class, there were one or two more methods which could probably be merged into one, but this wasn't completely trivial, so I did not attempt to do that now. Reviewers: jingham, zturner, clayborg, asmith Subscribers: emaste, mgorny, Hui, lldb-commits Differential Revision: https://reviews.llvm.org/D58052 llvm-svn: 353812
* [yaml2obj/obj2yaml] - Move `Info` field out from `Section` class.George Rimar2019-02-126-12/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | ELFYAML.h contains a `Section` class which is a base for a few other sections classes that are used for mapping different section types. `Section` has a `StringRef Info` field used for storing sh_info. At the same time, sh_info has very different meanings for sections and cannot be processed in a similar way generally, for example ELFDumper does not handle it in `dumpCommonSection` but do that in `dumpGroup` and `dumpCommonRelocationSection` respectively. At this moment, we have and handle it as a string, because that was possible for the current use case. But also it can simply be a number: For SHT_GNU_verdef is "The number of version definitions within the section." The patch moves `Info` field out to be able to have it as a number. With that change, each class will be able to decide what type and purpose of the sh_info field it wants to use. I also had to edit 2 test cases. This is because patch fixes a bug. Previously we accepted yaml files with Info fields for all sections (for example, for SHT_DYNSYM too). But we do not handle it and the resulting objects had zero sh_info fields set for such sections. Now it is accepted only for sections that supports it. Differential revision: https://reviews.llvm.org/D58054 llvm-svn: 353810
* LibFuzzer.rst: double backticksHans Wennborg2019-02-121-3/+3
| | | | llvm-svn: 353809
* [NativePDB] Process virtual bases in the correct orderAleksandr Urakov2019-02-124-12/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This patch makes virtual bases to be added in the correct order to the bases list. It is important because `VTableContext` (`MicrosoftVTableContext` in our case) uses then the order of virtual bases in the list to restore the virtual table indexes. These indexes are used then to resolve the layout of the virtual bases. We haven't enough information about offsets of virtual bases regarding to the object (moreover, in a common case we can't rely on such information, see the example here: https://reviews.llvm.org/D53506#1272306 ), but there should be enough information to restore the layout of the virtual bases from the indexes in runtime. After D53506 this information is used whenever possible, so there should be no problems with virtual bases' fields reading. Reviewers: zturner, rnk, stella.stamenova Subscribers: abidh, teemperor, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D56904 llvm-svn: 353806
* tsan: Introduce in_symbolizer() function for Thread sanitizerDmitry Vyukov2019-02-124-22/+28
| | | | | | | | | This change is preparation for fiber support. Author: yuri (Yuri Per) Reviewed in: https://reviews.llvm.org/D58104 llvm-svn: 353805
* Delete blocks from DTU to avoid dangling pointersMax Kazantsev2019-02-121-1/+1
| | | | llvm-svn: 353804
* [LoopSimplifyCFG] Pay respect to LCSSA when removing dead blocksMax Kazantsev2019-02-122-9/+30
| | | | | | | | | | | Utility function that we use for blocks deletion always unconditionally removes one-input Phis. In LoopSimplifyCFG, it can lead to breach of LCSSA form. This patch alters this function to keep them if needed. Differential Revision: https://reviews.llvm.org/D57231 Reviewed By: fedor.sergeev llvm-svn: 353803
* [X86] Use the new unaligned vector typedefs for the loadu/storeu intrinsics ↵Craig Topper2019-02-122-8/+8
| | | | | | | | pointer arguments. This matches what gcc does and what was suggested by rnk in PR20670. llvm-svn: 353802
* [NFC] Rename DontDeleteUselessPHIs --> KeepOneInputPHIsMax Kazantsev2019-02-129-29/+29
| | | | llvm-svn: 353801
* [Statepoint Lowering] Update misleading comments about chainsPhilip Reames2019-02-121-9/+7
| | | | llvm-svn: 353800
* [NFC] Add parameter for keeping one-input Phis in DeleteDeadBlock(s)Max Kazantsev2019-02-122-11/+19
| | | | llvm-svn: 353799
* [X86] Collapse FP_TO_INT16_IN_MEM/FP_TO_INT32_IN_MEM/FP_TO_INT64_IN_MEM into ↵Craig Topper2019-02-123-21/+19
| | | | | | a single opcode using memory VT to distinquish. NFC llvm-svn: 353798
* [X86] Remove the value type operand from the floating point load/store ↵Craig Topper2019-02-123-58/+84
| | | | | | | | MemIntrinsicSDNodes. Use the MemoryVT instead. NFCI We already have the memory VT, we can just match from that during isel. llvm-svn: 353797
* [CMake] Avoid internal dependencies in the runtimes buildPetr Hosek2019-02-121-1/+1
| | | | | | | When performing runtimes build, dependencies like clang and clang-headers aren't available. This was accidentally omitted in D57992. llvm-svn: 353796
* Remove redundant ::get() for smart pointer. (NFC)Jonas Devlieghere2019-02-1252-191/+187
| | | | | | | | This commit removes redundant calls to smart pointer’s ::get() method. https://clang.llvm.org/extra/clang-tidy/checks/readability-redundant-smartptr-get.html llvm-svn: 353795
* [libFuzzer] make the fork mode less verboseKostya Serebryany2019-02-125-28/+52
| | | | llvm-svn: 353794
* [build] Remove a stray comment. NFCShoaib Meenai2019-02-121-1/+1
| | | | | | | The CMake change associated with this comment was removed but the comment got left behind. Add a newline instead. llvm-svn: 353793
* [libFuzzer] teach the fork mode to ignore OOMs and timeoutsKostya Serebryany2019-02-127-11/+47
| | | | llvm-svn: 353792
* Fix VS2015 build problem introduced by r353370.Douglas Yung2019-02-121-2/+2
| | | | llvm-svn: 353791
* [CMake] Don't override required compiler flags in the runtimes buildPetr Hosek2019-02-121-13/+5
| | | | | | | | | Ensure that HandleLLVMOptions adds all necessary required flags, including -Wno-error when building with LLVM_ENABLE_WERROR enabled. Differential Revision: https://reviews.llvm.org/D58092 llvm-svn: 353790
OpenPOWER on IntegriCloud