- Oct 07, 2023
-
-
ChiaHungDuan authored
In this CL, we move the printing of allocator stats from primary.h to combined.h. This will also dump the secondary stats and reduce the log spam when an OOM happens Also change the symbol `F` to `E` to indicate region pages exhausted. It means the region can't map more pages for blocks but it may still have free blocks to allocate. `F` may hint the failure of fatel error in the region. Also update the related comments.
-
Peiming Liu authored
…to simple steps
-
michaelrj-google authored
The name of the namespace for LLVM's libc is now provided by a macro. The ImplementationNamespaceCheck was updated to handle this, but the CalleeNamespaceCheck was missed. This patch updates the CalleeNamespaceCheck to handle the macro.
-
Nikolas Klauser authored
This makes exception handling a lot simpler, since we don't have to convert any exceptions this way. Is also properly handles all the user-thrown exceptions. Reviewed By: ldionne, #libc Spies: arichardson, mstorsjo, libcxx-commits Differential Revision: https://reviews.llvm.org/D154238
-
Nikolas Klauser authored
``` --------------------------------------------------------------- Benchmark old new --------------------------------------------------------------- bm_vector_bool_count/1 1.92 ns 1.92 ns bm_vector_bool_count/2 1.92 ns 1.92 ns bm_vector_bool_count/3 1.92 ns 1.92 ns bm_vector_bool_count/4 1.92 ns 1.92 ns bm_vector_bool_count/5 1.92 ns 1.92 ns bm_vector_bool_count/6 1.92 ns 1.92 ns bm_vector_bool_count/7 1.92 ns 1.92 ns bm_vector_bool_count/8 1.92 ns 1.92 ns bm_vector_bool_count/16 1.92 ns 1.92 ns bm_vector_bool_count/64 2.24 ns 2.25 ns bm_vector_bool_count/512 3.19 ns 3.20 ns bm_vector_bool_count/4096 14.1 ns 12.3 ns bm_vector_bool_count/32768 84.0 ns 83.6 ns bm_vector_bool_count/262144 664 ns 661 ns bm_vector_bool_count/1048576 2623 ns 2628 ns bm_vector_bool_ranges_count/1 1.07 ns 1.92 ns bm_vector_bool_ranges_count/2 1.65 ns 1.92 ns bm_vector_bool_ranges_count/3 2.27 ns 1.92 ns bm_vector_bool_ranges_count/4 2.68 ns 1.92 ns bm_vector_bool_ranges_count/5 3.33 ns 1.92 ns bm_vector_bool_ranges_count/6 3.99 ns 1.92 ns bm_vector_bool_ranges_count/7 4.67 ns 1.92 ns bm_vector_bool_ranges_count/8 5.19 ns 1.92 ns bm_vector_bool_ranges_count/16 11.1 ns 1.92 ns bm_vector_bool_ranges_count/64 52.2 ns 2.24 ns bm_vector_bool_ranges_count/512 452 ns 3.20 ns bm_vector_bool_ranges_count/4096 3577 ns 12.1 ns bm_vector_bool_ranges_count/32768 28725 ns 83.7 ns bm_vector_bool_ranges_count/262144 229676 ns 662 ns bm_vector_bool_ranges_count/1048576 905574 ns 2625 ns ``` Reviewed By: #libc, ldionne Spies: arichardson, ldionne, libcxx-commits Differential Revision: https://reviews.llvm.org/D156956
-
Steven Wu authored
LazyAtomicPointer is a lock-free pointer that can coordinate concurrent writes to a pointer using a generator. Reviewed By: benlangmuir Differential Revision: https://reviews.llvm.org/D133714
-
Steven Wu authored
Add support for ThreadSafeAllocator, which is needed for a CAS implementation, which requires thread safe allocation for data storage. Reviewed By: dblaikie Differential Revision: https://reviews.llvm.org/D133713
-
Steven Wu authored
Add new functions in StringExtras to convert byte size type array to StringRef and vice versa. Reviewed By: benlangmuir, dexonsmith Differential Revision: https://reviews.llvm.org/D139035
-
Alex Fan authored
Implements for sv39 and sv48 VMA layout. Userspace only has access to the bottom half of vma range. The top half is used by kernel. There is no dedicated vsyscall or heap segment. PIE program is allocated to start at TASK_SIZE/3*2. Maximum ASLR is ARCH_MMAP_RND_BITS_MAX+PAGE_SHIFT=24+12=36 Loader, vdso and other libraries are allocated below stack from the top. Also change RestoreAddr to use 4 bits to accommodate MappingRiscv64_48 Reviewed by: MaskRay, dvyukov, asb, StephenFan, luismarques, jrtc27, hiraditya, vitalybuka Differential Revision: https://reviews.llvm.org/D145214
-
Aart Bik authored
This revision introduces a MapRef, which will support a future generalization beyond permutations (e.g. block sparsity). This revision also unifies the conversion/codegen paths for the sparse_tensor.new operation from file (eg. the readers). Note that more unification is planned as well as general affine dim2lvl and lvl2dim (all marked with TODOs).
-
Amara Emerson authored
After calling arm_sme_state, the -S assembly would show clang generating a “tbz xN, #0, Lbb”. However, disassembling it showed that it was actually encoded as “tbz xN, #32, Lbb”. The issue is that for TBZ, if you want a bit offset <32 you need to use the W variant, since the instruction overloads the top bit of the immediate.
-
qcolombet authored
When lowering `tensor.unpack`, we need to use the sizes of the destination tensor in the final `tensor.extract_slice` operation. Prior to this patch, when the destination tensor had dynamic dimensions, we would compute them from the result of the `tensor.unpack` operation instead of its destination argument. This would produce invalid IR because the `tensor.dim` operations would need to appear before the `tensor.extract_slice` operation, but the input of the `tensor.dim` operations would consume the final result of the lowering of `tensor.unpack`, which happens after the `tensor.extract_slice` operation. In other words, the definition wouldn't dominate its uses. I.e., we were generating: ``` %dynDim = tensor.dim %defLater, ... <-- %defLater defined below %res = tensor.extract_slice ..., %dynDim, ... %defLater = linalg.copy (ins %res) ``` Note: I checked the implementation of `lower_pack` and the code is correct as far as I can tell.
-
Kazu Hirata authored
This patch fixes: clang/lib/Basic/SourceManager.cpp:1979:64: error: 'greater' may not intend to support class template argument deduction [-Werror,-Wctad-maybe-unsupported]
-
Paul Robinson authored
This option will cause -E to preserve the #include directives for system headers, rather than expanding them into the output. This can greatly reduce the volume of preprocessed source text in a test case, making test case reduction simpler. Note that -fkeep-system-includes is not always appropriate. For example, if the problem you want to reproduce is induced by a system header file, it's better to expand those headers fully. If your source defines symbols that influence the content of a system header (e.g., _POSIX_SOURCE) then -E will eliminate the definition, potentially changing the meaning of the preprocessed source. If you use -isystem to point to non-system headers, for example to suppress warnings in third-party software, those will not be expanded and might make the preprocessed source less useful as a test case.
-
Paul Robinson authored
This will allow the raw_ostream to be redirected in a subsequent commit.
-
Jan Svoboda authored
This commit removes the list of SLocEntry offsets to preload eagerly from PCM files. Commit introducing this functionality (258ae54a) doesn't clarify why this would be more performant than the lazy approach used regularly. Currently, the only SLocEntry the reader is supposed to preload is the predefines buffer, but in my experience, it's not actually referenced in most modules, so the time spent deserializing its SLocEntry is wasted. This is especially noticeable in the dependency scanner, where this change brings 4.56% speedup on my benchmark.
-
Paul T Robinson authored
The #if now has a conditional expression, so a user can add `-D__CLANG_REWRITTEN_SYSTEM_INCLUDES` to include the system headers instead of using the expanded content, or `-D__CLANG_REWRITTEN_INCLUDES` to include all headers. Also added the filename to the comments it emits, to help identify where included text ends, making it easier to identify and remove the content of individual headers.
-
Markus Böck authored
-
spupyrev authored
Aggressive inlining might produce huge functions with >10K of basic blocks. Since BFI treats _all_ blocks and jumps as "hot" having non-negative (but perhaps small) weight, the current implementation can be slow, taking minutes to produce an layout. This change introduces a few modifications that significantly (up to 50x on some instances) speeds up the computation. Some notable changes: - reduced the maximum chain size to 512 (from the prior 4096); - introeuced MaxMergeDensityRatio param to avoid merging chains with very differen densities; - dropped a couple of params that seem unnecessary. Looking at some "offline" metrics (e.g., the number of created fall-throughs), there shouldn't be problems; in fact, I do see some metrics go up. But it might be hard/impossible to measure perf difference for such small changes. I did test the performance clang-14 binary and do not record a perf or i-cache-related differences. My 5 benchmarks, with ext-tsp runtime (the lower the better) and "tsp-score" (the higher the better). **Before**: - benchmark 1: reordering running time is 2486 milliseconds score: 125503458 (128.3102%) - benchmark 2: reordering running time is 3443 milliseconds score: 12613997277 (129.7495%) - benchmark 2: reordering running time is 1978 milliseconds score: 1315881613 (105.8991%) - benchmark 4: reordering running time is 7364 milliseconds score: 89513906284 (100.3413%) - benchmark 5: reordering running time is 372605 milliseconds score: 21292505965077 (99.9979%) **After**: - benchmark 1: reordering running time is 2498 milliseconds score: 125510418 (128.3173%) - benchmark 2: reordering running time is 3201 milliseconds score: 12614502162 (129.7547%) - benchmark 3: reordering running time is 2137 milliseconds score: 1315938168 (105.9036%) - benchmark 4: reordering running time is 6242 milliseconds score: 89518095837 (100.3460%) - benchmark 5: reordering running time is 5819 milliseconds score: 21292295939119 (99.9969%)
-
Stella Laurenzo authored
This reverts commit fc865c20. Triggering assert on X86: ``` iree-compile: /work/third_party/llvm-project/llvm/include/llvm/Support/Casting.h:662: decltype(auto) llvm::dyn_cast(From *) [To = llvm::PointerType, From = llvm::Type]: Assertion `detail::isPresent(Val) && "dyn_cast on a non-existent value"' failed. ``` See PR for comments and full stack trace.
-
PiJoules authored
The allocator should be tuned well enough for Fuchsia+RISCV.
-
Nitin John Raj authored
This patch adds minimal support for selecting G_SELECT. In the future we may want to fix this patch to select the other opcodes or handle that in the combiner.
-
LLVM GN Syncbot authored
-
Jonas Devlieghere authored
Add the ability to list all processes through the SB API. rdar://116188959
-
Brandon Wu authored
-
Philip Reames authored
The motivation of this change is simply to reduce test duplication. As can be seen in the (massive) test delta, we have many tests whose output differ only due to the use of addi on rv32 vs addiw on rv64 when the high bits are don't care. As an aside, we don't need to worry about the non-zero immediate restriction on the compressed variants because we're not directly forming the compressed variants. If we happen to get a zero immediate for the ADDI, then either a later optimization will strip the useless instruction or the encoder is responsible for not compressing the instruction.
-
Kazu Hirata authored
This patch fixes: llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:10832:12: error: variable 'Changed' set but not used [-Werror,-Wunused-but-set-variable]
-
Abhinav271828 authored
Modified `Fraction.reduce()` to work with negative fractions as well. Added tests to verify the implementation of arithmetic and relational operators on Fractions.
-
Craig Topper authored
Retain name for SExt->ZExt and AShr->LShr. Previously SExt->ZExt copied the name with a numeric suffix. AShr->LShr dropped it.
-
Andrzej Warzynski authored
This patch constrains the patterns for converting `vector.contract` to `vector.outerproduct` so that * the reduction dimension is _not unrolled_ if the corresponding dimension is scalable. This is necessary as the current lowering is incorrect for scalable dims. Indeed, the following unrolling for `vector.contract` would be invalid if the corresponding dimension was scalable (K is the size of the reduction dimension): ``` // K times. This is valid if K _is not_ scalable. %lhs = vector.extract %LHS[0] %rhs = vector.extract %RHS[0] vector.outerproduct %lhs, %rhs %lhs = vector.extract %LHS[1] %rhs = vector.extract %RHS[1] vector.outerproduct %lhs, %rhs // ... ``` Instead, a `for` loop should be generated: ``` // This would be valid regardless of whether K is scalable or not scf.for %k = 0 to K step 1 %lhs = vector.extract LHS[%k] %rhs = vector.extract RHS[%k] vector.outerproduct %lhs, %rhs ``` However, the lowering of: * `vector.extract` of vector slices with dynamic indices is incomplete and hence the implementation proposed above (with `scf.for`) wouldn't work just yet, i.e. it wouldn't be possible to lower it further. Instead, this patch disables unrolling in cases when the reduction dimension is scalable, i.e. where the generated code would be functionally incorrect. In order to document unsupported cases, a dedicated test file is added: * "vector-contract-to-outerproduct-transforms-unsupported.mlir" This is the first patch in a series of patches that strives to update these patterns (and to test them) for scalable vectors. Resolves #68400
-
- Oct 06, 2023
-
-
Anatoly Trosinenko authored
Fix test failure in non-assertion builds introduced by f1b2dd2a.
-
Jon Roelofs authored
-
Philip Reames authored
-
Ben Mudd authored
This patch adds support for salvaging TRUNC nodes during SelectionDAG, fixing LLVM issue #63076: https://github.com/llvm/llvm-project/issues/63076 Reviewed in: https://github.com/llvm/llvm-project/pull/66922
-
Valentin Clement (バレンタイン クレメン) authored
This patch updates the lowering of OpenACC routine directive to avoid creating duplicate acc.routine operations when all the clauses are identical. If clauses differ an error is raised.
-
Michael Buch authored
Split out the assertions that fail on Windows in preparation to XFAILing them. Drive-by change: * Add a missing `self.build()` call in `test_union_in_anon_namespace` * Fix formatting * Add expectedFailureWindows decorator
-
Anatoly Trosinenko authored
Moving instructions that are recognized as branch targets by BTI can result in runtime crash. In outliner tests, replaced "BRK 1" with "HINT 0" (a.k.a. NOP) as a generic outlinable instruction.
-
Casey Carter authored
-