- Dec 13, 2023
-
-
Nikita Popov authored
This recovers more of the max-rss regression introduced by https://reviews.llvm.org/D157657. This is an about 1.2% max-rss improvement for the LTO link stage with debuginfo on CTMark.
-
Guillaume Chatelet authored
Reverts llvm/llvm-project#75196 GCC complains about change of meaning for `FPBits` ``` /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/src/__support/FPUtil/generic/FMod.h:188:9: error: declaration of ‘using FPBits = struct __llvm_libc_18_0_0_git::fputil::FPBits<T>’ changes meaning of ‘FPBits’ [-fpermissive] 188 | using FPBits = FPBits<T>; | ^~~~~~ ``` I'll reland with a different name. -
Shengchen Kan authored
-
Shengchen Kan authored
-
Abhinav271828 authored
Implement Gram-Schmidt orthogonalisation for the FracMatrix class. This requires dotProduct, which has been added as a util.
-
Guillaume Chatelet authored
Also make type naming consistent: - `UIntType` instead of `intU_t` - `FPBits` instead of `FPBits_t`, `FPB`
-
paperchalice authored
-
Matt Arsenault authored
If the rematerialize was placing a subregister into a super register, and implicit operands referenced the original register, we need to add undef flags to the now-subregister indexed implicit operands. Depends #75152
-
Schrodinger ZHU Yifan authored
This patch fixes cmake configuration when building with LLVM_LIBC_INCLUDE_SCUDO. In libc, LIBC_TARGET_ARCHITECTURE is renamed from `riscv64` to `riscv`. However, `compiler-rt`, hence `scudo`, distinguishes `riscv32` and `riscv64` in the support list. As a result, we need to translate the architecture name accordingly.
-
paperchalice authored
-
Pierre van Houtryve authored
Most users of AddImm and CheckConstantInt only use 1 byte immediates, so I added an opcode variants for those. That way all those instructions save 7 bytes. Also added an opcode for AddTempRegister for the cases where there are no register flags. Space savings: - AMDGPUGenGlobalISel: 470180 bytes to 422564 (-10%) - AArch64GenGlobalISel.inc: 383893 bytes to 374046 -
Matt Arsenault authored
If the copy being hoisted was undef, we have the same problems that eliminateUndefCopy needs to solve. We would effectively be introducing a new live out implicit_def. We need to add an undef flag to avoid artificially introducing a live through undef value. Previously, the verifier would fail due to the dead def inside the loop providing the live in value for the %1 use.
-
Fangrui Song authored
-
Shengchen Kan authored
Found in #75288
-
paperchalice authored
- `CollectorMetadataAnalysis` provides `GCStrategyMap`. - `GCFunctionAnalysis` provides `GCFunctionInfo`. `GCStrategyMap` owns `GCStrategy` pointers and this pass is used by `AsmPrinter` to iterate all GC strategies. Most passes that require `GCModuleInfo` actually require the `GCFunctionInfo`, so add `GCFunctionAnalysis` for convenience.
-
Mariya Podchishchaeva authored
Current context set to where alias was met, not where it is declared caused incorrect access check in case alias referenced private members of the parent class. This is a recommit of 6b1aa319 with a slight modification in order to fix reported regression. Fixes https://github.com/llvm/llvm-project/issues/41693
-
Pierre van Houtryve authored
See https://discourse.llvm.org/t/rfc-make-globalisel-match-table-entries-1-byte-instead-of-8/75411 This helps reduce llc's binary size, at the cost of some added complexity to the MatchTable machinery.
-
Mariya Podchishchaeva authored
Normally warning is not reported when a field has default initializer. Do so for anonymous unions with default initializers as well. No release note since it is a regression in clang 18. Fixes https://github.com/llvm/llvm-project/issues/70384
-
David Green authored
-
Vitaly Buka authored
It's required for hwasan `aliasing` mode.
-
Yeting Kuo authored
Bump to https://github.com/riscv/riscv-cfi/releases/tag/v0.4.0. Actually there is no functional change here.
-
Vitaly Buka authored
This avoids internal libstdc++ leaks.
-
Fangrui Song authored
-
Vitaly Buka authored
-
Sizov Nikita authored
``` CommutativeBinOp(select(V, A, B), select(V, B, A) --> CommutativeBinOp(A, B) CommutativeIntrinsicCall(select(V, A, B), select(V, B, A), ...) --> CommutativeIntrinsicCall(A, B, ...) ``` https://alive2.llvm.org/ce/z/8CDUZ4 Closes #73904
-
Eric authored
Also add links to github actions workflow.
-
serge-sans-paille authored
We only allow for assembly code in naked function, and PGO instrumentation (esp. temporal instrumentation that introduces a function call) can wreak havoc in this. Fix #74573
-
Vitaly Buka authored
Fixes sanitizer-ppc64le-linux bot.
-
Yingchi Long authored
Currently on mcpu=v3 we do not support sdiv, srem instructions. And the backend crashes with stacktrace & coredump, which is misleading for end users, as this is not a "bug" Add llvm bug reporting for sdiv/srem on ISel legalize-op phase. For clang frontend we can get detailed location & bug report. $ build/bin/clang -g -target bpf -c local/sdiv.c local/sdiv.c:1:35: error: unsupported signed division, please convert to unsigned div/mod. 1 | int sdiv(int a, int b) { return a / b; } | ^ 1 error generated. Fixes: #70433 Fixes: #48647 This also improves error handling for dynamic stack allocation: local/vla.c:2:3: error: unsupported dynamic stack allocation 2 | int b[n]; | ^ 1 error generated. Fixes: https://github.com/llvm/llvm-project/issues/57171 -
Matheus Izvekov authored
Reverts llvm/llvm-project#75104 Original commit causes clang to generate invalid IR: ``` mismatched subprogram between llvm.dbg.declare variable and !dbg attachment call void @llvm.dbg.declare(metadata ptr %4, metadata !34468, metadata !DIExpression(DW_OP_plus_uconst, 176)), !dbg !34467 ```
-
Tacet authored
This commit introduces basic annotations for `std::basic_string`, mirroring the approach used in `std::vector` and `std::deque`. Initially, only long strings with the default allocator will be annotated. Short strings (_SSO - short string optimization_) and strings with non-default allocators will be annotated in the near future, with separate commits dedicated to enabling them. The process will be similar to the workflow employed for enabling annotations in `std::deque`. **Please note**: these annotations function effectively only when libc++ and libc++abi dylibs are instrumented (with ASan). This aligns with the prevailing behavior of Memory Sanitizer. To avoid breaking everything, this commit also appends `_LIBCPP_INSTRUMENTED_WITH_ASAN` to `__config_site` whenever libc++ is compiled with ASan. If this macro is not defined, string annotations are not enabled. However, linking a binary that does **not** annotate strings with a dynamic library that annotates strings, is not permitted. Originally proposed here: https://reviews.llvm.org/D132769 Related patches on Phabricator: - Turning on annotations for short strings: https://reviews.llvm.org/D147680 - Turning on annotations for all allocators: https://reviews.llvm.org/D146214 This PR is a part of a series of patches extending AddressSanitizer C++ container overflow detection capabilities by adding annotations, similar to those existing in `std::vector` and `std::deque` collections. These enhancements empower ASan to effectively detect instances where the instrumented program attempts to access memory within a collection's internal allocation that remains unused. This includes cases where access occurs before or after the stored elements in `std::deque`, or between the `std::basic_string`'s size (including the null terminator) and capacity bounds. The introduction of these annotations was spurred by a real-world software bug discovered by Trail of Bits, involving an out-of-bounds memory access during the comparison of two strings using the `std::equals` function. This function was taking iterators (`iter1_begin`, `iter1_end`, `iter2_begin`) to perform the comparison, using a custom comparison function. When the `iter1` object exceeded the length of `iter2`, an out-of-bounds read could occur on the `iter2` object. Container sanitization, upon enabling these annotations, would effectively identify and flag this potential vulnerability. This Pull Request introduces basic annotations for `std::basic_string`. Long strings exhibit structural similarities to `std::vector` and will be annotated accordingly. Short strings are already implemented, but will be turned on separately in a forthcoming commit. Look at [a comment](https://github.com/llvm/llvm-project/pull/72677#issuecomment-1850554465) below to read about SSO issues at current moment. Due to the functionality introduced in [D132522](https://github.com/llvm/llvm-project/commit/dd1b7b797a116eed588fd752fbe61d34deeb24e4), the `__sanitizer_annotate_contiguous_container` function now offers compatibility with all allocators. However, enabling this support will be done in a subsequent commit. For the time being, only strings with the default allocator will be annotated. If you have any questions, please email: - advenam.tacet@trailofbits.com - disconnect3d@trailofbits.com
-
Vitaly Buka authored
-
Matheus Izvekov authored
Add test for https://github.com/llvm/llvm-project/issues/75115
-
paperchalice authored
-
Vitaly Buka authored
They already include workarounds.
-
Matt Arsenault authored
-
Matt Arsenault authored
-
Cyndy Ishida authored
This reverts commit aa217eb0. This reverts commit 634feddc. This breaks buildbots by introducing cycle dependency between libObject and TextAPI and breaks gcc compiles on buildbots.
-
Vitaly Buka authored
-
Cyndy Ishida authored
* Reported in buildbot failures
-