This project is mirrored from https://github.com/llvm/llvm-project.git.
Pull mirroring failed .
Repository mirroring has been paused due to too many failed attempts. It can be resumed by a project maintainer or owner.
Last successful update .
Repository mirroring has been paused due to too many failed attempts. It can be resumed by a project maintainer or owner.
Last successful update .
- Dec 29, 2021
-
-
Mariya Podchishchaeva authored
Adds diagnosing on attempt to use zero length arrays, pointers, refs, arrays of them and structs/classes containing all of it. In case a struct/class with zero length array is used this emits a set of notes pointing out how zero length array got into used struct, like this: ``` struct ContainsArr { int A[0]; // note: field of illegal type declared here }; struct Wrapper { ContainsArr F; // note: within field of type ContainsArr declared here // ... } // Device code Wrapper W; W.use(); // error: zero-length arrays are not permitted ``` Total deep check of each used declaration may result in double diagnosing at the same location. Reviewed By: aaron.ballman Differential Revision: https://reviews.llvm.org/D114080
-
Sam McCall authored
-
Sam McCall authored
This reverts commit 6d09aaec. The test uses ulimit and ran into problems on some bots. Run on linux only. There's nothing platform-specific about the code we're testing, so this should be enough to ensure correctness.
-
Sjoerd Meijer authored
-
Pavel Labath authored
The MonitorCallback function was assuming that the "exited" argument is set whenever a thread exits, but the caller was only setting that flag for the main thread. This patch deletes the argument altogether, and lets MonitorCallback compute what it needs itself. This is almost NFC, since previously we would end up in the "GetSignalInfo failed for unknown reasons" branch, which was doing the same thing -- forgetting about the thread.
-
PoYao Chang authored
Remove the Mangled::operator! and Mangled::operator void* where the comments in header and implementation files disagree and replace them with operator bool. This fix PR52702 as https://reviews.llvm.org/D106837 used the buggy Mangled::operator! in Symbol::SynthesizeNameIfNeeded. For example, consider the symbol "puts" in a hello world C program: // Inside Symbol::SynthesizeNameIfNeeded (lldb) p m_mangled (lldb_private::Mangled) $0 = (m_mangled = None, m_demangled = "puts") (lldb) p !m_mangled (bool) $1 = true # should be false!! This leads to Symbol::SynthesizeNameIfNeeded overwriting m_demangled part of Mangled (in this case "puts"). In conclusion, this patch turns callq 0x401030 ; symbol stub for: ___lldb_unnamed_symbol36 back into callq 0x401030 ; symbol stub for: puts . Differential Revision: https://reviews.llvm.org/D116217
-
Pavel Labath authored
Now that we are caching the dwarf index as well, we will always have more than one cache file (when not using accelerator tables). I have adjusted the test to check for the presence of one _symtab_ index.
-
Pavel Labath authored
Multithreaded applications using fork(2) need to be extra careful about what they do in the fork child. Without any special precautions (which only really work if you can fully control all threads) they can only safely call async-signal-safe functions. This is because the forked child will contain snapshot of the parents memory at a random moment in the execution of all of the non-forking threads (this is where the similarity with signals comes in). For example, the other threads could have been holding locks that can now never be released in the child process and any attempt to obtain them would block. This is what sometimes happen when using tcmalloc -- our fork child ends up hanging in the memory allocation routine. It is also what happened with our logging code, which is why we added a pthread_atfork hackaround. This patch implements a proper fix to the problem, by which is to make the child code async-signal-safe. The ProcessLaunchInfo structure is transformed into a simpler ForkLaunchInfo representation, one which can be read without allocating memory and invoking complex library functions. Strictly speaking this implementation is not async-signal-safe, as it still invokes library functions outside of the posix-blessed set of entry points. Strictly adhering to the spec would mean reimplementing a lot of the functionality in pure C, so instead I rely on the fact that any reasonable implementation of some functions (e.g., basic_string::c_str()) will not start allocating memory or doing other unsafe things. The new child code does not call into our logging infrastructure, which enables us to remove the pthread_atfork call from there. Differential Revision: https://reviews.llvm.org/D116165
-
Chuanqi Xu authored
The root cause for the crash is the incorrect use of `cast`. The actual type and cast-to type is different. This patch fixes the crash by converting the `cast` to `dyn_cast`.
-
Kazu Hirata authored
Identified with llvm-header-guard.
-
Kazu Hirata authored
-
Johannes Doerfert authored
-
Johannes Doerfert authored
This reverts commit 73ece231 and reapplies 7bfcdbcb with mlir changes. Also reverts commit 423ba129 and includes the unit test changes of 16da2140.
-
Mehdi Amini authored
This reverts commit 16da2140. Revert unit-test API update after previous revert of the API change.
-
Mehdi Amini authored
This reverts commit 7bfcdbcb. Broke MLIR build
-
Kazu Hirata authored
This patch fixes: mlir/include/mlir/Tools/PDLL/AST/Types.h:54:3: error: definition of implicit copy assignment operator for 'Type' is deprecated because it has a user-declared copy constructor [-Werror,-Wdeprecated-copy]
-
Johannes Doerfert authored
AAPointerInfo, and thereby other places, can look already through internal global and stack memory. This patch enables them to look through heap memory returned by functions with a `noalias` return. In the future we can look through `noalias` arguments as well but that will require AAIsDead to learn that such memory can be inspected by the caller later on. We also need teach AAPointerInfo about dominance to actually deal with memory that might not be `null` or `undef` initialized. D106397 is a first step in that direction already. Reviewed By: kuter Differential Revision: https://reviews.llvm.org/D109170
-
Johannes Doerfert authored
Similar to loads, we want to be aggressive when it comes to store simplification. Not everything in LLVM handles dead stores well when address space casts are involved, we can simply ask the Attributor to do it for us though. Reviewed By: tianshilei1992 Differential Revision: https://reviews.llvm.org/D109998
-
Johannes Doerfert authored
-
Johannes Doerfert authored
-
Johannes Doerfert authored
One of the unused ident_t fields now holds the size of the string (=const char *) field so we have an easier time dealing with those in the future. Differential Revision: https://reviews.llvm.org/D113126
-
Johannes Doerfert authored
While we skipped uses in stores if we can find all copies of the value when the memory is loaded, we did not correlate the use in the store with the use in the load. So far this lead to less precise results in the offset calculations which prevented deductions. With the new EquivalentUseCB callback argument the user of checkForAllUses can be informed of the correlation and act on it appropriately. Differential Revision: https://reviews.llvm.org/D109662
-
Johannes Doerfert authored
-
Johannes Doerfert authored
Issue #52875 reported non-determinism, this is the first step to avoid it. We iterate over MallocCalls so we should keep the order stable.
-
Johannes Doerfert authored
-
Johannes Doerfert authored
-
William S. Moses authored
LLVM (dialect and IR) have atomics for and/or. This patch enables atomic_rmw ops in the standard dialect for and/or that lower to these (in addition to the existing atomics such as addi, etc). Reviewed By: mehdi_amini Differential Revision: https://reviews.llvm.org/D116345
-
William S. Moses authored
This patch adds constant folds for FPToSI/FPToUI/SIToFP/UIToFP Reviewed By: mehdi_amini, bondhugula Differential Revision: https://reviews.llvm.org/D116321
-
Joe Loser authored
Some individual test files verify the CPO under test satisfies `semiregular` concept. This is redundant since it is already part of the test in verifying whether the entity is indeed a CPO in `libcxx/test/std/library/description/conventions/customization.point.object/cpo.compile.pass.cpp`. Differential Revision: https://reviews.llvm.org/D116173
-
Craig Topper authored
Some constants require more instructions than others. This adds additional test for each variation. UDIV has 2 variations, SDIV has 4 variations. Some of these sequence may have gotten worse on RV32 when we started doing the div by constant optimization before type legalization. We materialized a smaller constant, but we require more instructions to emulate 8 or 16 bit right shifts. This was hidden by the lack of test coverage. I've also added Zba and Zbb test cases to show the affect of sext.b, sext.h, zext.h, and zext.w on some of the shifts. In some cases we end up generating more code after the multiply because we use a zext.h+srli and sext.h+srai where without Zbb we share a slli between a srli and srai.
-
Fangrui Song authored
-
Kyungwoo Lee authored
Add the option comment in .rst. Reviewed By: ellis Differential Revision: https://reviews.llvm.org/D116348
-
Mike Hommey authored
References from thread-local variable sections are treated as offsets relative to the start of the thread-local data memory area, which is initialized via copying all the TLV data sections (which are all contiguous). If later data sections require a greater alignment than earlier ones, the offsets of data within those sections won't be guaranteed to aligned unless we normalize alignments. We therefore use the largest alignment for all TLV data sections. Reviewed By: #lld-macho, int3 Differential Revision: https://reviews.llvm.org/D116263
-
modimo authored
D43002 introduced a test debug-info-objname.cpp that outputted the current compiler version into CodeView. Internally we appended a date to the patch version and overflowed the 16-bits allocated to that space. This change clamps the Frontend version outputted values to 16-bits like rGd1185fc081ead71a8bf239ff1814f5ff73084c15 did for the Backend version. Testing: ninja check-all newly added tests correctly clamps and no longer asserts when trying to output the field Reviewed By: aganea Differential Revision: https://reviews.llvm.org/D116243
-
Krzysztof Parzyszek authored
Co-authored-by:
Anirudh Sundar Subramaniam <quic_sanirudh@quicinc.com> Co-authored-by:
Ankit Aggarwal <aankit@quicinc.com>
-
Shilei Tian authored
Following D111954, this patch adds the resource pool for CUevent. Reviewed By: ye-luo Differential Revision: https://reviews.llvm.org/D116315
-
Ellis Hoag authored
When using debug info for profile correlation, avoid adding duplicate functions in the synthetic Data section. Before this patch, n duplicate function entries in the Data section would cause counter values to be a factor of n larger. I built instrumented clang with and without debug info correlation and got these summaries. ``` # With Debug Info Correlate $ llvm-profdata show default.profdata Instrumentation level: IR entry_first = 0 Total functions: 182530 Maximum function count: 52034 Maximum internal block count: 5763 # Without $ llvm-profdata show default.profdata Instrumentation level: IR entry_first = 0 Total functions: 183212 Maximum function count: 52034 Maximum internal block count: 5766 ``` The slight difference in counts seem to be mostly from FileSystem and Map functions and the difference in the number of instrumented functions seems to come from missing debug info like destructors without source. Reviewed By: kyulee Differential Revision: https://reviews.llvm.org/D116051
-
Craig Topper authored
getShiftAmountTy used to directly return the shift amount type from the target which could be too small for large illegal types. For example, X86 always returns i8. The code here detected this and used i32 instead if it won't fit. This behavior was added to getShiftAmountTy in D112469 so we no longer need this workaround.
-
Nick Desaulniers authored
This conditional check for -mstack-protector-guard=tls got out of sync with the conditional check for -mtp=cp15 by me in D114116, because I forgot about the similar check added in D113026. Re-use the code in arm::isHardTPSupported so that these aren't out of sync. Interestingly, our CI reported this when testing -mstack-protector-guard=tls; it was only reproducible with Debian's LLVM and not upstream LLVM due to this out of tree patch: https://salsa.debian.org/pkg-llvm-team/llvm-toolchain/-/blob/snapshot/debian/patches/930008-arm.diff Fixes: https://github.com/ClangBuiltLinux/linux/issues/1502 Reviewed By: ardb Differential Revision: https://reviews.llvm.org/D116233
-