aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2024-06-11[𝘀𝗽𝗿] initial versionusers/shawbyoung/spr/updated-commandlineargumentreferencemdshawbyoung25-85/+540
Created using spr 1.3.4
2024-06-11[𝘀𝗽𝗿] changes to main this commit is based onusers/shawbyoung/spr/main.updated-commandlineargumentreferencemdshawbyoung24-84/+528
Created using spr 1.3.4 [skip ci]
2024-06-09[mlir][Transforms][NFC] Improve dialect conversion documentation (#94736)Matthias Springer1-2/+3
2024-06-09[clang-tidy] Ignore non-math operators in ↵Piotr Zegar2-1/+19
readability-math-missing-parentheses (#94654) Do not emit warnings for non-math operators. Closes #92516
2024-06-09[clang][Interp][NFC] Refactor lvalue-to-rvalue conversion codeTimm Bäder2-19/+20
Really perform the conversion always if the flag is set and don't make it dependent on whether we're checking the result for initialization.
2024-06-09[SPARC][IAS] Add aliases for %asr20-21 as defined in JPS1Koakuma2-2/+13
This adds %set_softint and %clear_softint alias for %asr20 and %asr21 as defined in JPS1. Reviewers: jrtc27, brad0, s-barannikov, rorth Reviewed By: s-barannikov Pull Request: https://github.com/llvm/llvm-project/pull/94247
2024-06-09[SPARC][IAS] Add support for %uhi and %ulo extensionsKoakuma2-38/+50
This adds support for GNU %uhi and %ulo extensions. Those resolve to the same relocations as %hh and %hm. Reviewers: cyndyishida, dcci, brad0, jrtc27, aaupov, Endilll, rorth, maksfb, #reviewers-libcxxabi, s-barannikov, rafaelauler, ayermolo, #reviewers-libunwind, #reviewers-libcxx, daniel-grumberg, tbaederr Reviewed By: s-barannikov Pull Request: https://github.com/llvm/llvm-project/pull/94246
2024-06-09[SPARC][IAS] Add GNU extension for `addc`Koakuma2-3/+18
Transform `addc imm, %rs, %rd` into `addc %rs, imm, %rd`. This is used in some GNU and Linux code. Reviewers: s-barannikov, rorth, jrtc27, brad0 Reviewed By: s-barannikov Pull Request: https://github.com/llvm/llvm-project/pull/94245
2024-06-08[MC] Simplify Sec.getFragmentList().insert(Sec.begin(), F). NFCFangrui Song3-6/+8
Decrease the uses of getFragmentList() to make it easier to change the fragment list representation.
2024-06-09[clang][NFC] Update CWG issues listVlad Serebrennikov1-0/+12
2024-06-08[InstCombine] Propagate flags when folding consecutative shiftsNoah Goldstein2-7/+16
When we fold `(shift (shift C0, x), C1)` we can propagate flags that are common to both shifts. Proofs: https://alive2.llvm.org/ce/z/LkEzXD Closes #94872
2024-06-08[InstCombine] Add tests for propagating flags when folding consecutative ↵Noah Goldstein1-0/+80
shifts; NFC
2024-06-09[mlir][nfc] Sort test passes registration (#94201)Ivan Butygin1-34/+34
2024-06-08[ProfileData] Simplify calls to readNext in readBinaryIdsInternal (NFC) (#94862)Kazu Hirata1-6/+1
readNext has two variants: - readNext<uint64_t, endian>(ptr) - readNext<uint64_t>(ptr, endian) This patch uses the latter to simplify readBinaryIdsInternal. Both forms default to unaligned.
2024-06-08[VPlan] Mark FirstOrderRecurrenceSplice as not having side-effects.Florian Hahn9-37/+42
Now that FOR exit and resume value creation is explicitly modeled in VPlan (05e1b5340b0caf1, 07b330132c0b) it doesn't depend on the first order recurrence splice being preserved and it can now be marked as not having side-effects. This allows removal of first-order-recurrence-splce if the FOR is only used in the exit or as scalar ph resume value.
2024-06-09[RISCV][GISel] Add calling convention support for half (#94110)Yingwei Zheng3-2/+520
This patch adds initial support to the half type on RISC-V.
2024-06-08[VPlan] Check if only first part is used for all per-part VPInsts.Florian Hahn5-13/+8
Apply the onlyFirstPartUsed logic generally to all per-part VPInstructions. Note that the test changes remove the second part of an unsued first-order recurrence splice.
2024-06-08[libc][math][C23] Implemented remquof128 function (#94809)Hendrik Hübner10-1/+83
Added remquof128 function. Closes #94312
2024-06-08[libc][math][c23] fmul correcly rounded to all rounding modes (#91537)Job Henandez Lara14-1/+303
This is an implementation of floating point multiplication: It will consist of - `double x double -> float`
2024-06-08[lldb] Use const reference for range variables to improve performance (NFC) ↵Shivam Gupta4-4/+4
(#94840) 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
2024-06-08[ProfileData] Use default member initialization (NFC) (#94860)Kazu Hirata2-4/+4
Identified with modernize-use-default-member-init.
2024-06-08[RISCV][MC] Implicit 0-offset aliases for JR/JALR (#94688)Sam Elliott2-0/+13
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
2024-06-08[libc++][NFC] Simplify the implementation of `__promote` (#81379)Nikolas Klauser1-4/+38
This depends on enabling the use of extensions.
2024-06-08[memprof] Remove redundant virtual (NFC) (#94858)Kazu Hirata1-2/+2
'override' makes 'virtual' redundant. Identified with modernize-use-override.
2024-06-08[ProfileData] Use a range-based for loop (NFC) (#94856)Kazu Hirata1-4/+4
While I am at it, this patch adds const to a couple of places.
2024-06-08[memprof] Make Version3 officially available (#94837)Kazu Hirata1-1/+2
2024-06-08[X86] Support ATOMIC_LOAD_FP_BINOP_MI for other binops (#87524)AtariDreams2-1/+2326
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.
2024-06-08[Reassociate] Use uint64_t for repeat count (#94232)Yingwei Zheng2-122/+43
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.
2024-06-08[DAGCombine] Fix miscompilation caused by PR94008 (#94850)Yingwei Zheng2-1/+20
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.
2024-06-08[llvm] Remove useless headers in example BrainF (#93701)FantasqueX2-4/+0
2024-06-08[SimplifyCFG] Don't use a mask for lookup tables generated from switches ↵DaPorkchop_4-14/+607
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`).
2024-06-08Enable LLDB tests in Linux pre-merge CI (#94208)Vlad Serebrennikov3-4/+4
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.
2024-06-08lld/test: Make sure removing %t at firstNAKAMURA Takumi1-0/+1
2e1788f8e265 reverted #94843. It was creating `%t` as a directory and causes an error in incremental builds.
2024-06-08[compiler-rt] Replace deprecated aligned_storage with aligned byte array ↵Marc Auberer11-71/+50
(#94171) `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.
2024-06-08[SDISel][Combine] Constant fold FP16_TO_FP (#94790)Quentin Colombet4-8/+9
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.
2024-06-08[clang] Report erroneous floating point results in _Complex math (#90588)Timm Baeder2-33/+55
Use handleFloatFloatBinOp to properly diagnose NaN results and divisions by zero. Fixes #84871
2024-06-08[mlir][Transforms][NFC] `GreedyPatternRewriteDriver`: Use composition ↵Matthias Springer2-18/+23
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>
2024-06-08[SystemZ] Fix handling of triples.Jonas Paulsson1-2/+6
Some Ubuntu builds were broken after 20d497c "[Driver] Remove unneeded *-linux-gnu after D158183". This patch by Fangrui Song fixes this with a handling in config.guess.
2024-06-08[Support] Do not use `llvm::size` in `getLoopPreheader` (#94540)Ben Barham1-1/+1
`BlockT *LoopBase<BlockT, LoopT>::getLoopPreheader()` was changed in 7243607867393a2b8ccd477e95e6f62d00f3206f 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.
2024-06-07[RISCV] Remove unnecessary setting of parameter with same default value. NFCCraig Topper1-3/+3
2024-06-07[RISCV] Replace VPseudoBinaryFV_VV with VPseudoBinaryV_VV. NFCCraig Topper1-7/+2
2024-06-08Revert "[lld][AArch64][ELF][PAC] Support `.relr.auth.dyn` section" (#94843)Daniil Kovalev6-216/+47
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.
2024-06-08[lldb] Remove redundant c_str() calls in stream output (NFC) (#94839)Shivam Gupta1-5/+4
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
2024-06-07[RISCV] Remove unused defaults for sew paramters in tablegen. NFCCraig Topper2-33/+30
Also remove some unused Constraint paramters that appeared before the sew parameter.
2024-06-07[RISCV] Remove many ImmType parameters from tablegen classes. NFCCraig Topper2-35/+31
These usually have a single value that is always used. We can just hardcode into the class body.
2024-06-07[CMake] Update CMake cache file for the ARM/Aarch64 cross toolchain builds. ↵Vladimir Vereschaka1-14/+31
NFC. (#94835) * 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
2024-06-07[HLSL] Use llvm::Triple::EnvironmentType instead of ↵Helena Kotas4-75/+69
HLSLShaderAttr::ShaderType (#93847) `HLSLShaderAttr::ShaderType` enum is a subset of `llvm::Triple::EnvironmentType`. We can use `llvm::Triple::EnvironmentType` directly and avoid converting one enum to another.
2024-06-07[dfsan] Fix release_shadow_space.c (#94770)Thurston Dang1-4/+10
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
2024-06-08[mlir] Handle the newly-added "Reserved" FramePointerKind for ↵Jie Fu1-1/+4
1a5239251ead73ee57f4e2f7fc93433ac7cf18b1 (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.
2024-06-07[workflows] Add post-commit job that periodically runs the clang static ↵Tom Stellard2-0/+129
analyzer (#94106) 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