summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* [𝘀𝗽𝗿] changes introduced through rebaseupstream/users/vitalybuka/spr/main.tsan-fallback-to-top-frameVitaly Buka2024-01-0528-309/+1635
|\ | | | | | | | | | | Created using spr 1.3.4 [skip ci]
| * [tsan] Generalize FrameIsInternal (#77143)Vitaly Buka2024-01-051-6/+2
| | | | | | Prepare to move this into sanitizer_common.
| * Move verify-no-file.yaml to AArch64 folder (#77149)Shubham Sandeep Rastogi2024-01-051-1/+1
| | | | | | | | This test fails on power pc and solaris, moving it to AArch64 folder because the yaml is generated for an AArch64 MachO object file.
| * [cmake,Apple] Check ld-classic when looking for ld64. (#77136)Florian Hahn2024-01-051-2/+15
| | | | | | | | | | | | | | In newer SDKs, ld64 is called ld-classic. Look for it first, as ld in those SDKs is still missing some functionality some tests depend on. This enables running the tests from check-llvm-tools-lto with newer SDKs on ARM64 macOS.
| * [clang][Driver] Don't warn when -nostdinc and -nostdinc++ are both specified ↵Jonathon Penix2024-01-052-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | (#77130) When -nostdinc and -nostdinc++ are both specified and the Baremetal toolchain is used, an unused command line argument warning for -nostdinc++ is produced. This doesn't seem particularly meaningful as -nostdinc++ would have been claimed/used had the check in AddClangCXXStdlibIncludeArgs not short-circuited. So, just claim all arguments in this check. I believe this is consistent with what was done for the GNU toolchain (see 6fe7de90b9e4e466a5c2baadafd5f72d3203651d), so hopefully this is appropriate here as well.
| * [clang] Fix test for case-insensitive absolute includes (#76985)Jan Svoboda2024-01-051-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When CMake on Windows is told to generate the build into a directory whose real path has a different drive letter (e.g. due to a symlink), the "clang/test/Lexer/case-insensitive-include-absolute.c" test fails. That happens because because `trySimplifyPath()` in `PPDirectives.cpp` finds out there's more than a case difference between the `#include` path (containing `%/t`) and the real path, which prevents the diagnostic to fire. I thought this is only an issue on Windows due to the fact that LIT does not drag the path to the build directory through `os.path.realpath()` like it does on other systems (see `abs_path_preserve_drive()` in "llvm/utils/lit/lit/util.py"). However, even after only using `os.path.abspath()` on a Unix system, build generated into a symlinked directory tests correctly. I assume there must be something else at play, but I don't have the time to dig deeper. The fix is is fairly straightforward: use the real path in the `#include` (with `%{/t:real}`), which removes the non-case difference and unblocks the diagnostic.
| * [llvm-exegesis] Add matcher for register initial values (#76666)Aiden Grossman2024-01-051-0/+13
| | | | | | | | | | | | | | Currently, the unit tests for the BenchmarkResult struct do not check if the register initial values can be parsed back in. This patch adds a matcher and tests that the register initial values can be parsed correctly. This exercises code already contained within the benchmark to yaml infrastructure.
| * [llvm-exegesis] Remove unused Counter::read method (#76651)Aiden Grossman2024-01-053-17/+5
| | | | | | | | | | | | This method was simply a wrapper around readOrError. All users within the llvm-exegesis code base should have been processing an actual error rather than using the wrapper. This patch removes the wrapper and rewrites the users (just 1) to use the readOrError method.
| * [libc][cmake] append per obj compile options instead of prepending (#77126)Nick Desaulniers2024-01-051-11/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This allows individual object files to override the common compile commands in their local CMakeLists' add_object_library call. For example, the common compile commands contain -Wall and -Wextra. Before this patch, the per object COMPILE_OPTIONS were prepended to these, so that builds of individual object files could not individually disable specific diagnostics from those groups explicitly. After this patch, the per-object file compile objects are appended to the list of compiler flags, enabling this use case. ARGN is a bit of cmake magic; let's be explicit in the APPEND that we're appending the compile options. Link: #77007
| * [AArch64] Add some extra tests for SelectOpt. NFCDavid Green2024-01-051-0/+593
| |
| * [libunwind] Replace process_vm_readv with SYS_rt_sigprocmask (#74791)Jordan R AW2024-01-051-27/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | process_vm_readv is generally considered dangerous from a syscall perspective, and is frequently blanket banned in seccomp filters such as those in Chromium and ChromiumOS. We can get the same behaviour during the invalid PC address case with the raw SYS_rt_sigprocmask syscall. Testing to ensure that process_vm_readv does not appear, I ran the output of check-unwind on an ARM64 device under strace. Previously, bad_unwind_info in particular would use process_vm_readv, but with this commit, it now no longer uses it: ``` strace test/Output/bad_unwind_info.pass.cpp.dir/t.tmp.exe \ |& grep process_vm_readv ``` The libunwind unittests were also tested on ARM64 ChromeOS (Gentoo Linux) devices.
| * [InstCombine] Fold `switch(zext/sext(X))` into `switch(X)` (#76988)Yingwei Zheng2024-01-064-17/+202
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch folds `switch(zext/sext(X))` into `switch(X)`. The original motivation of this patch is to optimize a pattern found in cvc5. For example: ``` %bf.load.i = load i16, ptr %d_kind.i, align 8 %bf.clear.i = and i16 %bf.load.i, 1023 %bf.cast.i = zext nneg i16 %bf.clear.i to i32 switch i32 %bf.cast.i, label %if.else [ i32 335, label %if.then i32 303, label %if.then ] if.then: ; preds = %entry, %entry %d_children.i.i = getelementptr inbounds %"class.cvc5::internal::expr::NodeValue", ptr %0, i64 0, i32 3 %cmp.i.i.i.i.i = icmp eq i16 %bf.clear.i, 1023 %cond.i.i.i.i.i = select i1 %cmp.i.i.i.i.i, i32 -1, i32 %bf.cast.i ``` `%cmp.i.i.i.i.i` always evaluates to false because `%bf.clear.i` can only be 335 or 303. Folding `switch i32 %bf.cast.i` to `switch i16 %bf.clear.i` will help `CVP` to handle this case. See also https://github.com/llvm/llvm-project/pull/76928#issuecomment-1877055722. Compile-time impact: http://llvm-compile-time-tracker.com/compare.php?from=7954c57124b495fbdc73674d71f2e366e4afe522&to=502b13ed34e561d995ae1f724cf06d20008bd86f&stat=instructions:u |stage1-O3|stage1-ReleaseThinLTO|stage1-ReleaseLTO-g|stage1-O0-g|stage2-O3|stage2-O0-g|stage2-clang| |--|--|--|--|--|--|--| |+0.03%|+0.06%|+0.07%|+0.00%|-0.02%|-0.03%|+0.02%|
| * [OpenMP] Change `__tgt_device_image` to point to the image (#77003)Joseph Huber2024-01-052-5/+23
| | | | | | | | | | | | | | | | | | | | | | | | Summary: We use the OffloadBinary to contain bundled offloading objects used to support many images / targets at the same time. The `__tgt_device_info` struct used to contain a pointer to this underlying binary format, which contains information about the triple and architecture. We used to parse this in the runtime to do image verification. Recent changes removed the need for this to be used internally, as we just parse it out of the ELF directly. This patch sets the pointers up so they point to the ELF without requiring any further parsing.
| * [NFC] Address review feedback from PR #77004 (#77134)Shubham Sandeep Rastogi2024-01-052-5/+4
| | | | | | Accidentally didn't commit the review feedback before merging the PR
| * [gn] port a0e6b7c04292Nico Weber2024-01-051-0/+1
| |
| * Fix file index verifier when there is no file name in the prologue. (#77004)Shubham Sandeep Rastogi2024-01-052-2/+363
| | | | | | | | | | | | | | | | | | If there is no file name in the prologue of a line table, the verifier will try to verify the file index, which will be set to 1 by default. This will cause the DWARF verifier to throw an error even if there is no error. rdar://114476503 rdar://114343624
| * [bazel][libc][math] Add missing nan(f|l) depsJordan Rupprecht2024-01-051-3/+22
| | | | | | | | After 0504e932880e0c4c333baeba9b8d674c5b9ae316
| * [llvm][NFC] Refactor AutoUpgrader arm/aarch64 (#74145)Nathan Sidwell2024-01-052-219/+284
| | | | | | Break out and refactor AArch64 & ARM intrinsic updating. There's a fair amount of comonality, but let's avoid continually checking the same prefixes.
| * "Reapply "[Sema] Fix crash on invalid code with parenthesized aggrega… ↵Mark de Wever2024-01-055-1/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (#76833) …te initialization" (#76272)"" With updates the libc++ tests. This reverts commit 2205d23 and relands 86dc6e1 and 7ab16fb. Original commit was reverted because of failing libc++ tests, see #76232 for the discussion. The errors in the tests are spurious in the first place (coming from initialization of invalid classes), so update the tests to match new behavior that does not show those errors. The original patch was written by @ilya-biryukov To fix the CI two libc++ tests are temporary disabled for clang-18.
* | [𝘀𝗽𝗿] changes to main this commit is based onVitaly Buka2024-01-051-7/+3
|/ | | | | | Created using spr 1.3.4 [skip ci]
* [CVP] Improve the value solving of select at use (#76700)Yingwei Zheng2024-01-062-25/+49
| | | | | | | | | | | | This patch improves the value solving of select at use if the condition is an icmp and we know the result of comparison from `LVI->getPredicateAt`. Compile-time impact: http://llvm-compile-time-tracker.com/compare.php?from=7e405eb722e40c79b7726201d0f76b5dab34ba0f&to=3c315b1ddcb0ad82554b33f08b9356679fae4bb7&stat=instructions:u |stage1-O3|stage1-ReleaseThinLTO|stage1-ReleaseLTO-g|stage1-O0-g|stage2-O3|stage2-O0-g|stage2-clang| |--|--|--|--|--|--|--| |-0.01%|+0.01%|-0.00%|-0.00%|-0.08%|+0.02%|-0.01%|
* [ELF][Obvious] Last time fixing this test hopefullyJoseph Huber2024-01-051-1/+1
|
* [SystemZ] vec-perm-14.ll - partially regenerate checks so we can see all the ↵Simon Pilgrim2024-01-051-2/+17
| | | | | | vperm codegen We can't use the script as we need to keep the shuffle mask constant pool checks, but do more than just check that a second vperm isn't generated
* [ELF] Again attempt to fix test on BE architecturesJoseph Huber2024-01-052-3/+8
| | | | | | | Summary: This formats something according to the style, and again attempts to fix this failing on the BE PPC test. Sorry for the spam, these commits are the only way I can check it because the failure isn't local.
* [OpenACC] Implement 'default' clause parsing. (#77002)Erich Keane2024-01-054-5/+189
| | | | | A simple clause that is permitted on a few different constructs, 'default' takes a required parameter of either 'none' or 'present'. This patch implements parsing for it.
* [InstCombine] Canonicalize `switch(X << C)` into `switch(X)` (#77068)Yingwei Zheng2024-01-062-0/+212
| | | | | | | | | | | | | | | | This patch canonicalizes `switch(X << C)` to `switch(X)`. If the shift may wrap, an and instruction will be created to mask out all of the shifted bits. Alive2: https://alive2.llvm.org/ce/z/wSsL5y NOTE: We can relax the one-use constraint. But I don't see any benefit in my benchmark. Compile-time impact: http://llvm-compile-time-tracker.com/compare.php?from=a776740d6296520b8bde156aa3f8d9ecb32cddd9&to=6dd783b9f90ae5f258102d732953567d7e317c02&stat=instructions%3Au |stage1-O3|stage1-ReleaseThinLTO|stage1-ReleaseLTO-g|stage1-O0-g|stage2-O3|stage2-O0-g|stage2-clang| |--|--|--|--|--|--|--| |-0.00%|+0.01%|-0.02%|-0.01%|+0.02%|-0.00%|+0.01%|
* [lldb] Fix expressions that involve nested structs/classes/unions. (#77029)Greg Clayton2024-01-055-1/+117
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The LLDB expression parser relies on using the external AST source support in LLDB. This allows us to find a class at the root namespace level, but it wouldn't allow us to find nested classes all of the time. When LLDB finds a class via this mechanism, it would be able to complete this class when needed, but during completion, we wouldn't populate nested types within this class which would prevent us from finding contained types when needed as clang would expect them to be present if a class was completed. When we parse a type for a class, struct or union, we make a forward declaration to the class which can be completed. Now when the class is completed, we also add any contained types to the class' declaration context which now allows these types to be found. If we have a struct that contains a struct, we will add the forward declaration of the contained structure which can be c ompleted later. Having this forward declaration makes it possible for LLDB to find everything it needs now. This should fix an existing issue: https://github.com/llvm/llvm-project/issues/53904 Previously, contained types could be parsed by accident and allow expression to complete successfully. Other times we would have to run an expression multiple times because our old type lookup from our expressions would cau se a type to be parsed, but not used in the current expression, but this would have parsed a type into the containing decl context and the expression might succeed if it is run again.
* [ELF] Attempt to fix test on big endian architecturesJoseph Huber2024-01-051-4/+3
| | | | | | | Summary: This test fails because AMDGPU has a check for little-endianness before returning the architecture. This test attempts to force the type to be considered little-endian for the purpose of this test.
* [RISCV] Don't call use_nodbg_operands for physical registers in ↵Craig Topper2024-01-052-1/+25
| | | | | | | | RISCVOptWInstrs hasAllNBitUsers. (#77032) The ADDIW in the new test case was incorrectly removed due to incorrectly following the x10 register from the return value back to the argument. This is due to use_nodbg_operands returning every instruction that uses a physical register regardless of the data flow.
* [mlgo] Fix post PR #76919Mircea Trofin2024-01-051-1/+1
| | | | | Relaxed a bit the opcode checks to make the test less sensitive to changes resulting in opcode numbering.
* [ELF][Obvious] Remove unused CUDA OS/ABI structJoseph Huber2024-01-051-4/+0
| | | | | | | | Summary: This did not need a separate struct because it is not past the "architecture specific" ones in the identifier. This was accidentally left when it was added somewhere else and caused unused variable warnings.
* [ELF] Attempt to set the OS when using 'makeTriple()' (#76992)Joseph Huber2024-01-056-9/+80
| | | | | | | | | | | Summary: This patch fixes up the `makeTriple()` interface to emit append the operating system information when it is readily avaialble from the ELF. The main motivation for this is so the GPU architectures can be easily identified correctly when given and ELF. E.g. we want `amdgpu-amd-amdhsa` as the output and not `amdgpu--`. This required adding support for the CUDA OS/ABI, which is easily found to be `0x33` when using `readelf`.
* [libc] fix -Warray-bounds in block_offset (#77001)Nick Desaulniers2024-01-051-7/+1
| | | | | | | GCC reports an instance of -Warray-bounds in block_offset. Reimplement block_offset in terms of memcpy_inline which was created to avoid this diagnostic. See the linked issue for the full trace of diagnostic. Fixes: https://github.com/llvm/llvm-project/issues/76877
* [libc][math] fix nan* death tests failing in asan builds (#77110)Nishant Mittal2024-01-053-0/+6
|
* [Clang] Regenerate test checks (NFC)Nikita Popov2024-01-058-576/+576
|
* [clang]Transform uninstantiated ExceptionSpec in `TemplateInstantiator` (#77073)Congcong Cai2024-01-056-5/+26
| | | | | Fixes: #77071 `SubstituteDeducedTypeTransform` will transform type and it will visit uninstantiated `ExceptionSpecInfo`, which will cause odd behavior.
* [Clang][OpenMP] Fix stdio.h wrapper when glibc includes again (#77017)Joel E. Denny2024-01-051-3/+31
| | | | | | | | | | | | | | | | Since D154036 landed (2a65d0388ca0 on July 7, 2023), I've been seeing many (40-50) libomptarget test failures with errors like the following on some of our test systems: ``` /auto/software/gcc/x86_64/gcc-11.1.0/lib/gcc/x86_64-pc-linux-gnu/11.1.0/../../../../include/c++/11.1.0/cstdio:99:11: error: no member named 'fpos_t' in the global namespace 99 | using ::fpos_t; | ~~^ ``` This patch fixes that and doesn't break our other test sytems. I've looked through the glibc history and at LLVM's libc stdio.h to give me confidence that this solution should work on other systems. Of course, there might be use cases I've overlooked, so feedback is appreciated.
* [mlir][mesh] In sharding attr use FlatSymbolRefAttr instead of SymbolRefAttr ↵Boian Petkantchin2024-01-056-10/+18
| | | | | | (#76886) Analogous to func.call use FlatSymbolRefAttr to reference the corresponding mesh.
* [RemoveDIs] Handle DPValues in FastISel (#76952)Orlando Cazalet-Hyams2024-01-0574-151/+398
| | | | | | | | | | | | | The change is fairly mechanical: 1. Factor code from `FastISel::selectIntrinsicCall`, which converts debug intrinsics into debug instructions, into functions (NFC). 2. Call those functions for DPValues attached to instructions too. The test updates look the same as other RemoveDIs changes: re-run the tests with `--try-experimental-debuginfo-iterators`, which checks the output is identical using the new debug info format (if it has been enabled in the cmake configuration). Depends on #76941 (otherwise some modified tests spuriously fail).
* [libc][math] fix failing nanl_test build (#77102)Nishant Mittal2024-01-051-1/+1
|
* [OpenACC] Fix comments on OpenACC enum to use ///erichkeane2024-01-051-11/+11
|
* [mlir] Fix support for loop normalization with integer indices (#76566)Arseniy Obolenskiy2024-01-052-2/+35
| | | | Choose correct type for updated loop boundaries after scf loop normalization, do not force chosen type to IndexType
* [TableGen] Add a backend to generate MacroFusion predicators (#72222)Wang Pengcheng2024-01-057-0/+462
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `FusionPredicate` is used to predicate if target instruction matches the requirement. The targets can be firstMI, secondMI or both. The `Fusion` contains a list of `FusionPredicate`. The generated code will be like: ``` bool isNAME(const TargetInstrInfo &TII, const TargetSubtargetInfo &STI, const MachineInstr *FirstMI, const MachineInstr &SecondMI) { auto &MRI = SecondMI.getMF()->getRegInfo(); /* Predicates */ return true; } ``` A boilerplate class called `SimpleFusion` is added. `SimpleFusion` has a predefined structure of predicates and accepts predicate for `firstMI`, predicate for `secondMI` and epilog/prolog as arguments. The generated code for `SimpleFusion` will be like: ``` bool isNAME(const TargetInstrInfo &TII, const TargetSubtargetInfo &STI, const MachineInstr *FirstMI, const MachineInstr &SecondMI) { auto &MRI = SecondMI.getMF()->getRegInfo(); /* Prolog */ /* Predicate for `SecondMI` */ /* Wildcard */ /* Predicate for `FirstMI` */ /* Check One Use */ /* Tie registers */ /* Epilog */ return true; } ```
* [ConstraintElim] Add tests for signed induction variables (NFC)Nikita Popov2024-01-051-0/+297
|
* [DebugInfo] Correctly track metadata slots for DPValues (#76941)Stephen Tozer2024-01-051-1/+12
| | | | | | | Currently, the AsmWriter can print DPValues, but does not consider them when creating slots for metadata, which can result in erroneous output where metadata is numbered incorrectly. This patch modifies the ModuleSlotTracker to correctly track slots for metadata that appears in DPValues.
* [AsmPrinter][Dwarf5][nfc] Remove template from AccelTable class (#76296)Felipe de Azevedo Piovezan2024-01-051-37/+25
| | | This template is no longer used.
* [X86] Add ABI handling for __float128 to match with GCC (#75156)Phoebe Wang2024-01-053-0/+40
| | | Fixes #74601
* [mlir][nvvm] Add clock and clock64 special registers (#77088)Guray Ozen2024-01-052-0/+9
| | | Tihs PR adds `clock` and `clock64` special registers to NVVM dialect.
* [X86] keylocker-intrinsics.ll - replace X32 checks with X86. NFC.Simon Pilgrim2024-01-051-240/+240
| | | | We try to use X32 for gnux32 triples only.
* [X86] combine-fneg.ll - replace X32 checks with X86. NFC.Simon Pilgrim2024-01-051-68/+68
| | | | We try to use X32 for gnux32 triples only.