- Jun 09, 2024
-
-
Matthias Springer authored
-
Matthias Springer authored
Co-authored-by:Markus Böck <markus.boeck02@gmail.com>
-
Matthias Springer authored
Co-authored-by:Markus Böck <markus.boeck02@gmail.com>
-
Matthias Springer authored
Co-authored-by:Markus Böck <markus.boeck02@gmail.com>
-
Matthias Springer authored
Co-authored-by:Markus Böck <markus.boeck02@gmail.com>
-
Matthias Springer authored
This commit simplifies and improves documentation for the part of the `ConversionPatternRewriter` API that deals with signature conversions. There are now two public functions for signature conversion: * `applySignatureConversion` converts a single block signature. * `convertRegionTypes` converts all block signatures of a region. Note: `convertRegionTypes` could be renamed to `applySignatureConversion` (overload) in the future. Also clarify when a type converter and/or signature conversion object is needed and for what purpose. From a functional perspective, this change is NFC. However, the public API changes, thus not marking as NFC.
-
Shivam Gupta authored
Cppcheck recommends using a const reference for range variables in a for-each loop. This avoids unnecessary copying of elements, improving performance. Caught by cppcheck - lldb/source/API/SBBreakpoint.cpp:717:22: performance: Range variable 'name' should be declared as const reference. [iterateByValue] lldb/source/API/SBTarget.cpp:1150:15: performance: Range variable 'name' should be declared as const reference. [iterateByValue] lldb/source/Breakpoint/Breakpoint.cpp:888:26: performance: Range variable 'name' should be declared as const reference. [iterateByValue] lldb/source/Breakpoint/BreakpointIDList.cpp:262:26: performance: Range variable 'name' should be declared as const reference. [iterateByValue] Fix #91213 Fix #91217 Fix #91219 Fix #91220
-
Kazu Hirata authored
Identified with modernize-use-default-member-init.
-
Sam Elliott authored
This broadly follows how in almost all places, we accept `(<reg>)` to mean `0(<reg>)`, but I think these are the first like this for Jumps rather than Loads/Stores. These are accepted by binutils but not by LLVM: https://godbolt.org/z/GK7MGE7q7
-
- Jun 08, 2024
-
-
Nikolas Klauser authored
This depends on enabling the use of extensions.
-
Kazu Hirata authored
'override' makes 'virtual' redundant. Identified with modernize-use-override.
-
Kazu Hirata authored
While I am at it, this patch adds const to a couple of places.
-
Kazu Hirata authored
-
AtariDreams authored
Since we can bitcast and then do the same thing sub does in the table section above, I figured it was trivial to add fsub, fmul, and fdiv.
-
Yingwei Zheng authored
This patch relands #91469 and uses `uint64_t` for repeat count to avoid a miscompilation caused by overflow https://github.com/llvm/llvm-project/pull/91469#discussion_r1623925158.
-
Yingwei Zheng authored
The pr description in #94008 mismatches with the code. > + When VT is smaller than ShiftVT, it is safe to use trunc. > + When VT is larger than ShiftVT, it is safe to use zext iff `is_zero_poison` is true (i.e., `opcode == ISD::CTTZ_ZERO_UNDEF`). See also the counterexample `src_shl_cttz2 -> tgt_shl_cttz2` in the alive2 proofs. Closes #94824. -
FantasqueX authored
-
DaPorkchop_ authored
[SimplifyCFG] Don't use a mask for lookup tables generated from switches with an unreachable default case (#94468) When transforming a switch with holes into a lookup table, we currently use a mask to check if the current index is handled by the switch or if it is a hole. If it is a hole, we skip loading from the lookup table. Normally, if the switch's default case is unreachable this has no impact, as the mask test gets optimized away by subsequent passes. However, if the switch is large enough that the number of lookup table entries exceeds the target's register width, we won't be able to fit all the cases into a mask and the switch won't get transformed into a lookup table. If we know that the switch's default case is unreachable, we know that the mask is unnecessary and can skip constructing it entirely, which allows us to transform the switch into a lookup table. [Example](https://godbolt.org/z/7x7qfx8M1) In the future, it might be interesting to consider allowing lookup table masks to be more than one register large (e.g. using a constant array of bit flags, similar to `std::bitset`).
-
Vlad Serebrennikov authored
This patch removes LLDB from a list of projects that are excluded from building and testing on pre-merge CI on Linux. Windows environment needs to be prepared in order to test LLDB (https://github.com/llvm/llvm-project/pull/94208#issuecomment-2146256857), but we don't have enough maintenance resources to do that at the moment. Because LLDB has been in the list of projects that need to be tested on Clang changes, this PR make this happen on Linux. This seems to be the consensus in the discussion of this PR.
-
NAKAMURA Takumi authored
2e1788f8 reverted #94843. It was creating `%t` as a directory and causes an error in incremental builds.
-
Marc Auberer authored
`std::aligned_storage` is deprecated with C++23, see [here](https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2021/p1413r3.pdf). This replaces the usages of `std::aligned_storage` within compiler-rt with an aligned `std::byte` array. I will provide patches for other subcomponents as well.
-
Quentin Colombet authored
In some case, constant can survive early constant folding optimization because they are hidden behind several layers of type changes. E.g., consider the following sequence (extracted from the arm test that this commit changes): ``` t2: v1f16 = BUILD_VECTOR ConstantFP:f16<APFloat(0)> t4: v1f16 = insert_vector_elt t2, ConstantFP:f16<APFloat(0)>, Constant:i32<0> t5: f16 = bitcast t4 t6: f32 = fp_extend t5 ``` Because the constant (APFloat(0)) is hidden behind a <1 x ty> type, all the constant folding that normally happen for scalar nodes when using `SelectionDAG::getNode` are blocked. As a result the constant manages to survive as an actual conversion instruction down to the select phase: ``` t11: f32 = fp16_to_fp Constant:i32<0> ``` With the change in this patch, we try to do constant folding one more time during dag combine, which in the motivating example result in the much better sequence: ``` t7: ch = CopyToReg t0, Register:f32 %0, ConstantFP:f32<0.000000e+00> ``` Note: I'm sure we have this problem in a lot of other places. Generally speaking I believe SDISel is not that good with <1 x ty> compared to pure scalar. However, I only changed what I could easily test. -
Timm Baeder authored
Use handleFloatFloatBinOp to properly diagnose NaN results and divisions by zero. Fixes #84871
-
Matthias Springer authored
[mlir][Transforms][NFC] `GreedyPatternRewriteDriver`: Use composition instead of inheritance (#92785) This commit simplifies the design of the `GreedyPatternRewriterDriver` class. This class used to inherit from both `PatternRewriter` and `RewriterBase::Listener` and then attached itself as a listener. In the new design, the class has a `PatternRewriter` field instead of inheriting from `PatternRewriter`, which is generally perferred in object-oriented programming. --------- Co-authored-by:Markus Böck <markus.boeck02@gmail.com>
-
Jonas Paulsson authored
Some Ubuntu builds were broken after 20d497c2 "[Driver] Remove unneeded *-linux-gnu after D158183". This patch by Fangrui Song fixes this with a handling in config.guess.
-
Ben Barham authored
`BlockT *LoopBase<BlockT, LoopT>::getLoopPreheader()` was changed in 72436078 to use `llvm::size` rather than the checking that `child_begin() + 1 == child_end()`. `llvm::size` requires that `std::distance` be O(1) and hence that clients support random access. Use `llvm::hasSingleElement` instead.
-
Craig Topper authored
-
Craig Topper authored
-
Daniil Kovalev authored
Reverts llvm/llvm-project#87635 On some corner cases, lld generated an object file with an empty REL section with `sh_info` set to 0. This file triggers an lld error when used as its input. See https://github.com/llvm/llvm-project/pull/87635#issuecomment-2155318065 for details.
-
Shivam Gupta authored
Passing the result of c_str() to a stream is slow and redundant. This change removes unnecessary c_str() calls and uses the string object directly. Caught by cppcheck - lldb/tools/debugserver/source/JSON.cpp:398:19: performance: Passing the result of c_str() to a stream is slow and redundant. [stlcstrStream] lldb/tools/debugserver/source/JSON.cpp:408:64: performance: Passing the result of c_str() to a stream is slow and redundant. [stlcstrStream] lldb/tools/debugserver/source/JSON.cpp:420:54: performance: Passing the result of c_str() to a stream is slow and redundant. [stlcstrStream] lldb/tools/debugserver/source/JSON.cpp:46:13: performance: Passing the result of c_str() to a stream is slow and redundant. [stlcstrStream] Fix #91212
-
Craig Topper authored
Also remove some unused Constraint paramters that appeared before the sew parameter.
-
Craig Topper authored
These usually have a single value that is always used. We can just hardcode into the class body.
-
Vladimir Vereschaka authored
* generate Clang configuration file with provided target sysroot (TOOLCHAIN_TARGET_SYSROOTFS) * explicitly pass provided target sysroot into the compiler-rt tests configuration. * added ability to configure a type of the build libraries -- shared or static (TOOLCHAIN_SHARED_LIBS, default OFF) In behalf of: #94284
-
Helena Kotas authored
`HLSLShaderAttr::ShaderType` enum is a subset of `llvm::Triple::EnvironmentType`. We can use `llvm::Triple::EnvironmentType` directly and avoid converting one enum to another.
-
Thurston Dang authored
DFSan's sscanf is incorrect (https://github.com/llvm/llvm-project/issues/94769), which results in erroneous matches when scraping RSS from /proc/maps. This patch works around the issue by using strstr as a secondary check. It also adds a loose validity check for the initial RSS measurement, to guard against regressions in get_rss_kb(). Fixes https://github.com/llvm/llvm-project/issues/91287
-
Jie Fu authored
[mlir] Handle the newly-added "Reserved" FramePointerKind for 1a523925 (NFC) /llvm-project/mlir/lib/Target/LLVMIR/ModuleImport.cpp:48: tools/mlir/include/mlir/Dialect/LLVMIR/LLVMConversionEnumsFromLLVM.inc:158:11: error: enumeration value 'Reserved' not handled in switch [-Werror,-Wswitch] switch (value) { ^~~~~ 1 error generated.
-
Tom Stellard authored
This job will run once per day on the main branch, and for every commit on a release branch. It currently only builds llvm, but could add more sub-projects in the future. OpenSSF Best Practices recommends running a static analyzer on software before it is released: https://www.bestpractices.dev/en/criteria/0#0.static_analysis
-
Craig Topper authored
-
Craig Topper authored
This class is most closely related to VPatBinaryM.
-
Craig Topper authored
These pseudoinstructions have a policy operand so calling them TU is confusing.
-