- May 13, 2023
-
-
Fangrui Song authored
-
Tom Stellard authored
https://discourse.llvm.org/t/opening-up-prs-experimentally-for-a-subset-of-the-llvm-project/70375/11 Reviewed By: ldionne Differential Revision: https://reviews.llvm.org/D150314
-
Kazu Hirata authored
-
Kazu Hirata authored
-
Thurston Dang authored
My newly added backtrace test (https://reviews.llvm.org/D150491) broke the Windows buildbot (https://lab.llvm.org/buildbot/#/builders/127/builds/48103) because they do not have execinfo.h. I expect the same will happen with the backtrace_symbols test (https://reviews.llvm.org/D150498) as well. This patch does a quick fix by restricting the test scope to glibc-2.27. (A tricker fix would take into account SANITIZER_INTERCEPT_BACKTRACE, which is defined as (SI_FREEBSD || SI_NETBSD || SI_GLIBC || SI_SOLARIS))
-
Thurston Dang authored
This is another patch for https://github.com/google/sanitizers/issues/321 (sanitizer interceptors can write to freed memory, causing corruption), in this case for backtrace_symbols. backtrace_symbols is already correct, hence this patch removes the TODO note. Additionally, this patch adds a test case for it. Differential Revision: https://reviews.llvm.org/D150498
-
Weining Lu authored
Currenlty there is a mismatch between LoongArch gcc and clang about handling register name in inlineasm, i.e. gcc allows both `$`-prefixed and non-prefiexed names for GPRs while clang only allows `$`-prefixed one. This patch fixes this mismatch by adding non-prefixed GPR names in clang. Take `$r4` for example. With this patch, clang accepts `$r4`, `r4`, `$a0` and `a0` like what gcc does. Reviewed By: xen0n Differential Revision: https://reviews.llvm.org/D136436
-
Douglas Yung authored
Add 'REQUIRES: asserts' to test added in D150002 (53a4adc0) because it tests for a crash that is caused by an assertion failure.
-
Kazu Hirata authored
This is part of an effort to migrate from llvm::Optional to std::optional: https://discourse.llvm.org/t/deprecating-llvm-optional-x-hasvalue-getvalue-getvalueor/63716
-
Shengchen Kan authored
This was reverted in d4994d0e b/c a bolt test failed after the encoding changed. Relanded the patch with the updated test.
-
Tue Ly authored
This is to improve a performance bottleneck of printf for long double. Reviewed By: michaelrj Differential Revision: https://reviews.llvm.org/D150475
-
Philip Reames authored
Main value of this is simplifying code, and making a few of the tests easier to read. Differential Revision: https://reviews.llvm.org/D150474
-
Philip Reames authored
This was reverted in 4e84149c due to a problem report which has been confirmed to be misattributed. Original commit message: Use a switch to avoid repeat tests on the opcode, and factor out some common code out of another switch. (Not all branches had both common bits, but the one which didn't left the values unchanged and their starting value is the respective operand - so storing it back is a nop.)
-
Jessica Paquette authored
This reverts commit d3a6a05b. Some bots don't like it. Boo.
-
Jessica Paquette authored
Sometimes you want to see how much is being allocated in your data structure in general. Add statistics that show how many internal and leaf nodes have been allocated in the suffix tree over the course of its construction. Also add a testcase that shows that we actually get these stats out when we're outlining stuff. The test shows that we get the expected O(n) leaf nodes, a split, and so on.
-
Valentin Clement authored
Add if condition removal pattern for acc.host_data in a same way as acc.enter_data, acc.exit_data and acc.update. The condition is removed from the op if it is a true constant. If it is a false constant then the region is inlined before the op and the op is removed. Reviewed By: vzakhari Differential Revision: https://reviews.llvm.org/D150480
-
Philip Reames authored
This makes a (possible) change to the internal representation easier in the future, and makes the code easier to read now.
-
Alan Zhao authored
This reverts commit c13ed1cc. Reason: causes bolt tests to fail: https://crbug.com/1445243
-
Philip Reames authored
This reverts commit 13984608. A problem was reported - the attribution seems slightly questionable, but this is low enough value after 297e06cf that reverting is easy.
-
Thurston Dang authored
It is a known, longstanding issue that some ASan interceptors may write to freed memory, causing corruption (https://github.com/google/sanitizers/issues/321). This patch adds a testcase for the backtrace interceptor (one of the known cases). Reviewed By: vitalybuka Differential Revision: https://reviews.llvm.org/D150491
-
Yaxun (Sam) Liu authored
Predefine __AMDGCN_CUMODE__ as 1 or 0 when compilation assumes CU or WGP modes. If WGP mode is not supported, ignore -mno-cumode and emit a warning. This is needed for implementing device functions like __smid (https://github.com/ROCm-Developer-Tools/hipamd/blob/312dff7b794337aa040be0691acc78e9f968a8d2/include/hip/amd_detail/amd_device_functions.h#L957) Reviewed by: Matt Arsenault, Artem Belevich, Brian Sumner Differential Revision: https://reviews.llvm.org/D145343
-
Teresa Johnson authored
Adds support to set the hot/cold new hint values with an option. Change the defaults slightly to make it easier to distinguish between compiler synthesized vs manually inserted calls to the interface. Differential Revision: https://reviews.llvm.org/D150488
-
Vadim Paretsky authored
The 'loc' argument is optional, and some compilers (e.g. MSVC) do no supply it. Differential Revision: https://reviews.llvm.org/D148393
-
Kazu Hirata authored
This patch migrates uses of StringRef::{starts,ends}with_insensitive to StringRef::{starts,ends}_with_insensitive so that we can use names similar to those used in std::string_view. I'm planning to deprecate StringRef::{starts,ends}with_insensitive once the migration is complete across the code base. Differential Revision: https://reviews.llvm.org/D150426 -
Vadim Paretsky authored
[OpenMP] Fix GCC build issues and restore "Additional APIs used by the MSVC compiler for loop collapse (rectangular and non-rectangular loops)" Fixes a GCC build issue (an instance of unallowed typename keyword) and reworks memory allocation to avoid the use of C++ library based primitives ) in and restores the earlier commit https://reviews.llvm.org/D148393 Differential Revision: https://reviews.llvm.org/D149010
-
Florian Mayer authored
The short granule logic made this test flaky because with low probability there would be no tag mismatch by coincidence. Reviewed By: vitalybuka Differential Revision: https://reviews.llvm.org/D150484
-
Jerry Ge authored
Signed-off-by:
Jerry Ge <jerry.ge@arm.com> Change-Id: I922eeda95223da2c7da0653451e604651b7594bd Reviewed By: mehdi_amini Differential Revision: https://reviews.llvm.org/D150487
-
ziqingluo-90 authored
A follow-up change for 6d861d49: remove an unnecessary const-qualifier so that the code doesn't have to remove the qualifier explicitly using `std::remove_const_t`, which triggers a warning at some bots (e.g., https://lab.llvm.org/buildbot/#/builders/247/builds/4442).
-
Saleem Abdulrasool authored
Add support for --dump-section on COFF files. This is helpful for extracting specific content from an object file on Windows. Differential Revision: https://reviews.llvm.org/D150305 Reviewed By: @alexander-shaposhnikov, @jhenderson, @hjyamauchi
-
Vitaly Buka authored
-
Florian Hahn authored
-
William Huang authored
Cleanup profile reader classes to prepare for complex refactoring as propsed in D147740, continuing D148872 This is patch 3/n. This patch changes the behavior of function offset table. Previously when reading ExtBinary profile, the funcOffsetTable (map) is always populated, and in addition if the profile is CS, the orderedFuncOffsets (list) is also populated. However when reading the function samples, only one of the container is being used, never both, so it's a huge waste of time to populate both. Added logic to select which one to use, and completely skip reading function offset table if we are in tool mode (all function samples are to be read sequentially regardless) Reviewed By: davidxl, wenlei Differential Revision: https://reviews.llvm.org/D149124
-
Slava Zakharin authored
The global names were created using a hash based on the address of std::vector::data address. Since the memory may be reused by different std::vector's, this may cause non-equivalent constant expressions to map to the same name. This is what is happening in the modified flang/test/Lower/constant-literal-mangling.f90 test. I changed the name creation to use a map between the constant expressions and corresponding unique names. The uniquing is done using a name counter in FirConverter. The effect of this change is that the equivalent constant expressions are now mapped to the same global, and the naming is "stable" (i.e. it does not change from compilation to compilation). Though, the issue is not HLFIR specific it was affecting several tests when using HLFIR lowering. Differential Revision: https://reviews.llvm.org/D150380
-
TatWai Chong authored
Tosa supports fp16 and fp32 accumulator type for fp16 input, but no way to tell for computational operators whether accumulator should be fp16 or fp32 from input type. Add this new attribute to specify the type. Set to fp32 by default for now. When the time fp16 is supported, the accumulator type can be selected based on trade-off between performance and accuracy. Reviewed By: jpienaar Differential Revision: https://reviews.llvm.org/D146317
-
Alex Langford authored
DWARFAttribute is used in 2 classes: DWARFAbbreviationDecl and DWARFAttributes. The former stores a std::vector of them and the latter has a small structure called AttributeValue that contains a DWARFAttribute. DWARFAttributes maintains a llvm::SmallVector of AttributeValues. My end goal is to have `DWARFAttributes` have a llvm::SmallVector specialized on DWARFAttribute. In order to do that, we'll have to move the other elements of AttributeValue into DWARFAttribute itself. But we don't want to do this while DWARFAbbreviationDecl is using DWARFAttribute because it will needlessly increase the size of DWARFAbbreviationDecl. So instead I will create a small type containing only what DWARFAbbreviationDecl needs and call it `AttributeSpec`. This is the exact same thing that LLVM does today. I've elected to swap std::vector for llvm::SmallVector here with a pre-allocated size of 8. I've collected time and memory measurements before this change and after it as well. Using a c++ project with 10,000 object files and no dSYM, I place a breakpoint by file + lineno and see how long it takes to resolve. Before this patch: Time (mean ± σ): 13.577 s ± 0.024 s [User: 12.418 s, System: 1.247 s] Total number of bytes allocated: 1.38 GiB Total number of allocations: 6.47 million allocations After this patch: Time (mean ± σ): 13.287 s ± 0.020 s [User: 12.128 s, System: 1.250 s] Total number of bytes allocated: 1.59 GiB Total number of allocations: 4.61 million allocations So we consume more memory than before, but we actually make less allocations on average. I also measured with an llvm::SmallVector with a pre-allocated size of 4 instead of 8 to measure how well it performs: Time (mean ± σ): 13.246 s ± 0.048 s [User: 12.074 s, System: 1.268 s] Total memory consumption: 1.50 GiB Total number of allocations: 5.74 million Of course this data may look very different depending on the actual program being debugged, but each of the object files had 100+ AbbreviationDeclarations each with between 0 and 10 Attributes, so I feel this was a fair example to consider. Differential Revision: https://reviews.llvm.org/D150418
-
Nikolas Klauser authored
Reviewed By: ldionne, #libc Spies: arichardson, pcwang-thead, libcxx-commits, miyuki Differential Revision: https://reviews.llvm.org/D150277
-
Jeffrey Byrnes authored
IndirectCopyToAGPR should be reworked as to avoid optimizing during copy lowering. However, as it stands, the code is buggy. This patch replaces the call to definesRegister with modifiesRegister, and confirms that the dest reg of the found accvgpr_write is in fact the src reg of our copy. Differential Revision: https://reviews.llvm.org/D149873 Change-Id: Id8a61659ac15565dcb970069d0624f0925a46e6d
-
Craig Topper authored
This is preparation for an additional combine.
-
Alex Langford authored
-
Fangrui Song authored
-