- Mar 22, 2024
-
-
Nathan Lanza authored
Created using spr 1.3.5
-
Nathan Lanza authored
Created using spr 1.3.5 [skip ci]
-
Alexander Richardson authored
Since this standalone build configuration uses the runtime libraries that are being built just now, we need to ensure that e.g. the TSan unit tests depend on the tsan runtime library. Also fix TSAN_DEPS being overridden to not include the tsan runtime (commit .....). This change fixes a build race seen in the CI checks for TsanRtlTest-x86_64-Test in https://github.com/llvm/llvm-project/pull/83088. Reviewed By: vitalybuka Pull Request: https://github.com/llvm/llvm-project/pull/83650
-
Slava Zakharin authored
A file unit is emulated via a temporary buffer that accumulates the output, which is printed out via std::printf at the end of the IO statement. This implementation will be used for the offload devices.
-
Roland McGrath authored
The isfinite, isnan, and isinf "functions" are specified by C99..C23 to be macros that act as type-generic functions. Defining them as their __builtin_* counterparts works fine for this. However, in C++ the identifiers need to be usable in different contexts, such as being declared inside a C++ namespace. So define inline constexpr template functions for them under `#ifdef __cplusplus`.
-
Alexander Richardson authored
When building optimized versions of the runtime libraries the compiler is generally able to elide these references, but when building them for maximum debug info (with -O0), these references remain which causes the test suite to fail for tests that do not pull in the C++ standard library. Reviewed By: vitalybuka Pull Request: https://github.com/llvm/llvm-project/pull/84613
-
Cyndy Ishida authored
This patch completes the classes of errors installapi can detect.
-
alx32 authored
Fixing gcc warning regarding creating non-null-terminated string: ``` ../../lld/MachO/ObjC.cpp:1226:10: warning: 'char* strncpy(char*, const char*, size_t)' output truncated before terminating nul copying as many bytes from a string as its length [-Wstringop-truncation] 1226 | strncpy(strData, str, len); | ~~~~~~~^~~~~~~~~~~~~~~~~~~ ../../lld/MachO/ObjC.cpp: In member function 'void {anonymous}::ObjcCategoryMerger::emitAndLinkPointerList(lld::macho::Defined*, uint32_t, const {anonymous}::ObjcCategoryMerger::ClassExtensionInfo&, const {anonymous}::ObjcCategoryMerger::PointerListInfo&)': ../../lld/MachO/ObjC.cpp:1223:24: note: length computed here 1223 | uint32_t len = strlen(str); | ~~~~~~^~~~~ ``` This is not actually a bug, as `newSectionData` returns a zero-initialized memory region, so the null terminator will be there. -
alx32 authored
Before this change, after `InputSection` objects are created, they need to be added to the appropriate container for tracking. The logic for selecting the appropriate container lives in `Driver.cpp` / `gatherInputSections`, where the `InputSection` is added to the matching container depending on the input config and the type of `InputSection`. Also, multiple other locations also insert directly into `inputSections` array - assuming that that is the appropriate container for the `InputSection`'s they create. Currently this is the correct assumption, however an upcoming feature will change this. For an upcoming feature (relative method lists), we need to route `InputSection`'s either to `inputSections` array or to a synthetic section, depending on weather the relative method list optimization is enabled or not. We can achieve the above either by duplicating some of the logic or refactoring the routing and `InputSection`'s and reusing that. The refactoring & code sharing approach seems the correct way to go - as such this diff performs the refactoring while not introducing any functional changes. Later on we can just call `addInputSection` and not have to worry about routing logic. ---------
-
Arthur Eubanks authored
The code model doesn't affect the sub-compilation, so don't check it. Followup to #70740.
-
Cooper Partin authored
This change introduces a version 3 of the PSV data that includes support for the name of the entry function as an offset into StringTable data to a null-terminated utf-8 string. Additional tests were added to ensure that the new value was properly serialized/deserialized from object data. Fixes #80175 --------- Co-authored-by:Cooper Partin <coopp@ntdev.microsoft.com>
-
Amir Ayupov authored
Relax assumptions that YAML output is not supported in BAT mode. Set up basic infrastructure for emitting YAML for functions not covered by BAT, such as from `.bolt.org.text` section (code identical to input binary sans external refs), or non-rewritten functions in non-relocation mode (where the function stays in the same section but BAT mapping is not emitted). This diff only produces YAML profile for non-BAT functions (skipped, non-simple). YAML profile for BAT functions is added in follow-up diffs: - https://github.com/llvm/llvm-project/pull/76911 emits YAML profile with internal control flow information only (branch profile), - https://github.com/llvm/llvm-project/pull/76896 adds cross-function profile (calls profile). Test Plan: Added bolt/test/X86/bolt-address-translation-yaml.test Reviewers: ayermolo, dcci, maksfb, rafaelauler Reviewed By: rafaelauler Pull Request: https://github.com/llvm/llvm-project/pull/76910
-
Guillaume Chatelet authored
Follow up on #86140
-
Maksim Panchenko authored
Runtime code modification used by static keys is the most ubiquitous self-modifying feature of the Linux kernel. The idea is to to eliminate the condition check and associated conditional jump on a hot path if that condition (based on a boolean value of a static key) does not change often. Whenever they condition changes, the kernel runtime modifies all code paths associated with that key flipping the code between nop and (unconditional) jump.
-
Krzysztof Parzyszek authored
Remove `ClauseIterator2` and `clauses2` from ClauseProcessor. [Clause representation 5/6]
-
Kevin Frei authored
Finally getting back to Debuginfod tests: I've migrated the tests in my [earlier PR](https://github.com/llvm/llvm-project/pull/79181 ) from shell to API (at @JDevlieghere's suggestion) and addressed a couple issues that came about during testing. The tests first test the "normal" situation (no DebugInfoD involvement, just normal debug files sitting around), then the "no debug info" situation (to make sure the test is seeing failure properly), then it tests to validate that when Debuginfod returns the symbols, things work properly. This is duplicated for DWP/split-dwarf scenarios. --------- Co-authored-by:
Kevin Frei <freik@meta.com>
-
Florian Mayer authored
Also some drive by cleanup removing an unnnecessary argument and a redundant condition.
-
Michele Scandale authored
[InstCombine] Fix for folding select-like `shufflevector` into floating point binary operators. (#85452) Folding a select-like `shufflevector` into a floating point binary operators can only be done if the result is preserved for both case. In particular, if the common operand of the `shufflevector` and the floating point binary operator can be a NaN, then the transformation won't preserve the result value.
-
Guillaume Chatelet authored
Reverts llvm/llvm-project#86147
-
lorenzo chelini authored
-
dmaclach authored
As per https://clang.llvm.org/docs/AutomaticReferenceCounting.html#retainable-object-pointers, types with `__attribute__((NSObject))` are retainable, and thus should be eligible to be used as lightweight generic specifiers. Fix for #84592 84592
-
Aaron Ballman authored
We want to add -Wcast-function-type to -Wextra (as done in 1de7e6c8), but we do not want to add -Wcast-function-type-strict in at the same time (https://lab.llvm.org/buildbot/#/builders/57/builds/33601/steps/5/logs/stdio). This moves the existing warning to a new group (-Wcast-function-type-mismatch), puts the new group under the existing -Wcast-function-type warning group, and adds -Wcast-function-type-mismatch to -Wextra.
-
Kazu Hirata authored
With one raw memprof file I have, NumPCs averages about 41. Given the default number of inline elements being 8 for SmallVector<uint64_t>, we should reserve the storage in advance.
-
Craig Topper authored
The MinBW was being calculated using the significant bits of the upper and lower bounds. The upper bound is 1 past the last value in the range so I don't think it should be included. Instead use ConstantRange::getMinSignedBits. I'm still not sure if the +1 is needed after the getMinSignedBits call.
-
Noah Goldstein authored
Just went a quick replacement of `N{U,S}WAdd` with the `Like` variant that old matches `or disjoint` Closes #86082 -
Noah Goldstein authored
-
Noah Goldstein authored
`or disjoint` implies `add nuw nsw`: https://alive2.llvm.org/ce/z/VABhDA
-
Simon Pilgrim authored
-
Daniel Chen authored
[Flang] Support for NULL() and procedure in structure constructor for procedure pointer component. (#85991) This PR fixes a subset of procedure pointer component initialization in structure constructor. It covers 1. NULL() 2. procedure For example: ``` MODULE M TYPE :: DT !PROCEDURE(Fun), POINTER, NOPASS :: pp1 PROCEDURE(Fun), POINTER :: pp1 END TYPE CONTAINS INTEGER FUNCTION Fun(Arg) class(dt) :: arg END FUNCTION END MODULE PROGRAM MAIN USE M IMPLICIT NONE TYPE (DT), PARAMETER :: v1 = DT(NULL()) TYPE (DT) :: v2 v2 = DT(fun) END ``` Passing a procedure pointer itself or reference to a function that returns a procedure pointer is TODO. -
LLVM GN Syncbot authored
-
T-Gruber authored
Fixes https://github.com/llvm/llvm-project/issues/84463 Changes: - Adapted MemRegion::getDescriptiveName - Added unittest to check name for a given clang::ento::ElementRegion - Some format changes due to clang-format --------- Co-authored-by:
Andreas Steinhausen <andreas.steinhausen@concenrio.io> Co-authored-by:
Balazs Benics <benicsbalazs@gmail.com>
-
Balazs Benics authored
Inside the ExprEngine when we process the initializers, we create a PostInitializer program-point, which will refer to the field being initialized, see `FieldLoc` inside `ExprEngine::ProcessInitializer`. When a constructor (of which we evaluate the initializer-list) is analyzed in top-level context, then the `this` pointer will be represented by a `SymbolicRegion`, (as it should be). This means that we will form a `FieldRegion{SymbolicRegion{.}}` as the initialized region. ```c++ class Bear { public: void brum() const; }; class Door { public: // PostInitializer would refer to "FieldRegion{SymRegion{this}}" // whereas in the store and everywhere else it would be: // "FieldRegion{ELementRegion{SymRegion{Ty*, this}, 0, Ty}". Door() : ptr(nullptr) { ptr->brum(); // Bug } private: Bear* ptr; }; ``` We (as CSA folks) decided to avoid the creation of FieldRegions directly of symbolic regions in the past: https://github.com/llvm/llvm-project/commit/f8643a9b31c4029942f67d4534c9139b45173504 --- In this patch, I propose to also canonicalize it as in the mentioned patch, into this: `FieldRegion{ElementRegion{SymbolicRegion{Ty*, .}, 0, Ty}` This would mean that FieldRegions will/should never simply wrap a SymbolicRegion directly, but rather an ElementRegion that is sitting in between. This patch should have practically no observable effects, as the store (due to the mentioned patch) was made resilient to this issue, but we use `PostInitializer::getLocationValue()` for an alternative reporting, where we faced this issue. Note that in really rare cases it suppresses now dereference bugs, as demonstrated in the test. It is because in the past we failed to follow the region of the PostInitializer inside the StoreSiteFinder visitor - because it was using this code: ```c++ // If this is a post initializer expression, initializing the region, we // should track the initializer expression. if (std::optional<PostInitializer> PIP = Pred->getLocationAs<PostInitializer>()) { const MemRegion *FieldReg = (const MemRegion *)PIP->getLocationValue(); if (FieldReg == R) { StoreSite = Pred; InitE = PIP->getInitializer()->getInit(); } } ``` Notice that the equality check didn't pass for the regions I'm canonicalizing in this patch. Given the nature of this change, we would rather upstream this patch. CPP-4954 -
Janek van Oirschot authored
Reverts llvm/llvm-project#80855
-
Ilya Biryukov authored
[libc++] Remove macros for keeping std::allocator members and void specialization after C++20 (#85806) Fixes #75975. Remove `_LIBCPP_ENABLE_CXX20_REMOVED_ALLOCATOR_MEMBERS` for the LLVM 19 release, it was previously marked as deprecated in LLVM 18. I believe that `_LIBCPP_ENABLE_CXX20_REMOVED_ALLOCATOR_VOID_SPECIALIZATION` was only used by Google in conjunction with `_LIBCPP_ENABLE_CXX20_REMOVED_ALLOCATOR_MEMBERS`. Removing both macros together should not cause any issues in practice, even though we did not announce the removal of `_LIBCPP_ENABLE_CXX20_REMOVED_ALLOCATOR_VOID_SPECIALIZATION` before.
-
Simon Pilgrim authored
Noticed in debug logs - most calls to visitVECTOR_SHUFFLE resulted into wasteful UNDEF node creations, despite almost never being used.
-
Nick Desaulniers authored
SYS_rename may be unavailable on architectures such as aarch64 and riscv. rename can be implemented in terms of SYS_rename, SYS_renameat, or SYS_renameat2. I don't have a full picture of the history here, but it seems that SYS_renameat might also be unavailable on some platforms. `man 2 rename` mentions that SYS_renameat2 was added in Linux 3.15. We don't need to support such ancient kernel versions prior. Link: #84980 Link: #85068
-
OverMighty authored
Fixes #83075, fixes #83076.
-
Guillaume Chatelet authored
This will replace `__builtin_is_constant_evaluated` in math_extras.h.
-
Craig Topper authored
We were passing the min and max values of the range to the ConstantRange constructor, but the constructor expects the upper bound to 1 more than the max value so we need to add 1. We also need to use getNonEmpty so that passing 0, 0 to the constructor creates a full range rather than an empty range. And passing smin, smax+1 doesn't cause an assertion. I believe this fixes at least some of the reason #79158 was reverted.
-