- Oct 27, 2022
-
-
Haojian Wu authored
-
David Spickett authored
GDB implemented data_bit_offset in https://sourceware.org/bugzilla/show_bug.cgi?id=12616 which has been present since GDB 8.0. GCC started using it at GCC 11. Reviewed By: dblaikie Differential Revision: https://reviews.llvm.org/D135583
-
wangpc authored
There are a lot of cases for pseudos of the same instruction, here we just use existed mapping table to map pseudos to real instructions to reduce cases. Reviewed By: kito-cheng Differential Revision: https://reviews.llvm.org/D128271
-
OCHyams authored
And update the unittest. Reviewed By: dblaikie Differential Revision: https://reviews.llvm.org/D136242
-
Chuanqi Xu authored
Rename module related things according to the consensus in https://discourse.llvm.org/t/rfc-unifying-the-terminology-about-modules-in-clang/66054/ to reduce further confusings. This only renames things I can make sure. It doesn't mean all the names in Preprocessor are correct now.
-
Guillaume Chatelet authored
This patch seems to introduce bugs on aarch64. Reverting while we investigate the root cause. This reverts commit 02841488.
-
Nikita Popov authored
Clang detects the GCC version from the libdir. However, modern GCC versions only include the major version in the libdir (something like lib/gcc/powerpc64le-linux-gnu/12/), not all version components. For this reason, even though the system has a supported libstdcxx, it will still fail the check against the 12.1.0 version requirement. Fix this by doing the same thing we do for patch versions: Assume that a missing minor version is larger than any specific version. To allow this to be tested, we need to fix two additional issues: First, the GCC toolchain directories used for testing need to contain a crtbegin.o file to be properly detected. The existing tests actually ended up using a 0.0.0 version, rather the intended one. Second, we also need to satisfy the glibc version check based on the dynamic linker. To do so, respect the --dyld-prefix argument and add the necessary file to the test toolchain directory. Differential Revision: https://reviews.llvm.org/D136258
-
Alexander Belyaev authored
This reverts commit c34de60e.
-
Matthias Springer authored
Also allow unranked tensors/memrefs with destination style op outputs. This allows for a simpler implementation of the BufferizableOpInterface (in a subsequent commit). Differential Revision: https://reviews.llvm.org/D136346
-
Nikita Popov authored
When looking through phis, BasicAA has to guard against the possibility that values from two separate cycle iterations are being compared -- in this case, even though the SSA values may be the same, they cannot be considered as equal. This is currently done by keeping a set of VisitedPhiBBs for any phis we looked through, and then checking whether the relevant instruction is reachable from one of the phis. This patch replaces this set with a single flag. If the flag is set, then we will not assume equality for any instruction part of a cycle. While this is nominally less accurate, it makes essentially no difference in practice. Here are the AA stats for test-suite: aa.NumMayAlias | 3072005 | 3072016 aa.NumMustAlias | 337858 | 337854 aa.NumNoAlias | 13255345 | 13255349 The motivation for the change is to expose the MayBeCrossIteration flag to AA users, which will allow fixing miscompiles related to incorrect handling of cross-iteration AA queries. Differential Revision: https://reviews.llvm.org/D136174 -
owenca authored
Also add line range examples from #58161. Differential Revision: https://reviews.llvm.org/D136658
-
Matthias Springer authored
We have currently no need for unranked tensors/memrefs. Differential Revision: https://reviews.llvm.org/D136588
-
Tatsuyuki Ishi authored
While profiling InclusionRewriter, it was found that counting lines was so slow that it took up 20% of the processing time. Surely, calling memcmp() of size 1 on every substring in the window isn't a good idea. Use StringRef::find() instead; in the case of N=1 it will forward to memcmp which is much more optimal. For 2<=N<256 it will run the same memcmp loop as we have now, which is still suboptimal but at least does not regress anything. Differential Revision: https://reviews.llvm.org/D133658
-
Alexander Belyaev authored
``` %mapped = linalg.map ins(%arg0 : tensor<64xf32>) outs(%arg1 : tensor<64xf32>) (%in: f32) { %0 = math.absf %in : f32 linalg.yield %0 : f32 } %reduced = linalg.reduce ins(%arg0 : tensor<16x32x64xf32>) outs(%arg1 : tensor<16x64xf32>) dimensions = [1] (%in: f32, %init: f32) { %0 = arith.addf %in, %init : f32 linalg.yield %0 : f32 } %transposed = linalg.transpose ins(%arg0 : tensor<16x32x64xf32>) outs(%arg1 : tensor<32x64x16xf32>) permutation = [1, 2, 0] ``` Differential Revision: https://reviews.llvm.org/D136818 -
Matthias Springer authored
When writing a tensor.extract/tensor.insert, the rank of the tensor is implied by the number of specified indices. When extracting from/inserting into an unranked tensor, it should first be casted to a ranked version. Differential Revision: https://reviews.llvm.org/D136756
-
Nicolai Hähnle authored
We have a downstream project with a command-line utility that operates pretty much exactly like `opt`. So it would make sense for us to maintain tests with update_test_checks.py with our custom tool substituted for `opt`, as this change allows. Differential Revision: https://reviews.llvm.org/D136329
-
OCHyams authored
createFragmentExpression rejects expressions containing certain ops, like DW_OP_plus, that may cause the expression to compute a value that can't be split. Teach createFragmentExpression that the value loaded from an address computed using those ops is safe to split. Update a unittest to account for and test this change. Reviewed By: StephenTozer Differential Revision: https://reviews.llvm.org/D136243
-
Alex Brachet authored
This reverts commit a678f863.
-
Alex Brachet authored
Differential Revision: https://reviews.llvm.org/D133487
-
Siva Chandra authored
-
Ian Anderson authored
Add module maps for the libunwind headers. unwind_arm_ehabi.h and unwind_itanium.h aren't covered because they don't get installed on all platforms. Reviewed By: #libunwind, MaskRay Differential Revision: https://reviews.llvm.org/D135345
-
wangpc authored
Since we have converted SPLAT_VECTOR to VMV_V_X_VL or VFMV_V_F_VL in RISCVDAGToDAGISel::PreprocessISelDAG(). Reviewed By: craig.topper Differential Revision: https://reviews.llvm.org/D136814
-
Sameer Sahasrabuddhe authored
The struct OffsetAndSize is a simple tuple of two int64_t. Treating it as a derived class of std::pair has no special benefit, but it makes the code verbose since we need get/set functions that avoid using "first" and "second" in client code. Eliminating the std::pair makes this more readable. Reviewed By: jdoerfert Differential Revision: https://reviews.llvm.org/D136745
-
Jordan Rupprecht authored
-
Luca Di Sera authored
The new method is a wrapper of `CXXMethodDecl::isCopyAssignmentOperator` and can be used to recognized copy-assignment operators in libclang. An export for the method, together with its documentation, was added to "clang/include/clang-c/Index.h" with an implementation provided in "clang/tools/libclang/CIndex.cpp". The implementation was based on similar `clang_CXXMethod.*` implementations, following the same structure but calling `CXXMethodDecl::isCopyAssignmentOperator` for its main logic. The new symbol was further added to "clang/tools/libclang/libclang.map" to be exported, under the LLVM16 tag. "clang/tools/c-index-test/c-index-test.c" was modified to print a specific tag, "(copy-assignment operator)", for cursors that are recognized by `clang_CXXMethod_isCopyAssignmentOperator`. A new regression test file, "clang/test/Index/copy-assignment-operator.cpp", was added to ensure that the correct constructs were recognized or not by the new function. The "clang/test/Index/get-cursor.cpp" regression test file was updated as it was affected by the new "(copy-assignment operator)" tag. A binding for the new function was added to libclang's python's bindings, in "clang/bindings/python/clang/cindex.py", adding a new method for `Cursor`, `is_copy_assignment_operator_method`. The current release note, `clang/docs/ReleaseNotes.rst`, was modified to report the new addition under the "libclang" section. Reviewed By: aaron.ballman Differential Revision: https://reviews.llvm.org/D136604
-
Siva Chandra Reddy authored
Reviewed By: jeffbailey Differential Revision: https://reviews.llvm.org/D136810
-
Carlos Alberto Enciso authored
llvm-debuginfo-analyzer is a command line tool that processes debug info contained in a binary file and produces a debug information format agnostic “Logical View”, which is a high-level semantic representation of the debug info, independent of the low-level format. The code has been divided into the following patches: 1) Interval tree 2) Driver and documentation 3) Logical elements 4) Locations and ranges 5) Select elements 6) Warning and internal options 7) Compare elements 8) ELF Reader 9) CodeView Reader Full details: https://discourse.llvm.org/t/llvm-dev-rfc-llvm-dva-debug-information-visual-analyzer/62570 This patch: This is a high level summary of the changes in this patch. ELF Reader - Support for ELF/DWARF. LVBinaryReader, LVELFReader Reviewed By: psamolysov, probinson Differential Revision: https://reviews.llvm.org/D125783
-
Matheus Izvekov authored
Since we don't unique specializations for concepts, we can just instantiate them with the sugared template arguments, at negligible cost. If we don't track their specializations, we can't resugar them later anyway, and that would be more expensive than just instantiating them sugared in the first place since it would require an additional pass. Signed-off-by:
Matheus Izvekov <mizvekov@gmail.com> Differential Revision: https://reviews.llvm.org/D136566
-
Matheus Izvekov authored
This makes use of the changes introduced in D134604, in order to instantiate alias templates witn a final sugared substitution. This comes at no additional relevant cost. Since we don't track / unique them in specializations, we wouldn't be able to resugar them later anyway. Signed-off-by:
Matheus Izvekov <mizvekov@gmail.com> Differential Revision: https://reviews.llvm.org/D136565
-
Matheus Izvekov authored
This makes use of the changes introduced in D134604, in order to instantiate non-type template parameters and default template arguments with a final sugared substitution. This comes at no additional relevant cost. Since we don't track / unique them in specializations, we wouldn't be able to resugar them later anyway. Signed-off-by:
Matheus Izvekov <mizvekov@gmail.com> Differential Revision: https://reviews.llvm.org/D136564
-
Matheus Izvekov authored
Implements the changes required to perform substitution with non-canonical template arguments, and to 'finalize' them by not placing 'Subst' nodes. A finalized substitution means we won't resugar them later, because these templates themselves were eagerly substituted with the intended arguments at the point of use. We may still resugar other templates used within those, though. This patch does not actually implement any uses of this functionality, those will be added in subsequent patches, so expect no changes to existing tests. Signed-off-by:
Matheus Izvekov <mizvekov@gmail.com> Differential Revision: https://reviews.llvm.org/D134604
-
wlei authored
When a profile is stale and profile mismatch could happen, the mismatched samples are discarded, so we'd like to compute the mismatch metrics to quantify how stale the profile is, which will suggest user to refresh the profile if the number is high. Two sets of metrics are introduced here: - (Num_of_mismatched_funchash/Total_profiled_funchash), (Samples_of_mismached_func_hash / Samples_of_profiled_function) : Here it leverages the FunctionSamples's checksums attribute which is a feature of pseudo probe. When the source code CFG changes, the function checksums will be different, later sample loader will discard the whole functions' samples, this metrics can show the percentage of samples are discarded due to this. - (Num_of_mismatched_callsite/Total_profiled_callsite), (Samples_of_mismached_callsite / Samples_of_profiled_callsite) : This shows how many mismatching for the callsite location as callsite location mismatch will affect the inlining which is highly correlated with the performance. It goes through all the callsite location in the IR and profile, use the call target name to match, report the num of samples in the profile that doesn't match a IR callsite. This is implemented in a new class(SampleProfileMatcher) and under a switch("--report-profile-staleness"), we plan to extend it with a fuzzy profile matching feature in the future. Reviewed By: hoy, wenlei, davidxl Differential Revision: https://reviews.llvm.org/D136627 -
Matheus Izvekov authored
Since these are much like template type aliases, where we don't track a specialization for them and just substitute them eagerly, we can't resugar them anyway, and there is no relevant cost in just performing a finalizing sugared substitution. Signed-off-by:
Matheus Izvekov <mizvekov@gmail.com> Differential Revision: https://reviews.llvm.org/D136563
-
Matheus Izvekov authored
Makes CheckTemplateArgumentList and the template deduction functions produce a sugared converted argument list in addition to the canonical one. This is mostly NFC except that we hook this up to a few diagnostics in SemaOverload. The infrastructure here will be used in subsequent patches where we perform a finalized sugared substitution for entities which we do not unique per specializations on canonical arguments, and later on will be used for template specialization resugaring. Signed-off-by:
Matheus Izvekov <mizvekov@gmail.com> Differential Revision: https://reviews.llvm.org/D133874
-
Richard Smith authored
[clang] Include the type of a pointer or reference non-type template parameter in its notion of template argument identity. We already did this for all the other kinds of non-type template argument. Note: Based on earlier reverted patch from zygoloid. Differential Revision: https://reviews.llvm.org/D136803
-
Mahesh Ravishankar authored
Reviewed By: nicolasvasilache, hanchung, ThomasRaoux Differential Revision: https://reviews.llvm.org/D136733
-
Wanyi Ye authored
This reverts commit c8a26f8c. Returning full statistics result in "terminated" (DAP) event could result in delay in the UI when debugging from VSCode. If the program run to exit and debug session terminates. The DAP event order will be: exited event --> terminateCommands --> terminated event --> disconnect request --> disconnect response. The debugging UI in VSCode corresponds to "disconnect" request/response. If the terminated event is taking long to process, the IDE won't quit debugging UI until it's done. For big binary (tested example has 29 GB of debug info), it can cause ~15s delay in terminated event itself. And the UI could take ~20s to reflect. This may cause confusion in debug sessions. We should persuit a more lightweight return or other solution to return such info.
-
chenglin.bi authored
((X >> C) - Y) + Z --> (Z - Y) + (X >> C) Fix AArch part: #55714 Reviewed By: dmgreen Differential Revision: https://reviews.llvm.org/D136158
-
Paul Kirth authored
Add statistics about how much memory is used, in variables, spills, and unsafestack. Issue #58168 describes some of the difficulty diagnosing stack size issues identified by -Wframe-larger-than. D135488 addresses some of those issues by giving developers a method to view the stack layout and thereby understand where and how stack memory is used. However, that solution requires an additional pass, when a short summary about how the compiler has allocated stack memory can inform developers about where they should investigate. When they need the complete context, D135488 can provide them with a more comprehensive set of diagnostics. Reviewed By: nickdesaulniers Differential Revision: https://reviews.llvm.org/D136484
-
Roman Lebedev authored
-