- May 31, 2024
-
-
Florian Hahn authored
Add missing test coverage for follow-up to https://github.com/llvm/llvm-project/pull/93499.
-
Jianjian Guan authored
Use visitMUL to combine VP_MUL, share most logic of MUL with VP_MUL. Migrate from https://reviews.llvm.org/D121187
-
gulfemsavrun authored
Reverts llvm/llvm-project#93131 because it broke some lldb tests on the Fuchsia Clang toolchain builders. https://ci.chromium.org/ui/p/fuchsia/builders/toolchain.ci/clang-linux-x64/b8746482644341901905/infra
-
Amir Ayupov authored
CDSplit splits functions up to three ways: main fragment with no suffix, and fragments with .cold and .warm suffixes. Add .warm suffix to the regex used to recognize split fragments. Test Plan: updated register-fragments-bolt-symbols.s
-
Florian Hahn authored
Follow-up to adjust the names and tests after https://github.com/llvm/llvm-project/pull/93398.
-
Akira Hatanaka authored
`Eval->Value.get` returns a null pointer when the variable doesn't have an initializer. Use `cast_if_present` instead of `cast`. This fixes https://github.com/llvm/llvm-project/issues/93625. rdar://128482541
-
Aaron Siddhartha Mondal authored
This reverts commit fe82a3da. This broke LLDB on MacOS due to a missing symbol during linking. The fix has been applied in c6c08eee. Original commit message: The terminfo dependency introduces a significant nonhermeticity into the build. It doesn't respect `--no-undefined-version` meaning that it's not a dependency that can be built with Clang 17+. This forces maintainers of source-based distributions to implement patches or ignore linker errors. Remove it to reduce the closure size and improve portability of LLVM-based tools. Users can still use command line arguments to toggle color support expliticly. Fixes #75490 Closes #53294 #23355
-
Jorge Gorbe Moya authored
DeclBase.h only contains a forward declaration of ObjCMethodDecl, and when building clang/Sema/Attr.h with header modules this causes a build failure because `llvm::isa<ObjCMethodDecl>` requires the full type.
-
S. Bharadwaj Yadavalli authored
Fix doc build failure.
-
David Blaikie authored
This test is meant to check the behavior when -fno-standalone-debug is active - it doesn't care whether it's explicit or implicit, so let's make it explicit so it applies equally to MacOS and other platforms.
-
Matt Arsenault authored
Explicitly mark the unused implicit arguments in the test, since this should be sensitive to the number of free user SGPRs. This is in preparation for #83131.
-
Sterling Augustine authored
Prior to this, the test tries to write to the source directory, which prevents it from working when the source is on a read-only file systems.
-
shaw young authored
Make FunctionLayout::updateLayoutIndices const and add an overloaded function that updates LayoutIndices given an Order parameter.
-
Kazu Hirata authored
With this patch, we stop using on-disk hash tables for Frames and call stacks. Instead, we'll write out all the Frames as a flat array while maintaining mappings from FrameIds to the indexes into the array. Then we serialize call stacks in terms of those indexes. Likewise, we'll write out all the call stacks as another flat array while maintaining mappings from CallStackIds to the indexes into the call stack array. One minor difference from Frames is that the indexes into the call stack array are not contiguous because call stacks are variable-length objects. Then we serialize IndexedMemProfRecords in terms of the indexes into the call stack array. Now, we describe each call stack with 32-bit indexes into the Frame array (as opposed to the 64-bit FrameIds in Version 2). The use of the smaller type cuts down the profile file size by about 40% relative to Version 2. The departure from the on-disk hash tables contributes a little bit to the savings, too. For now, IndexedMemProfRecords refer to call stacks with 64-bit indexes into the call stack array. As a follow-up, I'll change that to uint32_t, including necessary updates to RecordWriterTrait.
-
Fangrui Song authored
-
Stanislav Mekhanoshin authored
It does not properly handle situation when address calculation uses V_ADDC_U32 0, 0, carry-in (i.e. with both src0 and src1 immediates).
-
Fangrui Song authored
-
Fangrui Song authored
https://reviews.llvm.org/D81156 tied errs() to outs(). 03089752 removed the tie, but did not update the comment.
-
Keith Smiley authored
-
Miro Bucko authored
Test llvm-project/lldb/test/API/python_api/address_range/TestAddressRange.py is failing on Windows due adding a carriage return character at the end of line. Original PR is #93836.
-
Fangrui Song authored
Merge some test files. The "undefined section" error (`checkIfExists`) was previously untested.
-
Craig Topper authored
If the smax removed all negative numbers, then we can treat the smin like a umin. If the smin and smax are in the other order we can swap them and use a vnclipu as long as the smax constant is smaller than the smin constant. This is based on similar code from X86's detectUSatPattern.
-
David Blaikie authored
This reverts commit 02c6845c, reapplying bfabc958. The patch was reverted due to the test failing on MacOS and Windows where type units aren't supported. This is addressed by limiting type unit flag/test coverage to Linux. Complete C++ type information can be quite expensive - and there's limited value in representing every member function, even those that can't be called (we don't do similarly for every non-member function anyway). So add a flag to opt out of this behavior for experimenting with this more terse behavior. I think Sony already does this by default, so perhaps with a change to the defaults, Sony can migrate to this rather than a downstream patch. This breaks current debuggers in some expected ways - but those breakages are visible without this feature too. Consider member function template instantiations - they can't be consistently enumerated in every translation unit: a.h: ``` struct t1 { template <int i> static int f1() { return i; } }; namespace ns { template <int i> int f1() { return i; } } // namespace ns ``` a.cpp: ``` void f1() { t1::f1<0>(); ns::f1<0>(); } ``` b.cpp: ``` void f1(); int main() { f1(); t1::f1<1>(); ns::f1<1>(); } ``` ``` (gdb) p ns::f1<0>() $1 = 0 (gdb) p ns::f1<1>() $2 = 1 (gdb) p t1::f1<0>() Couldn't find method t1::f1<0> (gdb) p t1::f1<1>() $3 = 1 (gdb) s f1 () at a.cpp:3 3 t1::f1<0>(); (gdb) p t1::f1<0>() $4 = 0 (gdb) p t1::f1<1>() Couldn't find method t1::f1<1> (gdb) ``` (other similar non-canonical features are implicit special members (copy/move ctor/assignment operator, default ctor) and nested types (eg: pimpl idiom, where the nested type is declared-but-not-defined in one TU, and defined in another TU)) lldb can't parse the template expressions above, so I'm not sure how to test it there, but I'd guess it has similar problems. ( https://stackoverflow.com/questions/64602475/how-to-print-value-returned-by-template-member-function-in-gdb-lldb-debugging so... I guess that's just totally not supported in lldb, how unfortunate. And implicit special members are instantiated implicitly by lldb, so missing those doesn't tickle the same issue) Some very rudimentary numbers for a clang debug build: .debug_info section size: -g: 476MiB -g -fdebug-types-section: 357MiB -g -gomit-unreferenced-members: 340MiB Though it also means a major reduction in .debug_str size, -fdebug-types-section doesn't reduce string usage (so the first two examples have the same .debug_str size, 247MiB), down to 175MiB. So for total clang binary size (I don't have a quick "debug section size reduction" on-hand): 1.45 (no type units) GiB -> 1.34 -> 1.22, so it saves about 120MiB of binary size. Original Differential Revision: https://reviews.llvm.org/D152017
-
Keith Smiley authored
-
Nick Desaulniers (paternity leave) authored
These changes slighly modify the output of the unittests so that they better match GTest, so that utilities that parse the expected output from GTest (such as Android's unit test harness) can read the output from our unit tests. This allows our unit tests to be run on Android devices. Add very primitive command line parsing to: - support --gtest_color=no to disable printing terminal colors. - recognize --gtest_print_time and print the test time in milliseconds. - most of our unit tests run on the order of microseconds, so its useful to preserve the existing behavior. But upsteram GTest ONLY prints time tests in milliseconds, and Android's atest expects to be able to parse exactly that. Atest always passes --gtest_print_time. The word `took` is removed as that also differs from upstream GTest, tripping up parsers. - ignore other --gtest_* flags Do so so that atest can parse the output correctly. Print the test number count before each run, so that atest can parse this value correctly. Link: https://android-review.googlesource.com/c/platform/external/llvm-libc/+/3107252 Link: https://google.github.io/googletest/advanced.html#colored-terminal-output Link: https://google.github.io/googletest/advanced.html#suppressing-the-elapsed-time -
Adrian Prantl authored
and reject them when copying Swift interface files, since they can live outside of DEVELOPER_DIR.
-
Kazu Hirata authored
This patch fixes: flang/lib/Semantics/check-do-forall.cpp:731:9: error: default label in switch which covers all enumeration values [-Werror,-Wcovered-switch-default]
-
Artem Yurchenko authored
Problem: the printer used to ignore all but the first declarator for unbraced language linkage declarators. Furthemore, that one would be printed without the final semicolon. Solution: when there is more than one declarator, we print them in a braced `extern <lang>` block. If the original declaration was unbraced and there is one or less declarator, we omit the braces, but add the semicolon. **N.B.** We are printing braces which were, in some cases, absent from the original CST. If that's an issue, I'll work on it. See the tests for the examples.
-
Teresa Johnson authored
Change a couple of maps from std::map to DenseMap, which showed a modest (3.6%) reduction in peak RSS.
-
Krzysztof Parzyszek authored
The `FirstClauses` is a vector of pointer-bool pairs, and the pointer part of the pair is never used. Replace the vector with std::bitset, and rename it to `SeenClauses` to make the purpose of it a bit clearer.
-
Martin Storsjö authored
So far, these tests have been disabled in mingw build configurations (built as asan-dynamic), but these were enabled in 246234ac, exposing the issue. (That commit is currently reverted, but will probably be relanded in some form soon.)
-
Mingming Liu authored
- In `Header::readFromBuffer`, read the buffer in the forward direction by using `readNext`. - When compute the header size, spell out the constant. With the changes above, we can remove `offsetOf` in InstrProf.cpp --------- Co-authored-by:Kazu Hirata <kazu@google.com>
-
Florian Mayer authored
We used the same name in the global name space for HWASan, so we got a collision.
-
Vlad Serebrennikov authored
This patch moves `PDiag` into `SemaBase`, making it readily available everywhere across `Sema` without `SemaRef`, like the regular `Diag`.
-
OverMighty authored
cc @lntue
-
Mircea Trofin authored
- added unittests for the raw_fd_stream output case. - the `BitstreamWriter` ctor was confusing, the relationship between the buffer and the file stream wasn't clear and in fact there was a potential bug in `BitcodeWriter` in the mach-o case, because that code assumed in-buffer only serialization. The incremental flushing behavior of flushing at end of block boundaries was an implementation detail that meant serializers not using blocks (for example) would need to know to check the buffer and flush. The bug was latent - in the sense that, today, because the stream being passed was not a `raw_fd_stream`, incremental buffering never kicked in. The new design moves the responsibility of flushing to the `BitstreamWriter`, and makes it work with any `raw_ostream` (but incrementally flush only in the `raw_fd_stream` case). If the `raw_ostream` is over a buffer - i.e. a `raw_svector_stream` - then it's equivalent to today's buffer case. For all other `raw_ostream` cases, buffering is an implementation detail. In all cases, the buffer is flushed (well, in the buffer case, that's a moot statement). This simplifies the state and state transitions the user has to track: you have a raw_ostream -> BitstreamWrite in it -> destroy the writer => the bitstream is completely written in your raw_ostream. The "buffer" case and the "raw_fd_stream" case become optimizations rather than imposing state transition concerns to the user.
-
Adrian Prantl authored
The function was meant to find the Developer/ dir, but it found a Developer directory nested deep inside the top-level Developer dir. The new implementation rejects everything in Xcode.app/Developer in broad strokes. rdar://128571037
-
Charlie Barto authored
This reverts commit 8fa66c6c.
-
khaki3 authored
Derived from #92480. This PR supports parsing of the DO CONCURRENT REDUCE clause in Fortran 2023. Following the style of the OpenMP parser in MLIR, the front end accepts both arbitrary operations and procedures for the REDUCE clause. But later Semantics can notify type errors and resolve procedure names.
-
Hendrik Hübner authored
New pull request for https://github.com/llvm/llvm-project/issues/89443 The previous PR was reverted after breaking fullbuild due to a missing struct declaration, which I forgot to commit. Reverts revert and adds the missing pthread_rwlockattr_getkind_np / pthread_rwlockattr_setkind_np functions and tests respecitvely.
-