- Mar 26, 2020
-
-
Dmitry Vyukov authored
When creating and destroying fibers in tsan a thread state is created and destroyed. Currently, a memory mapping is leaked with each fiber (in __tsan_destroy_fiber). This causes applications with many short running fibers to crash or hang because of linux vm.max_map_count. The root of this is that ThreadState holds a pointer to ThreadSignalContext for handling signals. The initialization and destruction of it is tied to platform specific events in tsan_interceptors_posix and missed when destroying a fiber (specifically, SigCtx is used to lazily create the ThreadSignalContext in tsan_interceptors_posix). This patch cleans up the memory by inverting the control from the platform specific code calling the generic ThreadFinish to ThreadFinish calling a platform specific clean-up routine after finishing a thread. The relevant code causing the leak with fibers is the fiber destruction: void FiberDestroy(ThreadState *thr, uptr pc, ThreadState *fiber) { FiberSwitchImpl(thr, fiber); ThreadFinish(fiber); FiberSwitchImpl(fiber, thr); internal_free(fiber); } I would appreciate feedback if this way of fixing the leak is ok. Also, I think it would be worthwhile to more closely look at the lifecycle of ThreadState (i.e. it uses no constructor/destructor, thus requiring manual callbacks for cleanup) and how OS-Threads/user level fibers are differentiated in the codebase. I would be happy to contribute more if someone could point me at the right place to discuss this issue. Reviewed-in: https://reviews.llvm.org/D76073 Author: Florian (Florian) -
Dmitry Vyukov authored
tsan while used by golang's race detector was not working on alpine linux, since it is using musl-c instead of glibc. Since alpine is very popular distribution for container deployments, having working race detector would be nice. This commits adds some ifdefs to get it working. It fixes https://github.com/golang/go/issues/14481 on golang's issue tracker. Reviewed-in: https://reviews.llvm.org/D75849 Author: graywolf-at-work (Tomas Volf)
-
Pavel Labath authored
The reason is to add .yaml as a valid test suffix. The test folder contains one yaml file, which wasn't being run because of that. Unsurprisingly the test fails, but this was not because the underlying functionality was broken, but rather because the test was setup incorrectly (most likely due to overly aggressive simplification of the test data on my part). Therefore this patch also tweaks the test inputs in order to test what they are supposed to test, and also updates some other breakpad tests (because they depend on the same inputs as this one) to be more realistic -- specifically it avoids putting symbols to the first page of the module, as that's where normally the COFF header would reside.
-
- Mar 25, 2020
-
-
Yvan Roux authored
Move ARM ConstantIsland and LowOverheadLopps passes later in the pipeline such that they will be run after the upcoming Machine Outlining pass. Differential Revision: https://reviews.llvm.org/D76065
-
Marcel Koester authored
[mlir] Removed TanHOp lowering from ConvertStandardToLLVM since there is no reasonable TanH representation in LLVM. Summary: The current ConvertStandardToLLVM phase lowers the standard TanHOp to function calls to external tanh symbols. However, this leads to misunderstandings since these external symbols are not defined anywhere. This commit removes the TanHOp lowering functionality from ConvertStandardToLLVM, adapts the LowerGpuOpsToNVVMOps and LowerGpuOpsToROCDLOps passes and adjusts the affected test cases. Reviewers: mravishankar, herhut Subscribers: jholewinski, mehdi_amini, rriddle, jpienaar, burmako, shauheen, antiagainst, nicolasvasilache, csigg, arpith-jacob, mgester, lucyrfox, aartbik, liufengdb, Joonsoo, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D75509
-
LLVM GN Syncbot authored
-
cdevadas authored
This pass can handle all the optimization opportunities found just before code emission. Presently it includes the handling of vcc branch optimization that was handled earlier in SIInsertSkips. Reviewed By: arsenm Differential Revision: https://reviews.llvm.org/D76712
-
Simon Pilgrim authored
-
Jonas Paulsson authored
A spilled load of an immediate can use MVHI/MVGHI instead. A compare of a spilled register against an immediate can use CHSI/CGHSI. A logical compare can use CLFHSI/CLGHSI. Review: Ulrich Weigand Differential Revision: https://reviews.llvm.org/D76055
-
Fangrui Song authored
llvm-objdump.cpp has 3 array_pod_sort() calls used for symbolization. array_pod_start() calls qsort() internally and can have different behaviors across different libcs. Use llvm::stable_sort instead. Reviewed By: davidb, thopre Differential Revision: https://reviews.llvm.org/D76739
-
Sean Fertile authored
Adds support for passing ByVal formal arguments as long as they fit in a single register. Differential Revision: https://reviews.llvm.org/D76401
-
Erich Keane authored
SPIRV2.0 Spec only specifies Linux mangling, however our downstream has use for a Windows mangling for these types. Unfortunately, the SPIRV spec specifies a single mangling for all pipe types, despite clang allowing overloading on these types. Because of this, this patch chooses to mangle the read/writability and element type for the windows mangling. The windows manglings in the test all demangle according to demangler: "void __cdecl test1(struct __clang::ocl_pipe<int,1>) "void __cdecl test2(struct __clang::ocl_pipe<float,0>) "void __cdecl test2(struct __clang::ocl_pipe<int,1>) "void __cdecl test3(struct __clang::ocl_pipe<int const,1>) "void __cdecl test4(struct __clang::ocl_pipe<union __clang::__vector<unsigned char,3>,1>) "void __cdecl test5(struct __clang::ocl_pipe<union __clang::__vector<int,4>,1>) "void __cdecl test_reserved_read_pipe(struct __clang::_ASCLglobal<struct Person > * __ptr64,struct __clang::ocl_pipe<struct Person,1>) Differential Revision: https://reviews.llvm.org/D75685
-
Hans Wennborg authored
-
Sanjay Patel authored
Goes with DD76727.
-
John Brawn authored
Differential Revision: https://reviews.llvm.org/D31343
-
John Brawn authored
Currently square-bracket-style (CXX11/C2X) attribute names are normalised to start with :: if they don't have a namespace. This is a bit odd, as such names are rejected when parsing, so don't do this. Differential Revision: https://reviews.llvm.org/D76704
-
sstefan1 authored
Summary: Attempt to add more attributes for runtime calls. Reviewers: jdoerfert Subscribers: guansong, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D75010
-
Erich Keane authored
In order to support non-user-named kernels, SYCL needs some way in the integration headers to name the kernel object themselves. Initially, the design considered just RTTI naming of the lambdas, this results in a quite unstable situation in light of some device/host macros. Additionally, this ends up needing to use RTTI, which is a burden on the implementation and typically unsupported. Instead, we've introduced a builtin, __builtin_unique_stable_name, which takes a type or expression, and results in a constexpr constant character array that uniquely represents the type (or type of the expression) being passed to it. The implementation accomplishes that simply by using a slightly modified version of the Itanium Mangling. The one exception is when mangling lambdas, instead of appending the index of the lambda in the function, it appends the macro-expansion back-trace of the lambda itself in the form LINE->COL[~LINE->COL...]. Differential Revision: https://reviews.llvm.org/D76620
-
Raphael Isemann authored
lldbassert is the macro that takes care of passing along line/file/function to the lldb_assert function. Let's call that instead of manually calling the function.
-
Sergej Jaskiewicz authored
Summary: This is essentially D71894, but for libc++. This is needed for running libc++ tests over SSH. Reviewers: EricWF, ldionne, phosek, mehdi_amini, mclow.lists, jroelofs, bcraig, #libc Reviewed By: ldionne, phosek, #libc Subscribers: mgorny, christof, dexonsmith, libcxx-commits Tags: #libc Differential Revision: https://reviews.llvm.org/D72687
-
Kerry McLaughlin authored
Summary: Implements the following intrinsics for contiguous loads & stores: - @llvm.aarch64.sve.ld1 - @llvm.aarch64.sve.st1 Reviewers: sdesmalen, andwar, efriedma, cameron.mcinally, dancgr, rengolin Reviewed By: cameron.mcinally Subscribers: tschuett, kristof.beyls, hiraditya, rkruppe, psnobl, danielkiss, cfe-commits, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D76688
-
Juneyoung Lee authored
-
Sam Parker authored
Add a target flag for instructions that reduce into one, or more, scalar reg(s), including variants of: - VADDV - VABAV - VMINV/VMAXV - VMLADAV Differential Revision: https://reviews.llvm.org/D76683
-
Richard Sandiford authored
Casts from an SVE type to itself aren't very useful, but they are supposed to be valid, and could occur in things like macro expansions. Such casts already work for C++ and are tested by sizeless-1.cpp. This patch makes them work for C too. Differential Revision: https://reviews.llvm.org/D76694
-
Richard Sandiford authored
When compiling C, a ?: between two values of the same SVE type currently gives an error such as: incompatible operand types ('svint8_t' (aka '__SVInt8_t') and 'svint8_t') It's supposed to be valid to select between (cv-qualified versions of) the same SVE type, so this patch adds that case. These expressions already work for C++ and are tested by SemaCXX/sizeless-1.cpp. Differential Revision: https://reviews.llvm.org/D76693 -
Simon Tatham authored
Summary: These were accidentally left out of D76123. I added tests for the other three instructions in this small cross-product family (vqdmlah, vqrdmlah, vqrdmlash) but missed this one. Reviewers: miyuki Reviewed By: miyuki Subscribers: kristof.beyls, dmgreen, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D76714
-
Nathan James authored
Summary: clang-apply-replacements currently deduplicates all diagnostic replacements. However if you get a duplicated replacement from one TU then its expected that it should not be deduplicated. This goes some way to solving [[ https://bugs.llvm.org/show_bug.cgi?id=45150 | export-fixes to yaml adds extra newlines and breaks offsets. ]] Take this example yaml. ``` --- MainSourceFile: '/home/nathan/test/test.cpp' Diagnostics: - DiagnosticName: readability-braces-around-statements DiagnosticMessage: Message: statement should be inside braces FilePath: '/home/nathan/test/test.cpp' FileOffset: 14 Replacements: - FilePath: '/home/nathan/test/test.cpp' Offset: 14 Length: 0 ReplacementText: ' {' - FilePath: '/home/nathan/test/test.cpp' Offset: 28 Length: 0 R...
-
Juneyoung Lee authored
-
Kazushi (Jam) Marukawa authored
Summary: Change enum name for condition codes from CondCodes to CondCode. Reviewers: arsenm, simoll, k-ishizaka Reviewed By: arsenm Subscribers: wdng, hiraditya, llvm-commits Tags: #llvm, #ve Differential Revision: https://reviews.llvm.org/D76747
-
Haojian Wu authored
Update the existing tests. Reviewers: sammccall Subscribers: cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D76696
-
Max Moroz authored
-
Juneyoung Lee authored
-
Max Moroz authored
Summary: Separate class definition and actual methods implementation. The main goal is to keep the list of available methods in a concise readable form inside the class definition. Reviewers: hctim, metzman Subscribers: dberris, #sanitizers Tags: #sanitizers Differential Revision: https://reviews.llvm.org/D76651
-
Craig Topper authored
We need to split tests that rely on isel duplicating operations for different masking conditions. Repeating the operation is more costly than emitting the masking separately. The change here is a mechanical splitting of tests that call multiple intrinsics in one function into separate functions that call one intrinsic. We could obviously avoid the splitting by giving the intrinsics different operands, but that would need closer scrutiny than just splitting.
-
Kai Luo authored
-
Siva Chandra Reddy authored
Just enough to help a follow up patch adding cosf and sinf has been added. Reviewers: abrachet Differential Revision: https://reviews.llvm.org/D76723
-
Uday Bondhugula authored
Switch std::is_same disjunctions to llvm::is_one_of Differential Revision: https://reviews.llvm.org/D76745
-
LLVM GN Syncbot authored
-
Petr Hosek authored
This avoids the test failure that was introduced in rG32bddad3 where this function pulls in the rest of InstrProfilingFile.c which is undesirable in use cases when profile runtime is being used without the rest of libc. This also allows additional cleanup by eliminating another variable from platforms that don't need it. Differential Revision: https://reviews.llvm.org/D76750
-
Louis Dionne authored
This reverts commit 1ac403bd, which broke some non-libc++ build bots because they use an ancient CMake.
-