- Jan 05, 2022
-
-
Pavel Labath authored
D116372, while fixing one kind of a race, ended up creating a new one. The new issue could occur when one inferior thread exits while another thread initiates termination of the entire process (exit_group(2)). With some bad luck, we could start processing the exit notification (PTRACE_EVENT_EXIT) only to have the become unresponsive (ESRCH) in the middle of the MonitorCallback function. This function would then delete the thread from our list even though it wasn't completely dead (it stays zombified until we read the WIFEXITED event). The linux kernel will not deliver the exited event for the entire process until we process individual thread exits. In a pre-D116372 world, this wouldn't be a problem because we would read this event (even though we would not know what to do with it) with waitpid(-1). Now, when we issue invididual waitpids, this event will never be picked up, and we end up hanging. The fix for this is actually quite simple -- don't delete the thread in this situation. The thread will be deleted when the WIFEXITED event comes. This situation was kind of already tested by TestCreateDuringInstructionStep (which is how I found this problem), but it was mostly accidental, so I am also creating a dedicated test which reproduces this situation.
-
Sander de Smalen authored
This was originally added in rG22174f5d although that patch doesn't really mention any reasons for ignoring the pointer type in this calculation if the memory access isn't consecutive. Reviewed By: david-arm Differential Revision: https://reviews.llvm.org/D115356
-
Dmitry Vyukov authored
A signal handler can alter ucontext_t to affect execution after the signal returns. Check that the contents are initialized. Restoring unitialized values in registers can't be good. Reviewed By: vitalybuka Differential Revision: https://reviews.llvm.org/D116209
-
Dmitry Vyukov authored
ucontext_t can be larger than its static size if it contains AVX state and YMM/ZMM registers. Currently a signal handler that tries to access that state can produce false positives with random origins on stack. Account for the additional ucontext_t state. Reviewed By: vitalybuka Differential Revision: https://reviews.llvm.org/D116208
-
Archibald Elliott authored
This reverts commits: - 04192422. - 015e08c6 D114206 was landed before it was approved - and was landed knowing that the test crashed on windows, without an xfail. The promised follow-up commit with fixes has not appeared since it was promised on December 14th.
-
Matthias Springer authored
This is in preparation of unifying core bufferization and Comprehensive Bufferize. Differential Revision: https://reviews.llvm.org/D116102
-
Paul Walker authored
Differential Revision: https://reviews.llvm.org/D116227
-
Paul Walker authored
When constructDup is passed an extract_subvector it tries to use extract_subvector's operand directly when creating the DUPLANE. This is invalid when extracting from a scalable vector because the necessary DUPLANE ISel patterns do not exist. NOTE: This patch is an update to https://reviews.llvm.org/D110524 that originally fixed this but introduced a bug when the result VT is 64bits. I've restructured the code so the critial final else block is entered when necessary. Differential Revision: https://reviews.llvm.org/D116442
-
Nikita Popov authored
In particular, this also preserves undef when loading from padding, rather than converting it to zero through a different codepath. This is the remaining part of D115924.
-
Nikita Popov authored
This currently load zero rather than undef.
-
Björn Schäpers authored
Differential Revision: https://reviews.llvm.org/D116563
-
Björn Schäpers authored
Use that name. Also remove the one check for its existence, that is given. Differential Revision: https://reviews.llvm.org/D116562
-
Björn Schäpers authored
Differential Revision: https://reviews.llvm.org/D116561
-
Björn Schäpers authored
Differential Revision: https://reviews.llvm.org/D116560
-
Björn Schäpers authored
Differential Revision: https://reviews.llvm.org/D116559
-
Björn Schäpers authored
And then use the argument and member. Differential Revision: https://reviews.llvm.org/D116558
-
Björn Schäpers authored
the Style's equality operator. This amends 6f6f88ff Differential Revision: https://reviews.llvm.org/D116557
-
Björn Schäpers authored
I think the deque was chosen because of a better push_front, but in combination with llvm::reverse the push_back'ed vector should be the better choice. Differential Revision: https://reviews.llvm.org/D115064
-
Nikita Popov authored
There are a number of places that specially handle loads from a uniform value where all the bits are the same (zero, one, undef, poison), because we a) don't care about the load offset in that case b) it bypasses casts that might not be legal generally but do work with uniform values. We had multiple implementations of this, with a different set of supported values each time. This replaces two usages with a more complete helper. Other usages will be replaced separately, because they have larger impact. This is part of D115924.
-
Nikita Popov authored
-
Matthias Springer authored
Pass unique_ptr<BufferizationOption> to the bufferization. This allows the bufferization to enqueue additional PostAnalysisSteps. When running bufferization a second time, a new BufferizationOptions must be constructed. Differential Revision: https://reviews.llvm.org/D116101
-
Benjamin Kramer authored
This reverts commit 29b6e967. The bug it found in PartiallyInlineLibCalls was fixed in c8ffc733.
-
Benjamin Kramer authored
readnone subsumes writeonly, so just swap out the attributes. The verifier doesn't allow us to have both on a call.
-
Victor Perez authored
Promote select, vselect and vp.select in a similar way. Reviewed By: craig.topper Differential Revision: https://reviews.llvm.org/D116400
-
Florian Hahn authored
-
Jun Ma authored
Differential Revision: https://reviews.llvm.org/D116362
-
Florian Hahn authored
At the moment, the primary induction variable for the vector loop is created as part of the skeleton creation. This is tied to creating the vector loop latch outside of VPlan. This prevents from modeling the *whole* vector loop in VPlan, which in turn is required to model preheader and exit blocks in VPlan as well. This patch introduces a new recipe VPCanonicalIVPHIRecipe to represent the primary IV in VPlan and CanonicalIVIncrement{NUW} opcodes for VPInstruction to model the increment. This allows us to partly retire createInductionVariable. At the moment, a bit of patching up is done after executing all blocks in the plan. Reviewed By: Ayal Differential Revision: https://reviews.llvm.org/D113223 -
Archibald Elliott authored
This fixes the test introduced in D114206 so it no longer writes to the current working directory. Reviewed By: simon_tatham Differential Revision: https://reviews.llvm.org/D116611
-
Fangrui Song authored
-
Fangrui Song authored
-
Fangrui Song authored
The diagnostic is emitted for an unextracted lazy symbol but suppressed for an undefined symbol. Suppressing the diagnostic for unextracted lazy symbol probably makes more sense because (a) an unextracted lazy symbol is quite similar to an undefined symbol and (b) an unextracted lazy symbol is different from "no such symbol".
-
Nicolas Vasilache authored
This revision refactors the implementation of outlineIfOp to expose a finer-grain functionality `outlineSingleBlockRegion` that will be reused in other contexts. Differential Revision: https://reviews.llvm.org/D116591
-
Victor Perez authored
Widen vp.select the same way as select and vselect. Reviewed By: craig.topper Differential Revision: https://reviews.llvm.org/D116407
-
Sjoerd Meijer authored
-
Martin Storsjö authored
This reverts commit ea75be3d and 1eb5b6e8. That commit caused crashes with compilation e.g. like this (not fixed by the follow-up commit): $ cat sqrt.c float a; b() { sqrt(a); } $ clang -target x86_64-linux-gnu -c -O2 sqrt.c Attributes 'readnone and writeonly' are incompatible! %sqrtf = tail call float @sqrtf(float %0) #1 in function b fatal error: error in backend: Broken function found, compilation aborted!
-
Jim Lin authored
-
Sjoerd Meijer authored
Clarify that `Changed` is set to true if the instruction/value was made loop-invariant; the function is returning true if it was already invariant. Differential Revision: https://reviews.llvm.org/D116588
-
Nikita Popov authored
The user scanning loop above looks through pointer casts, so we also need to strip pointer casts in the capture check. Previously the source was incorrectly considered not captured if a bitcast was passed to the call.
-
Fangrui Song authored
The code path is dead after D111365.
-
Nikita Popov authored
Call slot optimization is currently supposed to be prevented if the call can capture the source pointer. Due to an implementation bug, this check currently doesn't trigger if a bitcast of the source pointer is passed instead. I'm somewhat afraid of the fallout of fixing this bug (due to heavy reliance on call slot optimization in rust), so I'd like to strengthen the capture reasoning a bit first. In particular, I believe that the capture is fine as long as a) the call itself cannot depend on the pointer identity, because neither dest has been captured before/at nor src before the call and b) there is no potential use of the captured pointer before the lifetime of the source alloca ends, either due to lifetime.end or a return from a function. At that point the potentially captured pointer becomes dangling. Differential Revision: https://reviews.llvm.org/D115615
-