- Nov 11, 2020
-
-
Wang, Pengfei authored
-
Wang, Pengfei authored
-
Roland McGrath authored
This header has long lacked a standard multiple inclusion guard like other headers have, for no apparent reason. The GCC header of the same name likewise lacks one up through release 10.1, but trunk GCC (release 11, and perhaps future 10.x) has fixed it (see https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96238). Reviewed By: phosek Differential Revision: https://reviews.llvm.org/D91226
-
Kazu Hirata authored
This reverts commit 2f1038c7.
-
Wang, Pengfei authored
-
Gaurav Jain authored
Differential Revision: https://reviews.llvm.org/D90902
-
Akira Hatanaka authored
rdar://problem/70410504
-
Chen Zheng authored
-
zoecarver authored
This patch changes how linear_congruential_engine picks its randomization algorithm. It adds two restrictions, `_OverflowOK` and `_SchrageOK`. `_OverflowOK` means that m is a power of two so using the classic `(a * x + c) % m` will create a meaningless overflow. The second checks that Schrage's algorithm will produce results that are in bounds of min and max. This patch fixes https://llvm.org/PR27839. Differential Revision: D65041
-
Chen Zheng authored
delete abs/nabs handling in earlycse pass to avoid bugs related to hashing values. After abs/nabs is canonicalized to intrinsics in D87188, we should get CSE ability for abs/nabs back. Reviewed By: spatel Differential Revision: https://reviews.llvm.org/D90734
-
Sam Clegg authored
Previously we limited the use of atomics and TLS to programs linked with `--shared-memory`. However, as of https://reviews.llvm.org/D79530 we now allow programs that use atomic to be linked without `--shared-memory`. For this to be useful we also want to all TLS usage in such programs. In this case, since we know we are single threaded we simply include the TLS data as a regular active segment and create an immutable `__tls_base` global that point to the start of this segment. Fixes: https://github.com/emscripten-core/emscripten/issues/12489 Differential Revision: https://reviews.llvm.org/D91115
-
Evgenii Stepanov authored
HwasanThreadList::DontNeedThread clobbers Thread::next_, breaking the freelist. As a result, only the top of the freelist ever gets reused, and the rest of it is lost. Since the Thread object its associated ring buffer is only 8Kb, this is typically only noticable in long running processes, such as fuzzers. Fix the problem by switching from an intrusive linked list to a vector. Differential Revision: https://reviews.llvm.org/D91208
-
Wang, Pengfei authored
-
Vedant Kumar authored
-
Vedant Kumar authored
Adds test coverage for ThreadPlanStepInRange::SetAvoidRegexp. See: http://lab.llvm.org:8080/coverage/coverage-reports/coverage/Users/buildslave/jenkins/workspace/coverage/llvm-project/lldb/source/Target/ThreadPlanStepInRange.cpp.html#L309 Differential Revision: https://reviews.llvm.org/D91220
-
peter klausler authored
Avoid a spurious error message about a dummy procedure reference in a specification expression by restructuring the handling of use-associated and host-associated symbols. Differential revision: https://reviews.llvm.org/D91209
-
Vedant Kumar authored
-
Vedant Kumar authored
-
Vedant Kumar authored
Split up words that appear to have been accidentally concatenated. This looks to be exhaustive: to find these in vim, use: /\v[^ ]"\n +"[^ ]
-
Peter Collingbourne authored
It turns out that we can't remove the operator new and delete interceptors on Android without breaking ABI, so bring them back as forwards to the malloc and free functions. Differential Revision: https://reviews.llvm.org/D91219
-
Lang Hames authored
-
Richard Smith authored
specialization. Fixes a crash-on-valid if further template parameters are introduced within the specialization (by a generic lambda).
-
Peter Collingbourne authored
__register_frame and __deregister_frame are associated with the .eh_frame section, which I think is used on all of our platforms except Windows and 32-bit ARM (which uses the ARM EHABI). Also add a file that was added to lld/MachO.
-
Gaurav Jain authored
Differential Revision: https://reviews.llvm.org/D91161
-
Tue Ly authored
Implementing fdim, fdimf, and fdiml for llvm-libc. Differential Revision: https://reviews.llvm.org/D90906
-
Stephen Kelly authored
Differential Revision: https://reviews.llvm.org/D91144
-
Kazushi (Jam) Marukawa authored
Implement FoldImmediate for only integer aritihmetic operations. Add regression tests also. Reviewed By: simoll Differential Revision: https://reviews.llvm.org/D91150
-
Florian Hahn authored
This reverts commit a8e50f1c. This reportedly breaks building the Linux kernel. https://bugs.llvm.org/show_bug.cgi?id=48142
-
Richard Smith authored
-
Stephen Kelly authored
This reverts commit e73296d3. This may have caused build bot failure.
-
Zequan Wu authored
-
Akira Hatanaka authored
This enables a method sending an autorelease message to an object and returning the object in MRR to avoid adding the object to an autorelease pool if a call to objc_retainAutoreleasedReturnValue in the caller function accepts the hand off of the retain count. rdar://problem/50678052 Differential Revision: https://reviews.llvm.org/D91111
-
Sean Silva authored
This patch converts elementwise ops on tensors to linalg.generic ops with the same elementwise op in the payload (except rewritten to operate on scalars, obviously). This is a great form for later fusion to clean up. E.g. ``` // Compute: %arg0 + %arg1 - %arg2 func @f(%arg0: tensor<?xf32>, %arg1: tensor<?xf32>, %arg2: tensor<?xf32>) -> tensor<?xf32> { %0 = addf %arg0, %arg1 : tensor<?xf32> %1 = subf %0, %arg2 : tensor<?xf32> return %1 : tensor<?xf32> } ``` Running this through `mlir-opt -convert-std-to-linalg -linalg-fusion-for-tensor-ops` we get: ``` func @f(%arg0: tensor<?xf32>, %arg1: tensor<?xf32>, %arg2: tensor<?xf32>) -> tensor<?xf32> { %0 = linalg.generic {indexing_maps = [#map0, #map0, #map0, #map0], iterator_types = ["parallel"]} ins(%arg0, %arg1, %arg2 : tensor<?xf32>, tensor<?xf32>, tensor<?xf32>) { ^bb0(%arg3: f32, %arg4: f32, %arg5: f32): // no predecessors %1 = addf %arg3, %arg4 : f32 %2 = subf %1, %arg5 : f32 linalg.yield %2 : f32 } -> tensor<?xf32> return %0 : tensor<?xf32> } ``` So the elementwise ops on tensors have nicely collapsed into a single linalg.generic, which is the form we want for further transformations. Differential Revision: https://reviews.llvm.org/D90354 -
Sean Silva authored
This patch adds an `ElementwiseMappable` trait as discussed in the RFC here: https://llvm.discourse.group/t/rfc-std-elementwise-ops-on-tensors/2113/23 This trait can power a number of transformations and analyses. A subsequent patch adds a convert-elementwise-to-linalg pass exhibits how this trait allows writing generic transformations. See https://reviews.llvm.org/D90354 for that patch. This trait slightly changes some verifier messages, but the diagnostics are usually about as good. I fiddled with the ordering of the trait in the .td file trait lists to minimize the changes here. Differential Revision: https://reviews.llvm.org/D90731
-
Pirama Arumuga Nainar authored
Previously we used setRegClass to rgpr, which may expand the register domain if the result was already in a constrained class (tcgpr in the above PR). Differential Revision: https://reviews.llvm.org/D91192
-
Michael Kruse authored
ScopBuilder distributes independent instructions between statements. Only modeled (e.g. not synthesizable) instructions are represented. To compute independence, non-modeled instructions were used in some parts of determining instruction independence, which could lead to the re-introduction of non-model instructions. In particular, required invariant loads could be added to instruction list, which then led to redundant MemoryAccesses for such a load. This fixes llvm.org/PR48059.
-
Xun Li authored
The original bug was discovered in T75057860. Clang front-end emits an AST that looks like this for an co_await expression: |- ExprWithCleanups |- -CoawaitExpr |- -MaterializeTemporaryExpr ... Awaiter ... |- -CXXMemberCallExpr ... .await_ready ... |- -CallExpr ... __builtin_coro_resume ... |- -CXXMemberCallExpr ... .await_resume ... ExprWithCleanups is responsible for cleaning up (including calling dtors) for the temporaries generated in the wrapping expression). In the above structure, the __builtin_coro_resume part (which corresponds to the code for the suspend case in the co_await with symmetric transfer), the pseudocode looks like this: __builtin_coro_resume( awaiter.await_suspend( from_address( __builtin_coro_frame())).address()); One of the temporaries that's generated as part of this code is the coroutine handle returned from awaiter.await_suspend() call. The call returns a handle which is a prvalue (since it's a returned value on the fly). In order to call the address() method on it, it needs to be converted into an xvalue. Hence a materialized temp is created to hold it. This temp will need to be cleaned up eventually. Now, since all cleanups happen at the end of the entire co_await expression, which is after the <coro.suspend> suspension point, the compiler will think that such a temp needs to live across suspensions, and need to be put on the coroutine frame, even though it's only used temporarily just to call address() method. Such a phenomena not only unnecessarily increases the frame size, but can lead to ASAN failures, if the coroutine was already destroyed as part of the await_suspend() call. This is because if the coroutine was already destroyed, the frame no longer exists, and one can not store anything into it. But if the temporary object is considered to need to live on the frame, it will be stored into the frame after await_suspend() returns. A fix attempt was done in https://reviews.llvm.org/D87470. Unfortunately it is incorrect. The reason is that cleanups in Clang works more like linearly than nested. There is one current state indicating whether it needs cleanup, and an ExprWithCleanups resets that state. This means that an ExprWithCleanups must be capable of cleaning up all temporaries created in the wrapping expression, otherwise there will be dangling temporaries cleaned up at the wrong place. I eventually found a walk-around (https://reviews.llvm.org/D89066) that doesn't break any existing tests while fixing the issue. But it targets the final co_await only. If we ever have a co_await that's not on the final awaiter and the frame gets destroyed after suspend, we are in trouble. Hence we need a proper fix. This patch is the proper fix. It does the folllowing things to fully resolve the issue: 1. The AST has to be generated in the order according to their nesting relationship. We should not generate AST out of order because then the code generator would incorrectly track the state of temporaries and when a cleanup is needed. So the code in buildCoawaitCalls is reorganized so that we will be generating the AST for each coawait member call in order along with their child AST. 2. await_ready() call is wrapped with an ExprWithCleanups so that temporaries in it gets cleaned up as early as possible to avoid living across suspension. 3. await_suspend() call is wrapped with an ExprWithCleanups if it's not a symmetric transfer. In the case of a symmetric transfer, in order to maintain the musttail call contract, the ExprWithCleanups is wraaped before the resume call. 4. In the end, we mark again that it needs a cleanup, so that the entire CoawaitExpr will be wrapped with a ExprWithCleanups which will clean up the Awaiter object associated with the await expression. Differential Revision: https://reviews.llvm.org/D90990 -
AndreyChurbanov authored
Patch by Erdner, Todd <todd.erdner@intel.com> Differential Revision: https://reviews.llvm.org/D90974
-
Stanislav Mekhanoshin authored
These are opsel opcodes with op_sel actually being ignored. As a such op_sel_hi needs to be set to default 1 even though these bits are ignored. This is compatibility change. Differential Revision: https://reviews.llvm.org/D91202
-
Richard Smith authored
into a member function on LValueBase. NFC.
-