summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* Revert [Windows] Disable TrapUnreachable for Win64, add SEH_NoReturnReid Kleckner2019-09-0321-145/+38
| | | | | | | | | | | | | | | | | | This reverts r370525 (git commit 0bb1630685fba255fa93def92603f064c2ffd203) Also reverts r370543 (git commit 185ddc08eed6542781040b8499ef7ad15c8ae9f4) The approach I took only works for functions marked `noreturn`. In general, a call that is not known to be noreturn may be followed by unreachable for other reasons. For example, there could be multiple call sites to a function that throws sometimes, and at some call sites, it is known to always throw, so it is followed by unreachable. We need to insert an `int3` in these cases to pacify the Windows unwinder. I think this probably deserves its own standalone, Win64-only fixup pass that runs after block placement. Implementing that will take some time, so let's revert to TrapUnreachable in the mean time. llvm-svn: 370829
* [WebAssembly] Compare functions by names in Emscripten SjljHeejin Ahn2019-09-032-64/+74
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This removes all string constants for function names and compares functions by string directly when needed. Many of these constants are used only once or twice so the benefit of defining them separately is not very clear, and this actually fixes a bug. When we already have a `malloc` declaration which is an alias to something else within the module, ``` @malloc = weak hidden alias i8* (i32), i8* (i32)* @dlmalloc ``` (this happens compiling with emscripten with `-s WASM_OBJECT_FILES=0` because all bc files are merged before being fed into `wasm-ld` which runs the backend optimizations as LTO) `Module::getFunction("malloc")` in `canLongjmp` returns `nullptr` because `Module::getFunction` dyncasts pointer into `Function`, but the alias is a `GlobalValue` but not a `Function`. This makes `canLongjmp` return false for `malloc` in this case, and we end up adding a lot of longjmp handling code around malloc. This is not only a code size increase but actually a bug because `malloc` is used in the entry block when preparing for setjmp tables for emscripten sjlj handling, and this makes initial setjmp preparation, which has to happen in the entry block, move to another split block, and this interferes with SSA update later. This also adds two more functions, `getTempRet0` and `setTempRet0`, in the list of not longjmp-able functions. Fixes https://github.com/emscripten-core/emscripten/issues/8935. Reviewers: sbc100 Subscribers: mehdi_amini, jgravelle-google, hiraditya, sunfish, dexonsmith, dschuff, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D67129 llvm-svn: 370828
* [llvm-profdata] Add mode to recover from profile read failuresVedant Kumar2019-09-034-78/+89
| | | | | | | | | | Add a mode in which profile read errors are not immediately treated as fatal. In this mode, merging makes forward progress and reports failure only if no inputs can be read. Differential Revision: https://reviews.llvm.org/D66985 llvm-svn: 370827
* [InstrProf] Tighten a check for malformed data records in raw profilesVedant Kumar2019-09-034-6/+23
| | | | | | | | | | | | | The check needs to validate a counter offset before performing pointer arithmetic with the (potentially corrupt) offset. Found by UBSan's pointer overflow check. rdar://54843625 Differential Revision: https://reviews.llvm.org/D66979 llvm-svn: 370826
* [libclang][test][NFC] Split off fixture from tests.Jan Korous2019-09-032-71/+95
| | | | llvm-svn: 370825
* [GVN] Remove a todo introduced w/rL370791Philip Reames2019-09-031-3/+0
| | | | | | | | | | When I dug into this, it turns out to be *much* more involved than I'd realized and doesn't actually simplify anything. The general purpose of the leader table is that we want to find the most-dominating definition quickly. The problem for equivalance folding is slightly different; we want to find the most dominating *value* whose definition block dominates our use quickly. To make this change, we'd end up having to restructure the leader table (either the sorting thereof, or maybe even introducing multiple leader tables per value) and that complexity is just not worth it. llvm-svn: 370824
* [AArch64][GlobalISel] Legalize 128 bit divisions to libcalls.Amara Emerson2019-09-033-4/+116
| | | | | | | | | Now that we have the infrastructure to support s128 types as parameters we can expand these to libcalls. Differential Revision: https://reviews.llvm.org/D66185 llvm-svn: 370823
* [GlobalISel][CallLowering] Add support for splitting types according to ↵Amara Emerson2019-09-0312-84/+242
| | | | | | | | | | | | | | calling conventions. On AArch64, s128 types have to be split into s64 GPRs when passed as arguments. This change adds the generic support in call lowering for dealing with multiple registers, for incoming and outgoing args. Support for splitting for return types not yet implemented. Differential Revision: https://reviews.llvm.org/D66180 llvm-svn: 370822
* [MemorySSA] Disable MemorySSA use.Alina Sbirlea2019-09-036-53/+38
| | | | | | Differential Revision: https://reviews.llvm.org/D58311 llvm-svn: 370821
* [Attributor] Use the delete API for livenessJohannes Doerfert2019-09-033-16/+24
| | | | | | | | | | | | Reviewers: uenoku, sstefan1 Subscribers: hiraditya, bollu, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D66833 llvm-svn: 370818
* [Attributor] Deduce "no-capture" argument attributeJohannes Doerfert2019-09-0313-127/+579
| | | | | | | | | | | | | | Add the no-capture argument attribute deduction to the Attributor fixpoint framework. The new string attributed "no-capture-maybe-returned" is introduced to allow deduction of no-capture through functions that "capture" an argument but only by "returning" it. It is only used by the Attributor for testing. Differential Revision: https://reviews.llvm.org/D59922 llvm-svn: 370817
* reland "[lld-link] implement -start-lib and -end-lib"Bob Haarman2019-09-0315-70/+316
| | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This is a re-land of r370487 with a fix for the use-after-free bug that rev contained. This implements -start-lib and -end-lib flags for lld-link, analogous to the similarly named options in ld.lld. Object files after -start-lib are included in the link only when needed to resolve undefined symbols. The -end-lib flag goes back to the normal behavior of always including object files in the link. This mimics the semantics of static libraries, but without needing to actually create the archive file. Reviewers: ruiu, smeenai, MaskRay Reviewed By: ruiu, MaskRay Subscribers: akhuang, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D66848 llvm-svn: 370816
* [Driver] Remove duplicate option parsing (NFC)Jonas Devlieghere2019-09-031-8/+1
| | | | | | | | We were checking OPT_no_use_colors three times, twice to disable colors and once to enable debug mode. This simplifies things and now the option is only checked once. llvm-svn: 370814
* [CodeGen] Use FSHR in DAGTypeLegalizer::ExpandIntRes_MULFIXBjorn Pettersson2019-09-035-136/+99
| | | | | | | | | | | | | | | | | | | | | | | Summary: Simplify the right shift of the intermediate result (given in four parts) by using funnel shift. There are some impact on lit tests, but that seems to be related to register allocation differences due to how FSHR is expanded on X86 (giving a slightly different operand order for the OR operations compared to the old code). Reviewers: leonardchan, RKSimon, spatel, lebedev.ri Reviewed By: RKSimon Subscribers: hiraditya, asb, rbar, johnrusso, simoncook, apazos, sabuasal, niosHD, jrtc27, MaskRay, zzheng, edward-jones, rogfer01, MartinMosbeck, brucehoult, the_o, PkmX, jocewei, s.egerton, pzheng, bevinh, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D67036 llvm-svn: 370813
* Skip MCJIT unit tests if LLVM is not configured for native compilationDavid Blaikie2019-09-031-1/+7
| | | | | | | | Patch by Sergej Jaskiewicz! Differential Revision: D67089 llvm-svn: 370812
* [MemorySSA] Re-enable MemorySSA use.Alina Sbirlea2019-09-036-38/+53
| | | | | | Differential Revision: https://reviews.llvm.org/D58311 llvm-svn: 370811
* [AMDGPU] Set default flat work group size to (1,256) for HIPYaxun Liu2019-09-032-5/+7
| | | | | | Differential Revision: https://reviews.llvm.org/D67048 llvm-svn: 370808
* Unbreak the build after r370798Benjamin Kramer2019-09-031-1/+1
| | | | llvm-svn: 370807
* [MC] Pass through .code16/32/64 and .syntax unified for COFFReid Kleckner2019-09-033-11/+34
| | | | | | | | | | | | | | These flags should simply be passed through to the target, which will do the right thing. Add an MC/X86 test that uses these directives with the three primary object file formats and shows that they disassemble the same everywhere. There is a missing test for .code32 on Windows ARM, since I'm not sure exactly how to construct one. Fixes PR43203 llvm-svn: 370805
* [lldb][NFC] Remove lldbcurses.pyRaphael Isemann2019-09-031-1306/+0
| | | | | | | | | | | | | | | | Summary: This doesn't seem to be used anymore (at least I can't find any reference to this in the LLDB repo and it doesn't seem to be a standalone script). Git says this was once some new curses mode for viewing test results. Reviewers: clayborg, JDevlieghere Reviewed By: JDevlieghere Subscribers: JDevlieghere, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D67064 llvm-svn: 370804
* [OPENMP][NVPTX]Fix parallel level counter in non-SPMD mode.Alexey Bataev2019-09-034-16/+45
| | | | | | | | | | | | | | | | | | | Summary: In non-SPMD mode we may end up with the divergent threads when trying to increment/decrement parallel level counter. It may lead to incorrect calculations of the parallel level and wrong results when threads are divergent. We need to reconverge the threads before trying to modify the parallel level counter. Reviewers: grokos, jdoerfert Subscribers: guansong, openmp-commits, caomhin, kkwli0 Tags: #openmp Differential Revision: https://reviews.llvm.org/D66802 llvm-svn: 370803
* [lldb][NFC] Remove unused overload of File::ReadRaphael Isemann2019-09-032-74/+0
| | | | | | | | | | | | | | | | Summary: It's neither used or tested here and in swift-lldb, so let's get rid of it. Reviewers: #lldb, davide Reviewed By: #lldb, davide Subscribers: davide, JDevlieghere, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D67116 llvm-svn: 370802
* Disable stack exhaustion test on NetBSD, where either the detection orRichard Smith2019-09-031-0/+5
| | | | | | recovery mechanism does not appear to work. llvm-svn: 370801
* ld.lld.1: explain long options may use one or two dashesEd Maste2019-09-031-0/+11
| | | | | | Obtained from FreeBSD r329003 llvm-svn: 370800
* ld.lld.1: stylistic changes suggested by igorEd Maste2019-09-031-23/+36
| | | | | | | | | igor is an automated man page "proofreader" from FreeBSD - see http://www.wonkity.com/~wblock/igor/igor.pdf No content change. llvm-svn: 370799
* [analyzer] NonNullParamChecker and CStringChecker parameter number in ↵Kristof Umann2019-09-036-34/+45
| | | | | | | | | | | | | | | | | | | | checker message There are some functions which can't be given a null pointer as parameter either because it has a nonnull attribute or it is declared to have undefined behavior (e.g. strcmp()). Sometimes it is hard to determine from the checker message which parameter is null at the invocation, so now this information is included in the message. This commit fixes https://bugs.llvm.org/show_bug.cgi?id=39358 Reviewed By: NoQ, Szelethus, whisperity Patch by Tibor Brunner! Differential Revision: https://reviews.llvm.org/D66333 llvm-svn: 370798
* [libc++] Mark usage of _Atomic with __extension__Louis Dionne2019-09-031-1/+1
| | | | | | | | | An upcoming change in Clang will flag _Atomic as being a C11 extension. To avoid generating this warning in libc++, this commit marks the only use of _Atomic with the __extension__ extension, which suppresses such warnings. llvm-svn: 370796
* [www] Mark items complete in Clang 9 as 'Clang 9' rather than 'SVN'.Richard Smith2019-09-033-30/+33
| | | | | | Don't turn the boxes green yet, since Clang 9 hasn't been released. llvm-svn: 370795
* [CUDA] Use activemask.b32 instruction to implement __activemask w/ CUDA-9.2+Artem Belevich2019-09-031-1/+9
| | | | | | | | | | | vote.ballot instruction is gone in recent CUDA versions and vote.sync.ballot can not be used because it needs a thread mask parameter. Fortunately PTX 6.2 (introduced with CUDA-9.2) provides activemask.b32 instruction for this. Differential Revision: https://reviews.llvm.org/D66665 llvm-svn: 370792
* [GVN] Propagate simple equalities from assumes within the tail of the blockPhilip Reames2019-09-033-31/+100
| | | | | | | | | | | | This extends the existing logic for propagating constant expressions in an analogous manner for what we do across basic blocks. The core point is that we chose some order of operands, and canonicalize uses towards that one. The heuristic used is inspired by the one used across blocks; in a follow up change, I'd plan to common them so that the cross block version uses the slightly stronger ordering herein. As noted by the TODOs in the code, there's a good amount of room for improving the existing code and making it more powerful. Some follow up work planned. Differential Revision: https://reviews.llvm.org/D66977 llvm-svn: 370791
* [AArch64][GlobalISel] Don't import i64imm_32bit pattern at -O0Jessica Paquette2019-09-032-0/+43
| | | | | | | | | | | | | This pattern, when imported at -O0 adds an extra copy via the SUBREG_TO_REG. This is because the SUBREG_TO_REG is not eliminated. At all other opt levels, it is eliminated. This is a 1% geomean code size savings at -O0 on CTMark. Differential Revision: https://reviews.llvm.org/D67027 llvm-svn: 370789
* Revert r370454 "[LoopIdiomRecognize] BCmp loop idiom recognition"Roman Lebedev2019-09-036-1271/+588
| | | | | | | | | | https://bugs.llvm.org/show_bug.cgi?id=43206 was filed, claiming that there is a miscompilation. Reverting until i investigate. This reverts commit r370454 llvm-svn: 370788
* [test] Addres TestConcurrentMany*.py flakiness on macOSJonas Devlieghere2019-09-031-16/+11
| | | | | | | | | | On "fast" macOS machines, the TestConcurrentMany*.py tests would fail randomly with different numbers of breakpoints, watchpoints, etc. This seems to be avoidable by giving the threads a little time to breath after the passing the synchronization barrier. This is far from a structural fix but it reduces the flakiness. llvm-svn: 370785
* [Tests/GVN] Precommit requested test additions from D66977Philip Reames2019-09-031-0/+88
| | | | llvm-svn: 370784
* [libomptarget] Refactor activemask macro to inline functionJon Chesterfield2019-09-038-30/+29
| | | | | | | | | | | | | | | | | | Summary: [libomptarget] Refactor activemask macro to inline function See also abandoned D66846, split into this diff and others. Reviewers: jdoerfert, ABataev, grokos, ronlieb, gregrodgers Reviewed By: jdoerfert, ABataev Subscribers: openmp-commits Tags: #openmp Differential Revision: https://reviews.llvm.org/D66851 llvm-svn: 370781
* clang: default to DWARF 4 for FreeBSD 12.0 and laterEd Maste2019-09-033-3/+13
| | | | | | | | | | | | Older FreeBSD versions included GDB 6.1 and had other tools that were unable to handle debug information newer than DWARF 2. Those tools have since been updated. (An old version of GDB is still kept for kernel crash handling, but the kernel is compiled with an explicit -gdwarf2.) Reviewed by: dim Differential Revision: https://reviews.llvm.org/D66760 llvm-svn: 370779
* [test] Remove print statements and verify that the symbol existsJonas Devlieghere2019-09-031-10/+1
| | | | | | | This removes some (commented out) print statements and adds a line that verifies that uses image list to check the symbol. llvm-svn: 370777
* [lldb][NFC] Disable added frame select and all log option test on windowsRaphael Isemann2019-09-032-0/+2
| | | | llvm-svn: 370776
* [LifetimeAnalysis] Fix some false positivesGabor Horvath2019-09-032-5/+163
| | | | | | Differential Revision: https://reviews.llvm.org/D66806 llvm-svn: 370773
* [cmake] Improve comment describing the C4245 warning. NFCI.Simon Pilgrim2019-09-031-1/+1
| | | | llvm-svn: 370772
* [SVE][Inline-Asm] Fix -Wimplicit-fallthrough in AArch64ISelLowering.cppKerry McLaughlin2019-09-031-0/+1
| | | | | | | | | | | | | | | | Summary: Adds break to 'x' case in getRegForInlineAsmConstraint added by D66302, fixing the unintentional fallthrough. Reviewers: sdesmalen, rovka, cameron.mcinally, greened, gribozavr, ruiu Reviewed By: sdesmalen Subscribers: bjope, javed.absar, tschuett, kristof.beyls, rkruppe, psnobl, llvm-commits, cfe-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D67095 llvm-svn: 370769
* [clangd] Move getBeginningOfIdentifier from ClangdUnit to SourceCode. Drop ↵Sam McCall2019-09-0315-99/+105
| | | | | | dependencies on ClangdUnit from some headers. NFC llvm-svn: 370768
* [analyzer] Add a checker option to detect nested dead storesKristof Umann2019-09-037-165/+262
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Enables the users to specify an optional flag which would warn for more dead stores. Previously it ignored if the dead store happened e.g. in an if condition. if ((X = generate())) { // dead store to X } This patch introduces the `WarnForDeadNestedAssignments` option to the checker, which is `false` by default - so this change would not affect any previous users. I have updated the code, tests and the docs as well. If I missed something, tell me. I also ran the analysis on Clang which generated 14 more reports compared to the unmodified version. All of them seemed reasonable for me. Related previous patches: rGf224820b45c6847b91071da8d7ade59f373b96f3 Reviewers: NoQ, krememek, Szelethus, baloghadamsoftware Reviewed By: Szelethus Patch by Balázs Benics! Differential Revision: https://reviews.llvm.org/D66733 llvm-svn: 370767
* [clangd] Remove redundant semi-colon.Michael Liao2019-09-031-1/+1
| | | | llvm-svn: 370763
* [X86] Merge 2 consecutive HasInt256 branches. NFCI.Simon Pilgrim2019-09-031-3/+2
| | | | llvm-svn: 370761
* [clang-tidy] Fix a false positive in unused-using-decl checkHaojian Wu2019-09-032-30/+56
| | | | | | | | | | The previous matcher "hasAnyTemplateArgument(templateArgument())" only matches the first template argument, but the check wants to iterate all template arguments. This patch fixes this. Also some refactorings in this patch (to make the code reusable). llvm-svn: 370760
* [clangd] Decouple macro/decl-under-cursor finding. Don't pretend there can ↵Sam McCall2019-09-031-73/+41
| | | | | | be multiple macros. NFC. llvm-svn: 370759
* [clangd] Fix a data race in test codeIlya Biryukov2019-09-031-1/+3
| | | | | | Found by TSan, thanks bkramer for pointing this out. llvm-svn: 370758
* [clangd] Wrong attribute on debug function in r370746Sam McCall2019-09-031-1/+1
| | | | llvm-svn: 370757
* compiler-rt: use 64-bit time_t for all FreeBSD archs except i386Ed Maste2019-09-031-1/+1
| | | | | | | | | At present only i386 has 32-bit time_t on FreeBSD. Reviewed by: dim Differential Revision: https://reviews.llvm.org/D66758 llvm-svn: 370756
OpenPOWER on IntegriCloud