- Sep 03, 2022
-
-
Daniil Fukalov authored
Each dead def of the same virtual register is required to be split into multiple virtual registers with separate live intervals to avoid MachineVerifier error. Partially fixes https://github.com/llvm/llvm-project/issues/56050 and https://github.com/llvm/llvm-project/issues/56051 Reviewed By: qcolombet Differential Revision: https://reviews.llvm.org/D130477
-
Fangrui Song authored
Similar to 123ce97f for dllimport: dllexport expresses a non-hidden visibility intention. We can consider it explicit and therefore it should override the global visibility setting (see AST/Decl.cpp "NamedDecl Implementation"). Adding the special case to CodeGenModule::setGlobalVisibility is somewhat weird, but allows we to add the code in one place instead of many in AST/Decl.cpp. Differential Revision: https://reviews.llvm.org/D133180
-
Mehdi Amini authored
See #57475 Differential Revision: https://reviews.llvm.org/D133215
-
Fangrui Song authored
* If GCC is configured with `--disable-multi-arch`, `--print-multiarch` output is an empty line. * If GCC is configured with `--enable-multi-arch`, `--print-multiarch` output may be a normalized triple or (on Debian, 'vendor' is omitted) `x86_64-linux-gnu`. The Clang support D101400 just prints the Debian multiarch style triple unconditionally, but the string is not really expected for non-Debian systems. AIUI many Linux distributions and non-Linux OSes don't configure GCC with `--enable-multi-arch`. Instead of getting us in the trouble of supporting all kinds of variants, drop the support as before D101400. Close https://github.com/llvm/llvm-project/issues/51469 Reviewed By: phosek Differential Revision: https://reviews.llvm.org/D133170
-
Mikhail Goncharov authored
For a4d48e3b
-
Simon Pilgrim authored
Revert rG11765b77 "[CostModel][X86] Add CostKinds handling for fmul ops" I need to address some x87 codegen changes before re-committing this.
-
- Sep 02, 2022
-
-
Simon Pilgrim authored
This was achieved with an updated version of the 'cost-tables vs llvm-mca' script D103695 As we're using 'typical' worst case values, not all cost entries come from a single CPU - e.g. the latency/throughput from haswell but the size-latency(uops) from zen1/alderlake-e due to 'double pumping'
-
Dave Lee authored
Change the behavior of the libc++ `unordered_map` synthetic provider to present children as `std::pair` values, just like `std::map` does. The synthetic provider for libc++ `std::unordered_map` has returned children that expose a level of internal structure (over top of the key/value pair). For example, given an unordered map initialized with `{{1,2}, {3, 4}}`, the output is: ``` (std::unordered_map<int, int, std::hash<int>, std::equal_to<int>, std::allocator<std::pair<const int, int> > >) map = size=2 { [0] = { __cc = (first = 3, second = 4) } [1] = { __cc = (first = 1, second = 2) } } ``` It's not ideal/necessary to have the numbered children embdedded in the `__cc` field. Note: the numbered children have type `std::__hash_node<std::__hash_value_type<Key, T>, void *>::__node_value_type`, and the `__cc` fields have type `std::__hash_value_type<Key, T>::value_type`. Compare this output to `std::map`: ``` (std::map<int, int, std::less<int>, std::allocator<std::pair<const int, int> > >) map = size=2 { [0] = (first = 1, second = 2) [1] = (first = 3, second = 4) ``` Where the numbered children have type `std::pair<const Key, T>`. This changes the behavior of the synthetic provider for `unordered_map` to also present children as `pairs`, just like `std::map`. It appears the synthetic provider implementation for `unordered_map` was meant to provide this behavior, but was maybe incomplete (see d22a9437). It has both an `m_node_type` and an `m_element_type`, but uses only the former. The latter is exactly the type needed for the children pairs. With this existing code, it's not much of a change to make this work. Differential Revision: https://reviews.llvm.org/D117383 -
Adrian Prantl authored
This reverts commit 96f00f63 because D128830 has been reverted.
-
Simon Pilgrim authored
These were missed in an earlier commit, the latency/codesize/size-latency numbers aren't different from the SSE2 values that it was falling through to, hence no test change, but it did mean we were wasting a lookup.
-
Djordje Todorovic authored
This patch introduces recognition of table-based ctz implementation during the AggressiveInstCombine. This fixes the [0]. [0] https://bugs.llvm.org/show_bug.cgi?id=46434 Differential Revision: https://reviews.llvm.org/D113291
-
Leonard Grey authored
Detailed motivation here: https://docs.google.com/document/d/1xUNo5ovPKJMYxitiHUQVRxGI3iUmspI51Jm4w8puMwo check-asan (with LSAN enabled) and check-lsan are currently broken on recent macOS versions, due to pervasive false positives. Whenever the Objective-C runtime realizes a class, it allocates data for it, then stores that data with flags in the low bits. This means LSAN can not recognize it as a pointer while scanning. This change checks every potential pointer on Apple platforms, and if the high bit is set, attempts to extract a pointer by masking out the high bit and flags. This is ugly, but it's also the best approach I could think of (see doc above); very open to other suggestions. Differential Revision: https://reviews.llvm.org/D133126
-
Craig Topper authored
LEGALPOS appears to only be used by LegalizeVectorOps. It needs to point at a vector operand. Stores need to point at the second operand since the result and the first operand are MVT::Other. Reductions need to point at the second operand since the result and the first operand are scalsrs. Reviewed By: rogfer01 Differential Revision: https://reviews.llvm.org/D133048
-
Juan Manuel MARTINEZ CAAMAÑO authored
-
Jeff Bailey authored
Reviewed By: sivachandra Differential Revision: https://reviews.llvm.org/D133186
-
Luca Di Sera authored
The method is now wrapped by clang_getNonReferenceType. A declaration for clang_getNonReferenceType was added to clang-c/Index.h to expose it to user of the library. An implementation for clang_getNonReferenceType was introduced in CXType.cpp, wrapping the equivalent method of the underlying QualType of a CXType. An export symbol for the new function was added to libclang.map under the LLVM_16 version entry. A test was added to LibclangTest.cpp that tests the removal of ref-qualifiers for some CXTypes. The release-notes for the clang project was updated to include a notification of the new addition under the "libclang" section. Differential Revision: https://reviews.llvm.org/D133195
-
Mehdi Amini authored
-
Mehdi Amini authored
-
Kadir Cetinkaya authored
Differential Revision: https://reviews.llvm.org/D133200
-
Tian Zhou authored
Baseline tests for this patch https://reviews.llvm.org/D132888 Differential Revision: https://reviews.llvm.org/D133182
-
Matthias Springer authored
This change refines the semantics of scf.foreach_thread. Tensors that are inserted into in the terminator must now be passed to the region explicitly via `shared_outs`. Inside of the body of the op, those tensors are then accessed via block arguments. The body of a scf.foreach_thread is now treated as a repetitive region. I.e., op dominance can no longer be used in conflict detection when using a value that is defined outside of the body. Such uses may now be considered as conflicts (if there is at least one read and one write in the body), effectively privatizing the tensor. Shared outputs are not privatized when they are used via their corresponding block arguments. As part of this change, it was also necessary to update the "tiling to scf.foreach_thread", such that the generated tensor.extract_slice ops use the scf.foreach_thread's block arguments. This is implemented by cloning the TilingInterface op inside the scf.foreach_thread, rewriting all of its outputs with block arguments and then calling the tiling implementation. Afterwards, the cloned op is deleted again. Differential Revision: https://reviews.llvm.org/D133114
-
Matthias Springer authored
This method allows to declare regions as "repetitive" even if the parent op does not implement the RegionBranchOpInterface. This is needed to support loop-like ops that have parallel semantics but do not branch between regions. Differential Revision: https://reviews.llvm.org/D133113
-
Aaron Ballman authored
We haven't had a Geordi bot in years and we moved the build bot to another channel. This updates the documentation to be more reflective of reality, and it also identifies whether a channel is actively moderated or not. Differential Revision: https://reviews.llvm.org/D133155
-
Jolanta Jensen authored
We are not building up a proper list of load-store candidates because we are throwing away stores where the type don't match the load. This patch adds stores with matching store sizes as candidates. Author of the original patch: David Sherwood. Differential Revision: https://reviews.llvm.org/D130233
-
David Green authored
-
Egor Zhdan authored
This re-enables a test after it was disabled in https://reviews.llvm.org/D133009. Fixes #57484. Differential Revision: https://reviews.llvm.org/D133105
-
Muhammad Omair Javaid authored
This reverts commit c911befa. It has broken LLDB Arm/AArch64 Linux buildbots. I dont really understand the underlying reason. Reverting for now make buildbot green. https://reviews.llvm.org/D133036
-
Mikhail Goncharov authored
after fe415297
-
Simon Pilgrim authored
This was achieved with an updated version of the 'cost-tables vs llvm-mca' script D103695 which I'll update shortly As we're using 'typical' worst case values, not all cost entries come from a single CPU - e.g. the latency/throughput from haswell but the size-latency(uops) from zen1/alderlake-e due to 'double pumping'
-
Florian Hahn authored
Add test case where GlobalOpt fails to remove loads to global fields with struct types.
-
Utkarsh Saxena authored
As discussed in this [comment](https://github.com/llvm/llvm-project/issues/56183#issuecomment-1224331699), we end up building the lambda twice: once while parsing the function calls and then again while handling the immediate invocation. This happens specially during removing nested immediate invocation. Eg: When we have another consteval function as the parameter along with this lambda expression. Eg: `foo(bar([]{}))`, `foo(bar(), []{})` While removing such nested immediate invocations, we should not rebuild this lambda. (IIUC, rebuilding a lambda would always generate a new type which will never match the original type from parsing) Fixes: https://github.com/llvm/llvm-project/issues/56183 Fixes: https://github.com/llvm/llvm-project/issues/51695 Fixes: https://github.com/llvm/llvm-project/issues/50455 Fixes: https://github.com/llvm/llvm-project/issues/54872 Fixes: https://github.com/llvm/llvm-project/issues/54587 Differential Revision: https://reviews.llvm.org/D132945
-
Mikael Holmen authored
hasOnlyColdCalls skipped over calls to intrinsics, but it did so after checking the linkage of the called function. This meant that the presence of a call to a debug intrinsic could affect the outcome of the optimization. In my original reproducer (for an out of tree target) it was particularly interesting, because the actual IR after GlobalOpt was not different with debug instrinsics present, so -print-after-all printouts didn't show anything there. However, without debuginfo, GlobalOpt went further and ran BlockFrequencyAnalysis and (more importanly) LoopAnalysis, and later on in the pipeline, instcombine behaved in different ways when LoopInfo was present. So a call to a dbg.declare prevented running LoopAnalysis in GlobalOpt, which later prevented InstCombine from doing an optimization. The dbg-intrinsic-loopanalysis.ll testcase tries to expose this. Then I also noted that adding a dbg.declare actually made the existing testcase colccc_coldsites.ll generate different code, so I modified that to now test it behaves the same way with and without the dbg.declare. Reviewed By: nikic, fhahn Differential Revision: https://reviews.llvm.org/D133193
-
Sergey Kachkov authored
Use getPredicateOnEdge method if value is a non-local compare-with-a-constant instruction, that can give more precise results than getConstantOnEdge. Differential Revision: https://reviews.llvm.org/D131956
-
Andrey Tretyakov authored
Differential Revision: https://reviews.llvm.org/D132903
-
wanglei authored
The bash syntax `|&` is unsupported on other shells. Differential Revision: https://reviews.llvm.org/D133187
-
Simon Pilgrim authored
I'm not sure how much to add to the description as we've tried to allow targets to interpret the TargetCostKind enums in their own way. But we need to make it clear that certain cost kinds need to match threshold numbers used by various passes (and vice-versa when passes are determining a cost-benefit threshold). I'm not keen on the "The weighted sum of size and latency" description, but its very difficult to come up with anything else that's suitably generic (e.g. X86 will use uop counts here to easily work with LoopMicroOpBufferSize thresholds, even though high latency fdiv/fsqrt instructions still often have low uop counts). Differential Revision: https://reviews.llvm.org/D132288
-
WANG Xuerui authored
Jump tables cannot be generated yet, due to missing support for emitting local addresses. Differential Revision: https://reviews.llvm.org/D132653
-
Mats Petersson authored
This removes a bunch of duplicated code, by adding an intermediate function simplifyReduction that takes a std::function argument for the actual replacement of the code. No functional change intended. Reviewed By: vzakhari Differential Revision: https://reviews.llvm.org/D132588
-
Nikita Popov authored
-
Chuanqi Xu authored
-