- Jan 14, 2024
-
-
Vlad Serebrennikov authored
[P1787](https://wg21.link/p1787): The intent for CWG2335 (contra those of the older CWG1890, CWG1626, CWG1255, and CWG287) is supported by retaining the unrestricted forward lookup in complete-class contexts (despite current implementation behavior for non-templates). Wording: The declaration set is the result of a single search in the scope of C for N from immediately after the class-specifier of C if P is in a complete-class context of C or from P otherwise. [Drafting note: The plan for CWG2335 is to describe forbidden dependency cycles among the complete-class contexts of a class. — end drafting note] ([class.member.lookup]/4) Complete-class context is described in [class.mem.general] [p7](http://eel.is/c++draft/class#mem.general-7) and [p8](http://eel.is/c++draft/class#mem.general-8). In this patch I add tests only for CWG issues that fall under current definition of complete-class context, because I'm not sure how CWG1255 and CWG287 are going to work. That's why I skip over them, but mark CWG1308 as superseded by CWG1330.
-
Vlad Serebrennikov authored
Test is based on [P0136R1](https://wg21.link/p0136r1) wording instead of proposed resolution in the issue itself. This patch also expands related CWG1573 test with an additional test case. Existing `3.9` status of 1573 is still relevant even with this new test case.
-
Vitaly Buka authored
Reverts llvm/llvm-project#77832 To fix https://lab.llvm.org/buildbot/#/builders/236/builds/8673 Also truncation to shorter type looks incorrect. Issue for tracking #78024 .
-
Mark de Wever authored
GCC 13 is the latest GCC release and tested in the libc++ CI for several month. According to our policy we only support the latest version, update the documentation to the latest version.
-
Hristo Hristov authored
Co-authored-by:Zingam <zingam@outlook.com>
-
Félix-Antoine Constantin authored
The check currently emits warnings for the following code: `uint64_t fn() { return 1024 * 1024; }` But the code generated after applying the notes will look like this: `uint64_t fn() { return static_cast<uint64_t>(1024 * )1024; }` This is because when generating the notes the check will use the beginLoc() and EndLoc() of the subexpr of the implicit cast. But in some cases the AST Node might not have a beginLoc and EndLoc. This seems to be true when the Node is composed of only 1 token (for example an integer literal). Calling the getEndLoc() on this type of node will simply return the known location which is, in this case, the beginLoc. Fixes #63070 #56728 -
Tacet authored
This commit turns on ASan annotations in `std::basic_string` for all allocators by default. Originally suggested here: https://reviews.llvm.org/D146214 String annotations added here: https://github.com/llvm/llvm-project/pull/72677 This commit is part of our efforts to support container annotations with (almost) every allocator. Annotating `std::basic_string` with default allocator is implemented in https://github.com/llvm/llvm-project/pull/72677. Additionally it removes `__begin != nullptr` because `data()` should never return a nullptr. Support in ASan API exists since https://github.com/llvm/llvm-project/commit/1c5ad6d2c01294a0decde43a88e9c27d7437d157. This patch removes the check in std::basic_string annotation member function (__annotate_contiguous_container) to support different allocators. You can turn off annotations for a specific allocator based on changes from https://github.com/llvm/llvm-project/commit/2fa1bec7a20bb23f2e6620085adb257dafaa3be0. The motivation for a research and those changes was a bug, found by Trail of Bits, in a real code where an out-of-bounds read could happen as two strings were compared via a call to `std::equal` that took `iter1_begin`, `iter1_end`, `iter2_begin` iterators (with a custom comparison function). When object `iter1` was longer than `iter2`, read out-of-bounds on `iter2` could happen. Container sanitization would detect it. If you have any questions, please email: - advenam.tacet@trailofbits.com - disconnect3d@trailofbits.com
-
Benjamin Kramer authored
This way it doesn't trigger -Wunused-variable when assertions are disabled.
-
Abhinav271828 authored
We implement two functions that are needed to compute the constant term of a GF. One finds a vector not orthogonal to all the non-null vectors in a given set. One computes the coefficient of any term in an arbitrary rational function (quotient of two polynomials).
-
- Jan 13, 2024
-
-
Tom Stellard authored
This tracks our progress implementing the OpenSSF Best Practices for LLVM.
-
Bharathi Ramana Joshi authored
-
Jim Lin authored
From #75735, Zvfh implies Zvfhmin.
-
Mark de Wever authored
This is a followup of #76983 and adds the libc++ data formatters for - weekday, - weekday_indexed, - weekday_last, - month_weekday, - month_weekday_last, - year_month, - year_month_day_last - year_month_weekday, and - year_month_weekday_last.
-
Durgadoss R authored
-
Sergei Barannikov authored
This tries to fix a bug by resolving a few FIXMEs. The bug is that `EraseInstAction` is emitted after emitting the _first_ `BuildMIAction`, which is too early because the erased instruction may still be used by subsequent `BuildMIAction`s (in particular, by `CopyRenderer`). An example of the bug (from `match-table-operand-types.td`): ``` def InstTest0 : GICombineRule< (defs root:$a), (match (G_MUL i32:$x, i32:$b, i32:$c), (G_MUL $a, i32:$b, i32:$x)), (apply (G_ADD i64:$tmp, $b, i32:$c), (G_ADD i8:$a, $b, i64:$tmp))>; GIR_EraseFromParent, /*InsnID*/0, GIR_BuildMI, /*InsnID*/1, /*Opcode*/GIMT_Encode2(TargetOpcode::G_ADD), GIR_Copy, /*NewInsnID*/1, /*OldInsnID*/0, /*OpIdx*/0, // a GIR_Copy, /*NewInsnID*/1, /*OldInsnID*/0, /*OpIdx*/1, // b GIR_AddSimpleTempRegister, /*InsnID*/1, /*TempRegID*/0, ``` Here, the root instruction is destroyed before copying its operands ('a' and 'b') to the new instruction. The solution is to emit `EraseInstAction` for the root instruction as the last action in the emission pipeline. -
Kazu Hirata authored
-
Kazu Hirata authored
-
Kazu Hirata authored
-
Timm Baeder authored
This fixes a long-standing FIXME item. Unfortunately it changes the diagnostic output of the tests added in `cxx23.cpp`, but they were wrong before and are wrong after, so no big deal.
-
Gonsolo authored
Since the example (llvm/examples/Kaleidoscope/Chapter2/toy.cpp) is self-contained there is no need to use LLVM.
-
LLVM GN Syncbot authored
-
Kelvin Li authored
The linker name is different if the `lld` project is enabled `-DLLVM_ENABLE_PROJECTS="...;lld"`. --------- Co-authored-by:Leandro Lupori <leandro.lupori@gmail.com>
-
paperchalice authored
`PassBuilder` would be a better place to parse MIR pipeline. We can reuse the code to support parsing pass with parameters and targets can reuse `registerPassBuilderCallbacks` to register the target specific passes. `PassBuilder` also has ability to check whether a Pass is a machine pass.
-
Leonard Chan authored
Forward fix for https://github.com/llvm/llvm-project/pull/75256 The process for MmapAlignedOrDieOnFatalError involves trimming the start and end of a mapping to ensure it's aligned correctly. This invloves calling zx_vmar_map again but overwriting a part of the original vmar which involves a call to zx_object_get_info(ZX_INFO_VMAR). After https://github.com/llvm/llvm-project/pull/75256, we unconditionally called this on gSanitizerHeapVmar but this can lead to a ZX_ERR_INVALID_ARGS if the prior mapping was on the root vmar. This can be fixed by also returning the vmar we did the last mapping to and using that for followup operations that specifically involve the same vmar. This way we don't have to try each syscall for both vmars.
-
Kazu Hirata authored
-
Kazu Hirata authored
-
Kazu Hirata authored
-
Kazu Hirata authored
-
Koakuma authored
This lets the backend read the `tune-cpu` directive that is emitted by the frontend. No changes are needed for clang as it is already emits it.
-
Yi Wu authored
The FreeMemory function only accepts a void pointer, but it was being called with a const char pointer, resulting in a type-casting issue. To address this, the const was removed, use char * instead.
-
Min-Yih Hsu authored
XRay used to struggle reading large log files. It turned out the bottleneck was primarily caused by the reallocation happens when appending log entries into a std::vector. This patch reserves the memory space ahead-of-time since the number of entries is known for most cases. Making llvm-xray runs 1.8 times faster and uses 1.4 times less physical memory when reading large (~2.6GB) log files.
-
Congcong Cai authored
-
Congcong Cai authored
-
Reid Kleckner authored
Placing the class id at offset 0 should make `isa` and `dyn_cast` faster by eliminating the field offset (previously 0x10) from the memory operand, saving encoding space on x86, and, in theory, an add micro-op. You can see the load encodes one byte smaller here: https://godbolt.org/z/Whvz4can9 The compile time tracker shows some modestly positive results in the on the `cycle` metric and in the final clang binary size metric: https://llvm-compile-time-tracker.com/compare.php?from=33b54f01fe32030ff60d661a7a951e33360f82ee&to=2530347a57401744293c54f92f9781fbdae3d8c2&stat=cycles Clicking through to the per-library size breakdown shows that instcombine size reduces by 0.68%, which is meaningful, and I believe instcombine is known to be a hotspot. It is, however, potentially noise. I still think we should do this, because notionally, the class id really acts as the vptr of the Value, and conventionally the vptr is always at offset 0.
-
Greg Clayton authored
Some builds don't enable the x86_64 target, so we sometimes don't see register names in DWARF output.
-
Krzysztof Parzyszek authored
These two constructs were both handled in `genOMP` for loop constructs. There is some shared code between the two, but there are also enough differences to separate these two cases into individual functions. The shared code converting loop bounds and steps has been extracted into a separate function. Recursive lowering [1/5]
-
Dominik Wójt authored
The updated picolibc version has "isblank" function with external linkage. This is required for C++ modules support. This should solve all the problems reported in #76980, but we'll wait to validate this with the modules build without closing that issue.
-
Michael Buch authored
This adds API tests for the `target.max-string-summary-length`, which was recently fixed in https://github.com/llvm/llvm-project/pull/72233
-
MaheshRavishankar authored
This makes it consistent with how other linalg operations represent indexing maps.
-
John Harrison authored
When generating a `display_value` for a variable the current approach calls `SBValue::GetValue()` and `SBValue::GetSummary()` to generate a `display_value` for the `SBValue`. However, there are cases where both of these return an empty string and the fallback is to print a pointer and type name instead (e.g. `FooBarType @ 0x00321`). For swift types, lldb includes a langauge runtime plugin that can generate a description of the object but this is only used with `SBValue::GetDescription()`. For example: ``` $ lldb swift-binary ... stop at breakpoint ... lldb> script >>> event = lldb.frame.GetValueForVariablePath("event") >>> print("Value", event.GetValue()) Value None >>> print("Summary", event.GetSummary()) Summary None >>> print("Description", event) # __str__ calls SBValue::GetDescription() Description (main.Event) event = (name = "Greetings", time = 2024-01-04 23:38:06 UTC) ``` With this ch...
-