- Jan 21, 2023
-
-
Kazu Hirata authored
This patch adds C++20-style bit_floor, bit_ceil, and bit_width. In a subsequent patch, I'm going to define PowerOf2Floor in MathExtras.h in terms of bit_floor. Unfortunately, PowerOf2Ceil isn't quite the same as bit_ceil because PowerOf2Ceil(0) == 0, whereas bit_ceil(0) == 1. MathExtras.h does not have a function directly corresponding to bit_width, but Log2_32(X) + 1, which occurs in a few places, can be replaced with bit_width(X). Differential Revision: https://reviews.llvm.org/D142179
-
David Blaikie authored
(Phab review only sent in draft to use bazel presubmit testing - precommit human review was not required) Differential Revision: https://reviews.llvm.org/D142267
-
Amir Ayupov authored
In profile matching, if `.__uniq` suffix added for internal linkage symbols with `-funique-internal-linkage-names` prevents BOLT from matching to a binary function, try to strip the suffix and perform fuzzy name matching. Follow-up to D124117. Reviewed By: #bolt, maksfb Differential Revision: https://reviews.llvm.org/D142073
-
Matt Arsenault authored
This will allow for easier overriding of the pass.
-
Matt Arsenault authored
Bitcode inputs should produce bitcode intermediates by default.
-
Matt Arsenault authored
Move things that are naturally methods of ReducerWorkItem to be methods of ReducerWorkItem in the same source file.
-
Kazu Hirata authored
This patch drops the ZeroBehavior parameter from bit counting functions like countLeadingZeros. ZeroBehavior specifies the behavior when the input to count{Leading,Trailing}Zeros is zero and when the input to count{Leading,Trailing}Ones is all ones. ZeroBehavior was first introduced on May 24, 2013 in commit eb91eac9. While that patch did not state the intention, I would guess ZeroBehavior was for performance reasons. The x86 machines around that time required a conditional branch to implement countLeadingZero<uint32_t> that returns the 32 on zero: test edi, edi je .LBB0_2 bsr eax, edi xor eax, 31 .LBB1_2: mov eax, 32 That is, we can remove the conditional branch if we don't care about the behavior on zero. IIUC, Intel's Haswell architecture, launched on June 4, 2013, introduced several bit manipulation instructions, including lzcnt and tzcnt, which eliminated the need for the conditional branch. I think it's time to retire ZeroBehavior as its utility is very limited. If you care about compilation speed, you should build LLVM with an appropriate -march= to take advantage of lzcnt and tzcnt. Even if not, modern host compilers should be able to optimize away quite a few conditional branches because the input is often known to be nonzero from dominating conditional branches. In this iteration, I've moved the forward declarations of _BitScanForward outside the llvm space to fix builds on Windows. Differential Revision: https://reviews.llvm.org/D141798 -
David Blaikie authored
& some aarch64 fixes?
-
Siva Chandra authored
The static keyword of the concerned methods was accidentally lost in a previous commit.
-
Dmitri Gribenko authored
In unit tests for concrete dataflow analyses we typically use the testonly `checkDataflow()` helper to analyse a free function called "target". This pattern allows our tests to be uniform and focused on specific statement- or expression-level C++ features. As we expand our feature coverage, we want to analyze functions whose names we don't fully control, like constructors, destructors, operators etc. In such tests it is often convenient to analyze all functions defined in the input code, to avoid having to carefully craft an AST matcher that finds the exact function we're interested in. That can be easily done by providing `checkDataflow()` with a catch-all matcher like `functionDecl()`. It is also often convenient to define multiple special member functions in a single unit test, for example, multiple constructors, and share the rest of the class definition code between constructors. As a result, it makes sense to analyze multiple functions in one unit test. This change allows `checkDataflow()` to correctly handle AST matchers that match more than one function. Previously, it would only ever analyze the first matched function, and silently ignore the rest. Now it runs dataflow analysis in a loop, and calls `VerifyResults` for each function that was found in the input and analyzed. Reviewed By: ymandel, sgatev Differential Revision: https://reviews.llvm.org/D140859
-
David Blaikie authored
-
Mehdi Amini authored
This reverts commit 2e312a7b. Should never have been pushed here...
-
Mehdi Amini authored
-
Brad King authored
Extend the change from commit 15f3cd6b ([clang] Implement ElaboratedType sugaring for types written bare, 2021-10-11, D112374) to cover types in the signatures of implicit copy-constructor, copy-assignment, move-constructor, and move-assignment members in C++ record types. With this fix, diagnostic messages print types of special members consistently whether they are explicitly or implicitly defined. Fixes: https://github.com/llvm/llvm-project/issues/59557 Reviewed By: rsmith Differential Revision: https://reviews.llvm.org/D141441
-
Amir Ayupov authored
Break out stats-printing code from ReorderFunctions::reorder for brevity. Reviewed By: #bolt, maksfb Differential Revision: https://reviews.llvm.org/D142250
-
Jim Ingham authored
The presence of this entry causes the Xcode generator to produce two references to libLLVMSupport.a, one at the end of the list, and that causes the build to fail with a link error. The first version was pulled in when processing the CLANG_LIBS entries in the lldb/tools/lldb-instr/CMakeLists.txt. I looked around and the only places where we use LINK_COMPONENTS and CLANG_LIBS together are various lldb subdirectories that produce .a files but don't actually link anything. Anyway, this line doesn't seem to be needed for either the regular Ninja or the Xcode generator, and removing it makes the xcode build work again. Differential Revision: https://reviews.llvm.org/D142241
-
Joseph Huber authored
Summary: This patch removes a tool that was never finished and has no plans of being picked up again. It does not need to live in LLVM source in an unusable state.
-
Joseph Huber authored
Previously we had some special handling here that errored out if multiple architectures were detected. This isn't a problem anymore as the runtime can handle multi-archicture binaries automatically. So it's safe to simply take the first architecture that we know works. If users use `--offload-arch=native` instead it will build for all the architectures at the same time rather than just picking one. This patch makes it consisten with the NVPTX version. Reviewed By: jdoerfert Differential Revision: https://reviews.llvm.org/D142138
-
Eduard Zingerman authored
Stack protector builtin functions are not implemented for BPF target, thus compiling programs with one of the following options would result in an error: -fstack-protector -fstack-protector-all -fstack-protector-strong This commit adds logic to ignore these options for BPF target. Searching through DiagnosticDriverKinds.td shows that all messages for such kind of behavior are implemented as warnings, this commit follows the suit. Here is an example of the diagnostic message: clang-16: warning: ignoring '-fstack-protector' option as it is not currently supported for target 'bpf' [-Woption-ignored] Differential Revision: https://reviews.llvm.org/D142046
-
Anshil Gandhi authored
Reviewed By: arsenm Differential Revision: https://reviews.llvm.org/D142161
-
Haojian Wu authored
-
Changpeng Fang authored
Summary: For any enumerator whose definition does not have an initializer, the associated value is the value of the previous enumerator plus one. In order to avoid the possibility that two unrelated enumerators to have the same value, we should try to cluster the uninitialized enumerators together. Reviewers: arsenm Differential Revision https://reviews.llvm.org/D141643
-
Sanjay Patel authored
https://alive2.llvm.org/ce/z/ptZcJH issue #60167
-
Sanjay Patel authored
issue #60167
-
Kazu Hirata authored
This patch fixes: mlir/lib/Dialect/SparseTensor/IR/SparseTensorDialect.cpp:528:22: error: comparison of integers of different signs: 'uint64_t' (aka 'unsigned long') and 'int64_t' (aka 'long') [-Werror,-Wsign-compare]
-
Siva Chandra Reddy authored
This is first of a few patches which will do similar mechanical changes. LIBC_INLINE is a simple macro which is default defined as just `inline`. The idea is that, different downstream contexts can define the macro as suitable to their use case and context. For example, one can choose to define LIBC_INLINE as `[[clang::internal_linkage]] inline`. Reviewed By: lntue Differential Revision: https://reviews.llvm.org/D142154
-
Ed Maste authored
This at least allows us to stand up libc++ FreeBSD CI and avoid future regressions. The failures do need to be addressed, and can be done iteratively. Reviewed By: philnik, Mordante Differential Revision: https://reviews.llvm.org/D141542
-
Zahira Ammarguellat authored
This reverts commit 47074683. Had to revert it that since it's breaking tests on MacOS. See https://reviews.llvm.org/D141929 comments from @thakis.
-
Shilei Tian authored
-
Arthur Eubanks authored
This reverts commit 9d4f1a9e. Breaks under -DCOMPILER_RT_BUILD_SANITIZERS=OFF
-
Konstantin Belousov authored
Reviewed By: philnik Differential Revision: https://reviews.llvm.org/D142134
-
Jan Svoboda authored
Whenever we are compiling implementation of a framework (with the `-fmodule-name=FW` option), we never translate `#import <FW/Header.h>` to an import, regardless of whether "Header.h" belongs to "FW" or "FW_Private". For the same reasons, we also disallow `@import FW`. However, we still allow `@import FW_Private`. This patch disallows that a well, to be consistent with the rest of the rules. Reviewed By: benlangmuir Differential Revision: https://reviews.llvm.org/D142167
-
wren romano authored
Reviewed By: Peiming Differential Revision: https://reviews.llvm.org/D142072
-
Fahad Nayyar authored
Disabled an invalid fix-it which suggested fixes to be applied in system headers for some programs in IDEs like Xcode. rdar://100890960 Differential Revision: https://reviews.llvm.org/D141868
-
https://github.com/llvm/llvm-project/issues/59515Peter Rong authored
Also provide a `tryExtValue()` API like APInt did in D139683 Reviewed By: RKSimon, efriedma Differential Revision: https://reviews.llvm.org/D140059
-
Argyrios Kyrtzidis authored
Fixes a failure in some Windows configuration. Differential Revision: https://reviews.llvm.org/D142238
-
Tony Tye authored
Reviewed By: scott.linder Differential Revision: https://reviews.llvm.org/D142237
-
Prabhdeep Singh Soni authored
This patch modifies OpenMPIRBuilder::createTask to accept its Dependencies vector by value instead of by reference. This is necessary because the PostOutlineCB lambda that uses this Dependencies vector may outlive the original Dependencies vector. Reviewed By: kiranchandramohan Differential Revision: https://reviews.llvm.org/D141651
-
Augusto Noronha authored
SymbolFiles should be the only point of creation of Types to ensure that they aren't destroyed prematurely by keeping them in the SymbolFile's TypeList. This patch hides the copy constructor of Types, and adds a new CopyType function to SymbolFile, so Types can still be copied safely. Differential Revision: https://reviews.llvm.org/D142052
-
Dave Lee authored
The SBModule copy constructor has fast execution, and is high firing. Fast and frequent functions are not good candidates for timers. Differential Revision: https://reviews.llvm.org/D142150
-