aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2024-03-12[InstallAPI] Break up headers and add common header for TextAPI types (#84960)Cyndy Ishida8-110/+159
Before it gets too unwieldy, add a common header for all MachO types that are used across InstallAPI. Also, break up the types in `InstallAPI/Frontend`. This both avoids circular dependencies and is logically easier to maintain as more functionality gets added.
2024-03-12[test][X86] Precommit test for large data threshold and i1 globalArthur Eubanks1-60/+121
2024-03-12[mlir][vector] Use inferRankReducedResultType for subview type inference. ↵Han-Chung Wang2-55/+28
(#84395) Fixes https://github.com/openxla/iree/issues/16475
2024-03-12[OpenMP] Remove unused logical/physical CPUID information (#83298)Jonathan Peyton2-69/+1
2024-03-12[OpenMP] Make sure mask is set to nullptr (#83299)Jonathan Peyton1-2/+2
2024-03-12[OpenMP] Add debug checks for divide by zero (#83300)Jonathan Peyton2-3/+22
2024-03-12Add comment to assert from a843f26David Blaikie1-1/+1
2024-03-12[InstCombine] Detect `(x ^ -x)` as a ~MaskNoah Goldstein2-6/+8
Proof: https://alive2.llvm.org/ce/z/TAFmPw This is a lemma for clearing up some of the regressions that #84688 causes. Closes #84868
2024-03-12[InstCombine] Add test for detecting `(x ^ -x)` as a ~Mask; NFCNoah Goldstein1-0/+19
2024-03-12[NFC] SLVectorizer comparator refactoring that preserves behavior (#84966)David Blaikie1-44/+43
Spinning off from #79321 / 35f4592 - looked like the comparator could be simplified & made more clear/less risk of leaving hidden bugs.
2024-03-12[libcxx] Fix incorrect type in the has-1024-bit-atomics feature test (#84904)amilendra1-1/+1
2024-03-12Remove XFAIL from tests passing on green dragonAdrian Prantl2-2/+0
2024-03-12[ELF] Add --compress-section to compress matched non-SHF_ALLOC sectionsFangrui Song11-19/+259
--compress-sections <section-glib>=[none|zlib|zstd] is similar to --compress-debug-sections but applies to broader sections without the SHF_ALLOC flag. lld will report an error if a SHF_ALLOC section is matched. An interesting use case is to compress `.strtab`/`.symtab`, which consume a significant portion of the file size (15.1% for a release build of Clang). An older revision is available at https://reviews.llvm.org/D154641 . This patch focuses on non-allocated sections for safety. Moving `maybeCompress` as D154641 does not handle STT_SECTION symbols for `-r --compress-debug-sections=zlib` (see `relocatable-section-symbol.s` from #66804). Since different output sections may use different compression algorithms, we need CompressedData::type to generalize config->compressDebugSections. GNU ld feature request: https://sourceware.org/bugzilla/show_bug.cgi?id=27452 Link: https://discourse.llvm.org/t/rfc-compress-arbitrary-sections-with-ld-lld-compress-sections/71674 Pull Request: https://github.com/llvm/llvm-project/pull/84855
2024-03-12[X86] getFauxShuffleMask - recognise CONCAT(SUB0, SUB1) style patternsSimon Pilgrim6-242/+233
Handles the INSERT_SUBVECTOR(INSERT_SUBVECTOR(UNDEF,SUB0,0),SUB1,N) pattern Currently limited to v8i64/v8f64 cases as only AVX512 has decent cross lane 2-input shuffles, the plan is to relax this as I deal with some regressions
2024-03-12[AMDGPU] Adding the amdgpu_num_work_groups function attribute (#79035)Jun Wang21-1/+628
A new function attribute named amdgpu_num_work_groups is added. This attribute, which consists of three integers, allows programmers to let the compiler know the number of workgroups to be launched in each of the three dimensions and do optimizations based on that information. --------- Co-authored-by: Jun Wang <jun.wang7@amd.com>
2024-03-12Fix MSVC build issues (#84362)Hiroshi Yamauchi3-8/+9
MSVC fails when there is ambiguity (multiple options) around implicit type conversion operators. Make ConstString's conversion operator to string_view explicit to avoid ambiguity with one to StringRef and remove an unused local variable that MSVC also fails on.
2024-03-12[analyzer][NFC] Turn NodeBuilderContext into a class (#84638)Diego A. Estrada Rivera4-8/+14
From issue #73088. I changed `NodeBuilderContext` into a class. Additionally, there were some other mentions of the former being a struct which I also changed into a class. This is my first time working with an issue so I will be open to hearing any advice or changes that need to be done.
2024-03-12[X86] combineVectorPack - use APInt::truncSSat for PACKSS constant folding. NFC.Simon Pilgrim1-6/+2
Unfortunately PACKUS can't use APInt::truncUSat
2024-03-12[libc++] Improves UB handling in ios_base destructor. (#76525)Mark de Wever3-2/+94
Destroying an ios_base object before it is properly initialized is undefined behavior. Unlike typical C++ classes the initialization is not done in the constructor, but in a dedicated init function. Due to virtual inheritance of the basic_ios object in ostream and friends this undefined behaviour can be triggered when inheriting from classes that can throw in their constructor and inheriting from ostream. Use the __loc_ member of ios_base as sentinel to detect whether the object has or has not been initialized. Addresses https://github.com/llvm/llvm-project/issues/57964
2024-03-12AMDGPU: Add some more mfma hazard recognizer tests (#84727)Matt Arsenault1-0/+454
2024-03-13[SelectionDAG] Replace some basic patterns in visitADDLike with ↵XChy1-30/+25
SDPatternMatch (#84759) Resolves #84745. Based on SDPatternMatch introduced by #78654, this patch replaces some of basic patterns in `visitADDLike` with corresponding patterns in SDPatternMatch. This patch only replaces original folds, instead of introducing new ones.
2024-03-12[clang][ASTMatchers] Fix forEachArgumentWithParam* for deducing "this" ↵Balazs Benics4-41/+119
operator calls (#84887) This is a follow-up commit of #84446. In this patch, I demonstrate that `forEachArgumentWithParam` and `forEachArgumentWithParamType` did not correctly handle the presence of the explicit object parameter for operator calls. Prior to this patch, the matcher would skip the first (and only) argument of the operator call if the explicit object param was used. Note that I had to move the definition of `isExplicitObjectMemberFunction`, to be declared before the matcher I fix to be visible. I also had to do some gymnastics for passing the language standard version command-line flags to the invocation as `matchAndVerifyResultTrue` wasn't really considered for non-c++11 code. See the that it always prepends `-std=gnu++11` to the command-line arguments. I workarounded it by accepting extra args, which get appended, thus possibly overriding the hardcoded arguments. I'm not sure if this qualifies for backporting to clang-18 (probably not because its not a crash, but a semantic problem), but I figure it might be useful for some vendors (like us). But we are also happy to cherry-pick this fix to downstream. Let me know if you want this to be backported or not. CPP-5074
2024-03-12[libc++][CI] Installs tzdata package in Docker. (#84643)Mark de Wever1-0/+6
This allows testing the time zone information in the CI. This is needed to let https://github.com/llvm/llvm-project/pull/82108 pass the CI.
2024-03-12[libc++][TZDB] Fixes parsing interleaved rules. (#84808)Mark de Wever2-4/+47
Typically the rules in the database are contiguous, but that is not a requirement. This fixes the case when they are not. --------- Co-authored-by: Louis Dionne <ldionne.2@gmail.com>
2024-03-12[AIX][tests] Disable failing tests on AIXJake Egan2-0/+4
These new tests are failing on the AIX bot because the -I option isn't supported. Disable these tests for now until they can be fixed.
2024-03-12[lldb] [debugserver] Handle interrupted reads correctly (#84872)Jason Molenda1-3/+13
The first half of this patch is a long-standing annoyance, if I attach to debugserver with lldb while it is waiting for an lldb connection, the syscall is interrupted and it doesn't retry, debugserver exits immediately. The second half is a request from another tool that is communicating with debugserver, that we retry reads on our sockets in the same way. I haven't dug in to the details of how they're communicating that this is necessary, but the best I've been able to find reading the POSIX API docs, this is fine. rdar://117113298
2024-03-12[libc] move non <bit> functions to math_extras (#84818)Nick Desaulniers31-139/+154
As per TODOs added in https://github.com/llvm/llvm-project/pull/84035/commits/48b0bc837085a38ff1de33010d9222363f70238f.
2024-03-12[libc] Add utility functions for warp-level scan and reduction (#84866)Joseph Huber7-0/+111
Summary: The GPU uses a SIMT execution model. That means that each value actually belongs to a group of 32 or 64 other lanes executing next to it. These platforms offer some intrinsic fuctions to actually take elements from neighboring lanes. With these we can do parallel scans or reductions. These functions do not have an immediate user, but will be used in the allocator interface that is in-progress and are generally good to have. This patch is a precommit for these new utilitly functions.
2024-03-12[libc] Fix lane-id utility function not using built-in (#84902)Joseph Huber1-1/+1
Summary: Previously we got the lane-id from taking the global thread ID and taking off the bottom 5 bits. This works but is inefficient compared to the NVPTX intrinsic simply dedicated to get this value.
2024-03-12[libc] fix typo in stdbit.h macro spec files (#84780)Nick Desaulniers1-3/+3
2024-03-12[Libomptarget] Use NVPTX lane id intrinsic in DeviceRTL (#84928)Joseph Huber1-4/+1
Summary: We are currently taking the lower 5 bites of the thread ID as the warp ID. This doesn't work in non-1D grids and is also slower than just using the dedicated hardware register.
2024-03-12[libc] implement the final macros for stdbit.h support (#84798)Nick Desaulniers5-5/+31
Relevant sections of n3096: - 7.18.1p1 - 7.18.2
2024-03-12[libc] fix another build failure from using limits.h (#84827)Nick Desaulniers2-2/+2
My GCC build is failing with issues similar why we added our own. Looks like we missed one spot. See also: commit 72ce62941579 ("[libc] Add C23 limits.h header. (#78887)")
2024-03-12[RISC-V] Bad immediate value for Zcmp instructions with E extension (#84925)Nemanja Ivanovic1-0/+49
When we are using the Zcmp extension together with the E extension in 32-bit mode and we need to spill both callee-saved registers as well as needing a couple of 32-bit stack slots, we emit a meaningless stack adjustment with cm.push/cm.popret. Furthermore this leads to the stack slot for the ra being clobbered so control returns to a random location. This is just a pre-commit test so that the PR for the fix shows the difference in code generation.
2024-03-12[LSR] Clear SCEVExpander before deleting phi nodesNikita Popov2-0/+36
Fixes https://github.com/llvm/llvm-project/issues/84709.
2024-03-12Pre commit test cases SRL/SRA support in canCreateUndefOrPoison. NFCBjorn Pettersson1-0/+48
Add test cases to show that we can't push freeze through SRA/SRL with 'exact' flag when there are multiple uses.
2024-03-12[LoopSimplifyCFG] Drop no longer needed DependenceAnalysis.h includeBjorn Pettersson1-1/+0
2024-03-12[clang][deps] Fix dependency scanning with -working-directory (#84525)Ben Langmuir2-7/+37
Stop overriding -working-directory to CWD during argument parsing, which should no longer necessary after we set the VFS working directory, and set FSOpts correctly after parsing arguments so that working-directory behaves correctly.
2024-03-12Revert "[analyzer] Accept C library functions from the `std` namespace" (#84926)NagyDonat5-98/+9
Reverts llvm/llvm-project#84469 because it causes buildbot failures. I'll examine them and re-submit the change.
2024-03-12[SystemZ][z/OS] Add missing include header to AutoConvert.cpp to fix build ↵Fanbo Meng1-0/+1
(#84909) ba13fa2a5d57581bff1a7e9322234af30f4882f6 added usages of `errnoAsErrorCode()` to AutoConvert.cpp, need to include Error.h header to fix build failure.
2024-03-12[RemoveDIs][NFC] Rename common interface functions for DPValues->DbgRecords ↵Stephen Tozer50-301/+298
(#84793) As part of the effort to rename the DbgRecord classes, this patch renames the widely-used functions that operate on DbgRecords but refer to DbgValues or DPValues in their names to refer to DbgRecords instead; all such functions are defined in one of `BasicBlock.h`, `Instruction.h`, and `DebugProgramInstruction.h`. This patch explicitly does not change the names of any comments or variables, except for where they use the exact name of one of the renamed functions. The reason for this is reviewability; this patch can be trivially examined to determine that the only changes are direct string substitutions and any results from clang-format responding to the changed line lengths. Future patches will cover renaming variables and comments, and then renaming the classes themselves.
2024-03-12[gn] port bde7a6b791872bNico Weber1-0/+1
2024-03-12[DominanceFrontierBase] Fix doc of compare()'s return value. (#81352)bvlgah1-2/+2
This is a trivial fix ( I guess it has not been noticed because of no use). Currently, the doc says the function returns `true` if two instances of `DominanceFrontierBase` matches, otherwise `false` is returned. I have checked the implementation https://github.com/llvm/llvm-project/blob/9308d6688c673606fee1625d777a52539ae72015/llvm/include/llvm/Analysis/DominanceFrontierImpl.h#L71-L94 which examines whether two dominance frontier mappings are equal, and the actual value it returns contradicts the description in the doc.
2024-03-12[LAA] Fix typo IndidrectUnsafe -> IndirectUnsafe.Florian Hahn3-4/+4
Fix type in textual analysis output.
2024-03-12[Flang][OpenMp] Fix to threadprivate not working with host-association. (#74966)harishch44-7/+111
This patch considers host-associated variables to generate threadprivate Ops. Fixes: #60763 #84561
2024-03-12[Clang][Sema] Fix type of enumerators in incomplete enumerations (#84068)Kupa-Martin3-6/+30
Enumerators dont have the type of their enumeration before the closing brace. In these cases Expr::getEnumCoercedType() incorrectly returned the enumeration type. Introduced in PR #81418 Fixes #84712
2024-03-12Revert "[NVPTX] Add support for atomic add for f16 type" (#84918)Danial Klimkin4-146/+0
Reverts llvm/llvm-project#84295 due to breakages.
2024-03-12Don't do casting of atomic FP loads/stores in FE. (#83446)Jonas Paulsson6-58/+236
The casting of FP atomic loads and stores were always done by the front-end, even though the AtomicExpandPass will do it if the target requests it (which is the default). This patch removes this casting in the front-end entirely.
2024-03-12Fix build after #84460: link LLVMTestingSupport explicitly in clang unittestStefan Gränitz1-1/+1
This is supposed to fix the DYLIB-enabled build, i.e. https://lab.llvm.org/buildbot/#/builders/196
2024-03-12[Matrix] Add tests showing mis-compile with lifetime.end and fusion.Florian Hahn1-0/+707
Add a set of tests showing miscompiles due to multiply fusion introducing loads to dead objects after lifetime.end.