- Sep 26, 2023
-
-
Louis Dionne authored
Now that we have a LLVM-wide GitHub action, it doesn't make sense to have a custom job for libc++ in our BuildKite CI pipeline. This only creates confusion as to which CI job should be acted upon.
-
Nathan Sidwell authored
The memset intrinsics have no source pointer, so don't construct that operand.
-
Craig Topper authored
Extracted from #67159.
-
Craig Topper authored
…ng binary constantexprs. FP binary operators aren't supported anymore, so we don't need a switch to pick whether we expect an integer or FP type.
-
Alex Langford authored
I want to work towards unifying the implementations. It would be a lot easier to do if LLDB's DWARFDebugAbbrev looked more similar to LLVM's implementation, so this change moves in that direction.
-
Shafik Yaghmour authored
[Clang] Fix CXXRewrittenBinaryOperator::getDecomposedForm to handle case when spaceship operator returns comparison category by reference (#66270) Currently CXXRewrittenBinaryOperator::getDecomposedForm(...) may crash if the spaceship operator returns a comparison category by reference. This because IgnoreImplicitAsWritten() does not look through CXXConstructExpr. The fix is to use IgnoreUnlessSpelledInSource() which will look though CXXConstructExpr. This fixes: https://github.com/llvm/llvm-project/issues/64162
-
Jacques Pienaar authored
-
Ivan Kosarev authored
Reviewed By: Joe_Nash Differential Revision: https://reviews.llvm.org/D156782
-
Slava Zakharin authored
The changes are needed to get leslie3d same performance with HLFIR as with FIR lowering. The two module allocatable variables cannot alias, so the optimized bufferization should be able to elide the temporary and inline the assignment loop.
-
Philip Reames authored
-
Vitaly Buka authored
-
Augusto Noronha authored
Summary: Thread sanitizer reports the following data race: ``` Write of size 8 at 0x000103303e70 by thread T1 (mutexes: write M0): #0 RNBRemote::CommDataReceived(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&) RNBRemote.cpp:1075 (debugserver:arm64+0x100038db8) (BuildId: f130b34f693c4f3eba96139104af2b7132000000200000000100000000000e00) #1 RNBRemote::ThreadFunctionReadRemoteData(void*) RNBRemote.cpp:1180 (debugserver:arm64+0x1000391dc) (BuildId: f130b34f693c4f3eba96139104af2b7132000000200000000100000000000e00) Previous read of size 8 at 0x000103303e70 by main thread: #0 RNBRemote::GetPacketPayload(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>&) RNBRemote.cpp:797 (debugserver:arm64+0x100037c5c) (BuildId: f130b34f693c4f3eba96139104af2b7132000000200000000100000000000e00) #1 RNBRemote::GetPacket(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>&, RNBRemote::Packet&, bool) RNBRemote.cpp:907 (debugserver:arm64+0x1000378cc) (BuildId: f130b34f693c4f3eba96139104af2b7132000000200000000100000000000e00) ``` RNBRemote already has a mutex, extend its usage to protect the read of m_rx_packets. Reviewers: jdevlieghere, bulbazord, jingham Subscribers: -
Kazu Hirata authored
This reverts commit fff16807. We no longer need this workaround after 053478bb.
-
Ivan Kosarev authored
[TableGen][NFCI] Speed up generating *GenRegisterInfo.inc files on builds with expensive checks. (#67340) This is mostly AMDGPU-specific. When the expensive checks are enabled, generating of AMDGPUGenRegisterInfo.inc currently takes about 20 minutes on my machine for release+asserts builds, which effectively prevents such testing from regular use. This patch fixes this by reducing the time to about 2 minutes. Generation times for AMDGPUGenRegisterInfo.inc without expensive checks and other *GenRegisterInfo.inc files with and without the expensive checks remain approximately the same. The patch doesn't cause any changes in the contents of the generated files. The root cause of the current poor performance is that where glibcxx is used, enabling the expensive checks defines _GLIBCXX_DEBUG, which enables various consistency checks in the library. One such check is in std::binary_search() to make sure the range is ordered. As CodeGenRegisterClass::contains() relies on std::binary_search() and it is called very a large number of times from within CodeGenRegBank::inferMatchingSuperRegClass(), the libcxx checks heavily affect the runtimes.
-
Kazu Hirata authored
Ivan is planning to introduce actual uses of these functions in near future.
-
Philip Reames authored
-
Matthias Braun authored
Re-normalize branch-weights after removing a block successor to avoid branch-weights not adding up to 100%. This changes MIR for the `test/CodeGen/PowerPC/branch_coalesce.ll` test like this: ```diff - successors: %bb.6(0x40000000); %bb.6(50.00%) + successors: %bb.6(0x80000000); %bb.6(100.00%) ``` This doesn't affect codegen on its own but fixing this helps with fluctuations I have with some of my upcoming changes.
-
Louis Dionne authored
-
Ivan Kosarev authored
The DPP source and e64 destination operands remain unchanged for now. Reviewed By: Joe_Nash Differential Revision: https://reviews.llvm.org/D156104
-
Fangrui Song authored
-
Tulio Magno Quites Machado Filho authored
lit tests require commands FileCheck and not. They must be available in the PATH. This also guarantees that python3-psutil is installed in order to enable more tests. Fixes #64892.
-
Fangrui Song authored
`-include a.h` probes `a.h.pch` and `a.h.gch`, if not found, falls back to `a.h`. `.pch` is the preferred extension name. Probing .gch is supposed to provide compatibility with build systems that do ``` clang -x c-header a.h -o out/a.h.gch clang -include out/a.h -c a.c # out/a.h.gch is present while out/a.h is absent ``` (not sure what projects actually do this with Clang) But it can often get in the way [^0][^1][^2] when GCC and Clang are mixed as the file format is incompatible with GCC's. Let's deprecate .gch probing. Some tests using `-include` are switched to `.pch`. `test/PCH/pch-dir.c` shows the -Wdeprecated warning. [^0]: https://discourse.llvm.org/t/how-to-have-clang-ignore-gch-directories/51835 [^1]: https://bugreports.qt.io/browse/QTCREATORBUG-22427 [^2]: https://gitlab.kitware.com/cmake/cmake/-/issues/22081
-
Benjamin Maxwell authored
The format is `add_mlir_doc(<table gen file> <output md name> <output dir> <command>)` Using the Vector.td file does not work as it does not include VectorOps.td (so the docs are empty). If the output name is not VectorOps.md, the mlir-www site does not find the ops (and instead overwrites it with an empty template).
-
jeanPerier authored
The runtime skips finalization if the runtime type info "nofinalizationneeded" is set, so it should not be set if the derived type has polymorphic allocatable components since they may be allocated to some type extension with a final methods. IsFinalizable cannot be updated since polymorphic allocatable components do not imply a final routine will actually be called (it depends of the dynamic type, which semantics cannot know about), and this would not match the "Finalizable" definition of the standard in 7.5.6.1. Hence, this patch adds a MayRequireFinalization helper. The component visitor change is to avoid crashing in FindPolymorphicAllocatableUltimateComponent in the test test/Driver/dump-all-bad.f90 that tries generating runtime type info even after some semantic error is raised under debug-dump options.
-
Fangrui Song authored
Change the FF form --call-graph-profile-sort to --call-graph-profile-sort={none,hfsort}. This will be extended to support llvm/lib/Transforms/Utils/CodeLayout.cpp. --call-graph-profile-sort is not used in the wild but --no-call-graph-profile-sort is (Chromium). Make --no-call-graph-profile-sort an alias for --call-graph-profile-sort=none. Reviewed By: rahmanl Differential Revision: https://reviews.llvm.org/D159544 -
Slava Zakharin authored
If it happens that a symbol has an implicit SAVE attribute, we have to omit it in the mod file writer. Otherwise it may violate F202X C862: The SAVE attribute shall not be specified for... an object that is in a common block.
-
Slava Zakharin authored
Example: ``` subroutine global_sub() integer, dimension(4) :: iarr4=(/1,2,3,4/) integer, dimension(4) :: jarr4 equivalence(iarr4,jarr4) call sub1 print *, iarr4 contains subroutine sub1 iarr4=jarr4((/4:1:-1/)) end subroutine sub1 end subroutine global_sub ``` `iarr4` and `jarr4` are equivalenced via a global aggregate storage, but the references inside `sub1` are lowered differently. `iarr4` is accessed via the global aggregate storage, while `jarr4` is accessed via the argument tuple. This confuses the FIR alias analysis, that claims that a host associated entity cannot alias with a global (if they have different source and do not have Target/Pointer attributes deduced by the alias analysis). I am not convinced that there is an issue in the alias analysis yet. I think we'd better lower the accesses uniformly, i.e. if one variable from an equivalence is lowered via the global aggregate storage, then any other variable from this equivalence should be lowered the same way (even if they are used via host association). This patch makes sure that all symbols from an EQUIVALENCE get and implicit SAVE attribute, if they do not have it already and any symbol from the EQUIVALENCE is SAVEd (explicitly or implicitly). This makes the further lowering consistent. -
Austin Kerbow authored
This patch adds the DAG isel changes for kernel argument preloading. These changes are not usable with older firmware but subsequent patches in the series will make the codegen backwards compatible. This patch should only be submitted alongside that subsequent patch. Preloading here begins from the start of the kernel arguments until the amount of arguments indicated by the CL flag amdgpu-kernarg-preload-count. Aggregates and arguments passed by-ref are not supported. Special care for the alignment of the kernarg segment is needed as well as consideration of the alignment of addressable SGPR tuples when we cannot directly use misaligned large tuples that the arguments are loaded to. Reviewed By: bcahoon Differential Revision: https://reviews.llvm.org/D158579
-
Ivan Kosarev authored
Caught on builds with expensive and _GLIBCXX_DEBUG checks enabled. See related discussion in <https://reviews.llvm.org/D134675#inline-1472177>.
-
Aaron Ballman authored
-
Simon Pilgrim authored
-
Joseph Huber authored
Summary: Normally, the implementation of `puts` simply writes a second newline charcter after printing the first string. However, because the GPU does everything in batches of the SIMT group size, this will end up with very poor output where you get the strings printed and then 1-64 newline characters all in a row. Optimizations like to turn `printf` calls into `puts` so it's a good idea to make this produce the expected output. The least invasive way I could do this was to add a new opcode. It's a little bloated, but it avoids an unneccessary and slow send operation to configure this.
-
jeanPerier authored
Finalize/Initialize may be called on non contiguous arrays when dealing with INTENT(OUT) dummies or non contiguous LHS. Update the related element access to use indices instead of assuming contiguity and manually computing the byte offset. Also, the descriptor passed to parent type final routines should be set to the parent type, otherwise descriptor.IsContiguous() may wrongfully return true when finalizing parent components. Create a pointer to the parent component when recursing in Finalize.
-
Joseph Huber authored
Summary: There are several tests here that are not yet using the `add_libc_test`. Rather than do this individually we should just update these all at once. These all pass on my x64 build so I'm assuming it should be fine.
-
Louis Dionne authored
The new formatting job enabled with GitHub actions checks for mis-formatted files everywhere, not only in the select subdirectories we checked previously. As a result, we'd get spurious clang-format failure reports whenever a test was modified. This patch fixes that.
-
William Junda Huang authored
Based on disassembly and profiling results, it looks like the cost of std::error_code and llvm::ErrorOr<> are non-trivial, as it involves virtual function calls that are not optimized in -O3. This patch moves error handling logic into the conditional branch in error checking, only generates std::error_code on actual error instead of the default case to generate sampleprof_error::success. In the next patch I am looking to change the API to uses a plain old enum for error checking instead, because based on profiling results error handling related code accounts for 7-8% of the profile loading time even if there's no error at all.
-
Vitaly Buka authored
Breaks https://lab.llvm.org/buildbot/#/builders/5/builds/36953 This reverts commit a7530452.
-
- Sep 25, 2023
-
-
Austin Kerbow authored
Preloaded kernel arguments should not be lowered in the IR pass AMDGPULowerKernelArguments. Therefore it's necessary to calculate the total number of user SGPRs that are available for preloading and how many SGPRs would be required to preload each argument to determine whether we should skip lowering i.e. the argument will be preloaded instead. Reviewed By: bcahoon Differential Revision: https://reviews.llvm.org/D156853
-
Nick Desaulniers authored
Given a list of constraints for InlineAsm (ex. "imr") I'm looking to modify the order in which they are chosen. Before doing so, I noticed a fair amount of logic is duplicated between SelectionDAGISel and GlobalISel for this. That is because SelectionDAGISel is also trying to lower immediates during selection. If we detangle these concerns into: 1. choose the preferred constraint 2. attempt to lower that constraint Then we can slide down the list of constraints until we find one that can be lowered. That allows the implementation to be shared between instruction selection frameworks. This makes it so that later I might only need to adjust the priority of constraints in one place, and have both selectors behave the same.
-
Ivan Kosarev authored
Reviewed By: Joe_Nash Differential Revision: https://reviews.llvm.org/D156103
-